huangzhiguo hace 1 año
padre
commit
53960e9f5c
Se han modificado 18 ficheros con 2454 adiciones y 0 borrados
  1. 449 0
      src/main/java/com/caimei365/manager/controller/caimei/user/CustomerApi.java
  2. 235 0
      src/main/java/com/caimei365/manager/dao/user/CustomerServiceDao.java
  3. 4 0
      src/main/java/com/caimei365/manager/entity/caimei/CmShop.java
  4. 44 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmPageShop.java
  5. 54 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmPageShopInfo.java
  6. 42 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmPageShopKeyword.java
  7. 54 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmPageShopProduct.java
  8. 46 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmRoosInformation.java
  9. 55 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmShopAdvertisingImage.java
  10. 48 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmShopInfo.java
  11. 48 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmShopKeyword.java
  12. 34 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmShopPopUp.java
  13. 49 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmShopStatistics.java
  14. 68 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmUserSearchFrequency.java
  15. 140 0
      src/main/java/com/caimei365/manager/entity/caimei/cmUser/Info.java
  16. 231 0
      src/main/java/com/caimei365/manager/service/caimei/user/CustomerService.java
  17. 501 0
      src/main/java/com/caimei365/manager/service/caimei/user/impl/CustomerServiceImpl.java
  18. 352 0
      src/main/resources/mapper/user/CustomerServiceDao.xml

+ 449 - 0
src/main/java/com/caimei365/manager/controller/caimei/user/CustomerApi.java

@@ -0,0 +1,449 @@
+package com.caimei365.manager.controller.caimei.user;
+
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.caimei.CmShop;
+import com.caimei365.manager.entity.caimei.cmUser.*;
+import com.caimei365.manager.service.caimei.user.CustomerService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/5
+ */
+@RestController
+@RequestMapping("/user/customer")
+public class CustomerApi {
+
+    @Autowired private CustomerService customerService;
+
+    /**
+     * 潜客收集供应商列表
+     * @param cmShopStatistics
+     * @return
+     */
+    @GetMapping("/getCustomerShopList")
+    public ResponseJson<PaginationVo<CmShopStatistics>> getCustomerShopList(CmShopStatistics cmShopStatistics,
+                                                                    @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                    @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        return customerService.getCustomerShopList(cmShopStatistics, pageNum, pageSize);
+    }
+
+    /**
+     * 供应商列表
+     * @param shopName
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/getShopList")
+    public ResponseJson<PaginationVo<CmShop>> getShopList(String shopName,
+                                                          @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                          @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        return customerService.getShopLiat(shopName, pageNum, pageSize);
+    }
+
+    /**
+     * 添加统计供应商
+     * @param shopIds
+     * @return
+     */
+    @GetMapping("/saveCustomerShop")
+    public ResponseJson saveCustomerShop(String shopIds) {
+        if (null == shopIds) {
+            return ResponseJson.error(-1, "添加的供应商不能为空", null);
+        }
+        return customerService.saveCustomerShop(shopIds);
+    }
+
+    /**
+     * 设置统计状态
+     * @param id
+     * @param status
+     * @return
+     */
+    @GetMapping("/renewCustomerShop")
+    public ResponseJson renewCustomerShop(Integer id, Integer status) {
+        if (null == id) {
+            return ResponseJson.error(-1, "id不能为空", null);
+        }
+        if (null == status) {
+            return ResponseJson.error(-1, "状态不能为空", null);
+        }
+        return customerService.renewCustomerShop(id, status);
+    }
+
+    /**
+     * 游客统计
+     * @param cmRoosInformation
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/getCmInformationList")
+    public ResponseJson<PaginationVo<CmRoosInformation>> getCmInformationList(CmRoosInformation cmRoosInformation,
+                                                                              @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                              @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        if (null == cmRoosInformation.getShopId()) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        return customerService.getCmInformationList(cmRoosInformation, pageNum, pageSize);
+    }
+
+    /**
+     * 设置跟进状态
+     * @param id
+     * @param followUpStatus
+     * @return
+     */
+    @GetMapping("/renewFollowUpStatus")
+    public ResponseJson renewFollowUpStatus(Integer id, Integer followUpStatus) {
+        if (null == id) {
+            return ResponseJson.error(-1, "id不能为空", null);
+        }
+        if (null == followUpStatus) {
+            return ResponseJson.error(-1, "状态不能为空", null);
+        }
+        return customerService.renewFollowUpStatus(id, followUpStatus);
+    }
+
+    /**
+     * 相关文章列表
+     * @param cmShopInfo
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/getShopInfoList")
+    public ResponseJson<PaginationVo<CmShopInfo>> getShopInfoList(CmShopInfo cmShopInfo,
+                                                                  @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                  @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        if (null == cmShopInfo.getShopId()) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        return customerService.getShopInfoList(cmShopInfo, pageNum, pageSize);
+    }
+
+    /**
+     * 选择文章
+     * @param id
+     * @param title
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/getInfoList")
+    public ResponseJson<PaginationVo<Info>> getInfoList(Integer id, String title,
+                                                        @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                        @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        return customerService.getInfoList(id, title, pageNum, pageSize);
+    }
+
+    /**
+     * 添加文章统计
+     * @param shopId
+     * @param infoIds
+     * @return
+     */
+    @GetMapping("/saveShopInfo")
+    public ResponseJson saveShopInfo(Integer shopId, String infoIds){
+        if (null == shopId) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        if (null == infoIds) {
+            return ResponseJson.error(-1, "选择文章不能为空", null);
+        }
+        return customerService.saveShopInfo(shopId, infoIds);
+    }
+
+    /**
+     * 设置统计状态
+     * @param id
+     * @param status
+     * @return
+     */
+    @GetMapping("/renewShopInfo")
+    public ResponseJson renewShopInfo(Integer id, Integer status) {
+        if (null == id) {
+            return ResponseJson.error(-1, "id不能为空", null);
+        }
+        if (null == status) {
+            return ResponseJson.error(-1, "状态不能为空", null);
+        }
+        return customerService.renewShopInfo(id, status);
+    }
+
+    /**
+     * 删除统计文章
+     * @param id
+     * @return
+     */
+    @GetMapping("/delShopInfo")
+    public ResponseJson delShopInfo(Integer id) {
+        if (null == id) {
+            return ResponseJson.error(-1, "id不能为空", null);
+        }
+        return customerService.delShopInfo(id);
+    }
+
+    /**
+     * 相关搜索词统计列表
+     * @param cmShopKeyword
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/getShopKeywordList")
+    public ResponseJson<PaginationVo<CmShopKeyword>> getShopKeywordList(CmShopKeyword cmShopKeyword,
+                                                                     @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                     @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        if (null == cmShopKeyword.getShopId()) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        return customerService.getShopKeywordList(cmShopKeyword, pageNum, pageSize);
+    }
+
+    /**
+     * 选择文章
+     * @param keyword
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/getSearchFrequencyList")
+    public ResponseJson<PaginationVo<CmUserSearchFrequency>> getSearchFrequencyList(String keyword,
+                                                        @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                        @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        return customerService.getSearchFrequencyList(keyword, pageNum, pageSize);
+    }
+
+    /**
+     * 添加文章统计
+     * @param shopId
+     * @param keyWordIds
+     * @return
+     */
+    @GetMapping("/saveShopKeyword")
+    public ResponseJson saveShopKeyword(Integer shopId, String keyWordIds){
+        if (null == shopId) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        if (null == keyWordIds) {
+            return ResponseJson.error(-1, "选择文章不能为空", null);
+        }
+        return customerService.saveShopKeyword(shopId, keyWordIds);
+    }
+
+    /**
+     * 设置统计状态
+     * @param id
+     * @param status
+     * @return
+     */
+    @GetMapping("/renewShopKeyword")
+    public ResponseJson renewShopKeyword(Integer id, Integer status) {
+        if (null == id) {
+            return ResponseJson.error(-1, "id不能为空", null);
+        }
+        if (null == status) {
+            return ResponseJson.error(-1, "状态不能为空", null);
+        }
+        return customerService.renewShopKeyword(id, status);
+    }
+
+    /**
+     * 删除统计文章
+     * @param id
+     * @return
+     */
+    @GetMapping("/delShopKeyword")
+    public ResponseJson delShopKeyword(Integer id) {
+        if (null == id) {
+            return ResponseJson.error(-1, "id不能为空", null);
+        }
+        return customerService.delShopKeyword(id);
+    }
+
+    /**
+     * 弹框信息回显
+     * @param shopId
+     * @return
+     */
+    @GetMapping("/getShopPopUp")
+    public ResponseJson<CmShopPopUp> getShopPopUp(Integer shopId) {
+        if (null == shopId) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        return customerService.getShopPopUp(shopId);
+    }
+
+    /**
+     * 弹框信息回显
+     * @param cmShopPopUp
+     * @return
+     */
+    @PostMapping("/saveShopPopUp")
+    public ResponseJson saveShopPopUp(CmShopPopUp cmShopPopUp) {
+        if (null == cmShopPopUp.getShopId()) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        if (null == cmShopPopUp.getImage()) {
+            return ResponseJson.error(-1, "显示图不能为空", null);
+        }
+        if (null == cmShopPopUp.getGuidingOne()) {
+            return ResponseJson.error(-1, "引导语不能为空", null);
+        }
+        if (null == cmShopPopUp.getGuidingTwo()) {
+            return ResponseJson.error(-1, "引导语不能为空", null);
+        }
+        return customerService.saveShopPopUp(cmShopPopUp);
+    }
+
+    /**
+     * 供应商广告列表
+     * @param cmShopAdvertisingImage
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/getShopAdvertisingImage")
+    public ResponseJson<PaginationVo<CmShopAdvertisingImage>> getShopAdvertisingImage(CmShopAdvertisingImage cmShopAdvertisingImage,
+                                                                                      @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                                      @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        if (null == cmShopAdvertisingImage.getShopId()) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        return customerService.getShopAdvertisingImage(cmShopAdvertisingImage, pageNum, pageSize);
+    }
+
+    /**
+     * 供应商广告信息回显
+     * @param id
+     * @return
+     */
+    @GetMapping("/getShopAdvertisingImageById")
+    public ResponseJson<CmShopAdvertisingImage> getShopAdvertisingImageById(Integer id) {
+        if (null == id) {
+            return ResponseJson.error(-1, "Id不能为空", null);
+        }
+        return customerService.getShopAdvertisingImageById(id);
+    }
+
+    /**
+     * 保存供应商广告信息
+     * @param cmShopAdvertisingImage
+     * @return
+     */
+    @PostMapping("/saveShopAdvertisingImage")
+    public ResponseJson saveShopAdvertisingImage(CmShopAdvertisingImage cmShopAdvertisingImage) {
+
+        return customerService.saveShopAdvertisingImage(cmShopAdvertisingImage);
+    }
+
+    /**
+     * 一键排序
+     * @param advertisingImages
+     * @return
+     */
+    @GetMapping("/renewShopAdvertisingImageSort")
+    public ResponseJson renewShopAdvertisingImageSort(String advertisingImages) {
+        if (StringUtils.isBlank(advertisingImages)) {
+            return ResponseJson.error(-1, "排序数据不能为空", null);
+        }
+        return customerService.renewShopAdvertisingImageSort(advertisingImages);
+    }
+
+    /**
+     * 修改上下架状态
+     * @param id
+     * @param status
+     * @return
+     */
+    @GetMapping("/renewShopAdvertisingImageStatus")
+    public ResponseJson renewShopAdvertisingImageStatus(Integer id, Integer status) {
+        if (null == id) {
+            return ResponseJson.error(-1, "id不能为空", null);
+        }
+        if (null == status) {
+            return ResponseJson.error(-1, "状态不能为空", null);
+        }
+        return customerService.renewShopAdvertisingImageStatus(id, status);
+    }
+
+    /**
+     * 删除广告
+     * @param id
+     * @return
+     */
+    @GetMapping("/delShopAdvertisingImage")
+    public ResponseJson delShopAdvertisingImage(Integer id) {
+        if (null == id) {
+            return ResponseJson.error(-1, "id不能为空", null);
+        }
+        return customerService.delShopAdvertisingImage(id);
+    }
+
+    /**
+     * 供应商主页统计
+     * @param shopId
+     * @return
+     */
+    @GetMapping("/getPageShop")
+    ResponseJson<PaginationVo<CmPageShop>> getPageShop(Integer shopId,
+                                                       @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                       @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        if (null == shopId) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        return customerService.getPageShop(shopId, pageNum, pageSize);
+    }
+
+    /**
+     * 供应商商品统计
+     * @param shopId
+     * @return
+     */
+    @GetMapping("/getPageShopProduct")
+    public ResponseJson<PaginationVo<CmPageShopProduct>> getPageShopProduct(Integer shopId,
+                                                                     @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                     @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        if (null == shopId) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        return customerService.getPageShopProduct(shopId, pageNum, pageSize);
+    }
+
+    /**
+     * 供应商文章
+     * @param shopId
+     * @return
+     */
+    @GetMapping("/getPageShopInfo")
+    public ResponseJson<PaginationVo<CmPageShopInfo>> getPageShopInfo(Integer shopId,
+                                                               @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                               @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        if (null == shopId) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        return customerService.getPageShopInfo(shopId, pageNum, pageSize);
+    }
+
+    /**
+     * 供应商搜索词统计
+     * @param shopId
+     * @return
+     */
+    @GetMapping("/getPageShopKeyword")
+    public ResponseJson<PaginationVo<CmPageShopKeyword>> getPageShopKeyword(Integer shopId,
+                                                                     @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                     @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
+        if (null == shopId) {
+            return ResponseJson.error(-1, "供应商Id不能为空", null);
+        }
+        return customerService.getPageShopKeyword(shopId, pageNum, pageSize);
+    }
+}

+ 235 - 0
src/main/java/com/caimei365/manager/dao/user/CustomerServiceDao.java

@@ -0,0 +1,235 @@
+package com.caimei365.manager.dao.user;
+
+import com.caimei365.manager.entity.caimei.CmShop;
+import com.caimei365.manager.entity.caimei.cmUser.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/5
+ */
+@Mapper
+public interface CustomerServiceDao {
+    /**
+     * 潜客供应商列表
+     * @param cmShopStatistics
+     * @return
+     */
+    List<CmShopStatistics> getCustomerShopList(CmShopStatistics cmShopStatistics);
+
+    /**
+     * 潜客供应商Id集合
+     * @return
+     */
+    List<Integer> getCustomerShopId();
+
+    /**
+     * 供应商列表
+     * @param shopName
+     * @return
+     */
+    List<CmShop> getShopList(@Param("shopName") String shopName);
+
+    /**
+     * 添加供应商
+     * @param cmShopStatistics
+     */
+    void insertCustomerShop(CmShopStatistics cmShopStatistics);
+
+    /**
+     * 修改统计状态
+     * @param id
+     * @param status
+     */
+    void updateCustomerShop( @Param("id") Integer id, @Param("status") Integer status);
+
+    /**
+     * 游客统计列表
+     * @param cmRoosInformation
+     * @return
+     */
+    List<CmRoosInformation> getCmInformationList(CmRoosInformation cmRoosInformation);
+
+    /**
+     * 修改跟进状态
+     * @param id
+     * @param followUpStatus
+     */
+    void updateInformation(@Param("id") Integer id, @Param("followUpStatus") Integer followUpStatus);
+
+    /**
+     * 相关文章列表
+     * @param cmShopInfo
+     * @return
+     */
+    List<CmShopInfo> getShopInfoList(CmShopInfo cmShopInfo);
+
+    /**
+     * 已被选择文章集合
+     * @return
+     */
+    List<Integer> getShopInfoId();
+
+    /**
+     * 选择文章
+     * @param id
+     * @param title
+     * @return
+     */
+    List<Info> getInfoList(@Param("id")Integer id, @Param("title") String title);
+
+    /**
+     * 插入供应商相关文章统计
+     * @param cmShopInfo
+     */
+    void insertShopInfo(CmShopInfo cmShopInfo);
+
+    /**
+     * 修改统计状态
+     * @param id
+     * @param status
+     */
+    void updateShopInfoStatus(@Param("id") Integer id, @Param("status") Integer status);
+
+    /**
+     * 删除统计文章
+     * @param id
+     */
+    void delShopInfo(@Param("id") Integer id);
+
+    /**
+     * 相关搜索词统计列表
+     * @param cmShopKeyword
+     * @return
+     */
+    List<CmShopKeyword> getShopKeyword(CmShopKeyword cmShopKeyword);
+
+    /**
+     * 相关搜索词统计Id
+     * @return
+     */
+    List<Integer> getShopKeywordId();
+
+    /**
+     * 选择搜索词
+     * @param keyword
+     * @return
+     */
+    List<CmUserSearchFrequency> getSearchFrequencyList(@Param("keyword") String keyword);
+
+    /**
+     * 插入相关搜索词统计
+     * @param cmShopKeyword
+     */
+    void insertShopKeyword(CmShopKeyword cmShopKeyword);
+
+    /**
+     * 修改统计状态
+     * @param id
+     * @param status
+     */
+    void updateShopKeywordStatus(@Param("id") Integer id, @Param("status") Integer status);
+
+    /**
+     * 删除相关搜索词
+     * @param id
+     */
+    void delShopKeyword(@Param("id") Integer id);
+
+    /**
+     * 弹框数据回显
+     * @param shopId
+     * @return
+     */
+    CmShopPopUp getShopPopUp(@Param("shopId") Integer shopId);
+
+    /**
+     * 插入弹框数据
+     * @param cmShopPopUp
+     */
+    void insertShopPopUp(CmShopPopUp cmShopPopUp);
+
+    /**
+     * 修改弹框数据
+     * @param cmShopPopUp
+     */
+    void updateShopPopUp(CmShopPopUp cmShopPopUp);
+
+    /**
+     * 供应商广告列表
+     * @param cmShopAdvertisingImage
+     * @return
+     */
+    List<CmShopAdvertisingImage> getShopAdvertisingImage(CmShopAdvertisingImage cmShopAdvertisingImage);
+
+    /**
+     * 广告信息回显
+     * @return
+     */
+    CmShopAdvertisingImage getShopAdvertisingImageById(@Param("id") Integer id);
+
+    /**
+     * 插入广告信息
+     * @param cmShopAdvertisingImage
+     */
+    void insertShopAdvertisingImage(CmShopAdvertisingImage cmShopAdvertisingImage);
+
+    /**
+     * 编辑广告信息
+     * @param cmShopAdvertisingImage
+     */
+    void updateShopAdvertisingImage(CmShopAdvertisingImage cmShopAdvertisingImage);
+
+    /**
+     * 排序
+     * @param id
+     * @param sort
+     */
+    void updateShopAdvertisingImageSort(@Param("id") Integer id, @Param("sort") Integer sort);
+
+    /**
+     * 修改上下架状态
+     * @param id
+     * @param status
+     */
+    void updateShopAdvertisingImageStatus(@Param("id") Integer id, @Param("status") Integer status);
+
+    /**
+     * 删除广告
+     * @param id
+     */
+    void delShopAdvertisingImage(@Param("id") Integer id);
+
+    /**
+     * 供应商主页统计
+     * @param shopId
+     * @return
+     */
+    List<CmPageShop> getPageShop(@Param("shopId") Integer shopId);
+
+    /**
+     * 供应商商品统计
+     * @param shopId
+     * @return
+     */
+    List<CmPageShopProduct> getPageShopProduct(@Param("shopId") Integer shopId);
+
+    /**
+     * 供应商文章
+     * @param shopId
+     * @return
+     */
+    List<CmPageShopInfo> getPageShopInfo(@Param("shopId") Integer shopId);
+
+    /**
+     * 供应商搜索词统计
+     * @param shopId
+     * @return
+     */
+    List<CmPageShopKeyword> getPageShopKeyword(@Param("shopId") Integer shopId);
+}

+ 4 - 0
src/main/java/com/caimei365/manager/entity/caimei/CmShop.java

@@ -121,4 +121,8 @@ public class CmShop implements Serializable {
      * 如选择为医疗>>三类器械  则必须要上传资质
      */
     private String medicalPracticeLicenseImg1;
+    /**
+     * 是否支持选择
+     */
+    private Boolean flag;
 }

+ 44 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmPageShop.java

@@ -0,0 +1,44 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/6
+ */
+@Data
+public class CmPageShop {
+    private Integer id;
+    /**
+     * 供应商Id
+     */
+    private Integer shopId;
+    /**
+     * 供应商名称
+     */
+    private Integer shopName;
+    /**
+     * 跳转链接
+     */
+    private Integer shopLink;
+    /**
+     * 访问次数
+     */
+    private Integer accessNumber;
+    /**
+     * 访问时长
+     */
+    private String accessDuration;
+    /**
+     * 平均访问时长
+     */
+    private Double averageDuration;
+    /**
+     * 时间
+     */
+    private String accessDate;
+}

+ 54 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmPageShopInfo.java

@@ -0,0 +1,54 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/6
+ */
+@Data
+public class CmPageShopInfo {
+    private Integer id;
+    /**
+     * 供应商Id
+     */
+    private Integer shopId;
+    /**
+     * 文章Id
+     */
+    private Integer infoId;
+    /**
+     * 引导图
+     */
+    private String guidanceImage;
+    /**
+     * 文章标题
+     */
+    private String title;
+    /**
+     * 文章上线状态:1待上线,2已上线,3已下线
+     */
+    private Integer onlineStatus;
+    /**
+     * 链接
+     */
+    private String link;
+    /**
+     * 访问次数
+     */
+    private Integer accessNumber;
+    /**
+     * 访问时长
+     */
+    private String accessDuration;
+    /**
+     * 平均时长
+     */
+    private Double averageDuration;
+    /**
+     * 时间
+     */
+    private String accessDate;
+}

+ 42 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmPageShopKeyword.java

@@ -0,0 +1,42 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/6
+ */
+@Data
+public class CmPageShopKeyword {
+    private Integer id;
+    /**
+     * 供应商Id
+     */
+    private Integer shopId;
+    /**
+     * 搜索词
+     */
+    private String keyword;
+    /**
+     * 链接
+     */
+    private String link;
+    /**
+     * 访问次数
+     */
+    private Integer accessNumber;
+    /**
+     * 访问时长
+     */
+    private String accessDuration;
+    /**
+     * 平均访问时长
+     */
+    private Double averageDuration;
+    /**
+     * 时间
+     */
+    private String accessDate;
+}

+ 54 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmPageShopProduct.java

@@ -0,0 +1,54 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/6
+ */
+@Data
+public class CmPageShopProduct {
+    private Integer id;
+    /**
+     * 供应商Id
+     */
+    private Integer shopId;
+    /**
+     * 商品Id
+     */
+    private Integer productId;
+    /**
+     * 商品名称
+     */
+    private Integer productName;
+    /**
+     * 商品主图
+     */
+    private Integer mainImage;
+    /**
+     * 商品状态
+     */
+    private Integer validFlag;
+    /**
+     * 链接
+     */
+    private Integer link;
+    /**
+     * 访问次数
+     */
+    private Integer accessNumber;
+    /**
+     * 访问时长
+     */
+    private String accessDuration;
+    /**
+     * 平均访问时长
+     */
+    private Double averageDuration;
+    /**
+     * 时间
+     */
+    private String accessDate;
+}

+ 46 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmRoosInformation.java

@@ -0,0 +1,46 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/5
+ */
+@Data
+public class CmRoosInformation {
+    private Integer id;
+    /**
+     * IP
+     */
+    private Integer IP;
+    /**
+     * 用户ID
+     */
+    private Integer userID;
+    /**
+     * 供应商Id
+     */
+    private Integer shopId;
+    /**
+     * 跟进状态 0 已跟进 1 未跟进
+     */
+    private Integer followUpStatus;
+    /**
+     * 咨询姓名
+     */
+    private String consultName;
+    /**
+     * 咨询手机号码
+     */
+    private String consultMobile;
+    /**
+     * 是否点击关闭弹框
+     */
+    private Integer isClick;
+    /**
+     * 创建时间
+     */
+    private String createTime;
+}

+ 55 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmShopAdvertisingImage.java

@@ -0,0 +1,55 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import com.caimei365.manager.entity.caimei.CmShop;
+import lombok.Data;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/6
+ */
+@Data
+public class CmShopAdvertisingImage {
+    private Integer id;
+    /**
+     * 供应商Id
+     */
+    private Integer shopId;
+    /**
+     * 供应商名称
+     */
+    private String shopName;
+    /**
+     * pc图片
+     */
+    private String pcImage;
+    /**
+     * 小程序图片
+     */
+    private String appImage;
+    /**
+     * 跳转链接
+     */
+    private String jumpLink;
+    /**
+     * 排序
+     */
+    private Integer sort;
+    /**
+     * 添加时间
+     */
+    private String addTime;
+    /**
+     * 上下架状态 0 已上架 1 已下架
+     */
+    private Integer status;
+    /**
+     * 删除标记:0未删除,1已删除
+     */
+    private Integer delFlag;
+    /**
+     * 供应商信息
+     */
+    private CmShop shop;
+}

+ 48 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmShopInfo.java

@@ -0,0 +1,48 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/6
+ */
+@Data
+public class CmShopInfo {
+    private Integer id;
+    /**
+     * 供应商Id
+     */
+    private Integer shopId;
+    /**
+     * 文章Id
+     */
+    private Integer infoId;
+    /**
+     * 引导图
+     */
+    private Integer guidanceImage;
+    /**
+     * 标题
+     */
+    private String title;
+    /**
+     * 发布时间
+     */
+    private Date pubdate;
+    /**
+     * 统计状态 0 统计 1 不统计
+     */
+    private Integer status;
+    /**
+     * 添加时间
+     */
+    private String addTime;
+    /**
+     * 删除标记:0未删除,1已删除
+     */
+    private Integer delFlag;
+}

+ 48 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmShopKeyword.java

@@ -0,0 +1,48 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/6
+ */
+@Data
+public class CmShopKeyword {
+    private Integer id;
+    /**
+     * 供应商Id
+     */
+    private Integer shopId;
+    /**
+     * 搜索词Id
+     */
+    private Integer searchId;
+    /**
+     * 统计状态 0 统计 1 不统计
+     */
+    private Integer status;
+    /**
+     * 添加时间
+     */
+    private Integer addTime;
+    /**
+     * 删除标记:0未删除,1已删除
+     */
+    private Integer delFlag;
+    /**
+     * 关键词
+     */
+    private String keyword;
+    /**
+     * 搜索次数
+     */
+    private String number;
+    /**
+     * 搜索时间
+     */
+    private Date searchTime;
+}

+ 34 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmShopPopUp.java

@@ -0,0 +1,34 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/6
+ */
+@Data
+public class CmShopPopUp {
+    private Integer id;
+    /**
+     * 供应商Id
+     */
+    private Integer shopId;
+    /**
+     * 图片
+     */
+    private String image;
+    /**
+     * 引导语1
+     */
+    private String guidingOne;
+    /**
+     * 引导语2
+     */
+    private String guidingTwo;
+    /**
+     * 添加时间
+     */
+    private String addTime;
+}

+ 49 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmShopStatistics.java

@@ -0,0 +1,49 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/5
+ */
+@Data
+public class CmShopStatistics {
+    /**
+     * Id
+     */
+    private Integer id;
+    /**
+     * 供应商Id
+     */
+    private Integer shopId;
+    /**
+     * 供应商名称
+     */
+    private String shopName;
+    /**
+     * 联系人
+     */
+    private String linkMan;
+    /**
+     * 手机号
+     */
+    private String mobile;
+    /**
+     * 供应商状态 3待审核, 90已上线,91已下线,92审核不通过
+     */
+    private Integer shopStatus;
+    /**
+     * 统计状态 0 统计 1 不统计
+     */
+    private Integer status;
+    /**
+     * 添加时间
+     */
+    private String addTime;
+    /**
+     * 删除标记:0未删除,1已删除
+     */
+    private Integer delFlag;
+}

+ 68 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmUserSearchFrequency.java

@@ -0,0 +1,68 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/6
+ */
+@Data
+public class CmUserSearchFrequency {
+    private Integer id;
+    /**
+     * 标签库数据来源(1:手动添加;2:用户关键词统计;3:导入)
+     */
+    private Integer fromSearch;
+    /**
+     * 关键词
+     */
+    private String keyword;
+    /**
+     * 关键词出现次数
+     */
+    private Integer frequency;
+    /**
+     * 0:未加入关键词库;1:已加入关键词库
+     */
+    private Integer trueStatus;
+    /**
+     * 0:已删除;1未删除
+     */
+    private Integer delStatus;
+    /**
+     * 联动关键词出现次数
+     */
+    private Integer linkageFrequency;
+    /**
+     * 搜索时间
+     */
+    private Date searchTime;
+    /**
+     * 推荐状态:0未推荐,1已推荐
+     */
+    private Integer recommendStatus;
+    /**
+     * 推荐时间
+     */
+    private Date recommendTime;
+    /**
+     * 推荐列表删除标记0未忽略1忽略
+     */
+    private Integer recommendFlag;
+    /**
+     * 添加到标签库的时间
+     */
+    private Date addTime;
+    /**
+     * 联动搜索状态:0未启用,1已启用
+     */
+    private Integer linkageStatus;
+    /**
+     * 是否支持选择
+     */
+    private Boolean flag;
+}

+ 140 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/Info.java

@@ -0,0 +1,140 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/6
+ */
+@Data
+public class Info {
+    private Integer id;
+    /**
+     * 信息分类
+     */
+    private Integer typeId;
+    /**
+     * 标题
+     */
+    private String title;
+    /**
+     * 信息标签
+     */
+    private String label;
+    /**
+     * 发布人
+     */
+    private String publisher;
+    /**
+     * 来源
+     */
+    private String source;
+    /**
+     * 文章发布来源:1采美365网,2供应商
+     */
+    private Integer publishSource;
+    /**
+     * 供应商id,publishSource为2时才有值
+     */
+    private Integer shopId;
+    /**
+     * 关键字
+     */
+    private String keyword;
+    /**
+     * 推荐语
+     */
+    private String recommendContent;
+    /**
+     * 信息内容
+     */
+    private String infoContent;
+    /**
+     * 引导图
+     */
+    private String guidanceImage;
+    /**
+     * 商城首页图
+     */
+    private String homePageImage;
+    /**
+     * 发布时间
+     */
+    private Date pubdate;
+    /**
+     * 推荐状态 0停用 1启用
+     */
+    private String recommendStatus;
+    /**
+     * 推荐方式 0自动推荐 1手动推荐
+     */
+    private Integer autoStatus;
+    /**
+     * 启用/禁用状态
+     */
+    private String enabledStatus;
+    /**
+     * 基础点赞
+     */
+    private Integer basePraise;
+    /**
+     * 基础浏览量
+     */
+    private Integer basePv;
+    /**
+     * 优先级
+     */
+    private String priorityIndex;
+    /**
+     * 供应商文章审核状态:1待审核,2审核通过,3审核失败
+     */
+    private Integer auditStatus;
+    /**
+     * 文章上线状态:1待上线,2已上线,3已下线
+     */
+    private Integer onlineStatus;
+    /**
+     * 审核失败理由
+     */
+    private String failReason;
+    /**
+     * 创建人
+     */
+    private String createBy;
+    /**
+     * 创建时间
+     */
+    private Date createDate;
+    /**
+     * 最后更新人
+     */
+    private String updateBy;
+    /**
+     * 最后更新时间
+     */
+    private Date updateDate;
+    /**
+     * 首页置顶位
+     */
+    private Integer topPosition;
+    /**
+     * 关联标签库ids
+     */
+    private String labelIds;
+    /**
+     * 关联标签库字符串
+     */
+    private String relatedLabels;
+    /**
+     * 删除标记:0未删除,1已删除
+     */
+    private Integer delFlag;
+    /**
+     * 是否支持选择
+     */
+    private Boolean flag;
+}

+ 231 - 0
src/main/java/com/caimei365/manager/service/caimei/user/CustomerService.java

@@ -0,0 +1,231 @@
+package com.caimei365.manager.service.caimei.user;
+
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.caimei.CmShop;
+import com.caimei365.manager.entity.caimei.cmUser.*;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/5
+ */
+public interface CustomerService {
+    /**
+     * 潜客供应商列表
+     * @param cmShopStatistics
+     * @return
+     */
+    ResponseJson<PaginationVo<CmShopStatistics>> getCustomerShopList(CmShopStatistics cmShopStatistics, Integer pageNum, Integer pageSize);
+
+    /**
+     * 供应商列表
+     * @param shopName
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    ResponseJson<PaginationVo<CmShop>> getShopLiat(String shopName, Integer pageNum, Integer pageSize);
+
+    /**
+     * 添加统计供应商
+     * @return
+     */
+    ResponseJson saveCustomerShop(String shopIds);
+
+    /**
+     * 设置统计状态
+     * @param id
+     * @param status
+     * @return
+     */
+    ResponseJson renewCustomerShop(Integer id, Integer status);
+
+    /**
+     * 游客统计
+     * @param cmRoosInformation
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    ResponseJson<PaginationVo<CmRoosInformation>> getCmInformationList(CmRoosInformation cmRoosInformation, Integer pageNum, Integer pageSize);
+
+    /**
+     * 设置跟进状态
+     * @param id
+     * @param followUpStatus
+     * @return
+     */
+    ResponseJson renewFollowUpStatus(Integer id, Integer followUpStatus);
+
+    /**
+     * 相关文章列表
+     * @param cmShopInfo
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    ResponseJson<PaginationVo<CmShopInfo>> getShopInfoList(CmShopInfo cmShopInfo, Integer pageNum, Integer pageSize);
+
+    /**
+     * 选择文章
+     * @param id
+     * @param title
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    ResponseJson<PaginationVo<Info>> getInfoList(Integer id, String title, Integer pageNum, Integer pageSize);
+
+    /**
+     * 添加文章统计
+     * @param shopId
+     * @param infoIds
+     * @return
+     */
+    ResponseJson saveShopInfo(Integer shopId, String infoIds);
+
+    /**
+     * 设置统计状态
+     * @param id
+     * @param status
+     * @return
+     */
+    ResponseJson renewShopInfo(Integer id, Integer status);
+
+    /**
+     * 删除统计文章
+     * @param id
+     * @return
+     */
+    ResponseJson delShopInfo(Integer id);
+
+    /**
+     * 相关文章列表
+     * @param cmShopKeyword
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    ResponseJson<PaginationVo<CmShopKeyword>> getShopKeywordList(CmShopKeyword cmShopKeyword, Integer pageNum, Integer pageSize);
+
+    /**
+     * 选择文章
+     * @param keyword
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    ResponseJson<PaginationVo<CmUserSearchFrequency>> getSearchFrequencyList(String keyword, Integer pageNum, Integer pageSize);
+
+    /**
+     * 添加文章统计
+     * @param shopId
+     * @param keyWordIds
+     * @return
+     */
+    ResponseJson saveShopKeyword(Integer shopId, String keyWordIds);
+
+    /**
+     * 设置统计状态
+     * @param id
+     * @param status
+     * @return
+     */
+    ResponseJson renewShopKeyword(Integer id, Integer status);
+
+    /**
+     * 删除统计文章
+     * @param id
+     * @return
+     */
+    ResponseJson delShopKeyword(Integer id);
+
+    /**
+     * 弹框数据回显
+     * @param shopId
+     * @return
+     */
+    ResponseJson<CmShopPopUp> getShopPopUp(Integer shopId);
+
+    /**
+     * 谈款数据保存
+     * @param cmShopPopUp
+     * @return
+     */
+    ResponseJson saveShopPopUp(CmShopPopUp cmShopPopUp);
+
+    /**
+     * 供应商广告列表
+     * @param cmShopAdvertisingImage
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    ResponseJson<PaginationVo<CmShopAdvertisingImage>> getShopAdvertisingImage(CmShopAdvertisingImage cmShopAdvertisingImage, Integer pageNum, Integer pageSize);
+
+    /**
+     * 供应商广告信息回显
+     * @param id
+     * @return
+     */
+    ResponseJson<CmShopAdvertisingImage> getShopAdvertisingImageById(Integer id);
+
+    /**
+     * 保存供应商广告信息
+     * @param cmShopAdvertisingImage
+     * @return
+     */
+    ResponseJson saveShopAdvertisingImage(CmShopAdvertisingImage cmShopAdvertisingImage);
+
+    /**
+     * 一键排序
+     * @param advertisingImages
+     * @return
+     */
+    ResponseJson renewShopAdvertisingImageSort(String advertisingImages);
+
+    /**
+     * 修改上下架状态
+     * @param id
+     * @param status
+     * @return
+     */
+    ResponseJson renewShopAdvertisingImageStatus(Integer id, Integer status);
+
+    /**
+     * 删除广告
+     * @param id
+     * @return
+     */
+    ResponseJson delShopAdvertisingImage(Integer id);
+
+    /**
+     * 供应商主页统计
+     * @param shopId
+     * @return
+     */
+    ResponseJson<PaginationVo<CmPageShop>> getPageShop(Integer shopId, Integer pageNum, Integer pageSize);
+
+    /**
+     * 供应商商品统计
+     * @param shopId
+     * @return
+     */
+    ResponseJson<PaginationVo<CmPageShopProduct>> getPageShopProduct(Integer shopId, Integer pageNum, Integer pageSize);
+
+    /**
+     * 供应商文章
+     * @param shopId
+     * @return
+     */
+    ResponseJson<PaginationVo<CmPageShopInfo>> getPageShopInfo(Integer shopId, Integer pageNum, Integer pageSize);
+
+    /**
+     * 供应商搜索词统计
+     * @param shopId
+     * @return
+     */
+    ResponseJson<PaginationVo<CmPageShopKeyword>> getPageShopKeyword(Integer shopId, Integer pageNum, Integer pageSize);
+}

+ 501 - 0
src/main/java/com/caimei365/manager/service/caimei/user/impl/CustomerServiceImpl.java

@@ -0,0 +1,501 @@
+package com.caimei365.manager.service.caimei.user.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.caimei365.manager.dao.user.CustomerServiceDao;
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.caimei.CmShop;
+import com.caimei365.manager.entity.caimei.cmUser.*;
+import com.caimei365.manager.service.caimei.user.CustomerService;
+import com.github.pagehelper.PageHelper;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/5
+ */
+@Service
+public class CustomerServiceImpl implements CustomerService {
+
+    @Resource private CustomerServiceDao customerServiceDao;
+
+    /**
+     * 潜客供应商列表
+     * @param cmShopStatistics
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmShopStatistics>> getCustomerShopList(CmShopStatistics cmShopStatistics, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmShopStatistics> customerShopList = customerServiceDao.getCustomerShopList(cmShopStatistics);
+        PaginationVo<CmShopStatistics> page = new PaginationVo<>(customerShopList);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 供应商列表
+     * @param shopName
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmShop>> getShopLiat(String shopName, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmShop> shopList = customerServiceDao.getShopList(shopName);
+        // 是否支持选择
+        List<Integer> customerShopId = customerServiceDao.getCustomerShopId();
+        shopList.forEach( s -> {
+            if (customerShopId.contains(s.getShopId())) {
+                s.setFlag(false);
+            }
+        });
+        PaginationVo<CmShop> page = new PaginationVo<>(shopList);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 添加统计供应商
+     *
+     * @param shopIds
+     * @return
+     */
+    @Override
+    public ResponseJson saveCustomerShop(String shopIds) {
+        List<String> shopId = new ArrayList<>();
+        if (shopIds.contains(",")) {
+            shopId = Arrays.asList(shopIds.split(","));
+        } else {
+            shopId.add(shopIds);
+        }
+        for (String s : shopId) {
+            CmShopStatistics statistics = new CmShopStatistics();
+            statistics.setShopId(Integer.parseInt(s));
+            statistics.setStatus(0);
+            statistics.setDelFlag(0);
+            customerServiceDao.insertCustomerShop(statistics);
+        }
+        return ResponseJson.success();
+    }
+
+    /**
+     * 设置统计状态
+     *
+     * @param id
+     * @param status
+     * @return
+     */
+    @Override
+    public ResponseJson renewCustomerShop(Integer id, Integer status) {
+        customerServiceDao.updateCustomerShop(id, status);
+        return ResponseJson.success();
+    }
+
+    /**
+     * 游客统计
+     *
+     * @param cmRoosInformation
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmRoosInformation>> getCmInformationList(CmRoosInformation cmRoosInformation, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmRoosInformation> cmInformationList = customerServiceDao.getCmInformationList(cmRoosInformation);
+        PaginationVo<CmRoosInformation> page = new PaginationVo<>(cmInformationList);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 设置跟进状态
+     *
+     * @param id
+     * @param followUpStatus
+     * @return
+     */
+    @Override
+    public ResponseJson renewFollowUpStatus(Integer id, Integer followUpStatus) {
+        customerServiceDao.updateInformation(id, followUpStatus);
+        return ResponseJson.success();
+    }
+
+    /**
+     * 相关文章列表
+     *
+     * @param cmShopInfo
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmShopInfo>> getShopInfoList(CmShopInfo cmShopInfo, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmShopInfo> shopInfoList = customerServiceDao.getShopInfoList(cmShopInfo);
+        PaginationVo<CmShopInfo> page = new PaginationVo<>(shopInfoList);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 选择文章
+     *
+     * @param id
+     * @param title
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<Info>> getInfoList(Integer id, String title, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<Info> infoList = customerServiceDao.getInfoList(id, title);
+        List<Integer> shopInfoId = customerServiceDao.getShopInfoId();
+        infoList.forEach( i -> {
+            if (shopInfoId.contains(i.getId())) {
+                i.setFlag(false);
+            }
+        });
+        PaginationVo<Info> page = new PaginationVo<>(infoList);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 添加文章统计
+     *
+     * @param shopId
+     * @param infoIds
+     * @return
+     */
+    @Override
+    public ResponseJson saveShopInfo(Integer shopId, String infoIds) {
+        List<String> infoId = new ArrayList<>();
+        if (infoIds.contains(",")) {
+            infoId = Arrays.asList(infoIds.split(","));
+        } else {
+            infoId.add(infoIds);
+        }
+        for (String s : infoId) {
+            CmShopInfo shopInfo = new CmShopInfo();
+            shopInfo.setShopId(shopId);
+            shopInfo.setInfoId(Integer.parseInt(s));
+            shopInfo.setStatus(0);
+            shopInfo.setDelFlag(0);
+            customerServiceDao.insertShopInfo(shopInfo);
+        }
+        return ResponseJson.success();
+    }
+
+    /**
+     * 设置统计状态
+     *
+     * @param id
+     * @param status
+     * @return
+     */
+    @Override
+    public ResponseJson renewShopInfo(Integer id, Integer status) {
+        customerServiceDao.updateShopInfoStatus(id, status);
+        return ResponseJson.success();
+    }
+
+    /**
+     * 删除统计文章
+     *
+     * @param id
+     * @return
+     */
+    @Override
+    public ResponseJson delShopInfo(Integer id) {
+        customerServiceDao.delShopInfo(id);
+        return ResponseJson.success();
+    }
+
+    /**
+     * 相关文章列表
+     *
+     * @param cmShopKeyword
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmShopKeyword>> getShopKeywordList(CmShopKeyword cmShopKeyword, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmShopKeyword> shopKeyword = customerServiceDao.getShopKeyword(cmShopKeyword);
+        PaginationVo<CmShopKeyword> page = new PaginationVo<>(shopKeyword);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 选择文章
+     *
+     * @param keyword
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmUserSearchFrequency>> getSearchFrequencyList(String keyword, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmUserSearchFrequency> searchFrequencyList = customerServiceDao.getSearchFrequencyList(keyword);
+        List<Integer> shopKeywordId = customerServiceDao.getShopKeywordId();
+        searchFrequencyList.forEach( s -> {
+            if (shopKeywordId.contains(s.getId())) {
+                s.setFlag(false);
+            }
+        });
+        PaginationVo<CmUserSearchFrequency> page = new PaginationVo<>(searchFrequencyList);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 添加文章统计
+     *
+     * @param shopId
+     * @param keyWordIds
+     * @return
+     */
+    @Override
+    public ResponseJson saveShopKeyword(Integer shopId, String keyWordIds) {
+        List<String> keyWordId = new ArrayList<>();
+        if (keyWordIds.contains(",")) {
+            keyWordId = Arrays.asList(keyWordIds.split(","));
+        } else {
+            keyWordId.add(keyWordIds);
+        }
+        for (String s : keyWordId) {
+            CmShopKeyword shopKeyword = new CmShopKeyword();
+            shopKeyword.setShopId(shopId);
+            shopKeyword.setSearchId(Integer.parseInt(s));
+            shopKeyword.setStatus(0);
+            shopKeyword.setDelFlag(0);
+            customerServiceDao.insertShopKeyword(shopKeyword);
+        }
+        return ResponseJson.success();
+    }
+
+    /**
+     * 设置统计状态
+     *
+     * @param id
+     * @param status
+     * @return
+     */
+    @Override
+    public ResponseJson renewShopKeyword(Integer id, Integer status) {
+        customerServiceDao.updateShopKeywordStatus(id, status);
+        return ResponseJson.success();
+    }
+
+    /**
+     * 删除统计文章
+     *
+     * @param id
+     * @return
+     */
+    @Override
+    public ResponseJson delShopKeyword(Integer id) {
+        customerServiceDao.delShopKeyword(id);
+        return ResponseJson.success();
+    }
+
+    /**
+     * 弹框数据回显
+     *
+     * @param shopId
+     * @return
+     */
+    @Override
+    public ResponseJson<CmShopPopUp> getShopPopUp(Integer shopId) {
+        return ResponseJson.success(customerServiceDao.getShopPopUp(shopId));
+    }
+
+    /**
+     * 谈款数据保存
+     *
+     * @param cmShopPopUp
+     * @return
+     */
+    @Override
+    public ResponseJson saveShopPopUp(CmShopPopUp cmShopPopUp) {
+        if (null == cmShopPopUp.getId()) {
+            // 新增
+            customerServiceDao.insertShopPopUp(cmShopPopUp);
+        } else {
+            // 修改
+            customerServiceDao.updateShopPopUp(cmShopPopUp);
+        }
+        return ResponseJson.success();
+    }
+
+    /**
+     * 供应商广告列表
+     *
+     * @param cmShopAdvertisingImage
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmShopAdvertisingImage>> getShopAdvertisingImage(CmShopAdvertisingImage cmShopAdvertisingImage, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmShopAdvertisingImage> shopAdvertisingImage = customerServiceDao.getShopAdvertisingImage(cmShopAdvertisingImage);
+        PaginationVo<CmShopAdvertisingImage> page = new PaginationVo<>(shopAdvertisingImage);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 供应商广告信息回显
+     *
+     * @param id
+     * @return
+     */
+    @Override
+    public ResponseJson<CmShopAdvertisingImage> getShopAdvertisingImageById(Integer id) {
+        CmShopAdvertisingImage shopAdvertisingImage = customerServiceDao.getShopAdvertisingImageById(id);
+        // 设置供应商信息
+        List<CmShop> shopList = customerServiceDao.getShopList("");
+        CmShop shop = shopList.stream().filter(s -> s.getShopId().equals(shopAdvertisingImage.getShopId())).collect(Collectors.toList()).get(0);
+        shopAdvertisingImage.setShop(shop);
+        return ResponseJson.success(shopAdvertisingImage);
+    }
+
+    /**
+     * 保存供应商广告信息
+     *
+     * @param cmShopAdvertisingImage
+     * @return
+     */
+    @Override
+    public ResponseJson saveShopAdvertisingImage(CmShopAdvertisingImage cmShopAdvertisingImage) {
+        if (null == cmShopAdvertisingImage.getId()) {
+            // 插入
+            customerServiceDao.insertShopAdvertisingImage(cmShopAdvertisingImage);
+        } else {
+            // 修改
+            customerServiceDao.updateShopAdvertisingImage(cmShopAdvertisingImage);
+        }
+        return ResponseJson.success();
+    }
+
+    /**
+     * 一键排序
+     *
+     * @param advertisingImages
+     * @return
+     */
+    @Override
+    public ResponseJson renewShopAdvertisingImageSort(String advertisingImages) {
+        try {
+            JSONArray parseArray = JSONArray.parseArray(advertisingImages);
+            for (Object object : parseArray) {
+                JSONObject parseObject = (JSONObject) object;
+                Integer id = (Integer) parseObject.get("id");
+                Integer sort = (Integer) parseObject.get("sort");
+                customerServiceDao.updateShopAdvertisingImageSort(id, sort);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return ResponseJson.success();
+    }
+
+    /**
+     * 修改上下架状态
+     *
+     * @param id
+     * @param status
+     * @return
+     */
+    @Override
+    public ResponseJson renewShopAdvertisingImageStatus(Integer id, Integer status) {
+        customerServiceDao.updateShopAdvertisingImageStatus(id, status);
+        return ResponseJson.success();
+    }
+
+    /**
+     * 删除广告
+     *
+     * @param id
+     * @return
+     */
+    @Override
+    public ResponseJson delShopAdvertisingImage(Integer id) {
+        customerServiceDao.delShopAdvertisingImage(id);
+        return ResponseJson.success();
+    }
+
+    /**
+     * 供应商主页统计
+     *
+     * @param shopId
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmPageShop>> getPageShop(Integer shopId, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmPageShop> pageShop = customerServiceDao.getPageShop(shopId);
+        PaginationVo<CmPageShop> page = new PaginationVo<>(pageShop);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 供应商商品统计
+     *
+     * @param shopId
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmPageShopProduct>> getPageShopProduct(Integer shopId, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmPageShopProduct> pageShopProduct = customerServiceDao.getPageShopProduct(shopId);
+        PaginationVo<CmPageShopProduct> page = new PaginationVo<>(pageShopProduct);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 供应商文章
+     *
+     * @param shopId
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmPageShopInfo>> getPageShopInfo(Integer shopId, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmPageShopInfo> pageShopInfo = customerServiceDao.getPageShopInfo(shopId);
+        PaginationVo<CmPageShopInfo> page = new PaginationVo<>(pageShopInfo);
+        return ResponseJson.success(page);
+    }
+
+    /**
+     * 供应商搜索词统计
+     *
+     * @param shopId
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @Override
+    public ResponseJson<PaginationVo<CmPageShopKeyword>> getPageShopKeyword(Integer shopId, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CmPageShopKeyword> pageShopKeyword = customerServiceDao.getPageShopKeyword(shopId);
+        PaginationVo<CmPageShopKeyword> page = new PaginationVo<>(pageShopKeyword);
+        return ResponseJson.success(page);
+    }
+}

+ 352 - 0
src/main/resources/mapper/user/CustomerServiceDao.xml

@@ -0,0 +1,352 @@
+<?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.caimei365.manager.dao.user.CustomerServiceDao">
+
+    <select id="getCustomerShopList" resultType="com.caimei365.manager.entity.caimei.cmUser.CmShopStatistics">
+        SELECT
+            DISTINCT css.shopID AS shopId,
+                     s.name,
+                     s.linkMan,
+                     s.contractMobile AS mobile,
+                     s.status AS shopStatus,
+                     css.status,
+                     css.addTime
+        FROM cm_shop_statistics css
+                 LEFT JOIN shop s ON css.shopId = s.shopId
+        <where>
+            css.delFlag = 0
+            <if test="name != null and name != ''">
+                and s.name like concat('%',#{name},'%')
+            </if>
+            <if test="status != null">
+                and css.status = #{status}
+            </if>
+        </where>
+        order by css.addTime, s.addTime desc
+    </select>
+
+    <select id="getCustomerShopId" resultType="java.lang.Integer">
+        SELECT shopId FROM cm_shop_statistics where delFlag = 0
+    </select>
+
+    <select id="getShopList" resultType="com.caimei365.manager.entity.caimei.CmShop">
+        select * from shop
+        where status = 90
+        <if test="shopName != null and shopName != ''">
+            and name like concat('%',#{shopName},'%')
+        </if>
+        <if test="shopId != null">
+            and shopId = #{shopId}
+        </if>
+        order by addTime desc
+    </select>
+
+    <insert id="insertCustomerShop">
+        insert into cm_shop_statistics (shopId, status, addTime, delFlag)
+        values (#{shopId}, #{status}, now(), #{delFlag})
+    </insert>
+
+    <update id="updateCustomerShop">
+        update cm_shop_statistics
+        set status = #{status}
+        where id = #{id}
+    </update>
+    <select id="getCmInformationList" resultType="com.caimei365.manager.entity.caimei.cmUser.CmRoosInformation">
+        SELECT id,
+               IP,
+               userID,
+               shopId,
+               followUpStatus,
+               consultName,
+               consultMobile,
+               isClick,
+               createTime
+        FROM cm_roos_information
+        <where>
+          shopId = #{shopId}
+          AND consultName IS NOT NULL
+          AND consultMobile IS NOT NULL
+            <if test="consultName != null and consultName != ''">
+                and consultName like concat('%',#{consultName},'%')
+            </if>
+            <if test="consultMobile != null and consultMobile != ''">
+                and consultMobile like concat('%',#{consultMobile},'%')
+            </if>
+            <if test="followUpStatus != null">
+                and followUpStatus = #{followUpStatus}
+            </if>
+        </where>
+        order by createTime desc
+    </select>
+
+    <select id="updateInformation">
+        update cm_roos_information
+        set followUpStatus = #{followUpStatus}
+        where id = #{id}
+    </select>
+
+    <select id="getShopInfoList" resultType="com.caimei365.manager.entity.caimei.cmUser.CmShopInfo">
+        SELECT
+            csi.id,
+            csi.infoId,
+            i.guidanceImage,
+            i.title,
+            i.pubdate,
+            csi.status,
+            csi.addTime
+        FROM cm_shop_info csi
+        LEFT JOIN info i ON i.id = csi.infoId
+        <where>
+            csi.shopId = #{shopId} and csi.delFlag = 0 and i.delFlag = 0
+            <if test="infoId != null">
+                and csi.infoId = #{infoId}
+            </if>
+            <if test="title != null and title != ''">
+                and i.title like concat('%',#{title},'%')
+            </if>
+            <if test="status != null">
+                csi.status = #{status}
+            </if>
+        </where>
+        order by csi.addTime, i.pubdate desc
+    </select>
+
+    <select id="getShopInfoId" resultType="java.lang.Integer">
+        select id from cm_shop_info where delFlag = 0
+    </select>
+
+    <select id="getInfoList" resultType="com.caimei365.manager.entity.caimei.cmUser.Info">
+        select * from info
+        where delFlag = 0 and onlineStatus = 2
+        <if test="id != null">
+            and id = #{id}
+        </if>
+        <if test="title != null and title != ''">
+            and title like concat('%',#{title},'%')
+        </if>
+        order by pubdate desc
+    </select>
+
+    <insert id="insertShopInfo">
+        insert into cm_shop_info (shopId, infoId, status, addTime, delFlag)
+        values (#{shopId}, #{infoId}, #{status}, now(), #{delFlag})
+    </insert>
+
+    <update id="updateShopInfoStatus">
+        update cm_shop_info
+        set status = #{status}
+        where id = #{id}
+    </update>
+
+    <update id="delShopInfo">
+        update cm_shop_info
+        set delFlag = 0
+        where id = #{id}
+    </update>
+
+    <select id="getShopKeyword" resultType="com.caimei365.manager.entity.caimei.cmUser.CmShopKeyword">
+        SELECT
+            csk.id,
+            csk.shopId,
+            cusf.keyword,
+            (SELECT COUNT(recordID) FROM cm_behavior_record WHERE pageType = 8 AND pageLabel = cusf.keyword) as number,
+            cusf.searchTime,
+            csk.status,
+            csk.addTime
+        FROM cm_shop_keyword csk
+                 LEFT JOIN cm_user_search_frequency cusf ON cusf.id = csk.searchId
+        <where>
+            csk.shopId = #{shopId}
+            and csk.delFlag = 0 and cusf.delStatus = 0
+            <if test="keyword != null and keyword != ''">
+                and cusf.keyword like concat('%',#{keyword},'%')
+            </if>
+            <if test="status != null">
+                csk.status = #{status}
+            </if>
+        </where>
+        order by csk.addTime, (SELECT COUNT(recordID) FROM cm_behavior_record WHERE pageType = 8 AND pageLabel = cusf.keyword) desc
+    </select>
+
+    <select id="getShopKeywordId" resultType="java.lang.Integer">
+        select id from cm_shop_keyword where delFlag = 0
+    </select>
+
+    <select id="getSearchFrequencyList" resultType="com.caimei365.manager.entity.caimei.cmUser.CmUserSearchFrequency">
+        select * from cm_user_search_frequency
+        where delStatus = 0 and trueStatus = 1
+        <if test="keyword != null and keyword != ''">
+            and keyword like concat('%',#{keyword},'%')
+        </if>
+        order by searchTime desc
+    </select>
+
+    <insert id="insertShopKeyword">
+        insert into cm_shop_keyword (shopId, searchId, status, addTime, delFlag)
+        values (#{shopId}, #{searchId}, #{status}, now(), #{delFlag})
+    </insert>
+
+    <update id="updateShopKeywordStatus">
+        update cm_shop_keyword
+        set status = #{status}
+        where id = #{id}
+    </update>
+
+    <update id="delShopKeyword">
+        update cm_shop_keyword
+        set delFlag = 0
+        where id = #{id}
+    </update>
+
+    <select id="getShopPopUp" resultType="com.caimei365.manager.entity.caimei.cmUser.CmShopPopUp">
+        select
+        id,
+        shopId,
+        image,
+        guidingOne,
+        guidingTwo,
+        addTime
+        from cm_shop_popUp
+        where shopId = #{shopId}
+    </select>
+
+    <insert id="insertShopPopUp">
+        insert into cm_shop_popUp(shopId, image, guidingOne, guidingTwo, addTime)
+        values (#{shopId}, #{image}, #{guidingOne}, #{guidingTwo}, now())
+    </insert>
+
+    <update id="updateShopPopUp">
+        update cm_shop_popUp
+        set image = #{image},
+            guidingOne = #{guidingOne},
+            guidingTwo = #{guidingTwo}
+        where id = #{id}
+    </update>
+
+    <select id="getShopAdvertisingImage" resultType="com.caimei365.manager.entity.caimei.cmUser.CmShopAdvertisingImage">
+        select
+            csa.id,
+            csa.shopId,
+            s.name as shopName,
+            csa.pcImage,
+            csa.appImage,
+            csa.jumpLink,
+            csa.sort,
+            csa.addTime,
+            csa.status,
+            csa.delFlag
+            from cm_shop_advertisingImage csa
+            left join shop s on s.shopId = csa.shopId
+            <where>
+                csa.shopId = #{shopId}
+                <if test="shopName != null and shopName != ''">
+                    and s.name like concat('%',#{shopName},'%')
+                </if>
+                <if test="status != null">
+                    csa.status = #{status}
+                </if>
+            </where>
+            order by csa.sort asc, csa.addTime desc
+    </select>
+
+    <select id="getShopAdvertisingImageById" resultType="com.caimei365.manager.entity.caimei.cmUser.CmShopAdvertisingImage">
+        select id, shopId, pcImage, appImage, jumpLink, sort, addTime, status, delFlag
+        from cm_shop_advertisingImage
+        where id = #{id}
+    </select>
+
+    <insert id="insertShopAdvertisingImage">
+        insert into cm_shop_advertisingImage (shopId, pcImage, appImage, jumpLink, sort, addTime, status, delFlag)
+        values (#{shopId}, #{pcImage}, #{appImage}, #{jumpLink}, #{sort}, now(), #{status}, #{delFlag})
+    </insert>
+
+    <update id="updateShopAdvertisingImage">
+        update cm_shop_advertisingImage
+        set pcImage = #{pcImage},
+            appImage = #{appImage},
+            jumpLink = #{jumpLink},
+            status = #{status}
+        where id = #{id}
+    </update>
+
+    <update id="updateShopAdvertisingImageSort">
+        update cm_shop_advertisingImage
+        set sort = #{sort}
+        where id = #{id}
+    </update>
+
+    <update id="updateShopAdvertisingImageStatus">
+        update cm_shop_advertisingImage
+        set status = #{status}
+        where id = #{id}
+    </update>
+
+    <update id="delShopAdvertisingImage">
+        update cm_shop_advertisingImage
+        set delFlag = 0
+        where id = #{id}
+    </update>
+
+    <select id="getPageShop" resultType="com.caimei365.manager.entity.caimei.cmUser.CmPageShop">
+        SELECT
+            cps.id,
+            cps.shopId,
+            s.name AS shopName,
+            cps.shopLink,
+            cps.accessNumber,
+            cps.accessDuration,
+            (cps.accessDuration / cps.accessNumber) AS averageDuration
+        FROM cm_page_shop cps
+                 LEFT JOIN shop s ON s.shopId = cps.shopId
+        WHERE cps.shopId = #{shopId}
+    </select>
+
+    <select id="getPageShopProduct" resultType="com.caimei365.manager.entity.caimei.cmUser.CmPageShopProduct">
+        SELECT
+            cpsp.id,
+            cpsp.shopId,
+            cpsp.productId,
+            p.name,
+            p.mainImage,
+            copi.validFlag,
+            cpsp.link,
+            cpsp.accessNumber,
+            cpsp.accessDuration,
+            (cpsp.accessDuration / cpsp.accessNumber) AS averageDuration
+        FROM cm_page_shop_product cpsp
+                 LEFT JOIN product p ON p.productId = cpsp.productId
+                 LEFT JOIN cm_organize_product_info copi ON copi.productId = cpsp.productId
+        WHERE cpsp.shopId = #{shopId} and copi.organizeId = 0
+    </select>
+
+    <select id="getPageShopInfo" resultType="com.caimei365.manager.entity.caimei.cmUser.CmPageShopInfo">
+        SELECT
+            cpsi.id,
+            cpsi.shopId,
+            cpsi.infoId,
+            i.guidanceImage,
+            i.title,
+            i.onlineStatus,
+            cpsi.link,
+            cpsi.accessNumber,
+            cpsi.accessDuration,
+            (cpsi.accessDuration / cpsi.accessNumber) AS averageDuration
+        FROM cm_page_shop_info cpsi
+        LEFT JOIN info i ON i.id = cpsi.infoId
+        WHERE cpsi.shopId = #{shopId}
+    </select>
+
+    <select id="getPageShopKeyword" resultType="com.caimei365.manager.entity.caimei.cmUser.CmPageShopKeyword">
+        SELECT
+            cpsk.id,
+            cpsk.shopId,
+            cusf.keyword,
+            cpsk.link,
+            cpsk.accessNumber,
+            cpsk.accessDuration,
+            (cpsk.accessDuration / cpsk.accessNumber) AS averageDuration
+        FROM cm_page_shop_keyword cpsk
+        LEFT JOIN cm_user_search_frequency cusf ON cusf.id = cpsk.searchId
+        WHERE cpsk.shopId = #{shopId}
+    </select>
+</mapper>