Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/developerL' into developer

# Conflicts:
#	src/main/java/com/caimei/modules/user/web/newUser/SpController.java
kaick 1 anno fa
parent
commit
a9794c8835
50 ha cambiato i file con 2640 aggiunte e 215 eliminazioni
  1. 135 0
      src/main/java/com/caimei/modules/autoType/controller/CmAutoTypeController.java
  2. 100 0
      src/main/java/com/caimei/modules/autoType/domain/CmAutoType.java
  3. 204 0
      src/main/java/com/caimei/modules/autoType/domain/CmAutoTypeRecord.java
  4. 91 0
      src/main/java/com/caimei/modules/autoType/mapper/CmAutoTypeMapper.java
  5. 91 0
      src/main/java/com/caimei/modules/autoType/mapper/CmAutoTypeRecordMapper.java
  6. 178 0
      src/main/java/com/caimei/modules/autoType/service/CmAutoTypeRecordService.java
  7. 128 0
      src/main/java/com/caimei/modules/autoType/service/CmAutoTypeService.java
  8. 2 2
      src/main/java/com/caimei/modules/baike/service/CmBaikeProductService.java
  9. 47 1
      src/main/java/com/caimei/modules/cmpage/entity/CmImage.java
  10. 26 6
      src/main/java/com/caimei/modules/cmpage/service/CmImageService.java
  11. 6 4
      src/main/java/com/caimei/modules/cmpage/web/CmImageController.java
  12. 2 1
      src/main/java/com/caimei/modules/hehe/dao/CmHeheCollageProductDao.java
  13. 5 0
      src/main/java/com/caimei/modules/hehe/dao/CmHeheProductDao.java
  14. 10 5
      src/main/java/com/caimei/modules/hehe/service/CmHeheActivityProductService.java
  15. 15 6
      src/main/java/com/caimei/modules/hehe/service/CmHeheCollageProductService.java
  16. 18 15
      src/main/java/com/caimei/modules/hehe/service/HeheDiscountActivityProductService.java
  17. 38 22
      src/main/java/com/caimei/modules/info/service/InfoService.java
  18. 15 19
      src/main/java/com/caimei/modules/info/web/InfoController.java
  19. 18 16
      src/main/java/com/caimei/modules/info/web/InfoTypeController.java
  20. 40 5
      src/main/java/com/caimei/modules/landing/domain/CmBrandLanding.java
  21. 2 1
      src/main/java/com/caimei/modules/newhome/dao/NewPageHomeimageDao.java
  22. 50 0
      src/main/java/com/caimei/modules/newhome/entity/NewPageFirstNavigation.java
  23. 32 0
      src/main/java/com/caimei/modules/newhome/entity/NewPageHomeimage.java
  24. 5 2
      src/main/java/com/caimei/modules/newhome/web/NewPageFirstNavigationController.java
  25. 5 2
      src/main/java/com/caimei/modules/newhome/web/NewPageHomeimageController.java
  26. 2 1
      src/main/java/com/caimei/modules/user/dao/NewCmClubDao.java
  27. 43 5
      src/main/java/com/caimei/modules/utils/DateUtil.java
  28. 53 23
      src/main/java/com/caimei/modules/utils/MessageUtil.java
  29. 39 0
      src/main/java/com/caimei/modules/utils/message/WechatTemplateMessage.java
  30. 12 0
      src/main/java/com/thinkgem/jeesite/common/utils/DateUtils.java
  31. 167 0
      src/main/resources/mappings/modules/autoType/CmAutoTypeMapper.xml
  32. 200 0
      src/main/resources/mappings/modules/autoType/CmAutoTypeRecordMapper.xml
  33. 16 13
      src/main/resources/mappings/modules/cmpage/CmImageMapper.xml
  34. 1 0
      src/main/resources/mappings/modules/hehe/CmHeheCollageProductMapper.xml
  35. 26 2
      src/main/resources/mappings/modules/hehe/CmHeheProductMapper.xml
  36. 16 5
      src/main/resources/mappings/modules/landing/CmBrandLandingMapper.xml
  37. 3 0
      src/main/resources/mappings/modules/newhome/NewPageFirstNavigationMapper.xml
  38. 4 1
      src/main/resources/mappings/modules/newhome/NewPageHomeimageMapper.xml
  39. 11 0
      src/main/resources/mappings/modules/user/NewCmClubMapper.xml
  40. 52 43
      src/main/webapp/WEB-INF/tlds/fns.tld
  41. 218 0
      src/main/webapp/WEB-INF/views/modules/autoType/autoTypeList.jsp
  42. 193 0
      src/main/webapp/WEB-INF/views/modules/autoType/autoTypeRecordAdd.jsp
  43. 135 0
      src/main/webapp/WEB-INF/views/modules/autoType/autoTypeRecordClubAdd.jsp
  44. 121 0
      src/main/webapp/WEB-INF/views/modules/autoType/autoTypeRecordCmImageAdd.jsp
  45. 21 11
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.jsp
  46. 13 2
      src/main/webapp/WEB-INF/views/modules/cmpage/cmImageList.jsp
  47. 1 1
      src/main/webapp/WEB-INF/views/modules/info/infoRelatedForm.jsp
  48. 6 0
      src/main/webapp/WEB-INF/views/modules/info/infoTypeLandingList.jsp
  49. 18 1
      src/main/webapp/WEB-INF/views/modules/newhome/newPageFirstNavigationList.jsp
  50. 6 0
      src/main/webapp/WEB-INF/views/modules/newhome/newPageHomeimageList.jsp

+ 135 - 0
src/main/java/com/caimei/modules/autoType/controller/CmAutoTypeController.java

@@ -0,0 +1,135 @@
+package com.caimei.modules.autoType.controller;
+
+import com.caimei.modules.autoType.domain.CmAutoType;
+import com.caimei.modules.autoType.domain.CmAutoTypeRecord;
+import com.caimei.modules.autoType.service.CmAutoTypeRecordService;
+import com.caimei.modules.autoType.service.CmAutoTypeService;
+import com.caimei.modules.cmpage.entity.CmImage;
+import com.caimei.modules.cmpage.service.CmImageService;
+import com.caimei.modules.info.entity.Info;
+import com.caimei.modules.info.entity.InfoType;
+import com.caimei.modules.info.service.InfoService;
+import com.caimei.modules.info.service.InfoTypeService;
+import com.caimei.modules.user.entity.NewCmClub;
+import com.caimei.modules.user.service.NewCmClubService;
+import com.google.common.collect.Maps;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.web.BaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 推荐方式配置Controller
+ *
+ * @author Kaick
+ * @date 2023-11-20
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/autoType")
+public class CmAutoTypeController extends BaseController {
+    @Resource
+    private CmAutoTypeService cmAutoTypeService;
+    @Resource
+    private CmAutoTypeRecordService cmAutoTypeRecordService;
+    @Resource
+    private InfoService infoService;
+    @Resource
+    private InfoTypeService infoTypeService;
+    @Resource
+    private NewCmClubService newCmClubService;
+    @Resource
+    private CmImageService cmImageService;
+
+    @RequestMapping(value = {"list", ""})
+    public String form(CmAutoTypeRecord cmAutoTypeRecord, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<CmAutoTypeRecord> page = cmAutoTypeRecordService.findPage(new Page<CmAutoTypeRecord>(request, response), cmAutoTypeRecord);
+        CmAutoType byCmAutoType = cmAutoTypeService.getByCmAutoType(new CmAutoType().type(cmAutoTypeRecord.type()));
+        if(null==byCmAutoType){
+            cmAutoTypeService.addCmAutoType(new CmAutoType().type(cmAutoTypeRecord.type()).autoStatus("0"));
+            byCmAutoType = cmAutoTypeService.getByCmAutoType(new CmAutoType().type(cmAutoTypeRecord.type()));
+        }
+        model.addAttribute("cmAutoType", byCmAutoType);
+        model.addAttribute("page", page);
+        return "modules/autoType/autoTypeList";
+    }
+
+    @RequestMapping(value = "findAddPage")
+    public String findAddPage(Info info, Model model, HttpServletRequest request, HttpServletResponse response) {
+        info.setPublishSource(1);
+        Page<Info> page = infoService.findPage(new Page<Info>(request, response), info);
+        InfoType infoType = new InfoType();
+        infoType.setType("1");
+        infoType.setEnabledStatus("1");
+        List<InfoType> typeList = infoTypeService.findList(infoType);
+        model.addAttribute("typeList", typeList);
+        model.addAttribute("page", page);
+        return "modules/autoType/autoTypeRecordAdd";
+    }
+
+
+
+    @RequestMapping(value = "findCmImageAddPage")
+    public String findCmImageAddPage(CmImage cmImage, Model model, HttpServletRequest request, HttpServletResponse response) {
+        cmImage.setType("4");
+        Page<CmImage> page = cmImageService.findPage(new Page<CmImage>(request, response), cmImage);
+        model.addAttribute("page", page);
+        return "modules/autoType/autoTypeRecordCmImageAdd";
+    }
+
+    @RequestMapping(value = "findClubAddPage")
+    public String findClubAddPage(NewCmClub newCmClub, Model model, HttpServletRequest request, HttpServletResponse response) {
+        Page<NewCmClub> page = newCmClubService.findPage(new Page<NewCmClub>(request, response, 20), newCmClub);
+        model.addAttribute("page", page);
+        return "modules/autoType/autoTypeRecordClubAdd";
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "updateAutoStatus")
+    public Map<String, Object> updateLanDingStatus(CmAutoType cmAutoType, HttpServletRequest request, HttpServletResponse response) {
+        Map<String, Object> map = Maps.newLinkedHashMap();
+        try {
+            if (cmAutoType == null) {
+                throw new NullPointerException();
+            }
+            cmAutoTypeService.updateCmAutoType(new CmAutoType()
+                    .id(cmAutoType.id())
+                    .autoStatus(cmAutoType.autoStatus())
+            );
+            map.put("success", true);
+            map.put("msg", "修改成功");
+        } catch (Exception e) {
+            logger.debug(e.toString(), e);
+            map.put("success", false);
+            map.put("msg", "修改失败");
+        }
+        return map;
+    }
+
+
+    @ResponseBody
+    @RequestMapping(value = "addCmAutoTypeRecord")
+    public Map<String, Object> addCmAutoTypeRecord(CmAutoTypeRecord cmAutoTypeRecord, HttpServletRequest request, HttpServletResponse response) {
+        Map<String, Object> map = Maps.newLinkedHashMap();
+        try {
+            if (cmAutoTypeRecord == null) {
+                throw new NullPointerException();
+            }
+            cmAutoTypeRecordService.addCmAutoTypeRecord(cmAutoTypeRecord);
+            map.put("success", true);
+            map.put("msg", "修改成功");
+        } catch (Exception e) {
+            logger.debug(e.toString(), e);
+            map.put("success", false);
+            map.put("msg", "修改失败");
+        }
+        return map;
+    }
+}

+ 100 - 0
src/main/java/com/caimei/modules/autoType/domain/CmAutoType.java

@@ -0,0 +1,100 @@
+package com.caimei.modules.autoType.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.apache.ibatis.type.Alias;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 推荐方式配置对象 cm_auto_type
+ *
+ * @author Kaick
+ * @date 2023-11-20
+ */
+@Accessors(fluent  = true )
+@Data
+@Alias("CmAutoType")
+public class CmAutoType extends DataEntity<CmAutoType> implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private String id;
+
+    /** 分类:1文章推送, 2活动推送 */
+    private String type;
+
+    /** 推荐方式 0自动推荐 1手动推荐 */
+    private String autoStatus;
+
+    /** 删除状态 0正常,其他删除 */
+    private String delFlag;
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /** 添加时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    @Override
+    public String getId() {
+        return id;
+    }
+
+    @Override
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    @Override
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    @Override
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getAutoStatus() {
+        return autoStatus;
+    }
+
+    public void setAutoStatus(String autoStatus) {
+        this.autoStatus = autoStatus;
+    }
+
+
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}
+
+

+ 204 - 0
src/main/java/com/caimei/modules/autoType/domain/CmAutoTypeRecord.java

@@ -0,0 +1,204 @@
+package com.caimei.modules.autoType.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.apache.ibatis.type.Alias;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 文章-活动推送记录对象 cm_auto_type_record
+ *
+ * @author Kaick
+ * @date 2023-11-20
+ */
+@Accessors(fluent = true)
+@Data
+@Alias("CmAutoTypeRecord")
+public class CmAutoTypeRecord extends DataEntity<CmAutoTypeRecord> implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private String id;
+
+    /**
+     * 分类:1文章推送(cm_auto_type), 2活动推送(cm_auto_type)
+     */
+    private String type;
+
+    /**
+     * 归属者Id(type字段表Id)
+     */
+    private Integer authorId;
+
+    /**
+     * 推荐方式 0自动推荐 1手动推荐
+     */
+    private String autoStatus;
+
+    /**
+     * 当前Ids
+     */
+    private List<String> thisIds;
+    /**
+     * 机构Ids
+     */
+    private List<String> clubIds;
+    /**
+     * 删除状态 0正常,其他删除
+     */
+    private String delFlag;
+
+    /**
+     * 修改时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 添加时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 开始点击量时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date startPvCreateTime;
+    /**
+     * 结束点击量时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date endPvCreateTime;
+
+    //文章
+    /**
+     * 引导图
+     */
+    private String image;
+    /**
+     * 标题
+     */
+    private String title;
+
+
+
+    @Override
+    public String getId() {
+        return id;
+    }
+
+    public List<String> getClubIds() {
+        return clubIds;
+    }
+
+    public void setClubIds(List<String> clubIds) {
+        this.clubIds = clubIds;
+    }
+
+    public String getImage() {
+        return image;
+    }
+
+    public void setImage(String image) {
+        this.image = image;
+    }
+
+    public List<String> getThisIds() {
+        return thisIds;
+    }
+
+    public void setThisIds(List<String> thisIds) {
+        this.thisIds = thisIds;
+    }
+
+    @Override
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    @Override
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public Date getStartPvCreateTime() {
+        return startPvCreateTime;
+    }
+
+    public void setStartPvCreateTime(Date startPvCreateTime) {
+        this.startPvCreateTime = startPvCreateTime;
+    }
+
+    public Date getEndPvCreateTime() {
+
+        return endPvCreateTime;
+    }
+
+    public void setEndPvCreateTime(Date endPvCreateTime) {
+        this.endPvCreateTime = endPvCreateTime;
+    }
+
+    @Override
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Integer getAuthorId() {
+        return authorId;
+    }
+
+    public void setAuthorId(Integer authorId) {
+        this.authorId = authorId;
+    }
+
+    public String getAutoStatus() {
+        return autoStatus;
+    }
+
+    public void setAutoStatus(String autoStatus) {
+        this.autoStatus = autoStatus;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}
+

+ 91 - 0
src/main/java/com/caimei/modules/autoType/mapper/CmAutoTypeMapper.java

@@ -0,0 +1,91 @@
+package com.caimei.modules.autoType.mapper;
+
+import com.caimei.modules.autoType.domain.CmAutoType;
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+
+import java.util.List;
+
+/**
+ * 推荐方式配置Mapper接口
+ *
+ * @author Kaick
+ * @date 2023-11-20
+ */
+@MyBatisDao
+public interface CmAutoTypeMapper extends CrudDao<CmAutoType>
+{
+    /**
+     * 通过对象查询推荐方式配置列表
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return 推荐方式配置集合
+     */
+    List<CmAutoType> getCmAutoTypeList(CmAutoType cmAutoType);
+
+    /**
+     * 通过Id查询推荐方式配置对象
+     *
+     * @param id 推荐方式配置主键
+     * @return 推荐方式配置
+     */
+    CmAutoType getCmAutoTypeById(String id);
+
+    /**
+     * 通过对象查询推荐方式配置对象
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return 推荐方式配置
+     */
+    CmAutoType getByCmAutoType(CmAutoType cmAutoType);
+
+    /**
+     * 通过对象查询推荐方式配置Id
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return String
+     */
+    String getById(CmAutoType cmAutoType);
+
+
+    /**
+     * 通过对象查询推荐方式配置记录总数
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return 推荐方式配置Integer
+     */
+    int getCount(CmAutoType cmAutoType);
+
+    /**
+     * 新增推荐方式配置
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return 结果
+     */
+    int addCmAutoType(CmAutoType cmAutoType);
+
+    /**
+     * 修改推荐方式配置
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return 结果
+     */
+    int updateCmAutoType(CmAutoType cmAutoType);
+
+    /**
+     * 删除推荐方式配置
+     *
+     * @param id 推荐方式配置主键
+     * @return 结果
+     */
+    int delCmAutoTypeById(String id);
+
+    /**
+     * 批量删除推荐方式配置
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int delCmAutoType(CmAutoType cmAutoType);
+
+}

+ 91 - 0
src/main/java/com/caimei/modules/autoType/mapper/CmAutoTypeRecordMapper.java

@@ -0,0 +1,91 @@
+package com.caimei.modules.autoType.mapper;
+
+import com.caimei.modules.autoType.domain.CmAutoTypeRecord;
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+
+import java.util.List;
+
+/**
+ * 文章-活动推送记录Mapper接口
+ *
+ * @author Kaick
+ * @date 2023-11-20
+ */
+@MyBatisDao
+public interface CmAutoTypeRecordMapper extends CrudDao<CmAutoTypeRecord>
+{
+    /**
+     * 通过对象查询文章-活动推送记录列表
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return 文章-活动推送记录集合
+     */
+    List<CmAutoTypeRecord> getCmAutoTypeRecordList(CmAutoTypeRecord cmAutoTypeRecord);
+
+    /**
+     * 通过Id查询文章-活动推送记录对象
+     *
+     * @param id 文章-活动推送记录主键
+     * @return 文章-活动推送记录
+     */
+    CmAutoTypeRecord getCmAutoTypeRecordById(String id);
+
+    /**
+     * 通过对象查询文章-活动推送记录对象
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return 文章-活动推送记录
+     */
+    CmAutoTypeRecord getByCmAutoTypeRecord(CmAutoTypeRecord cmAutoTypeRecord);
+
+    /**
+     * 通过对象查询文章-活动推送记录Id
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return String
+     */
+    String getById(CmAutoTypeRecord cmAutoTypeRecord);
+
+
+    /**
+     * 通过对象查询文章-活动推送记录记录总数
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return 文章-活动推送记录Integer
+     */
+    int getCount(CmAutoTypeRecord cmAutoTypeRecord);
+
+    /**
+     * 新增文章-活动推送记录
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return 结果
+     */
+    int addCmAutoTypeRecord(CmAutoTypeRecord cmAutoTypeRecord);
+
+    /**
+     * 修改文章-活动推送记录
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return 结果
+     */
+    int updateCmAutoTypeRecord(CmAutoTypeRecord cmAutoTypeRecord);
+
+    /**
+     * 删除文章-活动推送记录
+     *
+     * @param id 文章-活动推送记录主键
+     * @return 结果
+     */
+    int delCmAutoTypeRecordById(String id);
+
+    /**
+     * 批量删除文章-活动推送记录
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int delCmAutoTypeRecord(CmAutoTypeRecord cmAutoTypeRecord);
+
+}

+ 178 - 0
src/main/java/com/caimei/modules/autoType/service/CmAutoTypeRecordService.java

@@ -0,0 +1,178 @@
+package com.caimei.modules.autoType.service;
+
+import com.caimei.modules.autoType.domain.CmAutoTypeRecord;
+import com.caimei.modules.autoType.mapper.CmAutoTypeRecordMapper;
+import com.caimei.modules.cmpage.dao.CmImageDao;
+import com.caimei.modules.cmpage.entity.CmImage;
+import com.caimei.modules.info.dao.InfoDao;
+import com.caimei.modules.info.entity.Info;
+import com.caimei.modules.user.dao.NewCmClubDao;
+import com.caimei.modules.utils.MessageUtil;
+import com.caimei.modules.utils.message.InsideMessage;
+import com.caimei.modules.utils.message.MessageModel;
+import com.caimei.modules.utils.message.MqInfo;
+import com.caimei.modules.utils.message.enums.MessageType;
+import com.thinkgem.jeesite.common.service.CrudService;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 文章-活动推送记录Service业务层处理
+ *
+ * @author Kaick
+ * @date 2023-11-20
+ */
+@Service
+public class CmAutoTypeRecordService extends CrudService<CmAutoTypeRecordMapper, CmAutoTypeRecord> {
+    @Resource
+    private CmAutoTypeRecordMapper cmAutoTypeRecordMapper;
+    @Resource
+    private NewCmClubDao newCmClubDao;
+    @Resource
+    private InfoDao infoDao;
+    @Resource
+    private CmImageDao cmImageDao;
+    /**
+     * 通过对象查询文章-活动推送记录列表
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return 文章-活动推送记录
+     */
+
+    public List<CmAutoTypeRecord> getCmAutoTypeRecordList(CmAutoTypeRecord cmAutoTypeRecord) {
+        return cmAutoTypeRecordMapper.getCmAutoTypeRecordList(cmAutoTypeRecord);
+    }
+
+    /**
+     * 通过Id查询文章-活动推送记录
+     *
+     * @param id 文章-活动推送记录主键
+     * @return 文章-活动推送记录
+     */
+
+    public CmAutoTypeRecord getCmAutoTypeRecordById(String id) {
+        return cmAutoTypeRecordMapper.getCmAutoTypeRecordById(id);
+    }
+
+    /**
+     * 通过对象查询文章-活动推送记录
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return 文章-活动推送记录
+     */
+
+    public CmAutoTypeRecord getByCmAutoTypeRecord(CmAutoTypeRecord cmAutoTypeRecord) {
+        return cmAutoTypeRecordMapper.getByCmAutoTypeRecord(cmAutoTypeRecord);
+    }
+
+    /**
+     * 通过对象查询文章-活动推送记录Id
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return String
+     */
+
+    public String getById(CmAutoTypeRecord cmAutoTypeRecord) {
+        return cmAutoTypeRecordMapper.getById(cmAutoTypeRecord);
+    }
+
+
+    /**
+     * 通过对象查询文章-活动推送记录记录总数
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return int
+     */
+
+    public int getCount(CmAutoTypeRecord cmAutoTypeRecord) {
+        return cmAutoTypeRecordMapper.getCount(cmAutoTypeRecord);
+    }
+
+    /**
+     * 新增文章-活动推送记录
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return 结果
+     */
+    @Async
+    @Transactional(readOnly = false)
+    public void addCmAutoTypeRecord(CmAutoTypeRecord cmAutoTypeRecord) {
+        if("0".equals(cmAutoTypeRecord.autoStatus())){
+            try {
+                Thread.sleep(3000);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+        }
+        for (String s : cmAutoTypeRecord.thisIds()) {
+            synchronized (cmAutoTypeRecord){
+                cmAutoTypeRecord.authorId(Integer.valueOf(s));
+                cmAutoTypeRecord.setCreateTime(new Date());
+                cmAutoTypeRecordMapper.addCmAutoTypeRecord(cmAutoTypeRecord);           //新增推送记录
+            }
+            String image;
+            String title;
+            int type;
+            if (StringUtils.equals("1", cmAutoTypeRecord.type())) {
+                Info info = infoDao.get(s);
+                image = info.getGuidanceImage();
+                title = info.getTitle();
+                type=5;
+            } else {
+                CmImage cmImage = cmImageDao.get(s);
+                image = cmImage.getImage();
+                title = cmImage.getTitle();
+                type=6;
+            }
+            //站内信 【最新文章/活动推送】
+            MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
+            insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)
+                    .mqInfo(new MqInfo().topic("MessageLine").delay(3).async(1));
+            List<String> clubIds = CollectionUtils.isEmpty(cmAutoTypeRecord.clubIds()) ? newCmClubDao.getClubIds() : cmAutoTypeRecord.clubIds();
+            for (String clubId : clubIds) {
+                insideMessageMessageModel.info(new InsideMessage()
+                        .userType(1)
+                        .messageType(type)
+                        .mainImage(image)
+                        .content(title)
+                        .thisId(Integer.valueOf(s))
+                        .clubId(Integer.valueOf(clubId))
+                );
+                MessageUtil.sendMessage(insideMessageMessageModel);
+            }
+        }
+    }
+
+    /**
+     * 修改文章-活动推送记录
+     *
+     * @param cmAutoTypeRecord 文章-活动推送记录
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int updateCmAutoTypeRecord(CmAutoTypeRecord cmAutoTypeRecord) {
+        cmAutoTypeRecord.setUpdateTime(new Date());
+        return cmAutoTypeRecordMapper.updateCmAutoTypeRecord(cmAutoTypeRecord);
+    }
+
+
+    /**
+     * 删除文章-活动推送记录信息
+     *
+     * @param id 文章-活动推送记录主键
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int delCmAutoTypeRecordById(String id) {
+        return cmAutoTypeRecordMapper.updateCmAutoTypeRecord(new CmAutoTypeRecord().id(id).delFlag("1"));
+        //return cmAutoTypeRecordMapper.delCmAutoTypeRecordById(id);
+    }
+
+}

+ 128 - 0
src/main/java/com/caimei/modules/autoType/service/CmAutoTypeService.java

@@ -0,0 +1,128 @@
+package com.caimei.modules.autoType.service;
+
+import com.caimei.modules.autoType.domain.CmAutoType;
+import com.caimei.modules.autoType.mapper.CmAutoTypeMapper;
+import com.thinkgem.jeesite.common.service.CrudService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 推荐方式配置Service业务层处理
+ *
+ * @author Kaick
+ * @date 2023-11-20
+ */
+@Service
+public class CmAutoTypeService  extends CrudService<CmAutoTypeMapper, CmAutoType>
+{
+    @Resource
+    private CmAutoTypeMapper cmAutoTypeMapper;
+
+    /**
+     * 通过对象查询推荐方式配置列表
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return 推荐方式配置
+     */
+
+    public List<CmAutoType> getCmAutoTypeList(CmAutoType cmAutoType)
+    {
+        return cmAutoTypeMapper.getCmAutoTypeList(cmAutoType);
+    }
+
+    /**
+     * 通过Id查询推荐方式配置
+     *
+     * @param id 推荐方式配置主键
+     * @return 推荐方式配置
+     */
+
+    public CmAutoType getCmAutoTypeById(String id)
+    {
+        return cmAutoTypeMapper.getCmAutoTypeById(id);
+    }
+
+    /**
+     * 通过对象查询推荐方式配置
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return 推荐方式配置
+     */
+
+    public CmAutoType getByCmAutoType(CmAutoType cmAutoType)
+    {
+        return cmAutoTypeMapper.getByCmAutoType(cmAutoType);
+    }
+
+    /**
+     * 通过对象查询推荐方式配置Id
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return String
+     */
+
+    public String getById(CmAutoType cmAutoType)
+    {
+        return cmAutoTypeMapper.getById(cmAutoType);
+    }
+
+
+    /**
+     * 通过对象查询推荐方式配置记录总数
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return int
+     */
+
+    public int getCount(CmAutoType cmAutoType)
+    {
+        return cmAutoTypeMapper.getCount(cmAutoType);
+    }
+
+    /**
+     * 新增推荐方式配置
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int addCmAutoType(CmAutoType cmAutoType)
+    {
+        cmAutoType.setCreateTime(new Date());
+        return cmAutoTypeMapper.addCmAutoType(cmAutoType);
+    }
+
+    /**
+     * 修改推荐方式配置
+     *
+     * @param cmAutoType 推荐方式配置
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int updateCmAutoType(CmAutoType cmAutoType)
+    {
+        cmAutoType.setUpdateTime(new Date());
+        return cmAutoTypeMapper.updateCmAutoType(cmAutoType);
+    }
+
+
+
+    /**
+     * 删除推荐方式配置信息
+     *
+     * @param id 推荐方式配置主键
+     * @return 结果
+     */
+    @Transactional(readOnly = false)
+    public int delCmAutoTypeById(String id)
+    {
+        return cmAutoTypeMapper.updateCmAutoType(new CmAutoType().id(id).delFlag("1"));
+        //return cmAutoTypeMapper.delCmAutoTypeById(id);
+    }
+
+}
+

+ 2 - 2
src/main/java/com/caimei/modules/baike/service/CmBaikeProductService.java

@@ -146,10 +146,10 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 
 
         // 管理员审核百科
         // 管理员审核百科
         if (null != cmBaikeProduct.getAuditFlag() && 1 == cmBaikeProduct.getAuditFlag()) {
         if (null != cmBaikeProduct.getAuditFlag() && 1 == cmBaikeProduct.getAuditFlag()) {
-            //站内信
+            //站内信 【审核采美百科推送】
             MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
             MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
             insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)
             insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)
-                    .mqInfo(new MqInfo().topic("MessageLine").delay(1).async(0));
+                    .mqInfo(new MqInfo().topic("MessageLine").delay(3).async(1));
             if (null != cmBaikeProduct.getAuditStatus() && 2 == cmBaikeProduct.getAuditStatus()) {
             if (null != cmBaikeProduct.getAuditStatus() && 2 == cmBaikeProduct.getAuditStatus()) {
                 // 审核通过
                 // 审核通过
                 cmBaikeProduct.setOnlineStatus(2);
                 cmBaikeProduct.setOnlineStatus(2);

+ 47 - 1
src/main/java/com/caimei/modules/cmpage/entity/CmImage.java

@@ -1,6 +1,8 @@
 package com.caimei.modules.cmpage.entity;
 package com.caimei.modules.cmpage.entity;
 
 
+import cn.hutool.core.date.DateUtil;
 import com.caimei.modules.product.entity.ActType;
 import com.caimei.modules.product.entity.ActType;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 import org.hibernate.validator.constraints.Length;
 import org.hibernate.validator.constraints.Length;
 
 
@@ -52,6 +54,50 @@ public class CmImage extends DataEntity<CmImage> {
      */
      */
     private String createDateStc;
     private String createDateStc;
 
 
+    //点击量统计
+    /** 开始点击量时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date startPvCreateTime;
+    /** 结束点击量时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date endPvCreateTime;
+    /** 统计分类*/
+    private String statisticsType;
+    /** 点击量*/
+    private Integer pv;
+
+    public Integer getPv() {
+        return pv;
+    }
+
+    public void setPv(Integer pv) {
+        this.pv = pv;
+    }
+
+    public Date getStartPvCreateTime() {
+        return startPvCreateTime;
+    }
+
+    public void setStartPvCreateTime(Date startPvCreateTime) {
+        this.startPvCreateTime = startPvCreateTime;
+    }
+
+    public Date getEndPvCreateTime() {
+
+        return endPvCreateTime;
+    }
+
+    public void setEndPvCreateTime(Date endPvCreateTime) {
+        this.endPvCreateTime = endPvCreateTime;
+    }
+
+    public String getStatisticsType() {
+        return statisticsType;
+    }
+
+    public void setStatisticsType(String statisticsType) {
+        this.statisticsType = statisticsType;
+    }
 
 
     public String getCrmEnabledStatus() {
     public String getCrmEnabledStatus() {
         return crmEnabledStatus;
         return crmEnabledStatus;
@@ -259,4 +305,4 @@ public class CmImage extends DataEntity<CmImage> {
     public void setAppletsEnabledStatus(String appletsEnabledStatus) {
     public void setAppletsEnabledStatus(String appletsEnabledStatus) {
         this.appletsEnabledStatus = appletsEnabledStatus;
         this.appletsEnabledStatus = appletsEnabledStatus;
     }
     }
-}
+}

+ 26 - 6
src/main/java/com/caimei/modules/cmpage/service/CmImageService.java

@@ -1,23 +1,27 @@
 package com.caimei.modules.cmpage.service;
 package com.caimei.modules.cmpage.service;
 
 
 import com.caimei.dfs.image.beens.ImageUploadInfo;
 import com.caimei.dfs.image.beens.ImageUploadInfo;
+import com.caimei.modules.autoType.domain.CmAutoType;
+import com.caimei.modules.autoType.domain.CmAutoTypeRecord;
+import com.caimei.modules.autoType.mapper.CmAutoTypeMapper;
+import com.caimei.modules.autoType.service.CmAutoTypeRecordService;
 import com.caimei.modules.brand.utils.ImagePathUtils;
 import com.caimei.modules.brand.utils.ImagePathUtils;
 import com.caimei.modules.cmpage.dao.CmImageDao;
 import com.caimei.modules.cmpage.dao.CmImageDao;
 import com.caimei.modules.cmpage.entity.CmImage;
 import com.caimei.modules.cmpage.entity.CmImage;
 import com.caimei.modules.common.utils.UploadUtils;
 import com.caimei.modules.common.utils.UploadUtils;
-import com.caimei.modules.info.entity.Info;
 import com.caimei.modules.sys.utils.UploadImageUtils;
 import com.caimei.modules.sys.utils.UploadImageUtils;
+import com.caimei.modules.user.dao.NewCmClubDao;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.utils.Encodes;
 import com.thinkgem.jeesite.common.utils.Encodes;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -31,11 +35,17 @@ public class CmImageService extends CrudService<CmImageDao, CmImage> {
 
 
 	@Resource
 	@Resource
 	private CmImageDao cmImageDao;
 	private CmImageDao cmImageDao;
+	@Resource
+	private CmAutoTypeMapper cmAutoTypeMapper;
+	@Resource
+	private CmAutoTypeRecordService cmAutoTypeRecordService;
+	@Resource
+	private NewCmClubDao newCmClubDao;
 
 
 	public CmImage get(String id) {
 	public CmImage get(String id) {
 		return super.get(id);
 		return super.get(id);
 	}
 	}
-	
+
 	public List<CmImage> findList(CmImage cmImage) {
 	public List<CmImage> findList(CmImage cmImage) {
 		return super.findList(cmImage);
 		return super.findList(cmImage);
 	}
 	}
@@ -62,7 +72,7 @@ public class CmImageService extends CrudService<CmImageDao, CmImage> {
 		return cmImageDao.findCentreImageByCentreId(id);
 		return cmImageDao.findCentreImageByCentreId(id);
 	}
 	}
 
 
-	
+
 	@Transactional(readOnly = false)
 	@Transactional(readOnly = false)
 	public void save(CmImage cmImage, HttpServletRequest request) {
 	public void save(CmImage cmImage, HttpServletRequest request) {
 		String photoServer = Global.getConfig("photoServer");//获取文件服务器地址
 		String photoServer = Global.getConfig("photoServer");//获取文件服务器地址
@@ -114,9 +124,19 @@ public class CmImageService extends CrudService<CmImageDao, CmImage> {
 				logger.error("图片上传错误:" + e.toString(), e);
 				logger.error("图片上传错误:" + e.toString(), e);
 			}
 			}
 		}
 		}
+
 		super.save(cmImage);
 		super.save(cmImage);
+
+		CmAutoType byCmAutoType = cmAutoTypeMapper.getByCmAutoType(new CmAutoType().type("2").autoStatus("0"));			//获取推送配置
+		if(StringUtils.equals("4",cmImage.getType())&& null!=byCmAutoType) {
+			cmAutoTypeRecordService.addCmAutoTypeRecord(new CmAutoTypeRecord()                            //新增推送记录
+					.type("2")
+					.autoStatus("0")
+					.thisIds(Arrays.asList(cmImage.getId()))
+			);
+		}
 	}
 	}
-	
+
 	@Transactional(readOnly = false)
 	@Transactional(readOnly = false)
 	public void delete(CmImage cmImage) {
 	public void delete(CmImage cmImage) {
 		super.delete(cmImage);
 		super.delete(cmImage);
@@ -163,4 +183,4 @@ public class CmImageService extends CrudService<CmImageDao, CmImage> {
 	public void updateAppletsEnabledStatusByIds(String enabledStatus, String ids) {
 	public void updateAppletsEnabledStatusByIds(String enabledStatus, String ids) {
 		cmImageDao.updateAppletsEnabledStatusByIds(enabledStatus, ids);
 		cmImageDao.updateAppletsEnabledStatusByIds(enabledStatus, ids);
 	}
 	}
-}
+}

+ 6 - 4
src/main/java/com/caimei/modules/cmpage/web/CmImageController.java

@@ -3,17 +3,16 @@ package com.caimei.modules.cmpage.web;
 import com.caimei.constants.common.RedisKeyUtil;
 import com.caimei.constants.common.RedisKeyUtil;
 import com.caimei.modules.cmpage.entity.CmImage;
 import com.caimei.modules.cmpage.entity.CmImage;
 import com.caimei.modules.cmpage.service.CmImageService;
 import com.caimei.modules.cmpage.service.CmImageService;
-import com.caimei.modules.info.entity.Info;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.opensearch.GenerateUtils;
+import com.caimei.modules.utils.DateUtil;
 import com.caimei.redis.RedisService;
 import com.caimei.redis.RedisService;
+import com.caimei.utils.StringUtils;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.Page;
-import com.caimei.utils.StringUtils;
 import com.thinkgem.jeesite.common.web.BaseController;
 import com.thinkgem.jeesite.common.web.BaseController;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.ModelAttribute;
@@ -63,7 +62,10 @@ public class CmImageController extends BaseController {
 	@RequiresPermissions("cmpage:cmImage:view")
 	@RequiresPermissions("cmpage:cmImage:view")
 	@RequestMapping(value = {"list", ""})
 	@RequestMapping(value = {"list", ""})
 	public String list(CmImage cmImage, HttpServletRequest request, HttpServletResponse response, Model model) {
 	public String list(CmImage cmImage, HttpServletRequest request, HttpServletResponse response, Model model) {
-
+		if (null != cmImage.getEndPvCreateTime()) {
+			cmImage.setEndPvCreateTime(DateUtil.getEndTime(cmImage.getEndPvCreateTime()));
+		}
+		cmImage.setStatisticsType("3");
 		if(StringUtils.equals("5",cmImage.getFlag())){//首页广告图片(【顶层广告】【轮播图】【小专题】)
 		if(StringUtils.equals("5",cmImage.getFlag())){//首页广告图片(【顶层广告】【轮播图】【小专题】)
 			if(StringUtils.isEmpty(cmImage.getType())){
 			if(StringUtils.isEmpty(cmImage.getType())){
 				cmImage.getSqlMap().put("type", " AND (a.type=5 OR a.type=6 OR a.type=7 OR a.type=9)");
 				cmImage.getSqlMap().put("type", " AND (a.type=5 OR a.type=6 OR a.type=7 OR a.type=9)");

+ 2 - 1
src/main/java/com/caimei/modules/hehe/dao/CmHeheCollageProductDao.java

@@ -33,4 +33,5 @@ public interface CmHeheCollageProductDao extends CrudDao<CmHeheCollageProduct> {
     CmSku getSkuCollage(Integer skuId);
     CmSku getSkuCollage(Integer skuId);
     //展示最低拼团价格
     //展示最低拼团价格
     Double getCollagePrice(Integer productId);
     Double getCollagePrice(Integer productId);
-}
+
+}

+ 5 - 0
src/main/java/com/caimei/modules/hehe/dao/CmHeheProductDao.java

@@ -96,4 +96,9 @@ public interface CmHeheProductDao extends CrudDao<CmHeheProduct> {
     void updateHeHeSkuPrice(@Param("skuId") Integer skuId, @Param("price") Double price);
     void updateHeHeSkuPrice(@Param("skuId") Integer skuId, @Param("price") Double price);
 
 
     List<CmLadderPrice> findLadderList(Integer skuId);
     List<CmLadderPrice> findLadderList(Integer skuId);
+
+    List<String> findMobileByUserYear(Integer num);
+
+    int getMonthCount(@Param("num")Integer num,@Param("type")Integer type);
+
 }
 }

+ 10 - 5
src/main/java/com/caimei/modules/hehe/service/CmHeheActivityProductService.java

@@ -1,6 +1,5 @@
 package com.caimei.modules.hehe.service;
 package com.caimei.modules.hehe.service;
 
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.modules.hehe.dao.CmHeheActivityProductDao;
 import com.caimei.modules.hehe.dao.CmHeheActivityProductDao;
@@ -9,20 +8,18 @@ import com.caimei.modules.hehe.entity.CmHeHeActivityLadder;
 import com.caimei.modules.hehe.entity.CmHeheActivityProduct;
 import com.caimei.modules.hehe.entity.CmHeheActivityProduct;
 import com.caimei.modules.hehe.entity.CmHeheProduct;
 import com.caimei.modules.hehe.entity.CmHeheProduct;
 import com.caimei.modules.product.entity.CmSku;
 import com.caimei.modules.product.entity.CmSku;
+import com.caimei.modules.sys.utils.SMSUtils;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.StringUtil;
 import com.caimei.utils.StringUtil;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.service.CrudService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.Assert;
 import org.springframework.util.Assert;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
-import java.util.Arrays;
-import java.util.Iterator;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -104,6 +101,14 @@ public class CmHeheActivityProductService extends CrudService<CmHeheActivityProd
 
 
     @Transactional(readOnly = false)
     @Transactional(readOnly = false)
     public void addProducts(Integer activityId, String productIds) {
     public void addProducts(Integer activityId, String productIds) {
+        int count = cmHeheProductDao.getMonthCount(1,2);
+        if (0 < count) {
+            List<String> mobileByUserYear = cmHeheProductDao.findMobileByUserYear(3);
+            for (String mobile : mobileByUserYear) {
+                //发送短信 【活动商品上架时派送】
+                SMSUtils.sendSms(3,mobile, "【颜选美学】优惠活动商品已上架啦!快去微信搜索“颜选美学”小程序登录下单您心仪的商品吧。关注公众号“颜选美学”获取更多优惠和精彩资讯。");
+            }
+        }
         CmHeheActivityProduct activityProduct = new CmHeheActivityProduct();
         CmHeheActivityProduct activityProduct = new CmHeheActivityProduct();
         activityProduct.setActivityId(activityId);
         activityProduct.setActivityId(activityId);
         if (StringUtil.isNotBlank(productIds)) {
         if (StringUtil.isNotBlank(productIds)) {
@@ -141,4 +146,4 @@ public class CmHeheActivityProductService extends CrudService<CmHeheActivityProd
             }
             }
         });
         });
     }
     }
-}
+}

+ 15 - 6
src/main/java/com/caimei/modules/hehe/service/CmHeheCollageProductService.java

@@ -1,19 +1,20 @@
 package com.caimei.modules.hehe.service;
 package com.caimei.modules.hehe.service;
 
 
-import java.util.List;
+import com.caimei.modules.hehe.dao.CmHeheCollageProductDao;
 import com.caimei.modules.hehe.dao.CmHeheFloorProductDao;
 import com.caimei.modules.hehe.dao.CmHeheFloorProductDao;
 import com.caimei.modules.hehe.dao.CmHeheProductDao;
 import com.caimei.modules.hehe.dao.CmHeheProductDao;
+import com.caimei.modules.hehe.entity.CmHeheCollageProduct;
 import com.caimei.modules.product.entity.CmSku;
 import com.caimei.modules.product.entity.CmSku;
 import com.caimei.modules.product.entity.Product;
 import com.caimei.modules.product.entity.Product;
+import com.caimei.modules.sys.utils.SMSUtils;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.AppUtils;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.service.CrudService;
-import com.caimei.modules.hehe.entity.CmHeheCollageProduct;
-import com.caimei.modules.hehe.dao.CmHeheCollageProductDao;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
+import java.util.List;
 
 
 /**
 /**
  * 呵呵商城拼团商品Service
  * 呵呵商城拼团商品Service
@@ -54,6 +55,14 @@ public class CmHeheCollageProductService extends CrudService<CmHeheCollageProduc
 
 
     @Transactional(readOnly = false)
     @Transactional(readOnly = false)
     public void save(CmHeheCollageProduct cmHeheCollageProduct) {
     public void save(CmHeheCollageProduct cmHeheCollageProduct) {
+        int count = cmHeheProductDao.getMonthCount(1,1);
+        if (0 < count) {
+            List<String> mobileByUserYear = cmHeheProductDao.findMobileByUserYear(3);
+            for (String mobile : mobileByUserYear) {
+                //发送短信 【拼团商品上架时派送】
+                SMSUtils.sendSms(3,mobile, "【颜选美学】拼团商品已上架啦!快去微信搜索“颜选美学”小程序登录下单您心仪的商品吧。关注公众号“颜选美学”获取更多优惠和精彩资讯。");
+            }
+        }
         if (!cmHeheCollageProduct.getIsNewRecord()) {
         if (!cmHeheCollageProduct.getIsNewRecord()) {
             CmHeheCollageProduct dbProduct = get(cmHeheCollageProduct.getId());
             CmHeheCollageProduct dbProduct = get(cmHeheCollageProduct.getId());
             if (!dbProduct.getProductId().equals(cmHeheCollageProduct.getProductId())) {
             if (!dbProduct.getProductId().equals(cmHeheCollageProduct.getProductId())) {
@@ -109,4 +118,4 @@ public class CmHeheCollageProductService extends CrudService<CmHeheCollageProduc
     public void updateStatus(Integer id, Integer status) {
     public void updateStatus(Integer id, Integer status) {
         cmHeheCollageProductDao.updateStatus(id, status);
         cmHeheCollageProductDao.updateStatus(id, status);
     }
     }
-}
+}

+ 18 - 15
src/main/java/com/caimei/modules/hehe/service/HeheDiscountActivityProductService.java

@@ -1,27 +1,22 @@
 package com.caimei.modules.hehe.service;
 package com.caimei.modules.hehe.service;
 
 
-import java.util.List;
-
 import com.caimei.modules.hehe.dao.CmHeheActivityProductDao;
 import com.caimei.modules.hehe.dao.CmHeheActivityProductDao;
 import com.caimei.modules.hehe.dao.CmHeheProductDao;
 import com.caimei.modules.hehe.dao.CmHeheProductDao;
+import com.caimei.modules.hehe.dao.HeheDiscountActivityProductDao;
 import com.caimei.modules.hehe.entity.CmHeheProduct;
 import com.caimei.modules.hehe.entity.CmHeheProduct;
-import com.caimei.modules.hehe.entity.HeheHomeTypeProduct;
+import com.caimei.modules.hehe.entity.HeheDiscountActivityProduct;
 import com.caimei.modules.product.entity.CmSku;
 import com.caimei.modules.product.entity.CmSku;
+import com.caimei.modules.sys.utils.SMSUtils;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.StringUtil;
 import com.caimei.utils.StringUtil;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.config.Global;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.service.CrudService;
-import com.caimei.modules.hehe.entity.HeheDiscountActivityProduct;
-import com.caimei.modules.hehe.dao.HeheDiscountActivityProductDao;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
-
-import static org.apache.struts2.interceptor.DateTextFieldInterceptor.DateWord.s;
+import java.util.List;
 
 
 /**
 /**
  * 限时特价商品Service
  * 限时特价商品Service
@@ -46,11 +41,11 @@ public class HeheDiscountActivityProductService extends CrudService<HeheDiscount
 		heheDiscountActivityProduct.setSkus(activityProductDao.findDiscountSku(heheDiscountActivityProduct.getProductId()));
 		heheDiscountActivityProduct.setSkus(activityProductDao.findDiscountSku(heheDiscountActivityProduct.getProductId()));
 		return heheDiscountActivityProduct;
 		return heheDiscountActivityProduct;
 	}
 	}
-	
+
 	public List<HeheDiscountActivityProduct> findList(HeheDiscountActivityProduct heheDiscountActivityProduct) {
 	public List<HeheDiscountActivityProduct> findList(HeheDiscountActivityProduct heheDiscountActivityProduct) {
 		return super.findList(heheDiscountActivityProduct);
 		return super.findList(heheDiscountActivityProduct);
 	}
 	}
-	
+
 	public Page<HeheDiscountActivityProduct> findPage(Page<HeheDiscountActivityProduct> page, HeheDiscountActivityProduct heheDiscountActivityProduct) {
 	public Page<HeheDiscountActivityProduct> findPage(Page<HeheDiscountActivityProduct> page, HeheDiscountActivityProduct heheDiscountActivityProduct) {
 		Page<HeheDiscountActivityProduct> productPage = super.findPage(page, heheDiscountActivityProduct);
 		Page<HeheDiscountActivityProduct> productPage = super.findPage(page, heheDiscountActivityProduct);
 		List<HeheDiscountActivityProduct> list = productPage.getList();
 		List<HeheDiscountActivityProduct> list = productPage.getList();
@@ -61,9 +56,17 @@ public class HeheDiscountActivityProductService extends CrudService<HeheDiscount
 		});
 		});
 		return productPage;
 		return productPage;
 	}
 	}
-	
+
 	@Transactional(readOnly = false)
 	@Transactional(readOnly = false)
 	public void save(HeheDiscountActivityProduct heheDiscountActivityProduct) {
 	public void save(HeheDiscountActivityProduct heheDiscountActivityProduct) {
+		int count = cmHeheProductDao.getMonthCount(1,3);
+		if (0 < count) {
+			List<String> mobileByUserYear = cmHeheProductDao.findMobileByUserYear(3);
+			for (String mobile : mobileByUserYear) {
+				//发送短信 【限时特价商品上架时派送】
+				SMSUtils.sendSms(3,mobile, "【颜选美学】特价商品已上架啦!快去微信搜索“颜选美学”小程序登录下单您心仪的商品吧。关注公众号“颜选美学”获取更多优惠和精彩资讯。");
+			}
+		}
 		super.save(heheDiscountActivityProduct);
 		super.save(heheDiscountActivityProduct);
 		//修改/保存sku的限时特价
 		//修改/保存sku的限时特价
 		List<CmSku> skus = heheDiscountActivityProduct.getSkus();
 		List<CmSku> skus = heheDiscountActivityProduct.getSkus();
@@ -110,4 +113,4 @@ public class HeheDiscountActivityProductService extends CrudService<HeheDiscount
         productPage.setList(productList);
         productPage.setList(productList);
         return productPage;
         return productPage;
     }
     }
-}
+}

+ 38 - 22
src/main/java/com/caimei/modules/info/service/InfoService.java

@@ -1,21 +1,28 @@
 package com.caimei.modules.info.service;
 package com.caimei.modules.info.service;
 
 
-import java.util.Date;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
+import com.caimei.dfs.image.beens.ImageUploadInfo;
+import com.caimei.modules.autoType.domain.CmAutoType;
+import com.caimei.modules.autoType.domain.CmAutoTypeRecord;
+import com.caimei.modules.autoType.mapper.CmAutoTypeMapper;
+import com.caimei.modules.autoType.service.CmAutoTypeRecordService;
 import com.caimei.modules.basesetting.dao.KeywordDao;
 import com.caimei.modules.basesetting.dao.KeywordDao;
-import com.caimei.modules.hehe.entity.cmHeHeUserActivity;
-import com.caimei.modules.live.entity.NewPageLive;
+import com.caimei.modules.brand.utils.ImagePathUtils;
+import com.caimei.modules.info.dao.InfoDao;
+import com.caimei.modules.info.dao.InfoLabelDao;
+import com.caimei.modules.info.entity.Info;
+import com.caimei.modules.info.entity.InfoLabel;
 import com.caimei.modules.sys.utils.UploadImageUtils;
 import com.caimei.modules.sys.utils.UploadImageUtils;
+import com.caimei.modules.user.dao.NewCmClubDao;
 import com.caimei.modules.utils.MessageUtil;
 import com.caimei.modules.utils.MessageUtil;
-import com.caimei.modules.utils.RequestUtil;
 import com.caimei.modules.utils.message.InsideMessage;
 import com.caimei.modules.utils.message.InsideMessage;
 import com.caimei.modules.utils.message.MessageModel;
 import com.caimei.modules.utils.message.MessageModel;
 import com.caimei.modules.utils.message.MqInfo;
 import com.caimei.modules.utils.message.MqInfo;
 import com.caimei.modules.utils.message.enums.MessageType;
 import com.caimei.modules.utils.message.enums.MessageType;
-import com.caimei.utils.StringUtil;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.service.CrudService;
+import com.thinkgem.jeesite.common.utils.Encodes;
+import com.thinkgem.jeesite.common.utils.StringUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.jsoup.Jsoup;
 import org.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Document;
@@ -25,17 +32,11 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
-import com.caimei.dfs.image.beens.ImageUploadInfo;
-import com.caimei.modules.brand.utils.ImagePathUtils;
-import com.caimei.modules.info.dao.InfoDao;
-import com.caimei.modules.info.dao.InfoLabelDao;
-import com.caimei.modules.info.entity.Info;
-import com.caimei.modules.info.entity.InfoLabel;
-import com.thinkgem.jeesite.common.config.Global;
-import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.service.CrudService;
-import com.thinkgem.jeesite.common.utils.Encodes;
-import com.thinkgem.jeesite.common.utils.StringUtils;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
 
 
 /**
 /**
  * 信息列表Service
  * 信息列表Service
@@ -56,6 +57,13 @@ public class InfoService extends CrudService<InfoDao, Info> {
     @Autowired
     @Autowired
     private KeywordDao keywordDao;
     private KeywordDao keywordDao;
 
 
+    @Resource
+    private CmAutoTypeMapper cmAutoTypeMapper;
+    @Resource
+    private CmAutoTypeRecordService cmAutoTypeRecordService;
+    @Resource
+    private NewCmClubDao newCmClubDao;
+
     public Info get(String id) {
     public Info get(String id) {
         Info info = super.get(id);
         Info info = super.get(id);
         if (null != info) {
         if (null != info) {
@@ -218,10 +226,10 @@ public class InfoService extends CrudService<InfoDao, Info> {
 
 
         // 管理员审核文章
         // 管理员审核文章
         if (null != info.getAuditFlag() && 1 == info.getAuditFlag()) {
         if (null != info.getAuditFlag() && 1 == info.getAuditFlag()) {
-            //站内信
+            //站内信 【审核文章推送】
             MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
             MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
             insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)
             insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)
-                    .mqInfo(new MqInfo().topic("MessageLine").delay(1).async(0));
+                    .mqInfo(new MqInfo().topic("MessageLine").delay(3).async(1));
             if (null != info.getAuditStatus() && 2 == info.getAuditStatus()) {
             if (null != info.getAuditStatus() && 2 == info.getAuditStatus()) {
                 // 审核通过
                 // 审核通过
                 info.setPubdate(new Date());
                 info.setPubdate(new Date());
@@ -251,6 +259,14 @@ public class InfoService extends CrudService<InfoDao, Info> {
         }
         }
         super.save(info);
         super.save(info);
 
 
+        CmAutoType byCmAutoType = cmAutoTypeMapper.getByCmAutoType(new CmAutoType().type("1").autoStatus("0"));  //获取推送配置
+        if (null != byCmAutoType) {
+            cmAutoTypeRecordService.addCmAutoTypeRecord(new CmAutoTypeRecord()                                   //新增推送记录
+                    .type("1")
+                    .autoStatus("0")
+                    .thisIds(Arrays.asList(info.getId()))
+            );
+        }
         if (flg) {
         if (flg) {
             infoDao.insertInfoPraise(info.getId());
             infoDao.insertInfoPraise(info.getId());
         }
         }

+ 15 - 19
src/main/java/com/caimei/modules/info/web/InfoController.java

@@ -1,23 +1,23 @@
 package com.caimei.modules.info.web;
 package com.caimei.modules.info.web;
 
 
-import java.util.*;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.alibaba.fastjson.JSONArray;
-import com.caimei.modules.hehe.entity.CmHeheProduct;
 import com.caimei.modules.info.dao.InfoDao;
 import com.caimei.modules.info.dao.InfoDao;
-import com.caimei.modules.info.entity.CmInfoDocSyn;
 import com.caimei.modules.info.entity.CmRelated;
 import com.caimei.modules.info.entity.CmRelated;
+import com.caimei.modules.info.entity.Info;
+import com.caimei.modules.info.entity.InfoType;
 import com.caimei.modules.info.service.CmInfoDocSynService;
 import com.caimei.modules.info.service.CmInfoDocSynService;
 import com.caimei.modules.info.service.CmRelatedService;
 import com.caimei.modules.info.service.CmRelatedService;
-import com.caimei.modules.opensearch.GenerateUtils;
+import com.caimei.modules.info.service.InfoService;
+import com.caimei.modules.info.service.InfoTypeService;
 import com.caimei.modules.opensearch.CoreServiceUitls;
 import com.caimei.modules.opensearch.CoreServiceUitls;
+import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.product.dao.KeywordFrequencyDao;
 import com.caimei.modules.product.dao.KeywordFrequencyDao;
 import com.caimei.modules.product.entity.SearchFrequencyVo;
 import com.caimei.modules.product.entity.SearchFrequencyVo;
 import com.caimei.redis.RedisService;
 import com.caimei.redis.RedisService;
+import com.google.common.collect.Maps;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,15 +29,10 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 
-import com.caimei.modules.info.entity.Info;
-import com.caimei.modules.info.entity.InfoType;
-import com.caimei.modules.info.service.InfoService;
-import com.caimei.modules.info.service.InfoTypeService;
-import com.google.common.collect.Maps;
-import com.thinkgem.jeesite.common.config.Global;
-import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.utils.StringUtils;
-import com.thinkgem.jeesite.common.web.BaseController;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
 
 
 /**
 /**
  * 信息列表Controller
  * 信息列表Controller
@@ -318,6 +313,7 @@ public class InfoController extends BaseController {
             return "redirect:" + Global.getAdminPath() + "/info/infoLabel/list";
             return "redirect:" + Global.getAdminPath() + "/info/infoLabel/list";
         }
         }
         info.setPublishSource(null == info.getPublishSource() ? 1 : info.getPublishSource());
         info.setPublishSource(null == info.getPublishSource() ? 1 : info.getPublishSource());
+
         return "redirect:" + Global.getAdminPath() + "/info/info/list?repage&publishSource=" + info.getPublishSource();
         return "redirect:" + Global.getAdminPath() + "/info/info/list?repage&publishSource=" + info.getPublishSource();
     }
     }
 
 

+ 18 - 16
src/main/java/com/caimei/modules/info/web/InfoTypeController.java

@@ -1,15 +1,18 @@
 package com.caimei.modules.info.web;
 package com.caimei.modules.info.web;
 
 
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.caimei.modules.hehe.util.UploadPicUtils;
+import com.caimei.modules.info.entity.Info;
+import com.caimei.modules.info.entity.InfoType;
+import com.caimei.modules.info.service.InfoService;
+import com.caimei.modules.info.service.InfoTypeService;
 import com.caimei.modules.landing.domain.CmBrandLanding;
 import com.caimei.modules.landing.domain.CmBrandLanding;
 import com.caimei.modules.landing.service.CmBrandLandingService;
 import com.caimei.modules.landing.service.CmBrandLandingService;
 import com.caimei.modules.opensearch.CoreServiceUitls;
 import com.caimei.modules.opensearch.CoreServiceUitls;
+import com.caimei.modules.utils.DateUtil;
+import com.google.common.collect.Maps;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,15 +24,10 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 
-import com.thinkgem.jeesite.common.config.Global;
-import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.web.BaseController;
-import com.thinkgem.jeesite.common.utils.StringUtils;
-import com.caimei.modules.info.entity.Info;
-import com.caimei.modules.info.entity.InfoType;
-import com.caimei.modules.info.service.InfoService;
-import com.caimei.modules.info.service.InfoTypeService;
-import com.google.common.collect.Maps;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
 
 
 /**
 /**
  * 信息分类Controller
  * 信息分类Controller
@@ -184,7 +182,11 @@ public class InfoTypeController extends BaseController {
 
 
 	@RequestMapping(value = {"infoTypeLandingList" })
 	@RequestMapping(value = {"infoTypeLandingList" })
 	public String list(CmBrandLanding cmBrandLanding, HttpServletRequest request, HttpServletResponse response, Model model) {
 	public String list(CmBrandLanding cmBrandLanding, HttpServletRequest request, HttpServletResponse response, Model model) {
+		if (null != cmBrandLanding.getEndPvCreateTime()) {
+			cmBrandLanding.setEndPvCreateTime(DateUtil.getEndTime(cmBrandLanding.getEndPvCreateTime()));
+		}
 		cmBrandLanding.setType(5);
 		cmBrandLanding.setType(5);
+		cmBrandLanding.setStatisticsType("2");
 		Page<CmBrandLanding> page = cmBrandLandingService.findPage(new Page<CmBrandLanding>(request, response), cmBrandLanding);
 		Page<CmBrandLanding> page = cmBrandLandingService.findPage(new Page<CmBrandLanding>(request, response), cmBrandLanding);
 		model.addAttribute("cmBrandLanding", cmBrandLanding);
 		model.addAttribute("cmBrandLanding", cmBrandLanding);
 		model.addAttribute("page", page);
 		model.addAttribute("page", page);

+ 40 - 5
src/main/java/com/caimei/modules/landing/domain/CmBrandLanding.java

@@ -1,15 +1,14 @@
 package com.caimei.modules.landing.domain;
 package com.caimei.modules.landing.domain;
 
 
-import java.util.Date;
+import cn.hutool.core.date.DateUtil;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 import lombok.Data;
 import lombok.Data;
 import lombok.experimental.Accessors;
 import lombok.experimental.Accessors;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import org.apache.ibatis.type.Alias;
 import org.apache.ibatis.type.Alias;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -87,12 +86,48 @@ public class CmBrandLanding extends DataEntity<CmBrandLanding> implements Serial
     /** 文件名称*/
     /** 文件名称*/
     private List<CmBrandFiles> cmBrandFiles;
     private List<CmBrandFiles> cmBrandFiles;
     /** 修改时间 */
     /** 修改时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date updateTime;
     private Date updateTime;
     /** 添加时间 */
     /** 添加时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date addTime;
     private Date addTime;
 
 
+
+    //点击量统计
+    /** 开始点击量时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date startPvCreateTime;
+    /** 结束点击量时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date endPvCreateTime;
+    /** 统计分类*/
+    private String statisticsType;
+
+    public String getStatisticsType() {
+        return statisticsType;
+    }
+
+    public void setStatisticsType(String statisticsType) {
+        this.statisticsType = statisticsType;
+    }
+
+    public Date getStartPvCreateTime() {
+        return startPvCreateTime;
+    }
+
+    public void setStartPvCreateTime(Date startPvCreateTime) {
+        this.startPvCreateTime = startPvCreateTime;
+    }
+
+    public Date getEndPvCreateTime() {
+        
+        return endPvCreateTime;
+    }
+
+    public void setEndPvCreateTime(Date endPvCreateTime) {
+        this.endPvCreateTime = endPvCreateTime;
+    }
+
     public Integer getPv() {
     public Integer getPv() {
         return pv;
         return pv;
     }
     }

+ 2 - 1
src/main/java/com/caimei/modules/newhome/dao/NewPageHomeimageDao.java

@@ -6,6 +6,7 @@ import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.caimei.modules.newhome.entity.NewPageHomeimage;
 import com.caimei.modules.newhome.entity.NewPageHomeimage;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -20,7 +21,7 @@ public interface NewPageHomeimageDao extends CrudDao<NewPageHomeimage> {
 
 
     void updateSort(@Param("id") String id, @Param("sort") String sort);
     void updateSort(@Param("id") String id, @Param("sort") String sort);
 
 
-    List<cmStatisticsType> getBannerStatistics();
+    List<cmStatisticsType> getBannerStatistics(@Param("startPvCreateTime") Date startPvCreateTime, @Param("endPvCreateTime")Date endPvCreateTime);
 
 
     String findBigSort();
     String findBigSort();
 }
 }

+ 50 - 0
src/main/java/com/caimei/modules/newhome/entity/NewPageFirstNavigation.java

@@ -1,8 +1,12 @@
 package com.caimei.modules.newhome.entity;
 package com.caimei.modules.newhome.entity;
 
 
+import cn.hutool.core.date.DateUtil;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 import org.hibernate.validator.constraints.Length;
 import org.hibernate.validator.constraints.Length;
 
 
+import java.util.Date;
+
 /**
 /**
  * 新首页一级导航栏Entity
  * 新首页一级导航栏Entity
  *
  *
@@ -46,6 +50,52 @@ public class NewPageFirstNavigation extends DataEntity<NewPageFirstNavigation> {
      */
      */
     private String crmEnabledStatus;
     private String crmEnabledStatus;
 
 
+
+    //点击量统计
+    /** 开始点击量时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date startPvCreateTime;
+    /** 结束点击量时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date endPvCreateTime;
+    /** 统计分类*/
+    private String statisticsType;
+    /** 点击量*/
+    private Integer pv;
+
+    public Date getStartPvCreateTime() {
+        return startPvCreateTime;
+    }
+
+    public void setStartPvCreateTime(Date startPvCreateTime) {
+        this.startPvCreateTime = startPvCreateTime;
+    }
+
+    public Date getEndPvCreateTime() {
+        
+        return endPvCreateTime;
+    }
+
+    public void setEndPvCreateTime(Date endPvCreateTime) {
+        this.endPvCreateTime = endPvCreateTime;
+    }
+
+    public String getStatisticsType() {
+        return statisticsType;
+    }
+
+    public void setStatisticsType(String statisticsType) {
+        this.statisticsType = statisticsType;
+    }
+
+    public Integer getPv() {
+        return pv;
+    }
+
+    public void setPv(Integer pv) {
+        this.pv = pv;
+    }
+
     public NewPageFirstNavigation() {
     public NewPageFirstNavigation() {
         super();
         super();
     }
     }

+ 32 - 0
src/main/java/com/caimei/modules/newhome/entity/NewPageHomeimage.java

@@ -1,9 +1,13 @@
 package com.caimei.modules.newhome.entity;
 package com.caimei.modules.newhome.entity;
 
 
+import cn.hutool.core.date.DateUtil;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import org.hibernate.validator.constraints.Length;
 import org.hibernate.validator.constraints.Length;
 
 
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 
 
+import java.util.Date;
+
 /**
 /**
  * 新首页轮播图Entity
  * 新首页轮播图Entity
  * @author ye.qin
  * @author ye.qin
@@ -23,6 +27,34 @@ public class NewPageHomeimage extends DataEntity<NewPageHomeimage> {
 	private String crmEnabledStatus;		// CRM端状态 0停用 1启用
 	private String crmEnabledStatus;		// CRM端状态 0停用 1启用
 	private Integer count;	// 点击次数
 	private Integer count;	// 点击次数
 
 
+
+	//点击量统计
+	/** 开始点击量时间 */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	private Date startPvCreateTime;
+	/** 结束点击量时间 */
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	private Date endPvCreateTime;
+
+	public Date getStartPvCreateTime() {
+		return startPvCreateTime;
+	}
+
+	public void setStartPvCreateTime(Date startPvCreateTime) {
+		this.startPvCreateTime = startPvCreateTime;
+	}
+
+	public Date getEndPvCreateTime() {
+		
+		return endPvCreateTime;
+	}
+
+	public void setEndPvCreateTime(Date endPvCreateTime) {
+		this.endPvCreateTime = endPvCreateTime;
+	}
+
+
+
 	public NewPageHomeimage() {
 	public NewPageHomeimage() {
 		super();
 		super();
 	}
 	}

+ 5 - 2
src/main/java/com/caimei/modules/newhome/web/NewPageFirstNavigationController.java

@@ -1,10 +1,10 @@
 package com.caimei.modules.newhome.web;
 package com.caimei.modules.newhome.web;
 
 
-import com.caimei.constants.common.RedisKeyUtil;
 import com.caimei.modules.hehe.util.UploadPicUtils;
 import com.caimei.modules.hehe.util.UploadPicUtils;
 import com.caimei.modules.newhome.entity.NewPageFirstNavigation;
 import com.caimei.modules.newhome.entity.NewPageFirstNavigation;
 import com.caimei.modules.newhome.service.NewPageFirstNavigationService;
 import com.caimei.modules.newhome.service.NewPageFirstNavigationService;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.opensearch.GenerateUtils;
+import com.caimei.modules.utils.DateUtil;
 import com.caimei.redis.RedisService;
 import com.caimei.redis.RedisService;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.config.Global;
@@ -13,7 +13,6 @@ import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.web.BaseController;
 import com.thinkgem.jeesite.common.web.BaseController;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.ModelAttribute;
@@ -66,6 +65,10 @@ public class NewPageFirstNavigationController extends BaseController {
     @RequiresPermissions("newhome:newPageFirstNavigation:view")
     @RequiresPermissions("newhome:newPageFirstNavigation:view")
     @RequestMapping(value = {"list", ""})
     @RequestMapping(value = {"list", ""})
     public String list(NewPageFirstNavigation newPageFirstNavigation, HttpServletRequest request, HttpServletResponse response, Model model) {
     public String list(NewPageFirstNavigation newPageFirstNavigation, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if (null != newPageFirstNavigation.getEndPvCreateTime()) {
+            newPageFirstNavigation.setEndPvCreateTime(DateUtil.getEndTime(newPageFirstNavigation.getEndPvCreateTime()));
+        }
+        newPageFirstNavigation.setStatisticsType("4");
         Page<NewPageFirstNavigation> page = newPageFirstNavigationService.findPage(new Page<NewPageFirstNavigation>(request, response), newPageFirstNavigation);
         Page<NewPageFirstNavigation> page = newPageFirstNavigationService.findPage(new Page<NewPageFirstNavigation>(request, response), newPageFirstNavigation);
         model.addAttribute("page", page);
         model.addAttribute("page", page);
         model.addAttribute("newPageFirstNavigation", newPageFirstNavigation);
         model.addAttribute("newPageFirstNavigation", newPageFirstNavigation);

+ 5 - 2
src/main/java/com/caimei/modules/newhome/web/NewPageHomeimageController.java

@@ -6,6 +6,7 @@ import com.caimei.modules.newhome.entity.NewPageHomeimage;
 import com.caimei.modules.newhome.entity.cmStatisticsType;
 import com.caimei.modules.newhome.entity.cmStatisticsType;
 import com.caimei.modules.newhome.service.NewPageHomeimageService;
 import com.caimei.modules.newhome.service.NewPageHomeimageService;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.opensearch.GenerateUtils;
+import com.caimei.modules.utils.DateUtil;
 import com.caimei.redis.RedisService;
 import com.caimei.redis.RedisService;
 import com.caimei.vo.JsonModel;
 import com.caimei.vo.JsonModel;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
@@ -14,7 +15,6 @@ import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.web.BaseController;
 import com.thinkgem.jeesite.common.web.BaseController;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.ModelAttribute;
@@ -66,9 +66,12 @@ public class NewPageHomeimageController extends BaseController {
 
 
     @RequestMapping(value = {"list", ""})
     @RequestMapping(value = {"list", ""})
     public String list(NewPageHomeimage newPageHomeimage, HttpServletRequest request, HttpServletResponse response, Model model) {
     public String list(NewPageHomeimage newPageHomeimage, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if (null != newPageHomeimage.getEndPvCreateTime()) {
+            newPageHomeimage.setEndPvCreateTime(DateUtil.getEndTime(newPageHomeimage.getEndPvCreateTime()));
+        }
         Page<NewPageHomeimage> page = newPageHomeimageService.findPage(new Page<NewPageHomeimage>(request, response), newPageHomeimage);
         Page<NewPageHomeimage> page = newPageHomeimageService.findPage(new Page<NewPageHomeimage>(request, response), newPageHomeimage);
         // 点击次数
         // 点击次数
-        List<cmStatisticsType> bannerStatistics = newPageHomeimageDao.getBannerStatistics();
+        List<cmStatisticsType> bannerStatistics = newPageHomeimageDao.getBannerStatistics(newPageHomeimage.getStartPvCreateTime(),newPageHomeimage.getEndPvCreateTime());
         if (bannerStatistics.size() > 0) {
         if (bannerStatistics.size() > 0) {
             for (NewPageHomeimage homeimage : page.getList()) {
             for (NewPageHomeimage homeimage : page.getList()) {
                 List<cmStatisticsType> collect = bannerStatistics.stream().filter(b -> homeimage.getId().equals(b.getBannerId().toString())).collect(Collectors.toList());
                 List<cmStatisticsType> collect = bannerStatistics.stream().filter(b -> homeimage.getId().equals(b.getBannerId().toString())).collect(Collectors.toList());

+ 2 - 1
src/main/java/com/caimei/modules/user/dao/NewCmClubDao.java

@@ -4,7 +4,6 @@ import com.caimei.modules.consult.entity.type.CmConsulttype;
 import com.caimei.modules.project.model.ServiceProviderModel;
 import com.caimei.modules.project.model.ServiceProviderModel;
 import com.caimei.modules.user.entity.*;
 import com.caimei.modules.user.entity.*;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
-import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
@@ -96,4 +95,6 @@ public interface NewCmClubDao extends CrudDao<NewCmClub> {
     List<CmBehaviorRecord> selPageLable();
     List<CmBehaviorRecord> selPageLable();
 
 
     List<easyExcel> findExcelList(ClubStatistics statistics);
     List<easyExcel> findExcelList(ClubStatistics statistics);
+
+    List<String> getClubIds();
 }
 }

+ 43 - 5
src/main/java/com/caimei/modules/utils/DateUtil.java

@@ -65,11 +65,49 @@ public class DateUtil {
         return format;
         return format;
     }
     }
 
 
-//    public static void main(String[] args) throws ParseException {
-//        String month = "2020-02";
-//        System.out.println(getMinDateMonth(month));
-//        System.out.println(getMaxDateMonth(month));
-//    }
+    /**
+     * 时间yyyy-mm格式
+     *
+     * @return
+     */
+    public static String format(Date date) {
+        String format = new SimpleDateFormat("yyyy-MM").format(date);
+        return format;
+    }
+
+    /**
+     * 获取当天00:00:00的时间戳
+     *
+     * @return 时间戳
+     */
+    public static Date getStartTime(Date date) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        return calendar.getTime();
+    }
+
+    /**
+     * 获取当天23:59:59的时间戳
+     *
+     * @return 时间戳
+     */
+    public static Date getEndTime(Date date) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.set(Calendar.HOUR_OF_DAY, 23);
+        calendar.set(Calendar.MINUTE, 59);
+        calendar.set(Calendar.SECOND, 59);
+        return calendar.getTime();
+    }
+
+    //    public static void main(String[] args) throws ParseException {
+    //        String month = "2020-02";
+    //        System.out.println(getMinDateMonth(month));
+    //        System.out.println(getMaxDateMonth(month));
+    //    }
 
 
 
 
 }
 }

+ 53 - 23
src/main/java/com/caimei/modules/utils/MessageUtil.java

@@ -1,20 +1,18 @@
 package com.caimei.modules.utils;
 package com.caimei.modules.utils;
 
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
-import com.caimei.modules.utils.message.InsideMessage;
 import com.caimei.modules.utils.message.MessageModel;
 import com.caimei.modules.utils.message.MessageModel;
 import com.caimei.modules.utils.message.MqInfo;
 import com.caimei.modules.utils.message.MqInfo;
 import com.caimei.modules.utils.message.WechatTemplateMessage;
 import com.caimei.modules.utils.message.WechatTemplateMessage;
 import com.caimei.modules.utils.message.enums.MessageType;
 import com.caimei.modules.utils.message.enums.MessageType;
-import com.caimei.utils.HttpRequest;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.config.Global;
+import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
 
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
 
 
 public class MessageUtil {
 public class MessageUtil {
     protected static Logger logger = LoggerFactory.getLogger(MessageUtil.class);
     protected static Logger logger = LoggerFactory.getLogger(MessageUtil.class);
@@ -23,10 +21,8 @@ public class MessageUtil {
         try {
         try {
             String coreServer = Global.getConfig("caimei.core");
             String coreServer = Global.getConfig("caimei.core");
             String url = coreServer + "/tools/message/send";
             String url = coreServer + "/tools/message/send";
-            logger.info("url>>>>" + url);
             String result = RequestUtil.sendPost(url, new ObjectMapper().writeValueAsString(model),"application/json");
             String result = RequestUtil.sendPost(url, new ObjectMapper().writeValueAsString(model),"application/json");
             JSONObject parseObject = JSONObject.parseObject(result);
             JSONObject parseObject = JSONObject.parseObject(result);
-            System.out.println(parseObject);
             Integer code = parseObject.getInteger("code");
             Integer code = parseObject.getInteger("code");
             if (code != 0) {
             if (code != 0) {
                 logger.info("审批消息推送失败>>>>" + model.info());
                 logger.info("审批消息推送失败>>>>" + model.info());
@@ -40,27 +36,61 @@ public class MessageUtil {
     }
     }
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
-
         //微信模板消息
         //微信模板消息
-        ArrayList<String> keyWords = new ArrayList<>();
-        keyWords.add("name"+"...等"+7+"家机构客户");
-        keyWords.add("pageLabel");
-        keyWords.add("2023-09-18");
+        // ArrayList<String> keyWords = new ArrayList<>();
+        // keyWords.add("2023-06-10");
+        // keyWords.add("2023-06-10");
+        // keyWords.add("2023-06-10");
+        // keyWords.add("2023-06-10");
+        Map<String,Object> keyWords = new HashMap<>();
+        keyWords.put("character_string3","2023-06-10");
+        keyWords.put("time10","2023-06-10");
+        keyWords.put("thing9","2023-06-10");
+        keyWords.put("character_string8","2023-06-10");
         MessageModel<WechatTemplateMessage> wechatTemplateMessageMessageModel = new MessageModel<WechatTemplateMessage>()
         MessageModel<WechatTemplateMessage> wechatTemplateMessageMessageModel = new MessageModel<WechatTemplateMessage>()
                 .code(MessageType.WECHAT_TEMPLATE_MESSAGE)
                 .code(MessageType.WECHAT_TEMPLATE_MESSAGE)
-                .mqInfo(new MqInfo().topic("MessageLine").delay(3).async(0))
+                .mqInfo(new MqInfo().topic("MessageLine").delay(3).async(1))
                 .info(new WechatTemplateMessage()
                 .info(new WechatTemplateMessage()
-                        .first("")
-//                        .openId("o9nzn5yD6IOcFuhG4b3OG1droVJw")
-//                        .openId("o9nzn51aTKY5u26FDoD5zf0wU6UM")
-                        .openId("o9nzn581OysHNNsDwJJlzKpWoQ4o")
-                        .appid("wxf3cd4ae0cdd11c36")
-                        .templateId("Zd7ewJw9-bN-gIgra9flKW96W3YehikRPPkDXPfhmQ0")
-                        .keyWords(keyWords)
-                        .remark("为了更好给您服务,请及时联系采美客服!")
-                        .pagePath("pages/seller/notice/service/Institutional_visits?spId="+1340+"&accDateTime="+"2023-09-18"));
-//                        .pagePath("pages/seller/notice/service/visits_details?spId="+1340+"&clubId="+"99930"+"&accessTime="+"2023-09-18"));
+                        .type("2")
+                        .templateType("2")
+                        .first("hgfhfgh")
+                        .openId("oIsyY5njDnjzjR8nghD0axsw34t8")
+                        .appid("wx2c3b0a7f343235b1")
+                        .templateId("0Ruf-Ypu0Eahk0vY9orVN0-QqE0auk2N89LqjtGq4p8")
+                        // .keyWords(keyWords)
+                        .mapKeyWords(keyWords)
+                        .remark("个地方刚发的")
+                        .pagePath("pages/views/order/order-detail?orderId="+18691)
+                );
+        String join = StringUtils.join(wechatTemplateMessageMessageModel.getInfo().getKeyWords(), ",");
+        if(join.contains("},{")){
+            join = join.replace("},{", ",");
+        }
+        JSONObject jsonObject = JSONObject.parseObject(join);
+                System.out.println(jsonObject);
         sendMessage(wechatTemplateMessageMessageModel);
         sendMessage(wechatTemplateMessageMessageModel);
+
+//         //微信模板消息
+//         ArrayList<String> keyWords = new ArrayList<>();
+//         keyWords.add("name"+"...等"+7+"家机构客户");
+//         keyWords.add("pageLabel");
+//         keyWords.add("2023-09-18");
+//         MessageModel<WechatTemplateMessage> wechatTemplateMessageMessageModel = new MessageModel<WechatTemplateMessage>()
+//                 .code(MessageType.WECHAT_TEMPLATE_MESSAGE)
+//                 .mqInfo(new MqInfo().topic("MessageLine").delay(3).async(0))
+//                 .info(new WechatTemplateMessage()
+//                         // .type("2")
+//                         .first("")
+//                        .openId("o9nzn5yD6IOcFuhG4b3OG1droVJw")
+// //                        .openId("o9nzn51aTKY5u26FDoD5zf0wU6UM")
+// //                         .openId("o9nzn581OysHNNsDwJJlzKpWoQ4o")
+//                         .appid("wxf3cd4ae0cdd11c36")
+//                         .templateId("Zd7ewJw9-bN-gIgra9flKW96W3YehikRPPkDXPfhmQ0")
+//                         .keyWords(keyWords)
+//                         .remark("为了更好给您服务,请及时联系采美客服!")
+//                         .pagePath("pages/seller/notice/service/Institutional_visits?spId="+1340+"&accDateTime="+"2023-09-18"));
+// //                        .pagePath("pages/seller/notice/service/visits_details?spId="+1340+"&clubId="+"99930"+"&accessTime="+"2023-09-18"));
+//         sendMessage(wechatTemplateMessageMessageModel);
 //        //站内信
 //        //站内信
 //        MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
 //        MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
 //        insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)
 //        insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)

+ 39 - 0
src/main/java/com/caimei/modules/utils/message/WechatTemplateMessage.java

@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
 import javax.validation.constraints.NotNull;
 import javax.validation.constraints.NotNull;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
+import java.util.Map;
 
 
 @Data
 @Data
 @Accessors(fluent = true)
 @Accessors(fluent = true)
@@ -65,6 +66,10 @@ public class WechatTemplateMessage {
      */
      */
     @NotNull
     @NotNull
     private JSONObject remark;
     private JSONObject remark;
+    /**
+     * 模板消息的公众号
+     */
+    private String type;
     /**
     /**
      * 所需跳转到的小程序appid(该小程序 appid 必须与发模板消息的公众号是绑定关联关系,暂不支持小游戏)
      * 所需跳转到的小程序appid(该小程序 appid 必须与发模板消息的公众号是绑定关联关系,暂不支持小游戏)
      */
      */
@@ -80,6 +85,11 @@ public class WechatTemplateMessage {
      */
      */
     @NotNull
     @NotNull
     private String templateId;
     private String templateId;
+
+    /**
+     * 模板type:1模板消息,2类目模板消息
+     */
+    private String templateType;
     /**
     /**
      * 模板跳转链接
      * 模板跳转链接
      */
      */
@@ -100,6 +110,22 @@ public class WechatTemplateMessage {
     private JSONObject data;
     private JSONObject data;
     private JSONObject json;
     private JSONObject json;
 
 
+    public String getTemplateType() {
+        return templateType;
+    }
+
+    public void setTemplateType(String templateType) {
+        this.templateType = templateType;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
     public JSONObject getFirst() {
     public JSONObject getFirst() {
         return first;
         return first;
     }
     }
@@ -179,6 +205,19 @@ public class WechatTemplateMessage {
         return this;
         return this;
     }
     }
 
 
+    public WechatTemplateMessage mapKeyWords(Map<String,Object> words) {
+        List<JSONObject> collect = new ArrayList<>();
+        words.forEach((key, value) -> {
+            JSONObject jsonValue = new JSONObject();
+            jsonValue.put("value",value);
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.put(key, jsonValue);
+            collect.add(jsonObject);
+        });
+        this.setKeyWords(collect);
+        return this;
+    }
+
     public void setKeyWords(List<JSONObject> keyWords) {
     public void setKeyWords(List<JSONObject> keyWords) {
         this.keyWords = keyWords;
         this.keyWords = keyWords;
     }
     }

+ 12 - 0
src/main/java/com/thinkgem/jeesite/common/utils/DateUtils.java

@@ -36,6 +36,16 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
         return DateFormatUtils.format(new Date(), pattern);
         return DateFormatUtils.format(new Date(), pattern);
     }
     }
 
 
+    /**
+     * 得到当前日期字符串 格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E"
+     */
+    public static String setDate(Date date, String pattern) {
+        if (date == null) {
+            return null;
+        }
+        return DateFormatUtils.format(date, pattern);
+    }
+
     /**
     /**
      * 得到日期字符串 默认格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E"
      * 得到日期字符串 默认格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E"
      */
      */
@@ -49,6 +59,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
         return formatDate;
         return formatDate;
     }
     }
 
 
+
     /**
     /**
      * 得到日期时间字符串,转换格式(yyyy-MM-dd HH:mm:ss)
      * 得到日期时间字符串,转换格式(yyyy-MM-dd HH:mm:ss)
      */
      */
@@ -56,6 +67,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
         return formatDate(date, "yyyy-MM-dd HH:mm:ss");
         return formatDate(date, "yyyy-MM-dd HH:mm:ss");
     }
     }
 
 
+
     /**
     /**
      * 得到当前时间字符串 格式(HH:mm:ss)
      * 得到当前时间字符串 格式(HH:mm:ss)
      */
      */

+ 167 - 0
src/main/resources/mappings/modules/autoType/CmAutoTypeMapper.xml

@@ -0,0 +1,167 @@
+<?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.caimei.modules.autoType.mapper.CmAutoTypeMapper">
+
+    <resultMap type="CmAutoType" id="CmAutoTypeResult">
+        <result property="id"    column="id"    />
+        <result property="type"    column="type"    />
+        <result property="autoStatus"    column="autoStatus"    />
+        <result property="delFlag"    column="delFlag"    />
+        <result property="updateTime"    column="updateTime"    />
+        <result property="createTime"    column="createTime"    />
+    </resultMap>
+
+    <sql id="selectCmAutoTypeVo">
+        select
+            cm_auto_type.id,
+            cm_auto_type.type,
+            cm_auto_type.autoStatus,
+            cm_auto_type.delFlag,
+            cm_auto_type.updateTime,
+            cm_auto_type.createTime
+    </sql>
+
+    <select id="getByCmAutoType" parameterType="CmAutoType" resultMap="CmAutoTypeResult">
+        <include refid="selectCmAutoTypeVo"/>
+        from cm_auto_type AS cm_auto_type
+        <where>  cm_auto_type.delFlag = 0
+            <if test="id != null and id != '' "> and cm_auto_type.id = #{id}</if>
+            <if test="type != null  and type != ''"> and cm_auto_type.type = #{type}</if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type.autoStatus = #{autoStatus}</if>
+        </where>
+        group by cm_auto_type.id
+        limit 0,1
+    </select>
+
+    <select id="findList" parameterType="CmAutoType" resultMap="CmAutoTypeResult">
+        <include refid="selectCmAutoTypeVo"/>
+        from cm_auto_type AS cm_auto_type
+        <where>  cm_auto_type.delFlag = 0
+            <if test="id != null and id != '' "> and cm_auto_type.id = #{id}</if>
+            <if test="type != null  and type != ''">
+                and cm_auto_type.type
+                <if test="type.toUpperCase().indexOf('=')==-1">
+                    = #{type}
+                </if>
+                <if test="type.toUpperCase().indexOf('=')!=-1">
+                    <if test="type.toUpperCase().indexOf('NOT')!=-1"> not </if>
+                    <if test="type.toUpperCase().indexOf('IN')!=-1"> in </if>
+                    <foreach item="typeIn" collection="type.substring(type.toUpperCase().indexOf('=')+1,type.length()).trim().split(',')" open="(" separator="," close=")">
+                        #{typeIn}
+                    </foreach>
+                </if>
+            </if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type.autoStatus = #{autoStatus}</if>
+        </where>
+        group by cm_auto_type.id
+        order by cm_auto_type.createTime desc
+    </select>
+
+    <select id="getCmAutoTypeList" parameterType="CmAutoType" resultMap="CmAutoTypeResult">
+        <include refid="selectCmAutoTypeVo"/>
+        from cm_auto_type AS cm_auto_type
+        <where>  cm_auto_type.delFlag = 0
+            <if test="id != null and id != '' "> and cm_auto_type.id = #{id}</if>
+            <if test="type != null  and type != ''">
+                and cm_auto_type.type
+                <if test="type.toUpperCase().indexOf('=')==-1">
+                    = #{type}
+                </if>
+                <if test="type.toUpperCase().indexOf('=')!=-1">
+                    <if test="type.toUpperCase().indexOf('NOT')!=-1"> not </if>
+                    <if test="type.toUpperCase().indexOf('IN')!=-1"> in </if>
+                    <foreach item="typeIn" collection="type.substring(type.toUpperCase().indexOf('=')+1,type.length()).trim().split(',')" open="(" separator="," close=")">
+                        #{typeIn}
+                    </foreach>
+                </if>
+            </if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type.autoStatus = #{autoStatus}</if>
+        </where>
+        group by cm_auto_type.id
+        order by cm_auto_type.createTime desc
+    </select>
+
+    <select id="getCount" parameterType="CmAutoType" resultType="int">
+        select count(1)
+        from cm_auto_type AS cm_auto_type
+        <where>  cm_auto_type.delFlag = 0
+            <if test="id != null and id != '' "> and cm_auto_type.id = #{id}</if>
+            <if test="type != null  and type != ''"> and cm_auto_type.type = #{type}</if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type.autoStatus = #{autoStatus}</if>
+        </where>
+    </select>
+
+    <select id="get" parameterType="String" resultMap="CmAutoTypeResult">
+        <include refid="selectCmAutoTypeVo"/>
+        from cm_auto_type AS cm_auto_type
+        where  cm_auto_type.delFlag = 0 and cm_auto_type.id = #{id}
+    </select>
+
+    <select id="getCmAutoTypeById" parameterType="String" resultMap="CmAutoTypeResult">
+        <include refid="selectCmAutoTypeVo"/>
+        from cm_auto_type AS cm_auto_type
+        where  cm_auto_type.delFlag = 0 and cm_auto_type.id = #{id}
+    </select>
+
+    <select id="getById" parameterType="CmAutoType" resultType="String">
+        select id
+        from cm_auto_type AS cm_auto_type
+        <where>  cm_auto_type.delFlag = 0
+            <if test="id != null and id != '' "> and cm_auto_type.id = #{id}</if>
+            <if test="type != null  and type != ''"> and cm_auto_type.type = #{type}</if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type.autoStatus = #{autoStatus}</if>
+        </where>
+        group by cm_auto_type.id
+        limit 0,1
+    </select>
+
+    <insert id="addCmAutoType" parameterType="CmAutoType" useGeneratedKeys="true" keyProperty="id">
+        insert into cm_auto_type
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != '' and id != ''">id,</if>
+            <if test="type != null and type != ''">type,</if>
+            <if test="autoStatus != null and autoStatus != ''">autoStatus,</if>
+            <if test="delFlag != null">delFlag,</if>
+            <if test="updateTime != null">updateTime,</if>
+            <if test="createTime != null">createTime,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != '' and id != ''">#{id},</if>
+            <if test="type != null and type != ''">#{type},</if>
+            <if test="autoStatus != null and autoStatus != ''">#{autoStatus},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="createTime != null">#{createTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateCmAutoType" parameterType="CmAutoType">
+        update cm_auto_type
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="type != null and type != ''">type = #{type},</if>
+            <if test="autoStatus != null and autoStatus != ''">autoStatus = #{autoStatus},</if>
+            <if test="delFlag != null">delFlag = #{delFlag},</if>
+            <if test="updateTime != null">updateTime = #{updateTime},</if>
+            <if test="createTime != null">createTime = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="delCmAutoTypeById" parameterType="String">
+        delete
+        from cm_auto_type where id = #{id}
+    </delete>
+
+    <delete id="delCmAutoType" parameterType="CmAutoType">
+        delete
+        from cm_auto_type AS cm_auto_type
+        <where>
+            <if test="id != null and id != '' "> and cm_auto_type.id = #{id}</if>
+            <if test="type != null  and type != ''"> and cm_auto_type.type = #{type}</if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type.autoStatus = #{autoStatus}</if>
+        </where>
+    </delete>
+
+</mapper>

+ 200 - 0
src/main/resources/mappings/modules/autoType/CmAutoTypeRecordMapper.xml

@@ -0,0 +1,200 @@
+<?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.caimei.modules.autoType.mapper.CmAutoTypeRecordMapper">
+
+    <resultMap type="CmAutoTypeRecord" id="CmAutoTypeRecordResult">
+        <result property="id"    column="id"    />
+        <result property="type"    column="type"    />
+        <result property="authorId"    column="authorId"    />
+        <result property="autoStatus"    column="autoStatus"    />
+        <result property="delFlag"    column="delFlag"    />
+        <result property="updateTime"    column="updateTime"    />
+        <result property="createTime"    column="createTime"    />
+    </resultMap>
+
+    <sql id="selectCmAutoTypeRecordVo">
+        select
+            cm_auto_type_record.id,
+            cm_auto_type_record.type,
+            cm_auto_type_record.authorId,
+            cm_auto_type_record.autoStatus,
+            cm_auto_type_record.delFlag,
+            cm_auto_type_record.updateTime,
+            cm_auto_type_record.createTime
+    </sql>
+
+    <select id="getByCmAutoTypeRecord" parameterType="CmAutoTypeRecord" resultMap="CmAutoTypeRecordResult">
+        <include refid="selectCmAutoTypeRecordVo"/>
+        from cm_auto_type_record AS cm_auto_type_record
+        <where>  cm_auto_type_record.delFlag = 0
+            <if test="id != null and id != '' "> and cm_auto_type_record.id = #{id}</if>
+            <if test="type != null  and type != ''"> and cm_auto_type_record.type = #{type}</if>
+            <if test="authorId != null "> and cm_auto_type_record.authorId = #{authorId}</if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type_record.autoStatus = #{autoStatus}</if>
+        </where>
+        group by cm_auto_type_record.id
+        limit 0,1
+    </select>
+
+    <select id="getCmAutoTypeRecordList" parameterType="CmAutoTypeRecord" resultMap="CmAutoTypeRecordResult">
+        <include refid="selectCmAutoTypeRecordVo"/>
+        from cm_auto_type_record AS cm_auto_type_record
+        <where>  cm_auto_type_record.delFlag = 0
+            <if test="id != null and id != '' "> and cm_auto_type_record.id = #{id}</if>
+            <if test="type != null  and type != ''">
+                and cm_auto_type_record.type
+                <if test="type.toUpperCase().indexOf('=')==-1">
+                    = #{type}
+                </if>
+                <if test="type.toUpperCase().indexOf('=')!=-1">
+                    <if test="type.toUpperCase().indexOf('NOT')!=-1"> not </if>
+                    <if test="type.toUpperCase().indexOf('IN')!=-1"> in </if>
+                    <foreach item="typeIn" collection="type.substring(type.toUpperCase().indexOf('=')+1,type.length()).trim().split(',')" open="(" separator="," close=")">
+                        #{typeIn}
+                    </foreach>
+                </if>
+            </if>
+            <if test="authorId != null "> and cm_auto_type_record.authorId = #{authorId}</if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type_record.autoStatus = #{autoStatus}</if>
+
+        </where>
+        group by cm_auto_type_record.id
+        order by cm_auto_type_record.createTime desc
+    </select>
+
+    <select id="findList" parameterType="CmAutoTypeRecord" resultMap="CmAutoTypeRecordResult">
+        <include refid="selectCmAutoTypeRecordVo"/>
+        <if test="type != null  and type == 1">
+            ,i.guidanceImage as image ,i.title
+        </if>
+        <if test="type != null  and type == 2">
+            ,cpi.image ,cpi.title
+        </if>
+        from cm_auto_type_record AS cm_auto_type_record
+        <if test="type != null  and type == 1">
+            LEFT JOIN info i ON cm_auto_type_record.type =1 and cm_auto_type_record.authorId=i.id
+        </if>
+        <if test="type != null  and type == 2">
+            LEFT JOIN cm_page_image cpi ON cm_auto_type_record.type =2 and cm_auto_type_record.authorId=cpi.id
+        </if>
+        <where>  cm_auto_type_record.delFlag = 0
+            <if test="id != null and id != '' "> and cm_auto_type_record.id = #{id}</if>
+            <if test="type != null  and type != ''">
+                and cm_auto_type_record.type
+                <if test="type.toUpperCase().indexOf('=')==-1">
+                    = #{type}
+                </if>
+                <if test="type.toUpperCase().indexOf('=')!=-1">
+                    <if test="type.toUpperCase().indexOf('NOT')!=-1"> not </if>
+                    <if test="type.toUpperCase().indexOf('IN')!=-1"> in </if>
+                    <foreach item="typeIn" collection="type.substring(type.toUpperCase().indexOf('=')+1,type.length()).trim().split(',')" open="(" separator="," close=")">
+                        #{typeIn}
+                    </foreach>
+                </if>
+            </if>
+            <if test="authorId != null "> and cm_auto_type_record.authorId = #{authorId}</if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type_record.autoStatus = #{autoStatus}</if>
+            <if test="startPvCreateTime != null ">AND cm_auto_type_record.createTime >= #{startPvCreateTime} </if>
+            <if test="endPvCreateTime != null ">AND cm_auto_type_record.createTime <![CDATA[ <= ]]> #{endPvCreateTime} </if>
+            <if test="type != null  and type == 1">
+                <if test="image != null and image != ''"> and i.guidanceImage = #{image}</if>
+                <if test="title != null and title != ''"> and i.title = #{title}</if>
+            </if>
+            <if test="type != null  and type == 2">
+                <if test="image != null and image != ''"> and cpi.image = #{image}</if>
+                <if test="title != null and title != ''"> and cpi.title = #{title}</if>
+            </if>
+        </where>
+        group by cm_auto_type_record.id
+        order by cm_auto_type_record.createTime desc
+    </select>
+
+    <select id="getCount" parameterType="CmAutoTypeRecord" resultType="int">
+        select count(1)
+        from cm_auto_type_record AS cm_auto_type_record
+        <where>  cm_auto_type_record.delFlag = 0
+            <if test="id != null and id != '' "> and cm_auto_type_record.id = #{id}</if>
+            <if test="type != null  and type != ''"> and cm_auto_type_record.type = #{type}</if>
+            <if test="authorId != null "> and cm_auto_type_record.authorId = #{authorId}</if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type_record.autoStatus = #{autoStatus}</if>
+        </where>
+    </select>
+
+    <select id="get" parameterType="String" resultMap="CmAutoTypeRecordResult">
+        <include refid="selectCmAutoTypeRecordVo"/>
+        from cm_auto_type_record AS cm_auto_type_record
+        where  cm_auto_type_record.delFlag = 0 and cm_auto_type_record.id = #{id}
+    </select>
+
+    <select id="getCmAutoTypeRecordById" parameterType="String" resultMap="CmAutoTypeRecordResult">
+        <include refid="selectCmAutoTypeRecordVo"/>
+        from cm_auto_type_record AS cm_auto_type_record
+        where  cm_auto_type_record.delFlag = 0 and cm_auto_type_record.id = #{id}
+    </select>
+
+
+    <select id="getById" parameterType="CmAutoTypeRecord" resultType="String">
+        select id
+        from cm_auto_type_record AS cm_auto_type_record
+        <where>  cm_auto_type_record.delFlag = 0
+            <if test="id != null and id != '' "> and cm_auto_type_record.id = #{id}</if>
+            <if test="type != null  and type != ''"> and cm_auto_type_record.type = #{type}</if>
+            <if test="authorId != null "> and cm_auto_type_record.authorId = #{authorId}</if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type_record.autoStatus = #{autoStatus}</if>
+        </where>
+        group by cm_auto_type_record.id
+        limit 0,1
+    </select>
+
+    <insert id="addCmAutoTypeRecord" parameterType="CmAutoTypeRecord" useGeneratedKeys="true" keyProperty="id">
+        insert into cm_auto_type_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="type != null and type != ''">type,</if>
+            <if test="authorId != null">authorId,</if>
+            <if test="autoStatus != null and autoStatus != ''">autoStatus,</if>
+            <if test="delFlag != null">delFlag,</if>
+            <if test="updateTime != null">updateTime,</if>
+            <if test="createTime != null">createTime,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="type != null and type != ''">#{type},</if>
+            <if test="authorId != null">#{authorId},</if>
+            <if test="autoStatus != null and autoStatus != ''">#{autoStatus},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="createTime != null">#{createTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateCmAutoTypeRecord" parameterType="CmAutoTypeRecord">
+        update cm_auto_type_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="type != null and type != ''">type = #{type},</if>
+            <if test="authorId != null">authorId = #{authorId},</if>
+            <if test="autoStatus != null and autoStatus != ''">autoStatus = #{autoStatus},</if>
+            <if test="delFlag != null">delFlag = #{delFlag},</if>
+            <if test="updateTime != null">updateTime = #{updateTime},</if>
+            <if test="createTime != null">createTime = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="delCmAutoTypeRecordById" parameterType="String">
+        delete
+        from cm_auto_type_record where id = #{id}
+    </delete>
+
+    <delete id="delCmAutoTypeRecord" parameterType="CmAutoTypeRecord">
+        delete
+        from cm_auto_type_record AS cm_auto_type_record
+        <where>
+            <if test="id != null and id != '' "> and cm_auto_type_record.id = #{id}</if>
+            <if test="type != null  and type != ''"> and cm_auto_type_record.type = #{type}</if>
+            <if test="authorId != null "> and cm_auto_type_record.authorId = #{authorId}</if>
+            <if test="autoStatus != null  and autoStatus != ''"> and cm_auto_type_record.autoStatus = #{autoStatus}</if>
+        </where>
+    </delete>
+
+</mapper>

+ 16 - 13
src/main/resources/mappings/modules/cmpage/CmImageMapper.xml

@@ -1,7 +1,7 @@
 <?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.caimei.modules.cmpage.dao.CmImageDao">
 <mapper namespace="com.caimei.modules.cmpage.dao.CmImageDao">
-    
+
 	<sql id="cmImageColumns">
 	<sql id="cmImageColumns">
 		a.id AS "id",
 		a.id AS "id",
 		a.title AS "title",
 		a.title AS "title",
@@ -26,18 +26,21 @@
 	</sql>
 	</sql>
 
 
 	<select id="get" resultType="CmImage">
 	<select id="get" resultType="CmImage">
-		SELECT 
+		SELECT
 			<include refid="cmImageColumns"/>
 			<include refid="cmImageColumns"/>
 		FROM cm_page_image a
 		FROM cm_page_image a
 		WHERE a.id = #{id}
 		WHERE a.id = #{id}
 	</select>
 	</select>
-	
+
 	<select id="findList" resultType="CmImage">
 	<select id="findList" resultType="CmImage">
-		SELECT 
+		SELECT
 			<include refid="cmImageColumns"/>
 			<include refid="cmImageColumns"/>
+			<if test="statisticsType != null  and statisticsType != ''">
+				,IFNULL((select sum(c.pv) from cm_praise_statistics c where  c.delFlag = 0 and c.type = #{statisticsType} and a.id = c.authorId  <if test="startPvCreateTime != null ">AND c.createTime >= #{startPvCreateTime} </if><if test="endPvCreateTime != null ">AND c.createTime <![CDATA[ <= ]]> #{endPvCreateTime} </if>), 0) as pv
+			</if>
 		FROM cm_page_image a
 		FROM cm_page_image a
 		<where>
 		<where>
-			
+
 			<if test="id != null and id != ''">
 			<if test="id != null and id != ''">
 				AND a.id = #{id}
 				AND a.id = #{id}
 			</if>
 			</if>
@@ -95,14 +98,14 @@
 			</otherwise>
 			</otherwise>
 		</choose>
 		</choose>
 	</select>
 	</select>
-	
+
 	<select id="findAllList" resultType="CmImage">
 	<select id="findAllList" resultType="CmImage">
-		SELECT 
+		SELECT
 			<include refid="cmImageColumns"/>
 			<include refid="cmImageColumns"/>
 		FROM cm_page_image a
 		FROM cm_page_image a
 		<where>
 		<where>
-			
-		</where>		
+
+		</where>
 		<choose>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
 				ORDER BY ${page.orderBy}
@@ -159,9 +162,9 @@
 			#{topPosition}
 			#{topPosition}
 		)
 		)
 	</insert>
 	</insert>
-	
+
 	<update id="update">
 	<update id="update">
-		UPDATE cm_page_image SET 	
+		UPDATE cm_page_image SET
 			title = #{title},
 			title = #{title},
 			link = #{link},
 			link = #{link},
 			appLink = #{appLink},
 			appLink = #{appLink},
@@ -181,7 +184,7 @@
 			topPosition = #{topPosition}
 			topPosition = #{topPosition}
 		WHERE id = #{id}
 		WHERE id = #{id}
 	</update>
 	</update>
-	
+
 	<update id="delete">
 	<update id="delete">
 		DELETE FROM cm_page_image
 		DELETE FROM cm_page_image
 		WHERE id = #{id}
 		WHERE id = #{id}
@@ -218,4 +221,4 @@
 		  b.centreId = #{id}
 		  b.centreId = #{id}
 		</where>
 		</where>
 	</select>
 	</select>
-</mapper>
+</mapper>

+ 1 - 0
src/main/resources/mappings/modules/hehe/CmHeheCollageProductMapper.xml

@@ -121,6 +121,7 @@
         limit 1
         limit 1
     </select>
     </select>
 
 
+
     <insert id="insert" parameterType="CmHeheCollageProduct" keyProperty="id" useGeneratedKeys="true">
     <insert id="insert" parameterType="CmHeheCollageProduct" keyProperty="id" useGeneratedKeys="true">
         INSERT INTO cm_hehe_collage_product(productId,
         INSERT INTO cm_hehe_collage_product(productId,
                                             limitedNum,
                                             limitedNum,

+ 26 - 2
src/main/resources/mappings/modules/hehe/CmHeheProductMapper.xml

@@ -336,8 +336,32 @@
         where skuId = #{skuId}
         where skuId = #{skuId}
     </update>
     </update>
     <select id="findLadderList" resultType="com.caimei.modules.product.entity.CmLadderPrice">
     <select id="findLadderList" resultType="com.caimei.modules.product.entity.CmLadderPrice">
-        select id,buyPrice,buyNum
+        select id, buyPrice, buyNum
         from cm_hehe_activity_ladder
         from cm_hehe_activity_ladder
-        where skuId=#{skuId}
+        where skuId = #{skuId}
+    </select>
+    <select id="findMobileByUserYear" resultType="String">
+        select chu.mobile
+        from cm_hehe_user chu
+                 left join user u on u.userID = chu.userID
+        where chu.userIdentity='1' and  u.validFlag='1' and  u.loginTime >= DATE_SUB(NOW(), INTERVAL #{num} YEAR)
+    </select>
+
+    <select id="getMonthCount" resultType="java.lang.Integer">
+        <if test="type != null and type == 1">
+            select count(1)
+            from cm_hehe_collage_product
+            where addTime >= DATE_SUB(NOW(), INTERVAL #{num} MONTH)
+        </if>
+        <if test="type != null and type == 2">
+            select count(1)
+            from cm_hehe_activity_product
+            where addTime >= DATE_SUB(NOW(), INTERVAL #{num} MONTH)
+        </if>
+        <if test="type != null and type == 3">
+            select count(1)
+            from hehe_discount_activity_product
+            where addTime >= DATE_SUB(NOW(), INTERVAL #{num} MONTH)
+        </if>
     </select>
     </select>
 </mapper>
 </mapper>

+ 16 - 5
src/main/resources/mappings/modules/landing/CmBrandLandingMapper.xml

@@ -50,13 +50,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                a.appStatus,
                a.appStatus,
                a.delFlag,
                a.delFlag,
                a.updateTime,
                a.updateTime,
-               a.addTime,
-               IFNULL((select c.pv from cm_praise_statistics c where a.id = c.authorId and c.type = 2), 0) as pv
-        from cm_brand_landing a
+               a.addTime
+
     </sql>
     </sql>
 
 
     <select id="selectCmBrandLandingList" parameterType="CmBrandLanding" resultMap="CmBrandLandingResult">
     <select id="selectCmBrandLandingList" parameterType="CmBrandLanding" resultMap="CmBrandLandingResult">
-        <include refid="selectCmBrandLandingVo"/>
+        <include refid="selectCmBrandLandingVo"/>,
+        <if test="statisticsType != null  and statisticsType != ''">
+            ,IFNULL((select sum(c.pv) from cm_praise_statistics c where  c.delFlag = 0 and c.type = #{statisticsType} and a.id = c.authorId  <if test="startPvCreateTime != null ">AND c.createTime >= #{startPvCreateTime} </if><if test="endPvCreateTime != null ">AND c.createTime <![CDATA[ <= ]]> #{endPvCreateTime} </if>), 0) as pv
+        </if>
+        from cm_brand_landing a
         <where>delFlag = 0
         <where>delFlag = 0
             <if test="id != null  and id != ''">and id = #{id}</if>
             <if test="id != null  and id != ''">and id = #{id}</if>
             <if test="authUserId != null ">and authUserId = #{authUserId}</if>
             <if test="authUserId != null ">and authUserId = #{authUserId}</if>
@@ -83,6 +86,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     </select>
     <select id="findList" parameterType="CmBrandLanding" resultMap="CmBrandLandingResult">
     <select id="findList" parameterType="CmBrandLanding" resultMap="CmBrandLandingResult">
         <include refid="selectCmBrandLandingVo"/>
         <include refid="selectCmBrandLandingVo"/>
+        <if test="statisticsType != null  and statisticsType != ''">
+            ,IFNULL((select sum(c.pv) from cm_praise_statistics c where  c.delFlag = 0 and c.type = #{statisticsType} and a.id = c.authorId  <if test="startPvCreateTime != null ">AND c.createTime >= #{startPvCreateTime} </if><if test="endPvCreateTime != null ">AND c.createTime <![CDATA[ <= ]]> #{endPvCreateTime} </if>), 0) as pv
+        </if>
+        from cm_brand_landing a
         <where>delFlag = 0
         <where>delFlag = 0
             <if test="id != null  and id != ''">and id = #{id}</if>
             <if test="id != null  and id != ''">and id = #{id}</if>
             <if test="authUserId != null ">and authUserId = #{authUserId}</if>
             <if test="authUserId != null ">and authUserId = #{authUserId}</if>
@@ -109,7 +116,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     </select>
 
 
     <select id="selectCmBrandLandingById" parameterType="String" resultMap="CmBrandLandingResult">
     <select id="selectCmBrandLandingById" parameterType="String" resultMap="CmBrandLandingResult">
-        <include refid="selectCmBrandLandingVo"/>
+        <include refid="selectCmBrandLandingVo"/>,
+        <if test="statisticsType != null  and statisticsType != ''">
+            ,IFNULL((select sum(c.pv) from cm_praise_statistics c where  c.delFlag = 0 and c.type = #{statisticsType} and a.id = c.authorId  <if test="startPvCreateTime != null ">AND c.createTime >= #{startPvCreateTime} </if><if test="endPvCreateTime != null ">AND c.createTime <![CDATA[ <= ]]> #{endPvCreateTime} </if>), 0) as pv
+        </if>
+        from cm_brand_landing a
         where id = #{id} and delFlag = 0
         where id = #{id} and delFlag = 0
     </select>
     </select>
 
 

+ 3 - 0
src/main/resources/mappings/modules/newhome/NewPageFirstNavigationMapper.xml

@@ -29,6 +29,9 @@
 	<select id="findList" resultType="NewPageFirstNavigation">
 	<select id="findList" resultType="NewPageFirstNavigation">
 		SELECT
 		SELECT
 			<include refid="newPageFirstNavigationColumns"/>
 			<include refid="newPageFirstNavigationColumns"/>
+		<if test="statisticsType != null  and statisticsType != ''">
+			,IFNULL((select sum(c.pv) from cm_praise_statistics c where  c.delFlag = 0 and c.type = #{statisticsType} and a.id = c.authorId  <if test="startPvCreateTime != null ">AND c.createTime >= #{startPvCreateTime} </if><if test="endPvCreateTime != null ">AND c.createTime <![CDATA[ <= ]]> #{endPvCreateTime} </if>), 0) as pv
+		</if>
 		FROM new_page_first_navigation a
 		FROM new_page_first_navigation a
 		<where>
 		<where>
 			a.delFlag = 0
 			a.delFlag = 0

+ 4 - 1
src/main/resources/mappings/modules/newhome/NewPageHomeimageMapper.xml

@@ -50,7 +50,10 @@
         ORDER BY a.sort desc,a.createDate desc
         ORDER BY a.sort desc,a.createDate desc
     </select>
     </select>
     <select id="getBannerStatistics" resultType="com.caimei.modules.newhome.entity.cmStatisticsType">
     <select id="getBannerStatistics" resultType="com.caimei.modules.newhome.entity.cmStatisticsType">
-        SELECT COUNT(statisticsId) as count, ifnull(bannerId, 0) as bannerId  FROM cm_statistics_type WHERE typeId = 1 GROUP BY bannerId
+        SELECT COUNT(statisticsId) as count, ifnull(bannerId, 0) as bannerId  FROM cm_statistics_type WHERE typeId = 1
+        <if test="startPvCreateTime != null ">AND clickTime >= #{startPvCreateTime} </if>
+        <if test="endPvCreateTime != null ">AND clickTime <![CDATA[ <= ]]> #{endPvCreateTime} </if>
+        GROUP BY bannerId
     </select>
     </select>
 
 
     <select id="findAllList" resultType="NewPageHomeimage">
     <select id="findAllList" resultType="NewPageHomeimage">

+ 11 - 0
src/main/resources/mappings/modules/user/NewCmClubMapper.xml

@@ -1398,4 +1398,15 @@
         </where>
         </where>
         GROUP BY c.userID ORDER BY ordr.lastOrderTime DESC
         GROUP BY c.userID ORDER BY ordr.lastOrderTime DESC
     </select>
     </select>
+
+
+    <select id="getClubIds" resultType="String">
+        SELECT
+        a.clubID
+        FROM club a
+        <include refid="newCmClubJoins"/>
+        <where>
+            AND a.status =90 and u.userOrganizeID IN(0,1)  AND u.userIdentity != 8
+        </where>
+    </select>
 </mapper>
 </mapper>

+ 52 - 43
src/main/webapp/WEB-INF/tlds/fns.tld

@@ -4,7 +4,7 @@
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
   version="2.0">
   version="2.0">
-    
+
   <description>JSTL 1.1 functions library</description>
   <description>JSTL 1.1 functions library</description>
   <display-name>JSTL functions sys</display-name>
   <display-name>JSTL functions sys</display-name>
   <tlib-version>1.1</tlib-version>
   <tlib-version>1.1</tlib-version>
@@ -46,79 +46,79 @@
     <function-signature>java.lang.Object getConst(java.lang.String)</function-signature>
     <function-signature>java.lang.Object getConst(java.lang.String)</function-signature>
     <example>${fns:getConst(key)}</example>
     <example>${fns:getConst(key)}</example>
   </function>
   </function>
-  
+
   <!-- UserUtils -->
   <!-- UserUtils -->
   <function>
   <function>
     <description>获取当前用户对象</description>
     <description>获取当前用户对象</description>
     <name>getUser</name>
     <name>getUser</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-signature>com.thinkgem.jeesite.modules.sys.entity.User getUser()</function-signature>
     <function-signature>com.thinkgem.jeesite.modules.sys.entity.User getUser()</function-signature>
-    <example>${fns:getUser()}</example>  
+    <example>${fns:getUser()}</example>
   </function>
   </function>
-  
+
   <function>
   <function>
     <description>根据编码获取用户对象</description>
     <description>根据编码获取用户对象</description>
     <name>getUserById</name>
     <name>getUserById</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-signature>com.thinkgem.jeesite.modules.sys.entity.User get(java.lang.String)</function-signature>
     <function-signature>com.thinkgem.jeesite.modules.sys.entity.User get(java.lang.String)</function-signature>
-    <example>${fns:getUserById(id)}</example>  
+    <example>${fns:getUserById(id)}</example>
   </function>
   </function>
-  
+
   <function>
   <function>
     <description>获取授权用户信息</description>
     <description>获取授权用户信息</description>
     <name>getPrincipal</name>
     <name>getPrincipal</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-signature>com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm.Principal getPrincipal()</function-signature>
     <function-signature>com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm.Principal getPrincipal()</function-signature>
-    <example>${fns:getPrincipal()}</example>  
+    <example>${fns:getPrincipal()}</example>
   </function>
   </function>
-  
+
   <function>
   <function>
     <description>获取当前用户的菜单对象列表</description>
     <description>获取当前用户的菜单对象列表</description>
     <name>getMenuList</name>
     <name>getMenuList</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-signature>java.util.List getMenuList()</function-signature>
     <function-signature>java.util.List getMenuList()</function-signature>
-    <example>${fns:getMenuList()}</example>  
+    <example>${fns:getMenuList()}</example>
   </function>
   </function>
-  
+
   <function>
   <function>
     <description>获取当前用户的区域对象列表</description>
     <description>获取当前用户的区域对象列表</description>
     <name>getAreaList</name>
     <name>getAreaList</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-signature>java.util.List getAreaList()</function-signature>
     <function-signature>java.util.List getAreaList()</function-signature>
-    <example>${fns:getAreaList()}</example>  
+    <example>${fns:getAreaList()}</example>
   </function>
   </function>
-  
+
   <function>
   <function>
     <description>获取当前用户的部门对象列表</description>
     <description>获取当前用户的部门对象列表</description>
     <name>getOfficeList</name>
     <name>getOfficeList</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-signature>java.util.List getOfficeList()</function-signature>
     <function-signature>java.util.List getOfficeList()</function-signature>
-    <example>${fns:getOfficeList()}</example>  
+    <example>${fns:getOfficeList()}</example>
   </function>
   </function>
-  
+
   <function>
   <function>
     <description>获取当前用户缓存</description>
     <description>获取当前用户缓存</description>
     <name>getCache</name>
     <name>getCache</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.UserUtils</function-class>
     <function-signature>java.lang.Object getCache(java.lang.String, java.lang.Object)</function-signature>
     <function-signature>java.lang.Object getCache(java.lang.String, java.lang.Object)</function-signature>
-    <example>${fns:getCache(cacheName, defaultValue)}</example>  
+    <example>${fns:getCache(cacheName, defaultValue)}</example>
   </function>
   </function>
-	
+
   <!-- DictUtils -->
   <!-- DictUtils -->
   <function>
   <function>
     <description>获取字典标签</description>
     <description>获取字典标签</description>
     <name>getDictLabel</name>
     <name>getDictLabel</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
     <function-signature>java.lang.String getDictLabel(java.lang.String, java.lang.String, java.lang.String)</function-signature>
     <function-signature>java.lang.String getDictLabel(java.lang.String, java.lang.String, java.lang.String)</function-signature>
-    <example>${fns:getDictLabel(value, type, defaultValue)}</example>  
+    <example>${fns:getDictLabel(value, type, defaultValue)}</example>
   </function>
   </function>
-  
+
   <function>
   <function>
     <description>获取字典标签(多个)</description>
     <description>获取字典标签(多个)</description>
     <name>getDictLabels</name>
     <name>getDictLabels</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
     <function-signature>java.lang.String getDictLabels(java.lang.String, java.lang.String, java.lang.String)</function-signature>
     <function-signature>java.lang.String getDictLabels(java.lang.String, java.lang.String, java.lang.String)</function-signature>
-    <example>${fns:getDictLabels(values, type, defaultValue)}</example>  
+    <example>${fns:getDictLabels(values, type, defaultValue)}</example>
   </function>
   </function>
 
 
   <function>
   <function>
@@ -126,23 +126,23 @@
     <name>getDictValue</name>
     <name>getDictValue</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
     <function-signature>java.lang.String getDictValue(java.lang.String, java.lang.String, java.lang.String)</function-signature>
     <function-signature>java.lang.String getDictValue(java.lang.String, java.lang.String, java.lang.String)</function-signature>
-    <example>${fns:getDictValue(label, type, defaultValue)}</example>  
+    <example>${fns:getDictValue(label, type, defaultValue)}</example>
   </function>
   </function>
-  
+
   <function>
   <function>
     <description>获取字典对象列表</description>
     <description>获取字典对象列表</description>
     <name>getDictList</name>
     <name>getDictList</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
     <function-signature>java.util.List getDictList(java.lang.String)</function-signature>
     <function-signature>java.util.List getDictList(java.lang.String)</function-signature>
-    <example>${fns:getDictList(type)}</example>  
+    <example>${fns:getDictList(type)}</example>
   </function>
   </function>
-  
+
   <function>
   <function>
     <description>获取字典对象列表</description>
     <description>获取字典对象列表</description>
     <name>getDictListJson</name>
     <name>getDictListJson</name>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
     <function-class>com.thinkgem.jeesite.modules.sys.utils.DictUtils</function-class>
     <function-signature>java.lang.String getDictListJson(java.lang.String)</function-signature>
     <function-signature>java.lang.String getDictListJson(java.lang.String)</function-signature>
-    <example>${fns:getDictListJson(type)}</example>  
+    <example>${fns:getDictListJson(type)}</example>
   </function>
   </function>
 
 
   <!-- CmmeDictUtils -->
   <!-- CmmeDictUtils -->
@@ -192,112 +192,121 @@
     <name>urlEncode</name>
     <name>urlEncode</name>
     <function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
     <function-signature>java.lang.String urlEncode(java.lang.String)</function-signature>
     <function-signature>java.lang.String urlEncode(java.lang.String)</function-signature>
-    <example>${fns:urlEncode(part)}</example>  
+    <example>${fns:urlEncode(part)}</example>
   </function>
   </function>
   <function>
   <function>
     <description>URL解码</description>
     <description>URL解码</description>
     <name>urlDecode</name>
     <name>urlDecode</name>
     <function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
     <function-signature>java.lang.String urlDecode(java.lang.String)</function-signature>
     <function-signature>java.lang.String urlDecode(java.lang.String)</function-signature>
-    <example>${fns:urlDecode(part)}</example>  
+    <example>${fns:urlDecode(part)}</example>
   </function>
   </function>
   <function>
   <function>
     <description>HTML编码</description>
     <description>HTML编码</description>
     <name>escapeHtml</name>
     <name>escapeHtml</name>
     <function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
     <function-signature>java.lang.String escapeHtml(java.lang.String)</function-signature>
     <function-signature>java.lang.String escapeHtml(java.lang.String)</function-signature>
-    <example>${fns:escapeHtml(html)}</example>  
+    <example>${fns:escapeHtml(html)}</example>
   </function>
   </function>
   <function>
   <function>
     <description>HTML解码</description>
     <description>HTML解码</description>
     <name>unescapeHtml</name>
     <name>unescapeHtml</name>
     <function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.Encodes</function-class>
     <function-signature>java.lang.String unescapeHtml(java.lang.String)</function-signature>
     <function-signature>java.lang.String unescapeHtml(java.lang.String)</function-signature>
-    <example>${fns:unescapeHtml(html)}</example>  
+    <example>${fns:unescapeHtml(html)}</example>
   </function>
   </function>
-  
+
   <!-- StringUtils -->
   <!-- StringUtils -->
   <function>
   <function>
     <description>从后边开始截取字符串</description>
     <description>从后边开始截取字符串</description>
     <name>substringAfterLast</name>
     <name>substringAfterLast</name>
     <function-class>org.apache.commons.lang3.StringUtils</function-class>
     <function-class>org.apache.commons.lang3.StringUtils</function-class>
     <function-signature>java.lang.String substringAfterLast(java.lang.String, java.lang.String)</function-signature>
     <function-signature>java.lang.String substringAfterLast(java.lang.String, java.lang.String)</function-signature>
-    <example>${fns:substringAfterLast(str,separator)}</example>  
+    <example>${fns:substringAfterLast(str,separator)}</example>
   </function>
   </function>
   <function>
   <function>
     <description>判断字符串是否以某某开头</description>
     <description>判断字符串是否以某某开头</description>
     <name>startsWith</name>
     <name>startsWith</name>
     <function-class>org.apache.commons.lang3.StringUtils</function-class>
     <function-class>org.apache.commons.lang3.StringUtils</function-class>
     <function-signature>boolean startsWith(java.lang.CharSequence, java.lang.CharSequence)</function-signature>
     <function-signature>boolean startsWith(java.lang.CharSequence, java.lang.CharSequence)</function-signature>
-    <example>${fns:startsWith(str,prefix)}</example> 
+    <example>${fns:startsWith(str,prefix)}</example>
   </function>
   </function>
   <function>
   <function>
     <description>判断字符串是否以某某结尾</description>
     <description>判断字符串是否以某某结尾</description>
     <name>endsWith</name>
     <name>endsWith</name>
     <function-class>org.apache.commons.lang3.StringUtils</function-class>
     <function-class>org.apache.commons.lang3.StringUtils</function-class>
     <function-signature>boolean endsWith(java.lang.CharSequence, java.lang.CharSequence)</function-signature>
     <function-signature>boolean endsWith(java.lang.CharSequence, java.lang.CharSequence)</function-signature>
-    <example>${fns:endsWith(str,suffix)}</example> 
+    <example>${fns:endsWith(str,suffix)}</example>
   </function>
   </function>
   <function>
   <function>
     <description>缩写字符串,超过最大宽度用“...”表示</description>
     <description>缩写字符串,超过最大宽度用“...”表示</description>
     <name>abbr</name>
     <name>abbr</name>
     <function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
     <function-signature>java.lang.String abbr(java.lang.String, int)</function-signature>
     <function-signature>java.lang.String abbr(java.lang.String, int)</function-signature>
-    <example>${fns:abbr(str,length)}</example>  
+    <example>${fns:abbr(str,length)}</example>
   </function>
   </function>
   <function>
   <function>
     <description>替换掉HTML标签</description>
     <description>替换掉HTML标签</description>
     <name>replaceHtml</name>
     <name>replaceHtml</name>
     <function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
     <function-signature>java.lang.String replaceHtml(java.lang.String)</function-signature>
     <function-signature>java.lang.String replaceHtml(java.lang.String)</function-signature>
-    <example>${fns:replaceHtml(html)}</example>  
+    <example>${fns:replaceHtml(html)}</example>
   </function>
   </function>
   <function>
   <function>
     <description>转换为JS获取对象值,生成三目运算返回结果。</description>
     <description>转换为JS获取对象值,生成三目运算返回结果。</description>
     <name>jsGetVal</name>
     <name>jsGetVal</name>
     <function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
     <function-signature>java.lang.String jsGetVal(java.lang.String)</function-signature>
     <function-signature>java.lang.String jsGetVal(java.lang.String)</function-signature>
-    <example>${fns:jsGetVal('row.user.id')}  返回:!row?'':!row.user?'':!row.user.id?'':row.user.id</example>  
+    <example>${fns:jsGetVal('row.user.id')}  返回:!row?'':!row.user?'':!row.user.id?'':row.user.id</example>
   </function>
   </function>
   <function>
   <function>
     <description>连接两个字符串</description>
     <description>连接两个字符串</description>
     <name>appendLast</name>
     <name>appendLast</name>
     <function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
     <function-signature>java.lang.String appendLast(java.lang.String, java.lang.String)</function-signature>
     <function-signature>java.lang.String appendLast(java.lang.String, java.lang.String)</function-signature>
-    <example>${fns:appendLast(str,suffixe)}</example>  
+    <example>${fns:appendLast(str,suffixe)}</example>
   </function>
   </function>
-  
+
   <function>
   <function>
     <description>连接多个字符串</description>
     <description>连接多个字符串</description>
     <name>appendLast1</name>
     <name>appendLast1</name>
     <function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.StringUtils</function-class>
     <function-signature>java.lang.String appendLast(java.lang.String, java.lang.String, java.lang.String)</function-signature>
     <function-signature>java.lang.String appendLast(java.lang.String, java.lang.String, java.lang.String)</function-signature>
-    <example>${fns:appendLast1(str,suffixe1,suffixe2)}</example>  
+    <example>${fns:appendLast1(str,suffixe1,suffixe2)}</example>
   </function>
   </function>
-  
+
   <!-- DateUtils -->
   <!-- DateUtils -->
   <function>
   <function>
     <description>获取当前日期</description>
     <description>获取当前日期</description>
     <name>getDate</name>
     <name>getDate</name>
     <function-class>com.thinkgem.jeesite.common.utils.DateUtils</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.DateUtils</function-class>
     <function-signature>java.lang.String getDate(java.lang.String)</function-signature>
     <function-signature>java.lang.String getDate(java.lang.String)</function-signature>
-    <example>${fns:getDate(pattern)}</example>  
+    <example>${fns:getDate(pattern)}</example>
   </function>
   </function>
+  <!-- DateUtils -->
+  <function>
+    <description>转换日期</description>
+    <name>setDate</name>
+    <function-class>com.thinkgem.jeesite.common.utils.DateUtils</function-class>
+    <function-signature>java.lang.String setDate(java.util.Date,java.lang.String)</function-signature>
+    <example>${fns:setDate(date,pattern)}</example>
+  </function>
+
   <function>
   <function>
     <description>获取过去的天数</description>
     <description>获取过去的天数</description>
     <name>pastDays</name>
     <name>pastDays</name>
     <function-class>com.thinkgem.jeesite.common.utils.DateUtils</function-class>
     <function-class>com.thinkgem.jeesite.common.utils.DateUtils</function-class>
     <function-signature>long pastDays(java.util.Date)</function-signature>
     <function-signature>long pastDays(java.util.Date)</function-signature>
-    <example>${fns:pastDays(date)}</example>  
+    <example>${fns:pastDays(date)}</example>
   </function>
   </function>
-  
+
   <!-- JsonMapper -->
   <!-- JsonMapper -->
   <function>
   <function>
     <description>对象转换JSON字符串</description>
     <description>对象转换JSON字符串</description>
     <name>toJson</name>
     <name>toJson</name>
     <function-class>com.thinkgem.jeesite.common.mapper.JsonMapper</function-class>
     <function-class>com.thinkgem.jeesite.common.mapper.JsonMapper</function-class>
     <function-signature>java.lang.String toJsonString(java.lang.Object)</function-signature>
     <function-signature>java.lang.String toJsonString(java.lang.Object)</function-signature>
-    <example>${fns:toJson(object)}</example>  
+    <example>${fns:toJson(object)}</example>
   </function>
   </function>
 
 
   <function>
   <function>

+ 218 - 0
src/main/webapp/WEB-INF/views/modules/autoType/autoTypeList.jsp

@@ -0,0 +1,218 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>推送方式设置</title>
+    <meta name="decorator" content="default"/>
+    <style>
+        .body {
+            padding: 30px;
+        }
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <c:if test="${cmAutoTypeRecord.type==2}">
+        <li><a href="${ctx}/cmpage/cmImage/?type=4&flag=4">活动专区列表</a></li>
+        <shiro:hasPermission name="cmpage:cmImage:edit">
+            <li><a href="${ctx}/cmpage/cmImage/form?flag=4&type=4">活动专区图添加</a></li>
+        </shiro:hasPermission>
+    </c:if>
+    <li class="active"><a
+            href="${ctx}/autoType/list?type=${cmAutoTypeRecord.type}">${cmAutoTypeRecord.type==1?"文章推送":"活动推送"}</a></li>
+</ul>
+<div class="body">
+    <form id="statusForm">
+        <input id="cmAutoTypeId" name="cmAutoTypeId" type="hidden" value="${cmAutoType.id}"/>
+        <div>
+            <label style="float: left">推荐方式:</label>
+            <div style="margin-left: 70px">
+                <input type="radio" name="autoStatus" value="0"  ${cmAutoType.autoStatus ne 1 ? "checked" : ""}>自动推送(设置自动推送后,则自动推送新发布的文章给所有机构)
+                <br>
+                <br>
+                <input type="radio" name="autoStatus" value="1"  ${cmAutoType.autoStatus eq 1 ? "checked" : ""}>手动推荐
+                <br>
+                <br>
+                <button id="btnSave" class="btn btn-primary" type="button"
+                        onclick="checkInfo()"  ${cmAutoType.autoStatus eq 1 ? "" : "disabled"}>
+                    选择需要推送的${cmAutoTypeRecord.type==1?"文章":"活动"}
+                </button>
+            </div>
+        </div>
+    </form>
+
+    <form:form id="searchForm" modelAttribute="cmAutoTypeRecord" action="${ctx}/autoType/list" method="post"
+               class="breadcrumb form-search">
+        <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+        <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+        <input id="type" name="type" type="hidden" value="${cmAutoTypeRecord.type}"/>
+        <div class="ul-form">
+            <label>ID:</label>
+            <form:input path="authorId" htmlEscape="false" maxlength="11" class="input-mini"/>
+            <label>标题:</label>
+            <form:input path="title" htmlEscape="false" maxlength="100" class="input-medium"/>
+            <label>推荐类型:</label>
+            <form:select path="autoStatus" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="0" label="自动推荐"/>
+                <form:option value="1" label="手动推荐"/>
+            </form:select>
+            <label>推送时间:</label>
+            <form:input path="startPvCreateTime" type="text" maxlength="20" class="input-mini Wdate"
+                        value="${fns:setDate(cmAutoTypeRecord.startPvCreateTime,'yyyy-MM-dd')}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            -
+            <form:input path="endPvCreateTime" type="text" maxlength="20" class="input-mini Wdate"
+                        value="${fns:setDate(cmAutoTypeRecord.endPvCreateTime,'yyyy-MM-dd')}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+            <div class="clearfix"></div>
+        </div>
+    </form:form>
+    <sys:message content="${message}"/>
+    <table id="contentTable" class="table table-striped table-bordered table-condensed">
+        <thead>
+        <tr>
+            <th>ID</th>
+            <th>${cmAutoTypeRecord.type==1?"引导图":"PC端图片"}</th>
+            <th>${cmAutoTypeRecord.type==1?"文章":"活动"}标题</th>
+            <th>推送类型</th>
+            <th>推送时间</th>
+        </tr>
+        </thead>
+        <tbody>
+        <c:forEach items="${page.list}" var="item">
+            <tr>
+                <td>${item.authorId}</td>
+                <td><img src="${item.image}" width="100px;" height="100px;"></td>
+                <td>${item.title}</td>
+                <td>${item.autoStatus==0?"自动推荐":"手动推荐"}</td>
+                <td><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+            </tr>
+        </c:forEach>
+        </tbody>
+    </table>
+    <div class="pagination">${page}</div>
+</div>
+<script>
+    $(document).ready(function () {
+        $("#searchForm").validate({
+            submitHandler: function (form) {
+                loading('正在提交,请稍等...');
+                form.submit();
+            },
+            errorContainer: "#messageBox",
+            errorPlacement: function (error, element) {
+                $("#messageBox").text("输入有误,请先更正。");
+                if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                    error.appendTo(element.parent().parent());
+                } else {
+                    error.insertAfter(element);
+                }
+            }
+        });
+        $('input[name="autoStatus"]').change(function (item) {
+            var id = $('#cmAutoTypeId').val();
+            var autoStatus = $(this).val();
+            $.post("${ctx}/autoType/updateAutoStatus", {'id': id, 'autoStatus': autoStatus}, function (data) {
+                if (data.success == false) {
+                    $.jBox.tip(data.msg, 'error');
+                }
+            }, "JSON");//这里返回的类型有:json,html,xml,text
+            if (autoStatus == 0) {
+                $('#btnSave').attr("disabled", true)
+            } else {
+                $('#btnSave').attr("disabled", false)
+            }
+        })
+
+    })
+    function page(n,s){
+        $("#pageNo").val(n);
+        $("#pageSize").val(s);
+        $("#searchForm").submit();
+        return false;
+    }
+    var items = null;
+    var type = $('#type').val();
+    var title = type == 1 ? "选择文章" : "选择活动";
+
+    function checkInfo() {
+        let url = type == 1 ? "${ctx}/autoType/findAddPage" : "${ctx}/autoType/findCmImageAddPage";
+        let buttons = {"取消": '-1', "下一步": '1'}
+        iframe(url, title, buttons, submitInfo)
+    }
+
+
+    var submitInfo = function (v, h, f) {
+        //确定
+        let $jboxFrame = top.$('#jbox-iframe');
+        let $mainFrame = top.$('#mainFrame');
+        if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
+            items = $jboxFrame[0].contentWindow.getCheckedItems(0);
+            if (items.length > 0) {
+                let url = "${ctx}/autoType/findClubAddPage";
+                let buttons = {"取消": '-1', "上一步": '0', "发送": '1'}
+                iframe(url, title, buttons, submitClub)
+            } else {
+                top.$.jBox.tip("请先勾选文章...");
+                return false;
+            }
+        }
+        return true;
+    }
+
+    var submitClub = function (v, h, f) {
+        if ('0' == v) {
+            checkInfo()
+        }
+        //确定
+        let $jboxFrame = top.$('#jbox-iframe');
+        let $mainFrame = top.$('#mainFrame');
+        if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
+            let ids = $jboxFrame[0].contentWindow.getCheckedItems(0);
+            if (null == ids) {
+                addRecord({"type": type, "autoStatus": 1, "thisIds": items.toString()})
+            } else if (ids.length > 0) {
+                addRecord({"type": type, "autoStatus": 1, "thisIds": items.toString(), "clubIds": ids.toString()})
+            } else {
+                top.$.jBox.tip("请先勾选机构...");
+                return false;
+            }
+        }
+        return true
+    }
+
+    function addRecord(data) {
+        $.ajax({
+            url: "${ctx}/autoType/addCmAutoTypeRecord",
+            data: data,
+            type: "POST",
+            async: false,
+            success: function (res) {
+                if (res.success) {
+                    $.jBox.tip(res.msg, 'info');
+                    history.go(0)
+                } else {
+                    $.jBox.tip(res.msg, 'error');
+                }
+            }
+        });
+    }
+
+    function iframe(url, title,buttons, submit) {
+        top.$.jBox("iframe:" + url, {
+            iframeScrolling: 'yes',
+            width: $(top.document).width() - 600,
+            height: $(top.document).height() - 160,
+            persistent: true,
+            title: title,
+            buttons: buttons,
+            submit: submit
+        });
+    }
+
+
+</script>
+</body>
+</html>

+ 193 - 0
src/main/webapp/WEB-INF/views/modules/autoType/autoTypeRecordAdd.jsp

@@ -0,0 +1,193 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>选择文章</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table td i {
+            margin: 0 2px;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            //弹出框去滚动条
+            top.$('#jbox-content').css("overflow-y", "hidden");
+            show_title(30);
+
+            //			反选
+            $('body').on('click', 'input[name="info"]', function () {
+                var allInputLength = $('input[name="info"]').length - $('input[name="info"]:disabled').length,
+                    allInputCheckedLength = $('input[name="info"]:checked').length,
+                    checkAllEle = $('.check-all');
+//			    判断选中长度和总长度,如果相等就是全选否则取消全选
+                if (allInputLength === allInputCheckedLength) {
+                    checkAllEle.attr('checked', true);
+                } else {
+                    checkAllEle.attr('checked', false);
+                }
+            })
+        });
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+        function getCheckedItems() {
+            var items = new Array();
+            var $items = $('.check-item:checked');
+            $items.each(function () {
+                //通过拿到的商品ID组合键获取其它值
+                var productId = $(this).val();
+                items.push(productId);
+            });
+            return items;
+        }
+
+        function allCkbfun(ckb) {
+            var isChecked = ckb.checked;
+            $(".check-item").attr('checked', isChecked);
+        }
+
+        /**
+         * @param obj
+         * jquery控制input只能输入数字
+         */
+        function onlynum(obj) {
+            obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+        }
+
+        /**
+         * @param obj
+         * jquery控制input只能输入数字和两位小数(金额)
+         */
+        function num(obj) {
+            obj.value = obj.value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
+            obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
+            obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个, 清除多余的
+            obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+            obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
+        }
+        var ontypeId = null;
+        var typeId = null;
+        function ischangeType() {
+            if (null != typeId) {
+                $("#typeListId option[value=" + typeId + "]").val(ontypeId);
+            }
+            $("#optionType").find("option").eq(0).prop("selected", true)
+            optionTypeParent()
+        }
+
+        function optionTypeParent() {
+            $("#optionType [parent]").each(function (item) {
+                if ($("#typeListId option:selected").val() == $(this).attr("parent")) {
+                    $(this).show()
+                } else {
+                    $(this).hide()
+                }
+            })
+        }
+
+        function isoptionType() {
+            if ("" != $("#optionType option:selected").val()) {
+                ontypeId =  $("#optionType option:selected").attr("parent")
+                typeId = $("#optionType option:selected").val()
+                $("#typeListId option:selected").val($("#optionType option:selected").val())
+            }else {
+                ischangeType()
+            }
+        }
+
+        $(document).ready(function () {
+            $("#typeListId option[value=" + $("#optionType option:selected").attr("parent") + "]").prop("selected", true);
+            optionTypeParent()
+            isoptionType()
+            $("input[type='radio'][name='publishSource']").change(function (obj) {
+                $("#searchForm").submit();
+            })
+        })
+
+    </script>
+</head>
+<body>
+<form:form id="searchForm" modelAttribute="info" action="${ctx}/autoType/findAddPage" method="post"
+           class="breadcrumb form-search">
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <div class="ul-form">
+        <label>ID:</label>
+        <form:hidden path="cmRelatedType"/>
+        <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
+        <label>标题:</label>
+        <form:input path="title" htmlEscape="false" maxlength="100" class="input-medium"/>
+        <label>发布人:</label>
+        <form:input path="publisher" htmlEscape="false" maxlength="50" class="input-medium"/>
+        <label>发布时间:</label>
+        <form:input path="startPubDate" type="text" maxlength="10" class="input-medium Wdate"
+                    value="${startPubDate}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
+        至
+        <form:input path="endPubDate" type="text" maxlength="10" class="input-medium Wdate"
+                    value="${startPubDate}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
+        <br> <br>
+        <label>文章分类:</label>
+        <form:select id="typeListId" path="infoType.id" class="input-small" onchange="ischangeType()">
+            <form:option value="" label=" "/>
+            <c:forEach items="${typeList}" var="type" varStatus="index">
+                <c:if test="${type.parentId eq 0}">
+                    <form:option value="${type.id}" label="${type.name}"/>
+                </c:if>
+            </c:forEach>
+        </form:select>
+        <form:select id="optionType" path="typeId" class="input-small" onchange="isoptionType()">
+            <form:option value="" label=" "/>
+            <c:forEach items="${typeList}" var="type" varStatus="index">
+                <c:if test="${type.parentId ne 0}">
+                    <form:option value="${type.id}" label="${type.name}" parent="${type.parentId}"
+                                 cssStyle="display: none"/>
+                </c:if>
+            </c:forEach>
+        </form:select>
+        &nbsp;&nbsp<input id="btnSubmit" class="btn btn-primary" type="submit" value="搜索"/>
+        <div class="clearfix"></div>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table class="table table-striped table-bordered table-condensed table-hover">
+    <tr>
+        <th style="width:20px;"><input class="check-all" type="checkbox" onclick="allCkbfun(this);"/></th>
+        <th>文章ID</th>
+        <th>文章分类</th>
+        <th>引导图</th>
+        <th>发布人</th>
+        <th>文章标题</th>
+        <th>发布时间</th>
+    </tr>
+    <tbody>
+    <c:if test="${not empty page.list}">
+        <c:forEach items="${page.list}" var="item">
+            <tr id="${item.id}" class="itemtr">
+                <th>
+                    <input class="check-item" type="checkbox" name="info" value='${item.id}'/>
+                </th>
+                <td>${item.id}</td>
+                <td>${item.infoType.name}</td>
+                <td><img src="${item.guidanceImage}" width="50px" height="50px"></td>
+                <td>${item.publisher}</td>
+                <td>${item.title}</td>
+                <td><fmt:formatDate value="${item.pubdate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+            </tr>
+        </c:forEach>
+    </c:if>
+    </tbody>
+</table>
+<c:if test="${empty  page.list}">
+    <p style="text-align: center;"><font color="#1e90ff">暂无数据……</font></p>
+</c:if>
+<div class="pagination">${page}</div>
+</body>
+</html>

+ 135 - 0
src/main/webapp/WEB-INF/views/modules/autoType/autoTypeRecordClubAdd.jsp

@@ -0,0 +1,135 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>选择文章</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table td i {
+            margin: 0 2px;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            //弹出框去滚动条
+            top.$('#jbox-content').css("overflow-y", "hidden");
+            show_title(30);
+            //反选
+            $('body').on('click', 'input[name="info"]', function () {
+                var allInputLength = $('input[name="info"]').length - $('input[name="info"]:disabled').length,
+                    allInputCheckedLength = $('input[name="info"]:checked').length,
+                    checkAllEle = $('.check-all');
+            //判断选中长度和总长度,如果相等就是全选否则取消全选
+                if (allInputLength === allInputCheckedLength) {
+                    checkAllEle.attr('checked', true);
+                } else {
+                    checkAllEle.attr('checked', false);
+                }
+            })
+        });
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+        function getCheckedItems() {
+            var items = null;
+            if($("input[type='radio'][name='allClub']:checked").val()==1){
+                items = new Array();
+                var $items = $('.check-item:checked');
+                $items.each(function () {
+                    //通过拿到的商品ID组合键获取其它值
+                    var productId = $(this).val();
+                    items.push(productId);
+                });
+            }
+            return items;
+        }
+
+        function allCkbfun(ckb) {
+            var isChecked = ckb.checked;
+            $(".check-item").attr('checked', isChecked);
+        }
+
+        /**
+         * @param obj
+         * jquery控制input只能输入数字
+         */
+        function onlynum(obj) {
+            obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+        }
+
+
+        $(document).ready(function () {
+            let allClub =$("input[type='radio'][name='allClub']")
+            allClub.change(function (obj) {
+                if ( $(this).val()==1){
+                    $("#tableFrom").show()
+                }else {
+                    $("#tableFrom").hide()
+                }
+            })
+        })
+
+    </script>
+</head>
+<body>
+<div style="padding: 20px">
+    <p>选择需要推送的机构</p>
+    <label style="float: left">推荐方式:</label>
+    <div style="margin-left: 70px">
+        <input type="radio" name="allClub" value="0" checked>全部机构
+        <br>
+        <br>
+        <input type="radio" name="allClub" value="1">自定义机构
+    </div>
+</div>
+<div id="tableFrom" style="display: none">
+    <form:form id="searchForm" modelAttribute="newCmClub" action="${ctx}/autoType/findClubAddPage" method="post"
+               class="breadcrumb form-search">
+        <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+        <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+        <div class="ul-form">
+            <label>机构ID:</label>
+            <form:input path="clubID" htmlEscape="false" maxlength="11" class="input-mini"/>
+            <label>机构名称:</label>
+            <form:input path="searchName" htmlEscape="false" maxlength="100" class="input-medium"/>
+            &nbsp;&nbsp<input id="btnSubmit" class="btn btn-primary" type="submit" value="搜索"/>
+            <div class="clearfix"></div>
+        </div>
+    </form:form>
+    <sys:message content="${message}"/>
+    <table class="table table-striped table-bordered table-condensed table-hover">
+        <tr>
+            <th style="width:20px;"><input class="check-all" type="checkbox" onclick="allCkbfun(this);"/></th>
+            <th>机构ID</th>
+            <th>机构名称</th>
+            <th>联系人</th>
+            <th>手机号</th>
+        </tr>
+        <tbody>
+        <c:if test="${not empty page.list}">
+            <c:forEach items="${page.list}" var="item">
+                <tr id="${item.clubID}" class="itemtr">
+                    <th>
+                        <input class="check-item" type="checkbox" name="info" value='${item.clubID}'/>
+                    </th>
+                    <td>${item.clubID}</td>
+                    <td>${item.name}</td>
+                    <td>${item.userName}</td>
+                    <td>${item.bindMobile}</td>
+                </tr>
+            </c:forEach>
+        </c:if>
+        </tbody>
+    </table>
+    <c:if test="${empty  page.list}">
+        <p style="text-align: center;"><font color="#1e90ff">暂无数据……</font></p>
+    </c:if>
+    <div class="pagination">${page}</div>
+</div>
+</body>
+</html>

+ 121 - 0
src/main/webapp/WEB-INF/views/modules/autoType/autoTypeRecordCmImageAdd.jsp

@@ -0,0 +1,121 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>选择文章</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table td i {
+            margin: 0 2px;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            //弹出框去滚动条
+            top.$('#jbox-content').css("overflow-y", "hidden");
+            show_title(30);
+            //反选
+            $('body').on('click', 'input[name="info"]', function () {
+                var allInputLength = $('input[name="info"]').length - $('input[name="info"]:disabled').length,
+                    allInputCheckedLength = $('input[name="info"]:checked').length,
+                    checkAllEle = $('.check-all');
+                //判断选中长度和总长度,如果相等就是全选否则取消全选
+                if (allInputLength === allInputCheckedLength) {
+                    checkAllEle.attr('checked', true);
+                } else {
+                    checkAllEle.attr('checked', false);
+                }
+            })
+        });
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+        function getCheckedItems() {
+            var items = null;
+            items = new Array();
+            var $items = $('.check-item:checked');
+            $items.each(function () {
+                //通过拿到的商品ID组合键获取其它值
+                var productId = $(this).val();
+                items.push(productId);
+            });
+            return items;
+        }
+
+        function allCkbfun(ckb) {
+            var isChecked = ckb.checked;
+            $(".check-item").attr('checked', isChecked);
+        }
+
+        /**
+         * @param obj
+         * jquery控制input只能输入数字
+         */
+        function onlynum(obj) {
+            obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+        }
+
+
+        $(document).ready(function () {
+            let allClub = $("input[type='radio'][name='allClub']")
+            allClub.change(function (obj) {
+                if ($(this).val() == 1) {
+                    $("#tableFrom").show()
+                } else {
+                    $("#tableFrom").hide()
+                }
+            })
+        })
+
+    </script>
+</head>
+<body>
+<div id="tableFrom" >
+    <form:form id="searchForm" modelAttribute="cmImage" action="${ctx}/autoType/findCmImageAddPage" method="post"
+               class="breadcrumb form-search">
+        <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+        <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+        <div class="ul-form">
+            <label>ID:</label>
+            <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
+            <label>标题:</label>
+            <form:input path="title" htmlEscape="false" maxlength="100" class="input-medium"/>
+            &nbsp;&nbsp<input id="btnSubmit" class="btn btn-primary" type="submit" value="搜索"/>
+            <div class="clearfix"></div>
+        </div>
+    </form:form>
+    <sys:message content="${message}"/>
+    <table class="table table-striped table-bordered table-condensed table-hover">
+        <tr>
+            <th style="width:20px;"><input class="check-all" type="checkbox" onclick="allCkbfun(this);"/></th>
+            <th>ID</th>
+            <th>PC端图片</th>
+            <th>标题</th>
+        </tr>
+        <tbody>
+        <c:if test="${not empty page.list}">
+            <c:forEach items="${page.list}" var="item">
+                <tr id="${item.id}" class="itemtr">
+                    <th>
+                        <input class="check-item" type="checkbox" name="info" value='${item.id}'/>
+                    </th>
+                    <td>${item.id}</td>
+                    <td><img src="${item.image}" width="50px" height="50px"></td>
+                    <td>${item.title}</td>
+                </tr>
+            </c:forEach>
+        </c:if>
+        </tbody>
+    </table>
+    <c:if test="${empty  page.list}">
+        <p style="text-align: center;"><font color="#1e90ff">暂无数据……</font></p>
+    </c:if>
+    <div class="pagination">${page}</div>
+</div>
+</body>
+</html>

+ 21 - 11
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.jsp

@@ -701,13 +701,21 @@
 							touchWords = '';
 							touchWords = '';
 						}
 						}
 					});
 					});
+					if ($("#banner").val() == "") {
+						top.$.jBox.tip("请先选择Banner图片!");
+						return false
+					}
+					if ($("#image").val() == "") {
+						top.$.jBox.tip("请先选择头图!");
+						return false
+					}
 					if (1 == status && emptyNum > 0) {
 					if (1 == status && emptyNum > 0) {
 						var msg = "您还剩余" + emptyNum + "项未完善,将会导致用户对您产品/仪器的认识度不够,确认是否提交?";
 						var msg = "您还剩余" + emptyNum + "项未完善,将会导致用户对您产品/仪器的认识度不够,确认是否提交?";
 						top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
 						top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
 							if (v == 'ok') {
 							if (v == 'ok') {
 								if (touchNum > 0) {
 								if (touchNum > 0) {
-									var msg = 1 == status?"当前发布内容存在敏感词,已为您标记在输入框下方," +
-											"请修改后,再进行保存发布,强行保存发布将会导致审核不通过!":
+									var msg = 1 == status ? "当前发布内容存在敏感词,已为您标记在输入框下方," +
+											"请修改后,再进行保存发布,强行保存发布将会导致审核不通过!" :
 											"当前内容存在敏感词,已为您标记在输入框下方,建议修改后再进行保存!否则," +
 											"当前内容存在敏感词,已为您标记在输入框下方,建议修改后再进行保存!否则," +
 											"将会影响发布时审核不通过!";
 											"将会影响发布时审核不通过!";
 									top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
 									top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
@@ -1180,12 +1188,12 @@
 		</div>
 		</div>
 		<%--banner--%>
 		<%--banner--%>
 		<div class="control-group" style="width: 1000px">
 		<div class="control-group" style="width: 1000px">
-			<label class="control-label">banner:</label>
+			<label class="control-label"><font color="red">*</font>banner:</label>
 			<div class="main-image-list" style="display: flex;flex-wrap: wrap">
 			<div class="main-image-list" style="display: flex;flex-wrap: wrap">
-				<div class="controls upload-content iconBox mainIgeBox" >
+				<div class="controls upload-content iconBox mainIgeBox">
 					<div class="conList">
 					<div class="conList">
 						<form:hidden id="banner" path="banner" htmlEscape="false" maxlength="255"
 						<form:hidden id="banner" path="banner" htmlEscape="false" maxlength="255"
-									 class="input-xlarge "/>
+									 class="input-xlarge required"/>
 						<sys:ckfinder input="banner" type="images" uploadPath="/photo" selectMultiple="false"
 						<sys:ckfinder input="banner" type="images" uploadPath="/photo" selectMultiple="false"
 									  maxWidth="100"
 									  maxWidth="100"
 									  maxHeight="100"/>
 									  maxHeight="100"/>
@@ -1362,13 +1370,15 @@
 			</div>
 			</div>
 		</div>
 		</div>
 		<%--头图--%>
 		<%--头图--%>
-		<div class="control-group"style="margin-top: 100px" >
-			<label class="control-label">头图:</label>
+		<div class="control-group" style="margin-top: 100px">
+			<label class="control-label"><font color="red">*</font>头图:</label>
 			<div class="main-image-list">
 			<div class="main-image-list">
-				<div class="controls upload-content iconBox mainIgeBox" >
-					<div class="" >
-						<form:hidden id="image" path="image" htmlEscape="false" maxlength="255" class="input-xlarge "/>
-						<sys:ckfinder input="image" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+				<div class="controls upload-content iconBox mainIgeBox">
+					<div class="">
+						<form:hidden id="image" path="image" htmlEscape="false" maxlength="255"
+									 class="input-xlarge required"/>
+						<sys:ckfinder input="image" type="images" uploadPath="/photo" selectMultiple="false"
+									  maxWidth="100"
 									  maxHeight="100"/>
 									  maxHeight="100"/>
 					</div>
 					</div>
 					<br>
 					<br>

+ 13 - 2
src/main/webapp/WEB-INF/views/modules/cmpage/cmImageList.jsp

@@ -16,7 +16,7 @@
 	</style>
 	</style>
 	<script type="text/javascript">
 	<script type="text/javascript">
 		$(document).ready(function() {
 		$(document).ready(function() {
-			
+
 		});
 		});
 		function page(n,s){
 		function page(n,s){
 			$("#pageNo").val(n);
 			$("#pageNo").val(n);
@@ -158,6 +158,9 @@
 			</c:if>
 			</c:if>
 		</a></li>
 		</a></li>
 		</shiro:hasPermission>
 		</shiro:hasPermission>
+		<c:if test="${cmImage.flag eq 4}">
+			<li><a href="${ctx}/autoType/list?type=2">活动推送</a></li>
+		</c:if>
 	</ul>
 	</ul>
 	<form:form id="searchForm" modelAttribute="cmImage" action="${ctx}/cmpage/cmImage/?flag=${empty cmImage.flag?null:(cmImage.flag)}" method="post" class="breadcrumb form-search">
 	<form:form id="searchForm" modelAttribute="cmImage" action="${ctx}/cmpage/cmImage/?flag=${empty cmImage.flag?null:(cmImage.flag)}" method="post" class="breadcrumb form-search">
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
@@ -197,6 +200,12 @@
 				<form:option value="1" label="是"/>
 				<form:option value="1" label="是"/>
 				<form:option value="0" label="否"/>
 				<form:option value="0" label="否"/>
 			</form:select>
 			</form:select>
+			<label>点击时间:</label>
+			<form:input path="startPvCreateTime" type="text" maxlength="20" class="input-mini Wdate" value="${fns:setDate(cmImage.startPvCreateTime,'yyyy-MM-dd')}"
+						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+			-
+			<form:input path="endPvCreateTime" type="text" maxlength="20" class="input-mini Wdate" value="${fns:setDate(cmImage.endPvCreateTime,'yyyy-MM-dd')}"
+						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
             <c:if test="${cmImage.flag eq 4}">
             <c:if test="${cmImage.flag eq 4}">
 				<label style="float:right;">活动专区首页:<a href="${fns:getConfig('wwwServer')}cmpage/area.html" target="_blank">${fns:getConfig('wwwServer')}cmpage/area.html</a></label>
 				<label style="float:right;">活动专区首页:<a href="${fns:getConfig('wwwServer')}cmpage/area.html" target="_blank">${fns:getConfig('wwwServer')}cmpage/area.html</a></label>
@@ -222,6 +231,7 @@
 					<th>活动状态</th>
 					<th>活动状态</th>
 				</c:if>
 				</c:if>
 				<th>排序</th>
 				<th>排序</th>
+				<th>点击量</th>
 				<th>创建时间</th>
 				<th>创建时间</th>
 				<shiro:hasPermission name="cmpage:cmImage:edit"><th>操作</th></shiro:hasPermission>
 				<shiro:hasPermission name="cmpage:cmImage:edit"><th>操作</th></shiro:hasPermission>
 			</tr>
 			</tr>
@@ -307,6 +317,7 @@
 					</td>
 					</td>
 				</c:if>
 				</c:if>
 				<td>${items.sort}</td>
 				<td>${items.sort}</td>
+				<td>${items.pv}</td>
 				<td><fmt:formatDate value="${items.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
 				<td><fmt:formatDate value="${items.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
 				<td hidden>
 				<td hidden>
 					<label id="homePageImage${index.index}">${items.homePageImage}</label>
 					<label id="homePageImage${index.index}">${items.homePageImage}</label>
@@ -342,4 +353,4 @@
 	</table>
 	</table>
 	<div class="pagination">${page}</div>
 	<div class="pagination">${page}</div>
 </body>
 </body>
-</html>
+</html>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/info/infoRelatedForm.jsp

@@ -87,7 +87,7 @@
 	<div id="infoList" style="display: none">
 	<div id="infoList" style="display: none">
 		<h4 style="line-height: 50px">
 		<h4 style="line-height: 50px">
 			<span style="font-weight: bold;">推荐列表</span>(当前列表记录数 <span id="infoListCount">0</span>, 最多只能添加3条数据)
 			<span style="font-weight: bold;">推荐列表</span>(当前列表记录数 <span id="infoListCount">0</span>, 最多只能添加3条数据)
-			<input class="btn btn-primary" style="width: 80px" onclick="showSelect()" value="添加商品"/>
+			<input class="btn btn-primary" style="width: 80px" onclick="showSelect()" value="添加文章"/>
 		</h4>
 		</h4>
 		<table id="contentTable" class="table table-striped table-bordered table-condensed" style="height: 300px">
 		<table id="contentTable" class="table table-striped table-bordered table-condensed" style="height: 300px">
 			<thead>
 			<thead>

+ 6 - 0
src/main/webapp/WEB-INF/views/modules/info/infoTypeLandingList.jsp

@@ -81,6 +81,12 @@
 					<form:option value="" label=" "/>
 					<form:option value="" label=" "/>
 					<form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
 					<form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
 				</form:select>
 				</form:select>
+			<label>点击时间:</label>
+			<form:input path="startPvCreateTime" type="text" maxlength="20" class="input-mini Wdate" htmlEscape="false" value="${fns:setDate(cmBrandLanding.startPvCreateTime,'yyyy-MM-dd')}"
+						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+			-
+			<form:input path="endPvCreateTime" type="text" maxlength="20" class="input-mini Wdate" htmlEscape="false" value="${fns:setDate(cmBrandLanding.endPvCreateTime,'yyyy-MM-dd')}"
+						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="一键排序"/>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="一键排序"/>
 			&nbsp;&nbsp;<input  class="btn btn-primary" type="button" value="添加" onclick="location.href='${ctx}/cmBrandLanding/form?type=5&levelType=${cmBrandLanding.levelType}'"/>
 			&nbsp;&nbsp;<input  class="btn btn-primary" type="button" value="添加" onclick="location.href='${ctx}/cmBrandLanding/form?type=5&levelType=${cmBrandLanding.levelType}'"/>

+ 18 - 1
src/main/webapp/WEB-INF/views/modules/newhome/newPageFirstNavigationList.jsp

@@ -115,9 +115,19 @@
 	<li class=${newPageFirstNavigation.type==0?"active":""}><a href="${ctx}/newhome/newPageFirstNavigation?type=0">主菜单列表</a></li>
 	<li class=${newPageFirstNavigation.type==0?"active":""}><a href="${ctx}/newhome/newPageFirstNavigation?type=0">主菜单列表</a></li>
 	<li class=${newPageFirstNavigation.type==2?"active":""}><a href="${ctx}/newhome/newPageFirstNavigation?type=2">快捷运营菜单</a></li>
 	<li class=${newPageFirstNavigation.type==2?"active":""}><a href="${ctx}/newhome/newPageFirstNavigation?type=2">快捷运营菜单</a></li>
 </ul>
 </ul>
-<form:form id="searchForm" modelAttribute="newPageFirstNavigation" action="${ctx}/newhome/newPageFirstNavigation?type${newPageFirstNavigation.type}" method="get" class="breadcrumb form-search">
+<form:form id="searchForm" modelAttribute="newPageFirstNavigation" action="${ctx}/newhome/newPageFirstNavigation" method="get" class="breadcrumb form-search">
 	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
 	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+	<input id="type" name="type" type="hidden" value="${newPageFirstNavigation.type}"/>
+	<c:if test="${newPageFirstNavigation.type==2}">
+		<label>点击时间:</label>
+		<form:input path="startPvCreateTime" type="text" maxlength="20" class="input-mini Wdate" value="${fns:setDate(newPageFirstNavigation.startPvCreateTime,'yyyy-MM-dd')}"
+					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+		-
+		<form:input path="endPvCreateTime" type="text" maxlength="20" class="input-mini Wdate" value="${fns:setDate(newPageFirstNavigation.endPvCreateTime,'yyyy-MM-dd')}"
+					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+	</c:if>
+	&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
 	<input class="btn btn-primary" style="width:80px" onclick="batchSaveSort()" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;
 	<input class="btn btn-primary" style="width:80px" onclick="batchSaveSort()" value="一键排序"/>&nbsp;&nbsp;&nbsp;&nbsp;
 	<input class="btn btn-primary" style="width:${newPageFirstNavigation.type==0?80:120}px" onclick="window.location='${ctx}/newhome/newPageFirstNavigation/form?type=${newPageFirstNavigation.type}'" value="添加${newPageFirstNavigation.type==0?"主":"快捷运营"}菜单"/>
 	<input class="btn btn-primary" style="width:${newPageFirstNavigation.type==0?80:120}px" onclick="window.location='${ctx}/newhome/newPageFirstNavigation/form?type=${newPageFirstNavigation.type}'" value="添加${newPageFirstNavigation.type==0?"主":"快捷运营"}菜单"/>
 	<input class="btn btn-primary" style="width:100px" onclick="updateStaticHome()" value="生成静态首页"/>
 	<input class="btn btn-primary" style="width:100px" onclick="updateStaticHome()" value="生成静态首页"/>
@@ -133,6 +143,9 @@
 		<th><c:if test="${newPageFirstNavigation.type==0}">主</c:if>菜单名称</th>
 		<th><c:if test="${newPageFirstNavigation.type==0}">主</c:if>菜单名称</th>
 		<th>图标</th>
 		<th>图标</th>
 		<th>跳转链接</th>
 		<th>跳转链接</th>
+		<c:if test="${newPageFirstNavigation.type==2}">
+			<th>点击量</th>
+		</c:if>
 		<th>网站状态</th>
 		<th>网站状态</th>
 		<th>小程序状态</th>
 		<th>小程序状态</th>
 		<th>排序</th>
 		<th>排序</th>
@@ -153,9 +166,13 @@
 			<td>
 			<td>
 					<img src="${newPageFirstNavigation.icon}" style="width: 50px;height: 50px;">
 					<img src="${newPageFirstNavigation.icon}" style="width: 50px;height: 50px;">
 			</td>
 			</td>
+
 			<td>
 			<td>
 					<a href="${newPageFirstNavigation.link}" target="_blank">${newPageFirstNavigation.link}</a>
 					<a href="${newPageFirstNavigation.link}" target="_blank">${newPageFirstNavigation.link}</a>
 			</td>
 			</td>
+			<c:if test="${newPageFirstNavigation.type==2}">
+				<td>${newPageFirstNavigation.pv}</td>
+			</c:if>
 			<td>
 			<td>
 				<shiro:hasPermission name="newhome:newPageFirstNavigation:edit">
 				<shiro:hasPermission name="newhome:newPageFirstNavigation:edit">
 					<c:if test="${newPageFirstNavigation.wwwEnabledStatus eq 1 }">
 					<c:if test="${newPageFirstNavigation.wwwEnabledStatus eq 1 }">

+ 6 - 0
src/main/webapp/WEB-INF/views/modules/newhome/newPageHomeimageList.jsp

@@ -131,6 +131,12 @@
             <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
             <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
                           htmlEscape="false"/>
                           htmlEscape="false"/>
         </form:select>
         </form:select>
+        <label>点击时间:</label>
+        <form:input path="startPvCreateTime" type="text" maxlength="20" class="input-mini Wdate" value="${fns:setDate(newPageHomeimage.startPvCreateTime,'yyyy-MM-dd')}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+        -
+        <form:input path="endPvCreateTime" type="text" maxlength="20" class="input-mini Wdate" value="${fns:setDate(newPageHomeimage.endPvCreateTime,'yyyy-MM-dd')}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
         &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
         &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
         <c:if test="${cmImage.flag eq 4}">
         <c:if test="${cmImage.flag eq 4}">
             <label style="float:right;">活动专区首页:<a href="${fns:getConfig('wwwServer')}cmpage/area.html"
             <label style="float:right;">活动专区首页:<a href="${fns:getConfig('wwwServer')}cmpage/area.html"