Browse Source

提交代码

6 months ago
parent
commit
379ce94dd2
61 changed files with 2711 additions and 48 deletions
  1. 119 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/banner/controller/BannerController.java
  2. 21 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/banner/domain/BannerVo.java
  3. 21 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/banner/mapper/BannerVoMapper.java
  4. 21 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/banner/service/IBannerVoService.java
  5. 34 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/banner/service/impl/BannerVoServiceImpl.java
  6. 3 6
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/merchantWxpay/controller/MerchantWxpayController.java
  7. 1 1
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/merchantWxpay/domain/MerchantWxpayVo.java
  8. 2 2
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/merchantWxpay/mapper/MerchantWxpayVoMapper.java
  9. 2 5
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/merchantWxpay/service/IMerchantWxpayVoService.java
  10. 4 4
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/merchantWxpay/service/impl/MerchantWxpayVoServiceImpl.java
  11. 21 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/newProd/mapper/NewProdVoMapper.java
  12. 163 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/news/controller/NewsController.java
  13. 21 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/news/domain/NewsVo.java
  14. 21 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/news/mapper/NewsVoMapper.java
  15. 21 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/news/service/INewsVoService.java
  16. 32 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/news/service/impl/NewsVoServiceImpl.java
  17. 99 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/controller/PopularProdController.java
  18. 26 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/domain/PopularProdVo.java
  19. 21 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/mapper/PopularProdVoMapper.java
  20. 38 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/service/IPopularProdVoService.java
  21. 81 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/service/impl/PopularProdVoServiceImpl.java
  22. 3 3
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/controller/ProdInventoryController.java
  23. 3 3
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/controller/ProdInventoryOrderController.java
  24. 1 1
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/domain/ProdInventoryOrderVo.java
  25. 1 1
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/domain/ProdInventoryVo.java
  26. 2 2
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/mapper/ProdInventoryOrderVoMapper.java
  27. 2 2
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/mapper/ProdInventoryVoMapper.java
  28. 2 2
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/IProdInventoryOrderVoService.java
  29. 2 2
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/IProdInventoryVoService.java
  30. 6 6
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/impl/ProdInventoryOrderVoServiceImpl.java
  31. 4 4
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/impl/ProdInventoryVoServiceImpl.java
  32. 99 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/controller/SuggestProdController.java
  33. 26 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/domain/SuggestProdVo.java
  34. 21 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/mapper/SuggestProdVoMapper.java
  35. 38 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/service/ISuggestProdVoService.java
  36. 81 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/service/impl/SuggestProdVoServiceImpl.java
  37. 2 0
      08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/merchant/domain/MerchantProdVo.java
  38. 52 0
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/BannerVoMapper.xml
  39. 4 0
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/MerchantProdVoMapper.xml
  40. 51 0
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/NewProdVoMapper.xml
  41. 39 0
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/NewsVoMapper.xml
  42. 51 0
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/PopularProdVoMapper.xml
  43. 1 1
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/ProdInventoryOrderVoMapper.xml
  44. 1 1
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/ProdInventoryVoMapper.xml
  45. 51 0
      08.src/Xingxi/xingxi-admin/src/main/resources/mapper/SuggestProdVoMapper.xml
  46. 104 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/banner/add.html
  47. 103 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/banner/banner.html
  48. 66 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/banner/edit.html
  49. 263 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/newProd/newProd.html
  50. 45 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/news/add.html
  51. 34 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/news/edit.html
  52. 139 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/news/editPic.html
  53. 70 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/news/news.html
  54. 263 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/popularProd/popularProd.html
  55. 263 0
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/suggestProd/suggestProd.html
  56. 1 1
      08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/designer/add.html
  57. 31 0
      08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/enums/EBannerType.java
  58. 4 0
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/News/service/impl/NewsPicServiceImpl.java
  59. 5 0
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/News/service/impl/NewsServiceImpl.java
  60. 4 0
      08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/SuggestProd/service/impl/SuggestProdServiceImpl.java
  61. 1 1
      08.src/Xingxi/xingxi-system/src/main/resources/mapper/business/NewsPicMapper.xml

+ 119 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/banner/controller/BannerController.java

@@ -0,0 +1,119 @@
+package com.xingxi.web.controller.business.banner.controller;
+
+import com.xingxi.business.Banner.domain.Banner;
+import com.xingxi.business.Banner.service.IBannerService;
+import com.xingxi.common.annotation.Log;
+import com.xingxi.common.core.controller.BaseController;
+import com.xingxi.common.core.domain.AjaxResult;
+import com.xingxi.common.core.page.TableDataInfo;
+import com.xingxi.common.enums.BusinessType;
+import com.xingxi.common.utils.poi.ExcelUtil;
+import com.xingxi.web.controller.business.banner.domain.BannerVo;
+import com.xingxi.web.controller.business.banner.service.IBannerVoService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * bannerController
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+@Controller
+@RequestMapping("/business/banner")
+public class BannerController extends BaseController {
+    private String prefix = "business/banner";
+
+    @Resource
+    private IBannerService bannerService;
+    @Resource
+    private IBannerVoService bannerVoService;
+
+    @RequiresPermissions("business:banner:view")
+    @GetMapping()
+    public String banner() {
+        return prefix + "/banner";
+    }
+
+    /**
+     * 查询banner列表
+     */
+    @RequiresPermissions("business:banner:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(BannerVo bannerVo) {
+        startPage();
+        List<BannerVo> list = bannerVoService.selectBannerVoList(bannerVo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出banner列表
+     */
+    @RequiresPermissions("business:banner:export")
+    @Log(title = "banner", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(Banner banner) {
+        List<Banner> list = bannerService.selectBannerList(banner);
+        ExcelUtil<Banner> util = new ExcelUtil<>(Banner.class);
+        return util.exportExcel(list, "banner数据");
+    }
+
+    /**
+     * 新增banner
+     */
+    @GetMapping("/add")
+    public String add() {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存banner
+     */
+    @RequiresPermissions("business:banner:add")
+    @Log(title = "banner", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(Banner banner) {
+        return toAjax(bannerService.insertBanner(banner));
+    }
+
+    /**
+     * 修改banner
+     */
+    @RequiresPermissions("business:banner:edit")
+    @GetMapping("/edit/{bannerId}")
+    public String edit(@PathVariable("bannerId") Long bannerId, ModelMap mmap) {
+        Banner banner = bannerService.selectBannerByBannerId(bannerId);
+        mmap.put("banner", banner);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存banner
+     */
+    @RequiresPermissions("business:banner:edit")
+    @Log(title = "banner", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(Banner banner) {
+        return toAjax(bannerService.updateBanner(banner));
+    }
+
+    /**
+     * 删除banner
+     */
+    @RequiresPermissions("business:banner:remove")
+    @Log(title = "banner", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids) {
+        return toAjax(bannerService.deleteBannerByBannerIds(ids));
+    }
+}

+ 21 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/banner/domain/BannerVo.java

@@ -0,0 +1,21 @@
+package com.xingxi.web.controller.business.banner.domain;
+
+import com.xingxi.business.Banner.domain.Banner;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+/**
+ * bannerVo对象 t_banner
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString
+public class BannerVo extends Banner {
+    private static final long serialVersionUID = 1L;
+    // 商品名称
+    private String prodName;
+}

+ 21 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/banner/mapper/BannerVoMapper.java

@@ -0,0 +1,21 @@
+package com.xingxi.web.controller.business.banner.mapper;
+
+import com.xingxi.web.controller.business.banner.domain.BannerVo;
+
+import java.util.List;
+
+/**
+ * bannerVoMapper接口
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+public interface BannerVoMapper {
+    /**
+     * 查询bannerVo列表
+     *
+     * @param bannerVo bannerVo
+     * @return bannerVo集合
+     */
+    List<BannerVo> selectBannerVoList(BannerVo bannerVo);
+}

+ 21 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/banner/service/IBannerVoService.java

@@ -0,0 +1,21 @@
+package com.xingxi.web.controller.business.banner.service;
+
+import com.xingxi.web.controller.business.banner.domain.BannerVo;
+
+import java.util.List;
+
+/**
+ * bannerVoService接口
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+public interface IBannerVoService {
+    /**
+     * 查询banner列表
+     *
+     * @param bannerVo bannerVo
+     * @return bannerVo集合
+     */
+    List<BannerVo> selectBannerVoList(BannerVo bannerVo);
+}

+ 34 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/banner/service/impl/BannerVoServiceImpl.java

@@ -0,0 +1,34 @@
+package com.xingxi.web.controller.business.banner.service.impl;
+
+import com.xingxi.common.enums.EDelFlag;
+import com.xingxi.web.controller.business.banner.domain.BannerVo;
+import com.xingxi.web.controller.business.banner.mapper.BannerVoMapper;
+import com.xingxi.web.controller.business.banner.service.IBannerVoService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * bannerService业务层处理
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+@Service
+public class BannerVoServiceImpl implements IBannerVoService {
+    @Resource
+    private BannerVoMapper bannerVoMapper;
+
+    /**
+     * 查询bannerVo列表
+     *
+     * @param bannerVo bannerVo
+     * @return bannerVo
+     */
+    @Override
+    public List<BannerVo> selectBannerVoList(BannerVo bannerVo) {
+        bannerVo.setDelFlag(EDelFlag.NO.getVal());
+        return bannerVoMapper.selectBannerVoList(bannerVo);
+    }
+}

+ 3 - 6
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/MerchantWxpay/controller/MerchantWxpayController.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/merchantWxpay/controller/MerchantWxpayController.java

@@ -1,22 +1,19 @@
-package com.xingxi.web.controller.business.MerchantWxpay.controller;
+package com.xingxi.web.controller.business.merchantWxpay.controller;
 
 
 import com.xingxi.business.MerchantWxpay.domain.MerchantWxpay;
 import com.xingxi.business.MerchantWxpay.domain.MerchantWxpay;
 import com.xingxi.business.MerchantWxpay.service.IMerchantWxpayService;
 import com.xingxi.business.MerchantWxpay.service.IMerchantWxpayService;
 import com.xingxi.common.annotation.Log;
 import com.xingxi.common.annotation.Log;
 import com.xingxi.common.core.controller.BaseController;
 import com.xingxi.common.core.controller.BaseController;
 import com.xingxi.common.core.domain.AjaxResult;
 import com.xingxi.common.core.domain.AjaxResult;
-import com.xingxi.common.core.page.TableDataInfo;
 import com.xingxi.common.enums.BusinessType;
 import com.xingxi.common.enums.BusinessType;
-import com.xingxi.common.utils.poi.ExcelUtil;
-import com.xingxi.web.controller.business.MerchantWxpay.domain.MerchantWxpayVo;
-import com.xingxi.web.controller.business.MerchantWxpay.service.IMerchantWxpayVoService;
+import com.xingxi.web.controller.business.merchantWxpay.domain.MerchantWxpayVo;
+import com.xingxi.web.controller.business.merchantWxpay.service.IMerchantWxpayVoService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
-import java.util.List;
 
 
 /**
 /**
  * 店铺微信支付信息Controller
  * 店铺微信支付信息Controller

+ 1 - 1
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/MerchantWxpay/domain/MerchantWxpayVo.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/merchantWxpay/domain/MerchantWxpayVo.java

@@ -1,4 +1,4 @@
-package com.xingxi.web.controller.business.MerchantWxpay.domain;
+package com.xingxi.web.controller.business.merchantWxpay.domain;
 
 
 import com.xingxi.business.MerchantWxpay.domain.MerchantWxpay;
 import com.xingxi.business.MerchantWxpay.domain.MerchantWxpay;
 import lombok.Data;
 import lombok.Data;

+ 2 - 2
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/MerchantWxpay/mapper/MerchantWxpayVoMapper.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/merchantWxpay/mapper/MerchantWxpayVoMapper.java

@@ -1,6 +1,6 @@
-package com.xingxi.web.controller.business.MerchantWxpay.mapper;
+package com.xingxi.web.controller.business.merchantWxpay.mapper;
 
 
-import com.xingxi.web.controller.business.MerchantWxpay.domain.MerchantWxpayVo;
+import com.xingxi.web.controller.business.merchantWxpay.domain.MerchantWxpayVo;
 
 
 /**
 /**
  * 店铺微信支付信息Mapper接口
  * 店铺微信支付信息Mapper接口

+ 2 - 5
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/MerchantWxpay/service/IMerchantWxpayVoService.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/merchantWxpay/service/IMerchantWxpayVoService.java

@@ -1,9 +1,6 @@
-package com.xingxi.web.controller.business.MerchantWxpay.service;
+package com.xingxi.web.controller.business.merchantWxpay.service;
 
 
-import com.xingxi.business.MerchantWxpay.domain.MerchantWxpay;
-import com.xingxi.web.controller.business.MerchantWxpay.domain.MerchantWxpayVo;
-
-import java.util.List;
+import com.xingxi.web.controller.business.merchantWxpay.domain.MerchantWxpayVo;
 
 
 /**
 /**
  * 店铺微信支付信息Service接口
  * 店铺微信支付信息Service接口

+ 4 - 4
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/MerchantWxpay/service/impl/MerchantWxpayVoServiceImpl.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/merchantWxpay/service/impl/MerchantWxpayVoServiceImpl.java

@@ -1,8 +1,8 @@
-package com.xingxi.web.controller.business.MerchantWxpay.service.impl;
+package com.xingxi.web.controller.business.merchantWxpay.service.impl;
 
 
-import com.xingxi.web.controller.business.MerchantWxpay.domain.MerchantWxpayVo;
-import com.xingxi.web.controller.business.MerchantWxpay.mapper.MerchantWxpayVoMapper;
-import com.xingxi.web.controller.business.MerchantWxpay.service.IMerchantWxpayVoService;
+import com.xingxi.web.controller.business.merchantWxpay.domain.MerchantWxpayVo;
+import com.xingxi.web.controller.business.merchantWxpay.mapper.MerchantWxpayVoMapper;
+import com.xingxi.web.controller.business.merchantWxpay.service.IMerchantWxpayVoService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;

+ 21 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/newProd/mapper/NewProdVoMapper.java

@@ -0,0 +1,21 @@
+package com.xingxi.web.controller.business.newProd.mapper;
+
+import com.xingxi.web.controller.business.newProd.domain.NewProdVo;
+
+import java.util.List;
+
+/**
+ * 新品上架VoMapper接口
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+public interface NewProdVoMapper {
+    /**
+     * 查询新品上架Vo列表
+     *
+     * @param newProdVo 新品上架Vo
+     * @return 新品上架Vo集合
+     */
+    List<NewProdVo> selectNewProdVoList(NewProdVo newProdVo);
+}

+ 163 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/news/controller/NewsController.java

@@ -0,0 +1,163 @@
+package com.xingxi.web.controller.business.news.controller;
+
+import com.xingxi.business.News.domain.News;
+import com.xingxi.business.News.domain.NewsPic;
+import com.xingxi.business.News.service.INewsPicService;
+import com.xingxi.business.News.service.INewsService;
+import com.xingxi.common.annotation.Log;
+import com.xingxi.common.core.controller.BaseController;
+import com.xingxi.common.core.domain.AjaxResult;
+import com.xingxi.common.core.page.TableDataInfo;
+import com.xingxi.common.core.text.Convert;
+import com.xingxi.common.enums.BusinessType;
+import com.xingxi.common.enums.EDelFlag;
+import com.xingxi.common.utils.poi.ExcelUtil;
+import com.xingxi.web.controller.business.news.domain.NewsVo;
+import com.xingxi.web.controller.business.news.service.INewsVoService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 新闻广告Controller
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+@Controller
+@RequestMapping("/business/news")
+public class NewsController extends BaseController {
+    private String prefix = "business/news";
+
+    @Resource
+    private INewsService newsService;
+    @Resource
+    private INewsVoService newsVoService;
+    @Resource
+    private INewsPicService newsPicService;
+
+    @RequiresPermissions("business:news:view")
+    @GetMapping()
+    public String news() {
+        return prefix + "/news";
+    }
+
+    /**
+     * 查询新闻广告列表
+     */
+    @RequiresPermissions("business:news:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(NewsVo newsVo) {
+        startPage();
+        newsVo.setDelFlag(EDelFlag.NO.getVal());
+        List<NewsVo> list = newsVoService.selectNewsVoList(newsVo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出新闻广告列表
+     */
+    @RequiresPermissions("business:news:export")
+    @Log(title = "新闻广告", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(News news) {
+        List<News> list = newsService.selectNewsList(news);
+        ExcelUtil<News> util = new ExcelUtil<>(News.class);
+        return util.exportExcel(list, "新闻广告数据");
+    }
+
+    /**
+     * 新增新闻广告
+     */
+    @GetMapping("/add")
+    public String add() {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存新闻广告
+     */
+    @RequiresPermissions("business:news:add")
+    @Log(title = "新闻广告", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(News news) {
+        return toAjax(newsService.insertNews(news));
+    }
+
+    /**
+     * 修改新闻广告
+     */
+    @RequiresPermissions("business:news:edit")
+    @GetMapping("/edit/{newsId}")
+    public String edit(@PathVariable("newsId") Long newsId, ModelMap mmap) {
+        News news = newsService.selectNewsByNewsId(newsId);
+        mmap.put("news", news);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存新闻广告
+     */
+    @RequiresPermissions("business:news:edit")
+    @Log(title = "新闻广告", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(News news) {
+        return toAjax(newsService.updateNews(news));
+    }
+
+    /**
+     * 删除新闻广告
+     */
+    @RequiresPermissions("business:news:remove")
+    @Log(title = "新闻广告", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids) {
+        return toAjax(newsService.logicDeleteNewsByNewsIds(Convert.toStrArray(ids)));
+    }
+
+    /**
+     * 修改新闻广告图片
+     */
+    @RequiresPermissions("business:news:editPic")
+    @GetMapping("/editPic/{newsId}")
+    public String editPic(@PathVariable("newsId") Long newsId, ModelMap mmap) {
+        NewsPic cond = new NewsPic();
+        cond.setNewsId(newsId);
+        cond.setDelFlag(EDelFlag.NO.getVal());
+        List<NewsPic> resultList = newsPicService.selectNewsPicList(cond);
+        mmap.put("newsPics", resultList);
+        return prefix + "/editPic";
+    }
+
+    /**
+     * 添加商品图片
+     */
+    @RequiresPermissions("business:news:addPic")
+    @Log(title = "新闻图片", businessType = BusinessType.INSERT)
+    @PostMapping("/addNewsPic")
+    @ResponseBody
+    public AjaxResult addNewsPic(NewsPic newsPic) {
+        newsPicService.insertNewsPic(newsPic);
+        return AjaxResult.success(newsPic);
+    }
+
+    /**
+     * 删除商品图片
+     */
+    @RequiresPermissions("business:news:editPic")
+    @Log(title = "新闻图片", businessType = BusinessType.DELETE)
+    @PostMapping("/removeNewsPic")
+    @ResponseBody
+    public AjaxResult removeNewsPic(NewsPic newsPic) {
+        return toAjax(newsPicService.logicDeleteNewsPicById(newsPic.getId()));
+    }
+}

+ 21 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/news/domain/NewsVo.java

@@ -0,0 +1,21 @@
+package com.xingxi.web.controller.business.news.domain;
+
+import com.xingxi.business.News.domain.News;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+/**
+ * 新闻广告对象 t_news
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString
+public class NewsVo extends News {
+    private static final long serialVersionUID = 1L;
+    // 新闻URL
+    private String newsUrl;
+}

+ 21 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/news/mapper/NewsVoMapper.java

@@ -0,0 +1,21 @@
+package com.xingxi.web.controller.business.news.mapper;
+
+import com.xingxi.web.controller.business.news.domain.NewsVo;
+
+import java.util.List;
+
+/**
+ * 新闻广告VoMapper接口
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+public interface NewsVoMapper {
+    /**
+     * 查询新闻广告Vo列表
+     *
+     * @param newsVo 新闻广告Vo
+     * @return 新闻广告Vo集合
+     */
+    List<NewsVo> selectNewsVoList(NewsVo newsVo);
+}

+ 21 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/news/service/INewsVoService.java

@@ -0,0 +1,21 @@
+package com.xingxi.web.controller.business.news.service;
+
+import com.xingxi.web.controller.business.news.domain.NewsVo;
+
+import java.util.List;
+
+/**
+ * 新闻广告VoService接口
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+public interface INewsVoService {
+    /**
+     * 查询新闻广告Vo列表
+     *
+     * @param newsVo 新闻广告Vo
+     * @return 新闻广告Vo集合
+     */
+    List<NewsVo> selectNewsVoList(NewsVo newsVo);
+}

+ 32 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/news/service/impl/NewsVoServiceImpl.java

@@ -0,0 +1,32 @@
+package com.xingxi.web.controller.business.news.service.impl;
+
+import com.xingxi.web.controller.business.news.domain.NewsVo;
+import com.xingxi.web.controller.business.news.mapper.NewsVoMapper;
+import com.xingxi.web.controller.business.news.service.INewsVoService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 新闻广告Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+@Service
+public class NewsVoServiceImpl implements INewsVoService {
+    @Resource
+    private NewsVoMapper newsVoMapper;
+
+    /**
+     * 查询新闻广告列表
+     *
+     * @param newsVo 新闻广告
+     * @return 新闻广告
+     */
+    @Override
+    public List<NewsVo> selectNewsVoList(NewsVo newsVo) {
+        return newsVoMapper.selectNewsVoList(newsVo);
+    }
+}

+ 99 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/controller/PopularProdController.java

@@ -0,0 +1,99 @@
+package com.xingxi.web.controller.business.popular.controller;
+
+import com.xingxi.business.PopularProd.domain.PopularProd;
+import com.xingxi.business.PopularProd.service.IPopularProdService;
+import com.xingxi.common.annotation.Log;
+import com.xingxi.common.core.controller.BaseController;
+import com.xingxi.common.core.domain.AjaxResult;
+import com.xingxi.common.core.page.TableDataInfo;
+import com.xingxi.common.enums.BusinessType;
+import com.xingxi.common.utils.poi.ExcelUtil;
+import com.xingxi.web.controller.business.popular.domain.PopularProdVo;
+import com.xingxi.web.controller.business.popular.service.IPopularProdVoService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 今日热门Controller
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+@Controller
+@RequestMapping("/business/popularProd")
+public class PopularProdController extends BaseController {
+    private String prefix = "business/popularProd";
+
+    @Resource
+    private IPopularProdService popularProdService;
+    @Resource
+    private IPopularProdVoService popularProdVoService;
+
+    @RequiresPermissions("business:popularProd:view")
+    @GetMapping()
+    public String popularProd() {
+        return prefix + "/popularProd";
+    }
+
+    /**
+     * 查询今日热门列表
+     */
+    @RequiresPermissions("business:popularProd:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(PopularProdVo popularProdVo) {
+        startPage();
+        List<PopularProdVo> list = popularProdVoService.selectPopularProdVoList(popularProdVo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出今日热门列表
+     */
+    @RequiresPermissions("business:popularProd:export")
+    @Log(title = "今日热门", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(PopularProd popularProd) {
+        List<PopularProd> list = popularProdService.selectPopularProdList(popularProd);
+        ExcelUtil<PopularProd> util = new ExcelUtil<>(PopularProd.class);
+        return util.exportExcel(list, "今日热门数据");
+    }
+
+    /**
+     * 新增保存今日热门
+     */
+    @RequiresPermissions("business:popularProd:add")
+    @Log(title = "今日热门", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(PopularProd popularProd) {
+        return toAjax(popularProdService.insertPopularProd(popularProd));
+    }
+
+    /**
+     * 新增保存今日热门
+     */
+    @RequiresPermissions("business:popularProd:edit")
+    @Log(title = "今日热门", businessType = BusinessType.UPDATE)
+    @PostMapping("/editSort")
+    @ResponseBody
+    public AjaxResult editSort(@RequestBody List<PopularProd> popularProdList) {
+        return toAjax(popularProdVoService.updateSorts(popularProdList));
+    }
+
+    /**
+     * 删除今日热门
+     */
+    @RequiresPermissions("business:popularProd:remove")
+    @Log(title = "今日热门", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids) {
+        return toAjax(popularProdVoService.batchLogicDeletePopularProd(ids));
+    }
+}

+ 26 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/domain/PopularProdVo.java

@@ -0,0 +1,26 @@
+package com.xingxi.web.controller.business.popular.domain;
+
+import com.xingxi.business.PopularProd.domain.PopularProd;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+/**
+ * 今日热门 t_popular_prod
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString
+public class PopularProdVo extends PopularProd {
+    private static final long serialVersionUID = 1L;
+
+    //商品ID
+    private Long prodId;
+    //商品名称
+    private String prodName;
+    //商品属性名称
+    private String attrName;
+}

+ 21 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/mapper/PopularProdVoMapper.java

@@ -0,0 +1,21 @@
+package com.xingxi.web.controller.business.popular.mapper;
+
+import com.xingxi.web.controller.business.popular.domain.PopularProdVo;
+
+import java.util.List;
+
+/**
+ * 推荐商品VoMapper接口
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+public interface PopularProdVoMapper {
+    /**
+     * 查询推荐商品Vo列表
+     *
+     * @param popularProdVo 推荐商品Vo
+     * @return 推荐商品Vo集合
+     */
+    List<PopularProdVo> selectPopularProdVoList(PopularProdVo popularProdVo);
+}

+ 38 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/service/IPopularProdVoService.java

@@ -0,0 +1,38 @@
+package com.xingxi.web.controller.business.popular.service;
+
+import com.xingxi.business.PopularProd.domain.PopularProd;
+import com.xingxi.web.controller.business.popular.domain.PopularProdVo;
+
+import java.util.List;
+
+/**
+ * 今日热门Service接口
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+public interface IPopularProdVoService {
+    /**
+     * 查询今日热门列表
+     *
+     * @param popularProdVo 今日热门Vo
+     * @return 今日热门集合
+     */
+    List<PopularProdVo> selectPopularProdVoList(PopularProdVo popularProdVo);
+
+    /**
+     * 更新今日热门排序
+     *
+     * @param popularProdList 今日热门 集合
+     * @return 结果
+     */
+    int updateSorts(List<PopularProd> popularProdList);
+
+    /**
+     * 批量删除今日热门
+     *
+     * @param ids 今日热门ID
+     * @return 结果
+     */
+    int batchLogicDeletePopularProd(String ids);
+}

+ 81 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/popular/service/impl/PopularProdVoServiceImpl.java

@@ -0,0 +1,81 @@
+package com.xingxi.web.controller.business.popular.service.impl;
+
+import com.xingxi.business.PopularProd.domain.PopularProd;
+import com.xingxi.business.PopularProd.mapper.PopularProdMapper;
+import com.xingxi.common.core.text.Convert;
+import com.xingxi.common.enums.EDelFlag;
+import com.xingxi.common.utils.DateUtils;
+import com.xingxi.common.utils.ShiroUtils;
+import com.xingxi.web.controller.business.popular.service.IPopularProdVoService;
+import com.xingxi.web.controller.business.popular.domain.PopularProdVo;
+import com.xingxi.web.controller.business.popular.mapper.PopularProdVoMapper;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 今日热门Service业务层处理
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+@Service
+public class PopularProdVoServiceImpl implements IPopularProdVoService {
+    @Resource
+    private PopularProdMapper popularProdMapper;
+    @Resource
+    private PopularProdVoMapper popularProdVoMapper;
+
+    /**
+     * 查询今日热门Vo列表
+     *
+     * @param popularProdVo 今日热门Vo
+     * @return 今日热门Vo集合
+     */
+    @Override
+    public List<PopularProdVo> selectPopularProdVoList(PopularProdVo popularProdVo) {
+        popularProdVo.setDelFlag(EDelFlag.NO.getVal());
+        return popularProdVoMapper.selectPopularProdVoList(popularProdVo);
+    }
+
+    /**
+     * 更新今日热门排序
+     *
+     * @param popularProdList 今日热门 集合
+     * @return 结果
+     */
+    @Override
+    public int updateSorts(List<PopularProd> popularProdList) {
+        int effectRow = 0;
+        Date nowDate = DateUtils.getNowDate();
+        for (PopularProd popularProd : popularProdList) {
+            popularProd.setUpdateUser(ShiroUtils.getLoginName());
+            popularProd.setUpdateTime(nowDate);
+            effectRow += popularProdMapper.updatePopularProd(popularProd);
+        }
+        return effectRow;
+    }
+
+    /**
+     * 批量删除今日热门
+     *
+     * @param ids 今日热门ID
+     * @return 结果
+     */
+    @Override
+    public int batchLogicDeletePopularProd(String ids) {
+        String[] idList = Convert.toStrArray(ids);
+        int effectRow = 0;
+        for (String id : idList) {
+            PopularProd popularProd = new PopularProd();
+            popularProd.setId(Long.parseLong(id));
+            popularProd.setDelFlag(EDelFlag.YES.getVal());
+            popularProd.setUpdateUser(ShiroUtils.getLoginName());
+            popularProd.setUpdateTime(DateUtils.getNowDate());
+            effectRow += popularProdMapper.updatePopularProd(popularProd);
+        }
+        return effectRow;
+    }
+}

+ 3 - 3
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/ProdInventory/controller/ProdInventoryController.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/controller/ProdInventoryController.java

@@ -1,4 +1,4 @@
-package com.xingxi.web.controller.business.ProdInventory.controller;
+package com.xingxi.web.controller.business.prodInventory.controller;
 
 
 import com.xingxi.business.ProdInventory.domain.ProdInventoryBill;
 import com.xingxi.business.ProdInventory.domain.ProdInventoryBill;
 import com.xingxi.business.ProdInventory.service.IProdInventoryBillService;
 import com.xingxi.business.ProdInventory.service.IProdInventoryBillService;
@@ -7,8 +7,8 @@ import com.xingxi.common.core.controller.BaseController;
 import com.xingxi.common.core.domain.AjaxResult;
 import com.xingxi.common.core.domain.AjaxResult;
 import com.xingxi.common.core.page.TableDataInfo;
 import com.xingxi.common.core.page.TableDataInfo;
 import com.xingxi.common.enums.BusinessType;
 import com.xingxi.common.enums.BusinessType;
-import com.xingxi.web.controller.business.ProdInventory.domain.ProdInventoryVo;
-import com.xingxi.web.controller.business.ProdInventory.service.IProdInventoryVoService;
+import com.xingxi.web.controller.business.prodInventory.domain.ProdInventoryVo;
+import com.xingxi.web.controller.business.prodInventory.service.IProdInventoryVoService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.ui.ModelMap;

+ 3 - 3
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/ProdInventory/controller/ProdInventoryOrderController.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/controller/ProdInventoryOrderController.java

@@ -1,4 +1,4 @@
-package com.xingxi.web.controller.business.ProdInventory.controller;
+package com.xingxi.web.controller.business.prodInventory.controller;
 
 
 import com.xingxi.business.ProdInventory.domain.ProdInventoryOrder;
 import com.xingxi.business.ProdInventory.domain.ProdInventoryOrder;
 import com.xingxi.business.ProdInventory.service.IProdInventoryOrderService;
 import com.xingxi.business.ProdInventory.service.IProdInventoryOrderService;
@@ -7,8 +7,8 @@ import com.xingxi.common.core.controller.BaseController;
 import com.xingxi.common.core.domain.AjaxResult;
 import com.xingxi.common.core.domain.AjaxResult;
 import com.xingxi.common.core.page.TableDataInfo;
 import com.xingxi.common.core.page.TableDataInfo;
 import com.xingxi.common.enums.BusinessType;
 import com.xingxi.common.enums.BusinessType;
-import com.xingxi.web.controller.business.ProdInventory.domain.ProdInventoryOrderVo;
-import com.xingxi.web.controller.business.ProdInventory.service.IProdInventoryOrderVoService;
+import com.xingxi.web.controller.business.prodInventory.domain.ProdInventoryOrderVo;
+import com.xingxi.web.controller.business.prodInventory.service.IProdInventoryOrderVoService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.ui.ModelMap;

+ 1 - 1
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/ProdInventory/domain/ProdInventoryOrderVo.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/domain/ProdInventoryOrderVo.java

@@ -1,4 +1,4 @@
-package com.xingxi.web.controller.business.ProdInventory.domain;
+package com.xingxi.web.controller.business.prodInventory.domain;
 
 
 import com.xingxi.business.ProdInventory.domain.ProdInventoryOrder;
 import com.xingxi.business.ProdInventory.domain.ProdInventoryOrder;
 import com.xingxi.business.ProdInventory.domain.ProdInventoryOrderDetail;
 import com.xingxi.business.ProdInventory.domain.ProdInventoryOrderDetail;

+ 1 - 1
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/ProdInventory/domain/ProdInventoryVo.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/domain/ProdInventoryVo.java

@@ -1,4 +1,4 @@
-package com.xingxi.web.controller.business.ProdInventory.domain;
+package com.xingxi.web.controller.business.prodInventory.domain;
 
 
 import com.xingxi.business.ProdInventory.domain.ProdInventory;
 import com.xingxi.business.ProdInventory.domain.ProdInventory;
 import lombok.Data;
 import lombok.Data;

+ 2 - 2
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/ProdInventory/mapper/ProdInventoryOrderVoMapper.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/mapper/ProdInventoryOrderVoMapper.java

@@ -1,6 +1,6 @@
-package com.xingxi.web.controller.business.ProdInventory.mapper;
+package com.xingxi.web.controller.business.prodInventory.mapper;
 
 
-import com.xingxi.web.controller.business.ProdInventory.domain.ProdInventoryOrderVo;
+import com.xingxi.web.controller.business.prodInventory.domain.ProdInventoryOrderVo;
 
 
 import java.util.List;
 import java.util.List;
 
 

+ 2 - 2
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/ProdInventory/mapper/ProdInventoryVoMapper.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/mapper/ProdInventoryVoMapper.java

@@ -1,6 +1,6 @@
-package com.xingxi.web.controller.business.ProdInventory.mapper;
+package com.xingxi.web.controller.business.prodInventory.mapper;
 
 
-import com.xingxi.web.controller.business.ProdInventory.domain.ProdInventoryVo;
+import com.xingxi.web.controller.business.prodInventory.domain.ProdInventoryVo;
 
 
 import java.util.List;
 import java.util.List;
 
 

+ 2 - 2
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/ProdInventory/service/IProdInventoryOrderVoService.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/IProdInventoryOrderVoService.java

@@ -1,6 +1,6 @@
-package com.xingxi.web.controller.business.ProdInventory.service;
+package com.xingxi.web.controller.business.prodInventory.service;
 
 
-import com.xingxi.web.controller.business.ProdInventory.domain.ProdInventoryOrderVo;
+import com.xingxi.web.controller.business.prodInventory.domain.ProdInventoryOrderVo;
 
 
 import java.util.List;
 import java.util.List;
 
 

+ 2 - 2
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/ProdInventory/service/IProdInventoryVoService.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/IProdInventoryVoService.java

@@ -1,6 +1,6 @@
-package com.xingxi.web.controller.business.ProdInventory.service;
+package com.xingxi.web.controller.business.prodInventory.service;
 
 
-import com.xingxi.web.controller.business.ProdInventory.domain.ProdInventoryVo;
+import com.xingxi.web.controller.business.prodInventory.domain.ProdInventoryVo;
 
 
 import java.util.List;
 import java.util.List;
 
 

+ 6 - 6
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/ProdInventory/service/impl/ProdInventoryOrderVoServiceImpl.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/impl/ProdInventoryOrderVoServiceImpl.java

@@ -1,4 +1,4 @@
-package com.xingxi.web.controller.business.ProdInventory.service.impl;
+package com.xingxi.web.controller.business.prodInventory.service.impl;
 
 
 import com.xingxi.business.ProdInventory.domain.ProdInventory;
 import com.xingxi.business.ProdInventory.domain.ProdInventory;
 import com.xingxi.business.ProdInventory.domain.ProdInventoryBill;
 import com.xingxi.business.ProdInventory.domain.ProdInventoryBill;
@@ -11,11 +11,11 @@ import com.xingxi.common.enums.EInventoryBillType;
 import com.xingxi.common.utils.DateUtils;
 import com.xingxi.common.utils.DateUtils;
 import com.xingxi.common.utils.ShiroUtils;
 import com.xingxi.common.utils.ShiroUtils;
 import com.xingxi.common.utils.bean.BeanUtils;
 import com.xingxi.common.utils.bean.BeanUtils;
-import com.xingxi.web.controller.business.ProdInventory.domain.ProdInventoryOrderVo;
-import com.xingxi.web.controller.business.ProdInventory.domain.ProdInventoryVo;
-import com.xingxi.web.controller.business.ProdInventory.mapper.ProdInventoryOrderVoMapper;
-import com.xingxi.web.controller.business.ProdInventory.mapper.ProdInventoryVoMapper;
-import com.xingxi.web.controller.business.ProdInventory.service.IProdInventoryOrderVoService;
+import com.xingxi.web.controller.business.prodInventory.domain.ProdInventoryOrderVo;
+import com.xingxi.web.controller.business.prodInventory.domain.ProdInventoryVo;
+import com.xingxi.web.controller.business.prodInventory.mapper.ProdInventoryOrderVoMapper;
+import com.xingxi.web.controller.business.prodInventory.mapper.ProdInventoryVoMapper;
+import com.xingxi.web.controller.business.prodInventory.service.IProdInventoryOrderVoService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;

+ 4 - 4
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/ProdInventory/service/impl/ProdInventoryVoServiceImpl.java → 08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/prodInventory/service/impl/ProdInventoryVoServiceImpl.java

@@ -1,4 +1,4 @@
-package com.xingxi.web.controller.business.ProdInventory.service.impl;
+package com.xingxi.web.controller.business.prodInventory.service.impl;
 
 
 import com.xingxi.business.ProdInventory.domain.ProdInventory;
 import com.xingxi.business.ProdInventory.domain.ProdInventory;
 import com.xingxi.business.ProdInventory.domain.ProdInventoryBill;
 import com.xingxi.business.ProdInventory.domain.ProdInventoryBill;
@@ -14,9 +14,9 @@ import com.xingxi.common.enums.EInventoryBillReason;
 import com.xingxi.common.utils.DateUtils;
 import com.xingxi.common.utils.DateUtils;
 import com.xingxi.common.utils.ShiroUtils;
 import com.xingxi.common.utils.ShiroUtils;
 import com.xingxi.common.utils.bean.BeanUtils;
 import com.xingxi.common.utils.bean.BeanUtils;
-import com.xingxi.web.controller.business.ProdInventory.domain.ProdInventoryVo;
-import com.xingxi.web.controller.business.ProdInventory.mapper.ProdInventoryVoMapper;
-import com.xingxi.web.controller.business.ProdInventory.service.IProdInventoryVoService;
+import com.xingxi.web.controller.business.prodInventory.domain.ProdInventoryVo;
+import com.xingxi.web.controller.business.prodInventory.mapper.ProdInventoryVoMapper;
+import com.xingxi.web.controller.business.prodInventory.service.IProdInventoryVoService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;

+ 99 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/controller/SuggestProdController.java

@@ -0,0 +1,99 @@
+package com.xingxi.web.controller.business.suggest.controller;
+
+import com.xingxi.business.SuggestProd.domain.SuggestProd;
+import com.xingxi.business.SuggestProd.service.ISuggestProdService;
+import com.xingxi.common.annotation.Log;
+import com.xingxi.common.core.controller.BaseController;
+import com.xingxi.common.core.domain.AjaxResult;
+import com.xingxi.common.core.page.TableDataInfo;
+import com.xingxi.common.enums.BusinessType;
+import com.xingxi.common.utils.poi.ExcelUtil;
+import com.xingxi.web.controller.business.suggest.domain.SuggestProdVo;
+import com.xingxi.web.controller.business.suggest.service.ISuggestProdVoService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 推荐商品Controller
+ *
+ * @author ruoyi
+ * @date 2025-05-15
+ */
+@Controller
+@RequestMapping("/business/suggestProd")
+public class SuggestProdController extends BaseController {
+    private String prefix = "business/suggestProd";
+
+    @Resource
+    private ISuggestProdService suggestProdService;
+    @Resource
+    private ISuggestProdVoService suggestProdVoService;
+
+    @RequiresPermissions("business:suggestProd:view")
+    @GetMapping()
+    public String suggestProd() {
+        return prefix + "/suggestProd";
+    }
+
+    /**
+     * 查询推荐商品列表
+     */
+    @RequiresPermissions("business:suggestProd:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SuggestProdVo suggestProdVo) {
+        startPage();
+        List<SuggestProdVo> list = suggestProdVoService.selectSuggestProdVoList(suggestProdVo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出推荐商品列表
+     */
+    @RequiresPermissions("business:suggestProd:export")
+    @Log(title = "推荐商品", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SuggestProd suggestProd) {
+        List<SuggestProd> list = suggestProdService.selectSuggestProdList(suggestProd);
+        ExcelUtil<SuggestProd> util = new ExcelUtil<>(SuggestProd.class);
+        return util.exportExcel(list, "推荐商品数据");
+    }
+
+    /**
+     * 新增保存推荐商品
+     */
+    @RequiresPermissions("business:suggestProd:add")
+    @Log(title = "推荐商品", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(SuggestProd suggestProd) {
+        return toAjax(suggestProdService.insertSuggestProd(suggestProd));
+    }
+
+    /**
+     * 新增保存推荐商品
+     */
+    @RequiresPermissions("business:suggestProd:edit")
+    @Log(title = "推荐商品", businessType = BusinessType.UPDATE)
+    @PostMapping("/editSort")
+    @ResponseBody
+    public AjaxResult editSort(@RequestBody List<SuggestProd> suggestProdList) {
+        return toAjax(suggestProdVoService.updateSorts(suggestProdList));
+    }
+
+    /**
+     * 删除推荐商品
+     */
+    @RequiresPermissions("business:suggestProd:remove")
+    @Log(title = "推荐商品", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids) {
+        return toAjax(suggestProdVoService.batchLogicDeleteSuggestProd(ids));
+    }
+}

+ 26 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/domain/SuggestProdVo.java

@@ -0,0 +1,26 @@
+package com.xingxi.web.controller.business.suggest.domain;
+
+import com.xingxi.business.SuggestProd.domain.SuggestProd;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+/**
+ * 推荐商品 t_suggest_prod
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString
+public class SuggestProdVo extends SuggestProd {
+    private static final long serialVersionUID = 1L;
+
+    //商品ID
+    private Long prodId;
+    //商品名称
+    private String prodName;
+    //商品属性名称
+    private String attrName;
+}

+ 21 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/mapper/SuggestProdVoMapper.java

@@ -0,0 +1,21 @@
+package com.xingxi.web.controller.business.suggest.mapper;
+
+import com.xingxi.web.controller.business.suggest.domain.SuggestProdVo;
+
+import java.util.List;
+
+/**
+ * 推荐商品VoMapper接口
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+public interface SuggestProdVoMapper {
+    /**
+     * 查询推荐商品Vo列表
+     *
+     * @param suggestProdVo 推荐商品Vo
+     * @return 推荐商品Vo集合
+     */
+    List<SuggestProdVo> selectSuggestProdVoList(SuggestProdVo suggestProdVo);
+}

+ 38 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/service/ISuggestProdVoService.java

@@ -0,0 +1,38 @@
+package com.xingxi.web.controller.business.suggest.service;
+
+import com.xingxi.business.SuggestProd.domain.SuggestProd;
+import com.xingxi.web.controller.business.suggest.domain.SuggestProdVo;
+
+import java.util.List;
+
+/**
+ * 推荐商品Service接口
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+public interface ISuggestProdVoService {
+    /**
+     * 查询推荐商品列表
+     *
+     * @param suggestProdVo 推荐商品Vo
+     * @return 推荐商品集合
+     */
+    List<SuggestProdVo> selectSuggestProdVoList(SuggestProdVo suggestProdVo);
+
+    /**
+     * 更新推荐商品排序
+     *
+     * @param suggestProdList 推荐商品 集合
+     * @return 结果
+     */
+    int updateSorts(List<SuggestProd> suggestProdList);
+
+    /**
+     * 批量删除推荐商品
+     *
+     * @param ids 推荐商品ID
+     * @return 结果
+     */
+    int batchLogicDeleteSuggestProd(String ids);
+}

+ 81 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/business/suggest/service/impl/SuggestProdVoServiceImpl.java

@@ -0,0 +1,81 @@
+package com.xingxi.web.controller.business.suggest.service.impl;
+
+import com.xingxi.business.SuggestProd.domain.SuggestProd;
+import com.xingxi.business.SuggestProd.mapper.SuggestProdMapper;
+import com.xingxi.common.core.text.Convert;
+import com.xingxi.common.enums.EDelFlag;
+import com.xingxi.common.utils.DateUtils;
+import com.xingxi.common.utils.ShiroUtils;
+import com.xingxi.web.controller.business.suggest.domain.SuggestProdVo;
+import com.xingxi.web.controller.business.suggest.mapper.SuggestProdVoMapper;
+import com.xingxi.web.controller.business.suggest.service.ISuggestProdVoService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 推荐商品Service业务层处理
+ *
+ * @author xingxi
+ * @date 2025-03-06
+ */
+@Service
+public class SuggestProdVoServiceImpl implements ISuggestProdVoService {
+    @Resource
+    private SuggestProdMapper suggestProdMapper;
+    @Resource
+    private SuggestProdVoMapper suggestProdVoMapper;
+
+    /**
+     * 查询推荐商品Vo列表
+     *
+     * @param suggestProdVo 推荐商品Vo
+     * @return 推荐商品Vo集合
+     */
+    @Override
+    public List<SuggestProdVo> selectSuggestProdVoList(SuggestProdVo suggestProdVo) {
+        suggestProdVo.setDelFlag(EDelFlag.NO.getVal());
+        return suggestProdVoMapper.selectSuggestProdVoList(suggestProdVo);
+    }
+
+    /**
+     * 更新推荐商品排序
+     *
+     * @param suggestProdList 推荐商品 集合
+     * @return 结果
+     */
+    @Override
+    public int updateSorts(List<SuggestProd> suggestProdList) {
+        int effectRow = 0;
+        Date nowDate = DateUtils.getNowDate();
+        for (SuggestProd suggestProd : suggestProdList) {
+            suggestProd.setUpdateUser(ShiroUtils.getLoginName());
+            suggestProd.setUpdateTime(nowDate);
+            effectRow += suggestProdMapper.updateSuggestProd(suggestProd);
+        }
+        return effectRow;
+    }
+
+    /**
+     * 批量删除推荐商品
+     *
+     * @param ids 推荐商品ID
+     * @return 结果
+     */
+    @Override
+    public int batchLogicDeleteSuggestProd(String ids) {
+        String[] idList = Convert.toStrArray(ids);
+        int effectRow = 0;
+        for (String id : idList) {
+            SuggestProd suggestProd = new SuggestProd();
+            suggestProd.setId(Long.parseLong(id));
+            suggestProd.setDelFlag(EDelFlag.YES.getVal());
+            suggestProd.setUpdateUser(ShiroUtils.getLoginName());
+            suggestProd.setUpdateTime(DateUtils.getNowDate());
+            effectRow += suggestProdMapper.updateSuggestProd(suggestProd);
+        }
+        return effectRow;
+    }
+}

+ 2 - 0
08.src/Xingxi/xingxi-admin/src/main/java/com/xingxi/web/controller/master/merchant/domain/MerchantProdVo.java

@@ -17,6 +17,8 @@ import lombok.ToString;
 public class MerchantProdVo extends MerchantProd {
 public class MerchantProdVo extends MerchantProd {
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
+    //店铺名称
+    private String mercName;
     //商品名称
     //商品名称
     private String prodName;
     private String prodName;
 
 

+ 52 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/BannerVoMapper.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xingxi.web.controller.business.banner.mapper.BannerVoMapper">
+    <resultMap type="BannerVo" id="BannerVoResult">
+        <result property="bannerId"     column="bannerId"   />
+        <result property="bannerUrl"    column="bannerUrl"  />
+        <result property="bannerType"   column="bannerType" />
+        <result property="prodId"       column="prodId"     />
+        <result property="newsId"       column="newsId"     />
+        <result property="sort"         column="sort"       />
+        <result property="delFlag"      column="delFlag"    />
+        <result property="createUser"   column="createUser" />
+        <result property="createTime"   column="createTime" />
+        <result property="updateUser"   column="updateUser" />
+        <result property="updateTime"   column="updateTime" />
+        <result property="proName"      column="proName" />
+    </resultMap>
+
+    <sql id="selectBannerVo">
+        select t_banner.bannerId
+             , t_banner.bannerUrl
+             , t_banner.bannerType
+             , t_banner.prodId
+             , t_banner.newsId
+             , t_banner.sort
+             , t_banner.delFlag
+             , t_banner.createUser
+             , t_banner.createTime
+             , t_banner.updateUser
+             , t_banner.updateTime
+             , m_prod.prodName
+        from t_banner
+        left join m_prod on t_banner.prodId = m_prod.id
+    </sql>
+
+    <select id="selectBannerVoList" parameterType="BannerVo" resultMap="BannerVoResult">
+        <include refid="selectBannerVo"/>
+        <where>  
+            <if test="bannerUrl != null  and bannerUrl != ''"> and t_banner.bannerUrl = #{bannerUrl}</if>
+            <if test="bannerType != null  and bannerType != ''"> and t_banner.bannerType = #{bannerType}</if>
+            <if test="prodId != null "> and t_banner.prodId = #{prodId}</if>
+            <if test="newsId != null "> and t_banner.newsId = #{newsId}</if>
+            <if test="sort != null "> and t_banner.sort = #{sort}</if>
+            <if test="delFlag != null  and delFlag != ''"> and t_banner.delFlag = #{delFlag}</if>
+            <if test="createUser != null  and createUser != ''"> and t_banner.createUser = #{createUser}</if>
+            <if test="createTime != null "> and t_banner.createTime = #{createTime}</if>
+            <if test="updateUser != null  and updateUser != ''"> and t_banner.updateUser = #{updateUser}</if>
+            <if test="updateTime != null "> and t_banner.updateTime = #{updateTime}</if>
+            <if test="prodName != null  and prodName != ''"> and m_prod.prodName like concat('%', #{prodName}, '%')</if>
+        </where>
+    </select>
+</mapper>

+ 4 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/MerchantProdVoMapper.xml

@@ -13,6 +13,7 @@
         <result property="createTime"   column="createTime"     />
         <result property="createTime"   column="createTime"     />
         <result property="updateUser"   column="updateUser"     />
         <result property="updateUser"   column="updateUser"     />
         <result property="updateTime"   column="updateTime"     />
         <result property="updateTime"   column="updateTime"     />
+        <result property="mercName"     column="mercName"       />
         <result property="prodName"     column="prodName"       />
         <result property="prodName"     column="prodName"       />
         <result property="attrName"     column="attrName"       />
         <result property="attrName"     column="attrName"       />
     </resultMap>
     </resultMap>
@@ -24,9 +25,11 @@
              , m_merchant_prod.prodAttrId
              , m_merchant_prod.prodAttrId
              , m_merchant_prod.shelfTime
              , m_merchant_prod.shelfTime
              , m_merchant_prod.shelfFlag
              , m_merchant_prod.shelfFlag
+             , m_merchant.mercName
              , m_prod.prodName
              , m_prod.prodName
              , m_prod_attr.attrName
              , m_prod_attr.attrName
         from m_merchant_prod
         from m_merchant_prod
+        inner join m_merchant on m_merchant.mercId = m_merchant_prod.mercId
         inner join m_prod on m_prod.id = m_merchant_prod.prodId
         inner join m_prod on m_prod.id = m_merchant_prod.prodId
         inner join m_prod_attr on m_prod_attr.prodAttrId = m_merchant_prod.prodAttrId
         inner join m_prod_attr on m_prod_attr.prodAttrId = m_merchant_prod.prodAttrId
     </sql>
     </sql>
@@ -54,6 +57,7 @@
                 and date_format(m_merchant_prod.shelfTime,'%y%m%d') &gt;= date_format(#{shelfTimeTo},'%y%m%d')
                 and date_format(m_merchant_prod.shelfTime,'%y%m%d') &gt;= date_format(#{shelfTimeTo},'%y%m%d')
             </if>
             </if>
             <if test="delFlag != null and delFlag != ''"> and m_merchant_prod.delFlag = #{delFlag}</if>
             <if test="delFlag != null and delFlag != ''"> and m_merchant_prod.delFlag = #{delFlag}</if>
+            <if test="mercName != null and mercName != ''"> and m_merchant.mercName like concat('%', #{mercName}, '%')</if>
             <if test="prodName != null and prodName != ''"> and m_prod.prodName like concat('%', #{prodName}, '%')</if>
             <if test="prodName != null and prodName != ''"> and m_prod.prodName like concat('%', #{prodName}, '%')</if>
             <if test="attrName != null  and attrName != ''"> and m_prod_attr.attrName like concat('%', #{attrName}, '%')</if>
             <if test="attrName != null  and attrName != ''"> and m_prod_attr.attrName like concat('%', #{attrName}, '%')</if>
         </where>
         </where>

+ 51 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/NewProdVoMapper.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xingxi.web.controller.business.newProd.mapper.NewProdVoMapper">
+    <resultMap type="NewProdVo" id="NewProdVoResult">
+        <result property="id"           column="id"         />
+        <result property="mercProdId"   column="mercProdId" />
+        <result property="sort"         column="sort"       />
+        <result property="delFlag"      column="delFlag"    />
+        <result property="createUser"   column="createUser" />
+        <result property="createTime"   column="createTime" />
+        <result property="updateUser"   column="updateUser" />
+        <result property="updateTime"   column="updateTime" />
+        <result property="prodId"       column="prodId"     />
+        <result property="prodName"     column="prodName"   />
+        <result property="attrName"     column="attrName"   />
+    </resultMap>
+
+    <sql id="selectNewProdVo">
+        select t_new_prod.id
+             , t_new_prod.mercProdId
+             , t_new_prod.sort
+             , t_new_prod.delFlag
+             , t_new_prod.createUser
+             , t_new_prod.createTime
+             , t_new_prod.updateUser
+             , t_new_prod.updateTime
+             , m_merchant_prod.prodId
+             , m_prod.prodName
+             , m_prod_attr.attrName
+        from t_new_prod
+        inner join m_merchant_prod on m_merchant_prod.mercProdId = t_new_prod.mercProdId
+        inner join m_prod on m_prod.id = m_merchant_prod.prodId
+        inner join m_prod_attr on m_prod_attr.prodId = m_merchant_prod.prodId and m_prod_attr.prodAttrId = m_merchant_prod.prodAttrId
+    </sql>
+
+    <select id="selectNewProdVoList" parameterType="NewProdVo" resultMap="NewProdVoResult">
+        <include refid="selectNewProdVo"/>
+        <where>  
+            <if test="mercProdId != null "> and t_new_prod.mercProdId = #{mercProdId}</if>
+            <if test="sort != null "> and t_new_prod.sort = #{sort}</if>
+            <if test="delFlag != null  and delFlag != ''"> and t_new_prod.delFlag = #{delFlag}</if>
+            <if test="createUser != null  and createUser != ''"> and t_new_prod.createUser = #{createUser}</if>
+            <if test="createTime != null "> and t_new_prod.createTime = #{createTime}</if>
+            <if test="updateUser != null  and updateUser != ''"> and t_new_prod.updateUser = #{updateUser}</if>
+            <if test="updateTime != null "> and t_new_prod.updateTime = #{updateTime}</if>
+            <if test="prodName != null  and prodName != ''"> and m_prod.prodName like concat('%', #{prodName}, '%')</if>
+            <if test="attrName != null  and attrName != ''"> and m_prod_attr.attrName like concat('%', #{attrName}, '%')</if>
+        </where>
+        order by t_new_prod.sort
+    </select>
+</mapper>

+ 39 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/NewsVoMapper.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xingxi.web.controller.business.news.mapper.NewsVoMapper">
+    <resultMap type="NewsVo" id="NewsVoResult">
+        <id     property="newsId"       column="newsId"   />
+        <result property="newsContext"  column="newsContext" />
+        <result property="delFlag"      column="delFlag"    />
+        <result property="createUser"   column="createUser" />
+        <result property="createTime"   column="createTime" />
+        <result property="updateUser"   column="updateUser" />
+        <result property="updateTime"   column="updateTime" />
+        <result property="newsUrl"      column="newsUrl" />
+    </resultMap>
+
+    <sql id="selectNewsVo">
+        select t_news.newsId
+             , t_news.newsContext
+             , t_news.delFlag
+             , t_news.createUser
+             , t_news.createTime
+             , t_news.updateUser
+             , t_news.updateTime
+             , t_news_pic.newsUrl
+        from t_news
+        left join t_news_pic on t_news_pic.newsId = t_news.newsId
+    </sql>
+
+    <select id="selectNewsVoList" parameterType="NewsVo" resultMap="NewsVoResult">
+        <include refid="selectNewsVo"/>
+        <where>  
+            <if test="newsId != null "> and t_news.newsId = #{newsId}</if>
+            <if test="delFlag != null  and delFlag != ''"> and t_news.delFlag = #{delFlag}</if>
+            <if test="createUser != null  and createUser != ''"> and t_news.createUser = #{createUser}</if>
+            <if test="createTime != null "> and t_news.createTime = #{createTime}</if>
+            <if test="updateUser != null  and updateUser != ''"> and t_news.updateUser = #{updateUser}</if>
+            <if test="updateTime != null "> and t_news.updateTime = #{updateTime}</if>
+        </where>
+    </select>
+</mapper>

+ 51 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/PopularProdVoMapper.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xingxi.web.controller.business.popular.mapper.PopularProdVoMapper">
+    <resultMap type="PopularProdVo" id="PopularProdVoResult">
+        <result property="id"           column="id"         />
+        <result property="mercProdId"   column="mercProdId" />
+        <result property="sort"         column="sort"       />
+        <result property="delFlag"      column="delFlag"    />
+        <result property="createUser"   column="createUser" />
+        <result property="createTime"   column="createTime" />
+        <result property="updateUser"   column="updateUser" />
+        <result property="updateTime"   column="updateTime" />
+        <result property="prodId"       column="prodId"     />
+        <result property="prodName"     column="prodName"   />
+        <result property="attrName"     column="attrName"   />
+    </resultMap>
+
+    <sql id="selectPopularProdVo">
+        select t_popular_prod.id
+             , t_popular_prod.mercProdId
+             , t_popular_prod.sort
+             , t_popular_prod.delFlag
+             , t_popular_prod.createUser
+             , t_popular_prod.createTime
+             , t_popular_prod.updateUser
+             , t_popular_prod.updateTime
+             , m_merchant_prod.prodId
+             , m_prod.prodName
+             , m_prod_attr.attrName
+        from t_popular_prod
+        inner join m_merchant_prod on m_merchant_prod.mercProdId = t_popular_prod.mercProdId
+        inner join m_prod on m_prod.id = m_merchant_prod.prodId
+        inner join m_prod_attr on m_prod_attr.prodId = m_merchant_prod.prodId and m_prod_attr.prodAttrId = m_merchant_prod.prodAttrId
+    </sql>
+
+    <select id="selectPopularProdVoList" parameterType="PopularProdVo" resultMap="PopularProdVoResult">
+        <include refid="selectPopularProdVo"/>
+        <where>  
+            <if test="mercProdId != null "> and t_popular_prod.mercProdId = #{mercProdId}</if>
+            <if test="sort != null "> and t_popular_prod.sort = #{sort}</if>
+            <if test="delFlag != null  and delFlag != ''"> and t_popular_prod.delFlag = #{delFlag}</if>
+            <if test="createUser != null  and createUser != ''"> and t_popular_prod.createUser = #{createUser}</if>
+            <if test="createTime != null "> and t_popular_prod.createTime = #{createTime}</if>
+            <if test="updateUser != null  and updateUser != ''"> and t_popular_prod.updateUser = #{updateUser}</if>
+            <if test="updateTime != null "> and t_popular_prod.updateTime = #{updateTime}</if>
+            <if test="prodName != null  and prodName != ''"> and m_prod.prodName like concat('%', #{prodName}, '%')</if>
+            <if test="attrName != null  and attrName != ''"> and m_prod_attr.attrName like concat('%', #{attrName}, '%')</if>
+        </where>
+        order by t_popular_prod.sort
+    </select>
+</mapper>

+ 1 - 1
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/ProdInventoryOrderVoMapper.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xingxi.web.controller.business.ProdInventory.mapper.ProdInventoryOrderVoMapper">
+<mapper namespace="com.xingxi.web.controller.business.prodInventory.mapper.ProdInventoryOrderVoMapper">
     <resultMap type="ProdInventoryOrderVo" id="ProdInventoryOrderVoResult">
     <resultMap type="ProdInventoryOrderVo" id="ProdInventoryOrderVoResult">
         <result property="inventoryOrderId" column="inventoryOrderId"   />
         <result property="inventoryOrderId" column="inventoryOrderId"   />
         <result property="ioFlag"           column="ioFlag"             />
         <result property="ioFlag"           column="ioFlag"             />

+ 1 - 1
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/ProdInventoryVoMapper.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xingxi.web.controller.business.ProdInventory.mapper.ProdInventoryVoMapper">
+<mapper namespace="com.xingxi.web.controller.business.prodInventory.mapper.ProdInventoryVoMapper">
     <resultMap type="ProdInventoryVo"    id="ProdInventoryVoResult">
     <resultMap type="ProdInventoryVo"    id="ProdInventoryVoResult">
         <result property="mercProdId"   column="mercProdId"     />
         <result property="mercProdId"   column="mercProdId"     />
         <result property="mercId"       column="mercId"         />
         <result property="mercId"       column="mercId"         />

+ 51 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/mapper/SuggestProdVoMapper.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xingxi.web.controller.business.suggest.mapper.SuggestProdVoMapper">
+    <resultMap type="SuggestProdVo" id="SuggestProdVoResult">
+        <result property="id"           column="id"         />
+        <result property="mercProdId"   column="mercProdId" />
+        <result property="sort"         column="sort"       />
+        <result property="delFlag"      column="delFlag"    />
+        <result property="createUser"   column="createUser" />
+        <result property="createTime"   column="createTime" />
+        <result property="updateUser"   column="updateUser" />
+        <result property="updateTime"   column="updateTime" />
+        <result property="prodId"       column="prodId"     />
+        <result property="prodName"     column="prodName"   />
+        <result property="attrName"     column="attrName"   />
+    </resultMap>
+
+    <sql id="selectSuggestProdVo">
+        select t_suggest_prod.id
+             , t_suggest_prod.mercProdId
+             , t_suggest_prod.sort
+             , t_suggest_prod.delFlag
+             , t_suggest_prod.createUser
+             , t_suggest_prod.createTime
+             , t_suggest_prod.updateUser
+             , t_suggest_prod.updateTime
+             , m_merchant_prod.prodId
+             , m_prod.prodName
+             , m_prod_attr.attrName
+        from t_suggest_prod
+        inner join m_merchant_prod on m_merchant_prod.mercProdId = t_suggest_prod.mercProdId
+        inner join m_prod on m_prod.id = m_merchant_prod.prodId
+        inner join m_prod_attr on m_prod_attr.prodId = m_merchant_prod.prodId and m_prod_attr.prodAttrId = m_merchant_prod.prodAttrId
+    </sql>
+
+    <select id="selectSuggestProdVoList" parameterType="SuggestProdVo" resultMap="SuggestProdVoResult">
+        <include refid="selectSuggestProdVo"/>
+        <where>  
+            <if test="mercProdId != null "> and t_suggest_prod.mercProdId = #{mercProdId}</if>
+            <if test="sort != null "> and t_suggest_prod.sort = #{sort}</if>
+            <if test="delFlag != null  and delFlag != ''"> and t_suggest_prod.delFlag = #{delFlag}</if>
+            <if test="createUser != null  and createUser != ''"> and t_suggest_prod.createUser = #{createUser}</if>
+            <if test="createTime != null "> and t_suggest_prod.createTime = #{createTime}</if>
+            <if test="updateUser != null  and updateUser != ''"> and t_suggest_prod.updateUser = #{updateUser}</if>
+            <if test="updateTime != null "> and t_suggest_prod.updateTime = #{updateTime}</if>
+            <if test="prodName != null  and prodName != ''"> and m_prod.prodName like concat('%', #{prodName}, '%')</if>
+            <if test="attrName != null  and attrName != ''"> and m_prod_attr.attrName like concat('%', #{attrName}, '%')</if>
+        </where>
+        order by t_suggest_prod.sort
+    </select>
+</mapper>

+ 104 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/banner/add.html

@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增banner')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-banner-add">
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">banner图地址:</label>
+                    <div class="col-sm-8">
+                        <img id="bannerImg" width="30%" height="30%">
+                        <input type="file" class="form-control" id="bannerImgUrl" accept="image/*"/>
+                        <input type="hidden" lass="form-control" name="bannerUrl" id="bannerUrl" />
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品ID:</label>
+                    <div class="col-sm-8">
+                        <input name="prodId" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">新闻ID:</label>
+                    <div class="col-sm-8">
+                        <input name="newsId" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">顺序:</label>
+                    <div class="col-sm-8">
+                        <input name="sort" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "business/banner"
+
+        $('#bannerImgUrl').change(function () {
+            var fileSize = this.files[0].size;
+            fileSize = Math.round(fileSize/1024*100)/100;
+
+            if(fileSize>2048){
+                layer.msg('上传文件不得大于2M,请重新上传。', {time: 3000, icon:6});
+                return false;
+            }
+
+            if (!/image\/\w+/.test(this.files[0].type)) {
+                layer.msg('上传的不是图片文件,请重新上传。', {time: 3000, icon:6});
+                return false;
+            }
+
+            if ($(this).val()) {
+                var formdata = new FormData();
+                formdata.append("imageFile", this.files[0]);
+                $.ajax({
+                    url: ctx + "common/upload/file/image",
+                    data: formdata,
+                    type: "post",
+                    processData: false,
+                    contentType: false,
+                    beforeSend: function () {
+                        $.modal.loading("正在处理中,请稍后...");
+                        $.modal.disable();
+                    },
+                    success: function (result) {
+                        if (result.code === web_status.SUCCESS) {
+                            $('#bannerImg').attr('src', result.imageUrl);
+                            $('#bannerUrl').val(result.imageUrl);
+                            $.modal.alertSuccess(result.msg)
+                        } else if (result.code === web_status.WARNING) {
+                            $.modal.alertWarning(result.msg)
+                        } else {
+                            $.modal.alertError(result.msg);
+                        }
+                        $.modal.closeLoading();
+                        $.modal.enable();
+                    }
+                })
+            }
+        });
+
+        $("#form-banner-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-banner-add').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 103 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/banner/banner.html

@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('banner列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <label>商品名称:</label>
+                                <input type="text" name="prodName"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:banner:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:banner:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:banner:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('system:banner:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('system:banner:remove')}]];
+        var bannerTypeFlags = [[${@dict.getType('banner_type')}]];
+        var prefix = ctx + "business/banner";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "banner",
+                columns: [
+                    {
+                        checkbox: true
+                    },
+                    {
+                        field: 'bannerUrl',
+                        title: 'banner图',
+                        formatter: function(value, row, index) {
+                            return $.table.imageView(value);
+                        }
+                    },
+                    {
+                        field: 'bannerType',
+                        title: 'Banner类型',
+                        formatter: function (value, row, index) {
+                            return $.table.selectDictLabel(bannerTypeFlags, value);
+                        }
+                    },
+                    {
+                        field: 'prodName',
+                        title: '商品名称'
+                    },
+                    {
+                        field: 'newsId',
+                        title: '新闻'
+                    },
+                    {
+                        field: 'sort',
+                        title: '顺序'
+                    },
+                    {
+                        title: '操作',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            var actions = [];
+                            actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.bannerId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.bannerId + '\')"><i class="fa fa-remove"></i>删除</a>');
+                            return actions.join('');
+                        }
+                    }
+                ]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+</html>

+ 66 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/banner/edit.html

@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改banner')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-banner-edit" th:object="${tBanner}">
+            <input name="bannerId" th:field="*{bannerId}" type="hidden">
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">banner图地址:</label>
+                    <div class="col-sm-8">
+                        <input name="bannerUrl" th:field="*{bannerUrl}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">商品ID:</label>
+                    <div class="col-sm-8">
+                        <input name="prodId" th:field="*{prodId}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">新闻ID:</label>
+                    <div class="col-sm-8">
+                        <input name="newsId" th:field="*{newsId}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">顺序:</label>
+                    <div class="col-sm-8">
+                        <input name="sort" th:field="*{sort}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">删除标志:</label>
+                    <div class="col-sm-8">
+                        <input name="delFlag" th:field="*{delFlag}" class="form-control" type="text">
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "system/banner";
+        $("#form-banner-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-banner-edit').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 263 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/newProd/newProd.html

@@ -0,0 +1,263 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('最新上架列表')" />
+</head>
+<body class="gray-bg">
+    <input type="hidden" id="mercProdId" value=""/>
+    <input type="hidden" id="sort" value=""/>
+    <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formNewProd">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <label>商品名称:</label>
+                                <input type="text" name="prodName"/>
+                            </li>
+                            <li>
+                                <label>属性名称:</label>
+                                <input type="text" name="attrName"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('formNewProd','mercProd-table')"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('formNewProd','mercProd-table')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="selectMerchantProd()" shiro:hasPermission="business:newProd:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:newProd:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="mercProd-table" data-use-row-attr-func="true" data-reorderable-rows="true">
+                </table>
+            </div>
+        </div>
+    </div>
+     <!-- 商品选择区域 -->
+     <script id="selectMerchantProdDiv" type="text/template">
+         <div>
+             <div class="col-sm-12 search-collapse">
+                 <form id="formSelectMerchant">
+                     <div class="select-list" style="margin-left: 20px;">
+                         <ul>
+                             <li>
+                                 <label>商户名称:</label>
+                             </li>
+                             <li>
+                                 <input type="text" class="form-control" name="mercName"/>
+                             </li>
+                             <li>
+                                 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('formSelectMerchant', 'merchant-table')"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                 <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('formSelectMerchant', 'merchant-table')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                             </li>
+                         </ul>
+                     </div>
+                 </form>
+             </div>
+             <div class="btn-group-sm" id="subToolbar" style="display: none">
+             </div>
+             <div class="col-sm-11 select-table table-striped">
+                 <table id="merchant-prod-table"></table>
+             </div>
+         </div>
+     </script>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: bootstrap-table-reorder-rows-js" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('business:newProd:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('business:newProd:remove')}]];
+        var shelfFlags = [[${@dict.getType('shelf_flag')}]];
+        var prefix = ctx + "business/newProd";
+
+        $(function() {
+            var options = {
+                id: "mercProd-table",
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "最新上架",
+                onReorderRow: function (dataRows, newRow, oldRow, el) {
+                    var datas = [];
+                    var sort = 1;
+                    dataRows.forEach(row => {
+                        var data= {
+                            "id": row.id,
+                            "sort": sort++,
+                        }
+                        datas.push(data);
+                    });
+                    $.ajax({
+                        url: prefix + "/editSort",
+                        contentType: 'application/json',
+                        data: JSON.stringify(datas),
+                        type: "post",
+                        processData: false,
+                        success: function(result) {
+                            $.operate.successCallback(result);
+                        }
+                    });
+                    $("#" + table.options.id).bootstrapTable('load', {
+                        total: el._xhr.responseJSON.total,
+                        rows: dataRows
+                    });
+                    return false;
+                },
+                columns: [
+                    {
+                        checkbox: true
+                    },
+                    {
+                        field: 'id',
+                        title: '主键',
+                        visible: false
+                    },
+                    {
+                        title: '商品名称',
+                        formatter: function (value, row, index) {
+                            return row.prodName + "(" + row.attrName + ")";
+                        }
+                    },
+                    {
+                        field: 'rowIndex',
+                        title: '排序',
+                        formatter: function (value, row, index) {
+                            var sort;
+                            if (!$("#sort").val()) {
+                                sort = 0;
+                            } else {
+                                sort = $("#sort").val()*1;
+                            }
+                            if ((index + 1) >= sort) {
+                                $("#sort").val(index + 1);
+                            }
+                            return index + 1;
+                        }
+                    },
+                    {
+                        title: '操作',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            var actions = [];
+                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                            return actions.join('');
+                        }
+                    }
+                ]
+            };
+            $.table.init(options);
+        });
+
+        function selectMerchantProd() {
+            console.log($("#sort").val());
+            var rows = $.map($("#mercProd-table").bootstrapTable('getData'), function (row) {
+                return $.common.getItemField(row, "mercProdId");
+            });
+            var content = $('#selectMerchantProdDiv').html();
+            layer.open({
+                type: 1,
+                fix: false,
+                maxmin: false,
+                shade: 0.3,
+                area: ['800px', '690px'],
+                title: '选择商户商品',
+                // 弹层外区域关闭
+                shadeClose: true,
+                success: function (layero, index) {
+                    var merchantOptions = {
+                        id: "merchant-prod-table",
+                        formId: "formSelectMerchant",
+                        url: ctx + "master/merchant/prod/list",
+                        modalName: "选择商户商品",
+                        showSearch: false,
+                        showColumns: false,
+                        showRefresh: false,
+                        showExport: false,
+                        showToggle: false,
+                        singleSelect: true,
+                        clickToSelect: true,
+                        toolbar: "subToolbar",
+                        pageSize: 10,
+                        pageList: [10, 20, 50],
+                        queryParams: queryParams,
+                        onCheck: onCheck,
+                        columns: [
+                            {
+                                checkbox: true,
+                                formatter: function (value, row, index) {
+                                    var isExists = false;
+                                    rows.forEach(prodId => {
+                                        if (row.mercProdId === prodId) {
+                                            isExists = true;
+                                        }
+                                    });
+                                    if (isExists) {
+                                        return {
+                                            disabled: true
+                                        };
+                                    }
+                                }
+                            },
+                            {
+                                field: 'mercName',
+                                title: '商户名称'
+                            },
+                            {
+                                field: 'prodName',
+                                title: '商品名称'
+                            },
+                            {
+                                field: 'attrName',
+                                title: '属性名称'
+                            },
+                            {
+                                field: 'shelfFlag',
+                                title: '上架状态',
+                                formatter: function (value, row, index) {
+                                    return $.table.selectDictLabel(shelfFlags, value);
+                                }
+                            },
+                        ]
+                    };
+                    $.table.init(merchantOptions);
+                },
+                content: content,
+                btn: ['<i class="fa fa-check"></i> 确定', '<i class="fa fa-remove"></i> 关闭'],
+                btn1: function () {
+                    var data = {
+                        "mercProdId": $("#mercProdId").val(),
+                        "sort": $("#sort").val() * 1 + 1,
+                    };
+                    $.operate.post(prefix + "/add", data, refreshTab);
+                    layer.closeAll();
+                }
+            });
+        }
+
+        function queryParams(params) {
+            var search = $.table.queryParams(params);
+            search.shelfFlag = '1';
+            return search;
+        }
+
+        function onCheck(row) {
+            $("#mercProdId").val(row.mercProdId);
+        }
+
+        function refreshTab() {
+            location.reload();
+        }
+    </script>
+</body>
+</html>

+ 45 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/news/add.html

@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增新闻广告')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-news-add">
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">新闻内容:</label>
+                    <div class="col-sm-8">
+                        <textarea name="newsContext" class="form-control" style="width: 455px; height: 300px; resize: none;"></textarea>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "business/news"
+        $("#form-news-add").validate({
+            rules: {
+                newsContext: {
+                    required: true,
+                    maxlength: 4000
+                },
+            },
+            messages: {
+                newsContext: {
+                    required: icon + "请输入新闻内容",
+                    maxlength: icon + "新闻内容最多输入4000字"
+                },
+            },
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-news-add').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 34 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/news/edit.html

@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改新闻广告')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-news-edit" th:object="${news}">
+            <input name="newsId" th:field="*{newsId}" type="hidden">
+            <div class="col-xs-12">
+                <div class="form-group">
+                    <label class="col-sm-3 control-label">新闻内容:</label>
+                    <div class="col-sm-8">
+                        <textarea name="newsContext" class="form-control" style="width: 455px; height: 300px; resize: none;">[[*{newsContext}]]</textarea>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "business/news";
+        $("#form-news-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-news-edit').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 139 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/news/editPic.html

@@ -0,0 +1,139 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('编辑新闻图片')" />
+    <style>
+        .custom-btn {
+            cursor: pointer;
+        }
+    </style>
+</head>
+<body class="white-bg">
+    <input id="newsId" th:value="${newsId}" type="hidden">
+    <div class="wrapper wrapper-content animated fadeInRight">
+        <div class="row" id="ibox-container" style="width: 1260px">
+        </div>
+        <div style="display: none;">
+            <input type="file" class="form-control" name="imageFileUrl" id="imageFileUrl" accept="image/*"/>
+            <input type="hidden" name="newsUrl" id="newsUrl" />
+            <input type="hidden" id="picCount" />
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var prefix = ctx + "business/news";
+        var newsPicVoList = [[${newsPics}]];
+        var iPicCount = 0;
+        newsPicVoList.forEach(item => {
+            iPicCount++;
+            var card = `<div class='col-sm-2'>
+                            <div style='width: 200px; height: 300px; border: 1px solid black'>
+                                <div style="position: absolute; width: 200px; height: 300px; top: 0; left: 14px;">
+                                    <img id='picImgSrc_${iPicCount}' style='width: 200px; height: 300px;' src='${item.newsUrl}'>
+                                </div>
+                            </div>
+                            <div style='width: 300px; height: 30px; margin-left: 70px; margin-top: 10px;' class='custom-btn'>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="removePic(${item.id})"><i class="fa fa-search"></i>&nbsp;删除</a>
+                            </div>
+                        </div>`;
+            $("#ibox-container").append(card);
+        });
+        $("#picCount").val(iPicCount);
+        var newPicCard = `<div class='col-sm-2' id='addButton'>
+                            <div class='ibox' style='width: 200px; height: 300px;'>
+                                <div class='ibox-content custom-btn' style='width: 100%; height: 100%;' onclick='addNewPic()'>
+                                    <h5 style='margin-left: 40px; font-size: large'>添加图片</h5>
+                                </div>
+                            </div>
+                          </div>`;
+        $("#ibox-container").append(newPicCard);
+
+        $('#imageFileUrl').change(function () {
+            var fileSize = this.files[0].size;
+            fileSize = Math.round(fileSize/1024*100)/100;
+
+            if(fileSize>2048){
+                layer.msg('上传文件不得大于2M,请重新上传。', {time: 3000, icon:6});
+                return false;
+            }
+
+            if (!/image\/\w+/.test(this.files[0].type)) {
+                layer.msg('上传的不是图片文件,请重新上传。', {time: 3000, icon:6});
+                return false;
+            }
+
+            if ($(this).val()) {
+                var formdata = new FormData();
+                formdata.append("imageFile", this.files[0]);
+                $.ajax({
+                    url: ctx + "common/upload/file/image",
+                    data: formdata,
+                    type: "post",
+                    processData: false,
+                    contentType: false,
+                    beforeSend: function () {
+                        $.modal.loading("正在处理中,请稍后...");
+                        $.modal.disable();
+                    },
+                    success: function (result) {
+                        if (result.code === web_status.SUCCESS) {
+                            var tempImageUrl = result.imageUrl;
+                            var data = {
+                                "newsId": $("#newsId").val(),
+                                "newsUrl": tempImageUrl,
+                            };
+                            $.operate.post(prefix + "/addNewsPic", data, setIdToImg);
+                        } else if (result.code === web_status.WARNING) {
+                            $.modal.alertWarning(result.msg)
+                        } else {
+                            $.modal.alertError(result.msg);
+                        }
+                        $.modal.closeLoading();
+                        $.modal.enable();
+                    }
+                })
+            }
+        });
+
+        $("#form-prod-edit").validate({
+            focusCleanup: true
+        });
+
+        function removePic(id) {
+            var data = {
+                "id": id,
+            };
+            $.operate.post(prefix + "/removeNewsPic", data, refreshTab);
+        }
+
+        function setIdToImg(result) {
+            var data = result.data;
+            var nowPicCount = $("#picCount").val()*1 + 1;
+            $("#picCount").val(nowPicCount);
+            var appendCard = `<div class='col-sm-2'>
+                                  <div style='width: 200px; height: 300px; border: 1px solid black'>
+                                      <div style="position: absolute; width: 200px; height: 300px; top: 0; left: 14px;">
+                                          <img id='picImgSrc_${nowPicCount}' style='width: 200px; height: 300px;' src=''>
+                                      </div>
+                                  </div>
+                                  <div style='width: 300px; height: 30px; margin-left: 70px; margin-top: 10px;' class='custom-btn'>
+                                      <a class="btn btn-primary btn-rounded btn-sm" onclick="removePic(${data.id})"><i class="fa fa-search"></i>&nbsp;删除</a>
+                                  </div>
+                              </div>`;
+            $('#addButton').before(appendCard);
+            $("#picImgSrc_" + nowPicCount).attr('src', data.newsUrl);
+            $("#newsUrl").val(data.newsUrl);
+            $.modal.alertSuccess(result.msg)
+        }
+
+        function refreshTab() {
+            location.reload();
+        }
+
+        function addNewPic() {
+            $("#imageFileUrl").click();
+        }
+
+    </script>
+</body>
+</html>

+ 70 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/news/news.html

@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('新闻广告列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:news:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:news:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:news:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('business:news:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('business:news:remove')}]];
+        var editPicFlag = [[${@permission.hasPermi('business:news:editPic')}]];
+        var prefix = ctx + "business/news";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "新闻广告",
+                showSearch: false,
+                showColumns: false,
+                columns: [
+                    {
+                        checkbox: true
+                    },
+                    {
+                        field: 'newsContext',
+                        title: '新闻内容'
+                    },
+                    {
+                        title: '操作',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            var actions = [];
+                            actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.newsId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.newsId + '\')"><i class="fa fa-remove"></i>删除</a> ');
+                            actions.push('<a class="btn btn-info btn-xs ' + editPicFlag + '" href="javascript:void(0)" onclick="editPic(\'' + row.newsId + '\')"><i class="fa fa-info"></i>新闻图片</a>');
+                            return actions.join('');
+                        }
+                    }
+                ]
+            };
+            $.table.init(options);
+        });
+        function editPic(newsId) {
+            $.modal.openTab("商品图片信息", ctx + "business/news/editPic/" + newsId);
+        }
+    </script>
+</body>
+</html>

+ 263 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/popularProd/popularProd.html

@@ -0,0 +1,263 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('今日热门列表')" />
+</head>
+<body class="gray-bg">
+    <input type="hidden" id="mercProdId" value=""/>
+    <input type="hidden" id="sort" value=""/>
+    <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formPopularProd">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <label>商品名称:</label>
+                                <input type="text" name="prodName"/>
+                            </li>
+                            <li>
+                                <label>属性名称:</label>
+                                <input type="text" name="attrName"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('formPopularProd','mercProd-table')"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('formPopularProd','mercProd-table')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="selectMerchantProd()" shiro:hasPermission="business:popularProd:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:popularProd:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="mercProd-table" data-use-row-attr-func="true" data-reorderable-rows="true">
+                </table>
+            </div>
+        </div>
+    </div>
+     <!-- 商品选择区域 -->
+     <script id="selectMerchantProdDiv" type="text/template">
+         <div>
+             <div class="col-sm-12 search-collapse">
+                 <form id="formSelectMerchant">
+                     <div class="select-list" style="margin-left: 20px;">
+                         <ul>
+                             <li>
+                                 <label>商户名称:</label>
+                             </li>
+                             <li>
+                                 <input type="text" class="form-control" name="mercName"/>
+                             </li>
+                             <li>
+                                 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('formSelectMerchant', 'merchant-table')"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                 <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('formSelectMerchant', 'merchant-table')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                             </li>
+                         </ul>
+                     </div>
+                 </form>
+             </div>
+             <div class="btn-group-sm" id="subToolbar" style="display: none">
+             </div>
+             <div class="col-sm-11 select-table table-striped">
+                 <table id="merchant-prod-table"></table>
+             </div>
+         </div>
+     </script>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: bootstrap-table-reorder-rows-js" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('business:popularProd:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('business:popularProd:remove')}]];
+        var shelfFlags = [[${@dict.getType('shelf_flag')}]];
+        var prefix = ctx + "business/popularProd";
+
+        $(function() {
+            var options = {
+                id: "mercProd-table",
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "今日热门",
+                onReorderRow: function (dataRows, newRow, oldRow, el) {
+                    var datas = [];
+                    var sort = 1;
+                    dataRows.forEach(row => {
+                        var data= {
+                            "id": row.id,
+                            "sort": sort++,
+                        }
+                        datas.push(data);
+                    });
+                    $.ajax({
+                        url: prefix + "/editSort",
+                        contentType: 'application/json',
+                        data: JSON.stringify(datas),
+                        type: "post",
+                        processData: false,
+                        success: function(result) {
+                            $.operate.successCallback(result);
+                        }
+                    });
+                    $("#" + table.options.id).bootstrapTable('load', {
+                        total: el._xhr.responseJSON.total,
+                        rows: dataRows
+                    });
+                    return false;
+                },
+                columns: [
+                    {
+                        checkbox: true
+                    },
+                    {
+                        field: 'id',
+                        title: '主键',
+                        visible: false
+                    },
+                    {
+                        title: '商品名称',
+                        formatter: function (value, row, index) {
+                            return row.prodName + "(" + row.attrName + ")";
+                        }
+                    },
+                    {
+                        field: 'rowIndex',
+                        title: '排序',
+                        formatter: function (value, row, index) {
+                            var sort;
+                            if (!$("#sort").val()) {
+                                sort = 0;
+                            } else {
+                                sort = $("#sort").val()*1;
+                            }
+                            if ((index + 1) >= sort) {
+                                $("#sort").val(index + 1);
+                            }
+                            return index + 1;
+                        }
+                    },
+                    {
+                        title: '操作',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            var actions = [];
+                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                            return actions.join('');
+                        }
+                    }
+                ]
+            };
+            $.table.init(options);
+        });
+
+        function selectMerchantProd() {
+            console.log($("#sort").val());
+            var rows = $.map($("#mercProd-table").bootstrapTable('getData'), function (row) {
+                return $.common.getItemField(row, "mercProdId");
+            });
+            var content = $('#selectMerchantProdDiv').html();
+            layer.open({
+                type: 1,
+                fix: false,
+                maxmin: false,
+                shade: 0.3,
+                area: ['800px', '690px'],
+                title: '选择商户商品',
+                // 弹层外区域关闭
+                shadeClose: true,
+                success: function (layero, index) {
+                    var merchantOptions = {
+                        id: "merchant-prod-table",
+                        formId: "formSelectMerchant",
+                        url: ctx + "master/merchant/prod/list",
+                        modalName: "选择商户商品",
+                        showSearch: false,
+                        showColumns: false,
+                        showRefresh: false,
+                        showExport: false,
+                        showToggle: false,
+                        singleSelect: true,
+                        clickToSelect: true,
+                        toolbar: "subToolbar",
+                        pageSize: 10,
+                        pageList: [10, 20, 50],
+                        queryParams: queryParams,
+                        onCheck: onCheck,
+                        columns: [
+                            {
+                                checkbox: true,
+                                formatter: function (value, row, index) {
+                                    var isExists = false;
+                                    rows.forEach(prodId => {
+                                        if (row.mercProdId === prodId) {
+                                            isExists = true;
+                                        }
+                                    });
+                                    if (isExists) {
+                                        return {
+                                            disabled: true
+                                        };
+                                    }
+                                }
+                            },
+                            {
+                                field: 'mercName',
+                                title: '商户名称'
+                            },
+                            {
+                                field: 'prodName',
+                                title: '商品名称'
+                            },
+                            {
+                                field: 'attrName',
+                                title: '属性名称'
+                            },
+                            {
+                                field: 'shelfFlag',
+                                title: '上架状态',
+                                formatter: function (value, row, index) {
+                                    return $.table.selectDictLabel(shelfFlags, value);
+                                }
+                            },
+                        ]
+                    };
+                    $.table.init(merchantOptions);
+                },
+                content: content,
+                btn: ['<i class="fa fa-check"></i> 确定', '<i class="fa fa-remove"></i> 关闭'],
+                btn1: function () {
+                    var data = {
+                        "mercProdId": $("#mercProdId").val(),
+                        "sort": $("#sort").val() * 1 + 1,
+                    };
+                    $.operate.post(prefix + "/add", data, refreshTab);
+                    layer.closeAll();
+                }
+            });
+        }
+
+        function queryParams(params) {
+            var search = $.table.queryParams(params);
+            search.shelfFlag = '1';
+            return search;
+        }
+
+        function onCheck(row) {
+            $("#mercProdId").val(row.mercProdId);
+        }
+
+        function refreshTab() {
+            location.reload();
+        }
+    </script>
+</body>
+</html>

+ 263 - 0
08.src/Xingxi/xingxi-admin/src/main/resources/templates/business/suggestProd/suggestProd.html

@@ -0,0 +1,263 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('推荐商品列表')" />
+</head>
+<body class="gray-bg">
+    <input type="hidden" id="mercProdId" value=""/>
+    <input type="hidden" id="sort" value=""/>
+    <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formSuggestProd">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <label>商品名称:</label>
+                                <input type="text" name="prodName"/>
+                            </li>
+                            <li>
+                                <label>属性名称:</label>
+                                <input type="text" name="attrName"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('formSuggestProd','mercProd-table')"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('formSuggestProd','mercProd-table')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="selectMerchantProd()" shiro:hasPermission="business:suggestProd:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:suggestProd:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="mercProd-table" data-use-row-attr-func="true" data-reorderable-rows="true">
+                </table>
+            </div>
+        </div>
+    </div>
+     <!-- 商品选择区域 -->
+     <script id="selectMerchantProdDiv" type="text/template">
+         <div>
+             <div class="col-sm-12 search-collapse">
+                 <form id="formSelectMerchant">
+                     <div class="select-list" style="margin-left: 20px;">
+                         <ul>
+                             <li>
+                                 <label>商户名称:</label>
+                             </li>
+                             <li>
+                                 <input type="text" class="form-control" name="mercName"/>
+                             </li>
+                             <li>
+                                 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('formSelectMerchant', 'merchant-table')"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                 <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('formSelectMerchant', 'merchant-table')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                             </li>
+                         </ul>
+                     </div>
+                 </form>
+             </div>
+             <div class="btn-group-sm" id="subToolbar" style="display: none">
+             </div>
+             <div class="col-sm-11 select-table table-striped">
+                 <table id="merchant-prod-table"></table>
+             </div>
+         </div>
+     </script>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: bootstrap-table-reorder-rows-js" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('business:suggestProd:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('business:suggestProd:remove')}]];
+        var shelfFlags = [[${@dict.getType('shelf_flag')}]];
+        var prefix = ctx + "business/suggestProd";
+
+        $(function() {
+            var options = {
+                id: "mercProd-table",
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "推荐商品",
+                onReorderRow: function (dataRows, newRow, oldRow, el) {
+                    var datas = [];
+                    var sort = 1;
+                    dataRows.forEach(row => {
+                        var data= {
+                            "id": row.id,
+                            "sort": sort++,
+                        }
+                        datas.push(data);
+                    });
+                    $.ajax({
+                        url: prefix + "/editSort",
+                        contentType: 'application/json',
+                        data: JSON.stringify(datas),
+                        type: "post",
+                        processData: false,
+                        success: function(result) {
+                            $.operate.successCallback(result);
+                        }
+                    });
+                    $("#" + table.options.id).bootstrapTable('load', {
+                        total: el._xhr.responseJSON.total,
+                        rows: dataRows
+                    });
+                    return false;
+                },
+                columns: [
+                    {
+                        checkbox: true
+                    },
+                    {
+                        field: 'id',
+                        title: '主键',
+                        visible: false
+                    },
+                    {
+                        title: '商品名称',
+                        formatter: function (value, row, index) {
+                            return row.prodName + "(" + row.attrName + ")";
+                        }
+                    },
+                    {
+                        field: 'rowIndex',
+                        title: '排序',
+                        formatter: function (value, row, index) {
+                            var sort;
+                            if (!$("#sort").val()) {
+                                sort = 0;
+                            } else {
+                                sort = $("#sort").val()*1;
+                            }
+                            if ((index + 1) >= sort) {
+                                $("#sort").val(index + 1);
+                            }
+                            return index + 1;
+                        }
+                    },
+                    {
+                        title: '操作',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            var actions = [];
+                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                            return actions.join('');
+                        }
+                    }
+                ]
+            };
+            $.table.init(options);
+        });
+
+        function selectMerchantProd() {
+            console.log($("#sort").val());
+            var rows = $.map($("#mercProd-table").bootstrapTable('getData'), function (row) {
+                return $.common.getItemField(row, "mercProdId");
+            });
+            var content = $('#selectMerchantProdDiv').html();
+            layer.open({
+                type: 1,
+                fix: false,
+                maxmin: false,
+                shade: 0.3,
+                area: ['800px', '690px'],
+                title: '选择商户商品',
+                // 弹层外区域关闭
+                shadeClose: true,
+                success: function (layero, index) {
+                    var merchantOptions = {
+                        id: "merchant-prod-table",
+                        formId: "formSelectMerchant",
+                        url: ctx + "master/merchant/prod/list",
+                        modalName: "选择商户商品",
+                        showSearch: false,
+                        showColumns: false,
+                        showRefresh: false,
+                        showExport: false,
+                        showToggle: false,
+                        singleSelect: true,
+                        clickToSelect: true,
+                        toolbar: "subToolbar",
+                        pageSize: 10,
+                        pageList: [10, 20, 50],
+                        queryParams: queryParams,
+                        onCheck: onCheck,
+                        columns: [
+                            {
+                                checkbox: true,
+                                formatter: function (value, row, index) {
+                                    var isExists = false;
+                                    rows.forEach(prodId => {
+                                        if (row.mercProdId === prodId) {
+                                            isExists = true;
+                                        }
+                                    });
+                                    if (isExists) {
+                                        return {
+                                            disabled: true
+                                        };
+                                    }
+                                }
+                            },
+                            {
+                                field: 'mercName',
+                                title: '商户名称'
+                            },
+                            {
+                                field: 'prodName',
+                                title: '商品名称'
+                            },
+                            {
+                                field: 'attrName',
+                                title: '属性名称'
+                            },
+                            {
+                                field: 'shelfFlag',
+                                title: '上架状态',
+                                formatter: function (value, row, index) {
+                                    return $.table.selectDictLabel(shelfFlags, value);
+                                }
+                            },
+                        ]
+                    };
+                    $.table.init(merchantOptions);
+                },
+                content: content,
+                btn: ['<i class="fa fa-check"></i> 确定', '<i class="fa fa-remove"></i> 关闭'],
+                btn1: function () {
+                    var data = {
+                        "mercProdId": $("#mercProdId").val(),
+                        "sort": $("#sort").val() * 1 + 1,
+                    };
+                    $.operate.post(prefix + "/add", data, refreshTab);
+                    layer.closeAll();
+                }
+            });
+        }
+
+        function queryParams(params) {
+            var search = $.table.queryParams(params);
+            search.shelfFlag = '1';
+            return search;
+        }
+
+        function onCheck(row) {
+            $("#mercProdId").val(row.mercProdId);
+        }
+
+        function refreshTab() {
+            location.reload();
+        }
+    </script>
+</body>
+</html>

+ 1 - 1
08.src/Xingxi/xingxi-admin/src/main/resources/templates/master/designer/add.html

@@ -55,7 +55,7 @@
                 var formdata = new FormData();
                 var formdata = new FormData();
                 formdata.append("imageFile", this.files[0]);
                 formdata.append("imageFile", this.files[0]);
                 $.ajax({
                 $.ajax({
-                    url: ctx + "common/upload/file/designerAvatar",
+                    url: ctx + "common/upload/file/avatar",
                     data: formdata,
                     data: formdata,
                     type: "post",
                     type: "post",
                     processData: false,
                     processData: false,

+ 31 - 0
08.src/Xingxi/xingxi-common/src/main/java/com/xingxi/common/enums/EBannerType.java

@@ -0,0 +1,31 @@
+package com.xingxi.common.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @program: biandan
+ * @description: Banner分类
+ * @author: gao
+ * @create: 2022-02-22 22:37
+ */
+@AllArgsConstructor
+@Getter
+public enum EBannerType {
+    PROD("PROD", "商品"),
+    IMAGE("IMAGE", "图片"),
+    STORY("STORY", "品牌故事");
+
+    private String val;
+    private String desc;
+
+    /** 解析 */
+    public static EBannerType parseByVal(String val) {
+        for(EBannerType type : EBannerType.values()) {
+            if(type.getVal().equalsIgnoreCase(val)) {
+                return type;
+            }
+        }
+        return EBannerType.IMAGE;
+    }
+}

+ 4 - 0
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/News/service/impl/NewsPicServiceImpl.java

@@ -1,10 +1,12 @@
 package com.xingxi.business.News.service.impl;
 package com.xingxi.business.News.service.impl;
 
 
 import com.xingxi.common.core.text.Convert;
 import com.xingxi.common.core.text.Convert;
+import com.xingxi.common.enums.EDelFlag;
 import com.xingxi.common.utils.DateUtils;
 import com.xingxi.common.utils.DateUtils;
 import com.xingxi.business.News.domain.NewsPic;
 import com.xingxi.business.News.domain.NewsPic;
 import com.xingxi.business.News.mapper.NewsPicMapper;
 import com.xingxi.business.News.mapper.NewsPicMapper;
 import com.xingxi.business.News.service.INewsPicService;
 import com.xingxi.business.News.service.INewsPicService;
+import com.xingxi.common.utils.ShiroUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
@@ -51,6 +53,8 @@ public class NewsPicServiceImpl implements INewsPicService {
      */
      */
     @Override
     @Override
     public int insertNewsPic(NewsPic newsPic) {
     public int insertNewsPic(NewsPic newsPic) {
+        newsPic.setDelFlag(EDelFlag.NO.getVal());
+        newsPic.setCreateUser(ShiroUtils.getLoginName());
         newsPic.setCreateTime(DateUtils.getNowDate());
         newsPic.setCreateTime(DateUtils.getNowDate());
         return newsPicMapper.insertNewsPic(newsPic);
         return newsPicMapper.insertNewsPic(newsPic);
     }
     }

+ 5 - 0
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/News/service/impl/NewsServiceImpl.java

@@ -1,10 +1,12 @@
 package com.xingxi.business.News.service.impl;
 package com.xingxi.business.News.service.impl;
 
 
 import com.xingxi.common.core.text.Convert;
 import com.xingxi.common.core.text.Convert;
+import com.xingxi.common.enums.EDelFlag;
 import com.xingxi.common.utils.DateUtils;
 import com.xingxi.common.utils.DateUtils;
 import com.xingxi.business.News.domain.News;
 import com.xingxi.business.News.domain.News;
 import com.xingxi.business.News.mapper.NewsMapper;
 import com.xingxi.business.News.mapper.NewsMapper;
 import com.xingxi.business.News.service.INewsService;
 import com.xingxi.business.News.service.INewsService;
+import com.xingxi.common.utils.ShiroUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
@@ -51,6 +53,8 @@ public class NewsServiceImpl implements INewsService {
      */
      */
     @Override
     @Override
     public int insertNews(News news) {
     public int insertNews(News news) {
+        news.setDelFlag(EDelFlag.NO.getVal());
+        news.setCreateUser(ShiroUtils.getLoginName());
         news.setCreateTime(DateUtils.getNowDate());
         news.setCreateTime(DateUtils.getNowDate());
         return newsMapper.insertNews(news);
         return newsMapper.insertNews(news);
     }
     }
@@ -74,6 +78,7 @@ public class NewsServiceImpl implements INewsService {
      */
      */
     @Override
     @Override
     public int updateNews(News news) {
     public int updateNews(News news) {
+        news.setUpdateUser(ShiroUtils.getLoginName());
         news.setUpdateTime(DateUtils.getNowDate());
         news.setUpdateTime(DateUtils.getNowDate());
         return newsMapper.updateNews(news);
         return newsMapper.updateNews(news);
     }
     }

+ 4 - 0
08.src/Xingxi/xingxi-system/src/main/java/com/xingxi/business/SuggestProd/service/impl/SuggestProdServiceImpl.java

@@ -1,10 +1,12 @@
 package com.xingxi.business.SuggestProd.service.impl;
 package com.xingxi.business.SuggestProd.service.impl;
 
 
 import com.xingxi.common.core.text.Convert;
 import com.xingxi.common.core.text.Convert;
+import com.xingxi.common.enums.EDelFlag;
 import com.xingxi.common.utils.DateUtils;
 import com.xingxi.common.utils.DateUtils;
 import com.xingxi.business.SuggestProd.domain.SuggestProd;
 import com.xingxi.business.SuggestProd.domain.SuggestProd;
 import com.xingxi.business.SuggestProd.mapper.SuggestProdMapper;
 import com.xingxi.business.SuggestProd.mapper.SuggestProdMapper;
 import com.xingxi.business.SuggestProd.service.ISuggestProdService;
 import com.xingxi.business.SuggestProd.service.ISuggestProdService;
+import com.xingxi.common.utils.ShiroUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
@@ -51,6 +53,8 @@ public class SuggestProdServiceImpl implements ISuggestProdService {
      */
      */
     @Override
     @Override
     public int insertSuggestProd(SuggestProd suggestProd) {
     public int insertSuggestProd(SuggestProd suggestProd) {
+        suggestProd.setDelFlag(EDelFlag.NO.getVal());
+        suggestProd.setCreateUser(ShiroUtils.getLoginName());
         suggestProd.setCreateTime(DateUtils.getNowDate());
         suggestProd.setCreateTime(DateUtils.getNowDate());
         return suggestProdMapper.insertSuggestProd(suggestProd);
         return suggestProdMapper.insertSuggestProd(suggestProd);
     }
     }

+ 1 - 1
08.src/Xingxi/xingxi-system/src/main/resources/mapper/business/NewsPicMapper.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xingxi.business.NewsPic.mapper.NewsPicMapper">
+<mapper namespace="com.xingxi.business.News.mapper.NewsPicMapper">
     <resultMap type="NewsPic" id="NewsPicResult">
     <resultMap type="NewsPic" id="NewsPicResult">
         <result property="id"    column="id"    />
         <result property="id"    column="id"    />
         <result property="newsUrl"    column="newsUrl"    />
         <result property="newsUrl"    column="newsUrl"    />