kaick 1 年之前
父节点
当前提交
570493ed9c

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

@@ -4,6 +4,8 @@ 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;
@@ -43,6 +45,8 @@ public class CmAutoTypeController extends BaseController {
     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) {
@@ -66,6 +70,16 @@ public class CmAutoTypeController extends BaseController {
         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);

+ 24 - 19
src/main/java/com/caimei/modules/autoType/domain/CmAutoTypeRecord.java

@@ -8,6 +8,7 @@ import org.apache.ibatis.type.Alias;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 文章-活动推送记录对象 cm_auto_type_record
@@ -42,13 +43,13 @@ public class CmAutoTypeRecord extends DataEntity<CmAutoTypeRecord> implements Se
     private String autoStatus;
 
     /**
-     * 删除状态 0正常,其他删除
+     * 当前Ids
      */
-    private String[] infoIds;
+    private List<String> thisIds;
     /**
-     * 删除状态 0正常,其他删除
+     * 机构Ids
      */
-    private String[] clubIds;
+    private List<String> clubIds;
     /**
      * 删除状态 0正常,其他删除
      */
@@ -81,31 +82,41 @@ public class CmAutoTypeRecord extends DataEntity<CmAutoTypeRecord> implements Se
     /**
      * 引导图
      */
-    private String guidanceImage;
+    private String image;
     /**
      * 标题
      */
     private String title;
 
+
+
     @Override
     public String getId() {
         return id;
     }
 
-    public String[] getInfoIds() {
-        return infoIds;
+    public List<String> getClubIds() {
+        return clubIds;
     }
 
-    public void setInfoIds(String[] infoIds) {
-        this.infoIds = infoIds;
+    public void setClubIds(List<String> clubIds) {
+        this.clubIds = clubIds;
     }
 
-    public String[] getClubIds() {
-        return clubIds;
+    public String getImage() {
+        return image;
     }
 
-    public void setClubIds(String[] clubIds) {
-        this.clubIds = clubIds;
+    public void setImage(String image) {
+        this.image = image;
+    }
+
+    public List<String> getThisIds() {
+        return thisIds;
+    }
+
+    public void setThisIds(List<String> thisIds) {
+        this.thisIds = thisIds;
     }
 
     @Override
@@ -118,13 +129,7 @@ public class CmAutoTypeRecord extends DataEntity<CmAutoTypeRecord> implements Se
         this.delFlag = delFlag;
     }
 
-    public String getGuidanceImage() {
-        return guidanceImage;
-    }
 
-    public void setGuidanceImage(String guidanceImage) {
-        this.guidanceImage = guidanceImage;
-    }
 
     public String getTitle() {
         return title;

+ 37 - 23
src/main/java/com/caimei/modules/autoType/service/CmAutoTypeRecordService.java

@@ -2,6 +2,10 @@ 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;
@@ -9,6 +13,8 @@ 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.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -28,7 +34,10 @@ public class CmAutoTypeRecordService extends CrudService<CmAutoTypeRecordMapper,
     private CmAutoTypeRecordMapper cmAutoTypeRecordMapper;
     @Resource
     private NewCmClubDao newCmClubDao;
-
+    @Resource
+    private InfoDao infoDao;
+    @Resource
+    private CmImageDao cmImageDao;
     /**
      * 通过对象查询文章-活动推送记录列表
      *
@@ -93,34 +102,39 @@ public class CmAutoTypeRecordService extends CrudService<CmAutoTypeRecordMapper,
      */
     @Transactional(readOnly = false)
     public int addCmAutoTypeRecord(CmAutoTypeRecord cmAutoTypeRecord) {
-        for (String s : cmAutoTypeRecord.infoIds()) {
+        for (String s : cmAutoTypeRecord.thisIds()) {
             cmAutoTypeRecord.authorId(Integer.valueOf(s));
             cmAutoTypeRecord.setCreateTime(new Date());
-            cmAutoTypeRecordMapper.addCmAutoTypeRecord(cmAutoTypeRecord);
-            String[] ids = cmAutoTypeRecord.clubIds();
+            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(1).async(1));
-            if (ids.length > 0) {
-                for (String clubId : ids) {
-                    insideMessageMessageModel
-                            .info(new InsideMessage()
-                                    .userType(2)
-                                    .messageType(2)
-                                    .shopMessType(6));
-                    MessageUtil.sendMessage(insideMessageMessageModel);
-                }
-            } else {
-                List<String> clubIds = newCmClubDao.getClubIds(null);
-                for (String clubId : clubIds) {
-                    insideMessageMessageModel
-                            .info(new InsideMessage()
-                                    .userType(2)
-                                    .messageType(2)
-                                    .shopMessType(6));
-                    MessageUtil.sendMessage(insideMessageMessageModel);
-                }
+            List<String> clubIds = CollectionUtils.isEmpty(cmAutoTypeRecord.clubIds()) ? newCmClubDao.getClubIds(null) : 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);
             }
         }
         return 1;

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

@@ -1,23 +1,32 @@
 package com.caimei.modules.cmpage.service;
 
 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.mapper.CmAutoTypeRecordMapper;
 import com.caimei.modules.brand.utils.ImagePathUtils;
 import com.caimei.modules.cmpage.dao.CmImageDao;
 import com.caimei.modules.cmpage.entity.CmImage;
 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.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.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.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -31,11 +40,17 @@ public class CmImageService extends CrudService<CmImageDao, CmImage> {
 
 	@Resource
 	private CmImageDao cmImageDao;
+	@Resource
+	private CmAutoTypeMapper cmAutoTypeMapper;
+	@Resource
+	private CmAutoTypeRecordMapper cmAutoTypeRecordMapper;
+	@Resource
+	private NewCmClubDao newCmClubDao;
 
 	public CmImage get(String id) {
 		return super.get(id);
 	}
-	
+
 	public List<CmImage> findList(CmImage cmImage) {
 		return super.findList(cmImage);
 	}
@@ -62,7 +77,7 @@ public class CmImageService extends CrudService<CmImageDao, CmImage> {
 		return cmImageDao.findCentreImageByCentreId(id);
 	}
 
-	
+
 	@Transactional(readOnly = false)
 	public void save(CmImage cmImage, HttpServletRequest request) {
 		String photoServer = Global.getConfig("photoServer");//获取文件服务器地址
@@ -114,9 +129,36 @@ public class CmImageService extends CrudService<CmImageDao, CmImage> {
 				logger.error("图片上传错误:" + e.toString(), e);
 			}
 		}
+
 		super.save(cmImage);
+
+		CmAutoType byCmAutoType = cmAutoTypeMapper.getByCmAutoType(new CmAutoType().type("2"));			//获取推送配置
+		if(StringUtils.equals("4",cmImage.getType())&& null!=byCmAutoType&& StringUtils.equals("0",byCmAutoType.autoStatus())){
+			cmAutoTypeRecordMapper.addCmAutoTypeRecord(new CmAutoTypeRecord()							//新增推送记录
+					.type("2")
+					.autoStatus("0")
+					.authorId(Integer.valueOf(cmImage.getId()))
+					.createTime(new Date())
+			);
+			//站内信
+			MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
+			insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)
+					.mqInfo(new MqInfo().topic("MessageLine").delay(1).async(1));
+			List<String> clubIds =  newCmClubDao.getClubIds(null);
+			for (String clubId : clubIds) {
+				insideMessageMessageModel.info(new InsideMessage()
+						.userType(1)
+						.messageType(6)
+						.mainImage(cmImage.getImage())
+						.content(cmImage.getTitle())
+						.thisId(Integer.valueOf(cmImage.getId()))
+						.clubId(Integer.valueOf(clubId))
+				);
+				MessageUtil.sendMessage(insideMessageMessageModel);
+			}
+		}
 	}
-	
+
 	@Transactional(readOnly = false)
 	public void delete(CmImage cmImage) {
 		super.delete(cmImage);
@@ -163,4 +205,4 @@ public class CmImageService extends CrudService<CmImageDao, CmImage> {
 	public void updateAppletsEnabledStatusByIds(String enabledStatus, String ids) {
 		cmImageDao.updateAppletsEnabledStatusByIds(enabledStatus, ids);
 	}
-}
+}

+ 52 - 20
src/main/java/com/caimei/modules/info/service/InfoService.java

@@ -1,21 +1,28 @@
 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.mapper.CmAutoTypeRecordMapper;
 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.user.dao.NewCmClubDao;
 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.MessageModel;
 import com.caimei.modules.utils.message.MqInfo;
 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.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
@@ -25,17 +32,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 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.Date;
+import java.util.List;
 
 /**
  * 信息列表Service
@@ -56,6 +56,13 @@ public class InfoService extends CrudService<InfoDao, Info> {
     @Autowired
     private KeywordDao keywordDao;
 
+    @Resource
+    private CmAutoTypeMapper cmAutoTypeMapper;
+    @Resource
+    private CmAutoTypeRecordMapper cmAutoTypeRecordMapper;
+    @Resource
+    private NewCmClubDao newCmClubDao;
+
     public Info get(String id) {
         Info info = super.get(id);
         if (null != info) {
@@ -251,6 +258,31 @@ public class InfoService extends CrudService<InfoDao, Info> {
         }
         super.save(info);
 
+        CmAutoType byCmAutoType = cmAutoTypeMapper.getByCmAutoType(new CmAutoType().type("2"));            //获取推送配置
+        if (null != byCmAutoType && StringUtils.equals("0", byCmAutoType.autoStatus())) {
+            cmAutoTypeRecordMapper.addCmAutoTypeRecord(new CmAutoTypeRecord()                            //新增推送记录
+                    .type("1")
+                    .autoStatus("0")
+                    .authorId(Integer.valueOf(info.getId()))
+                    .createTime(new Date())
+            );
+            //站内信
+            MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
+            insideMessageMessageModel.code(MessageType.WEB_INSIDE_MESSAGE)
+                    .mqInfo(new MqInfo().topic("MessageLine").delay(1).async(1));
+            List<String> clubIds = newCmClubDao.getClubIds(null);
+            for (String clubId : clubIds) {
+                insideMessageMessageModel.info(new InsideMessage()
+                        .userType(1)
+                        .messageType(5)
+                        .mainImage(info.getGuidanceImage())
+                        .content(info.getTitle())
+                        .thisId(Integer.valueOf(info.getId()))
+                        .clubId(Integer.valueOf(clubId))
+                );
+                MessageUtil.sendMessage(insideMessageMessageModel);
+            }
+        }
         if (flg) {
             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;
 
-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.entity.CmInfoDocSyn;
 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.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.GenerateUtils;
 import com.caimei.modules.product.dao.KeywordFrequencyDao;
 import com.caimei.modules.product.entity.SearchFrequencyVo;
 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.shiro.authz.annotation.RequiresPermissions;
 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.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
@@ -318,6 +313,7 @@ public class InfoController extends BaseController {
             return "redirect:" + Global.getAdminPath() + "/info/infoLabel/list";
         }
         info.setPublishSource(null == info.getPublishSource() ? 1 : info.getPublishSource());
+
         return "redirect:" + Global.getAdminPath() + "/info/info/list?repage&publishSource=" + info.getPublishSource();
     }
 

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

@@ -27,7 +27,7 @@
         <include refid="selectCmAutoTypeVo"/>
         from cm_auto_type AS cm_auto_type
         <where>  cm_auto_type.delFlag = 0
-            <if test="id != null "> and cm_auto_type.id = #{id}</if>
+            <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>
@@ -39,7 +39,7 @@
         <include refid="selectCmAutoTypeVo"/>
         from cm_auto_type AS cm_auto_type
         <where>  cm_auto_type.delFlag = 0
-            <if test="id != null "> and cm_auto_type.id = #{id}</if>
+            <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">
@@ -63,7 +63,7 @@
         <include refid="selectCmAutoTypeVo"/>
         from cm_auto_type AS cm_auto_type
         <where>  cm_auto_type.delFlag = 0
-            <if test="id != null "> and cm_auto_type.id = #{id}</if>
+            <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">
@@ -87,7 +87,7 @@
         select count(1)
         from cm_auto_type AS cm_auto_type
         <where>  cm_auto_type.delFlag = 0
-            <if test="id != null "> and cm_auto_type.id = #{id}</if>
+            <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>
@@ -109,7 +109,7 @@
         select id
         from cm_auto_type AS cm_auto_type
         <where>  cm_auto_type.delFlag = 0
-            <if test="id != null "> and cm_auto_type.id = #{id}</if>
+            <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>
@@ -120,7 +120,7 @@
     <insert id="addCmAutoType" parameterType="CmAutoType" useGeneratedKeys="true" keyProperty="id">
         insert into cm_auto_type
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null and id != ''">id,</if>
+            <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>
@@ -128,7 +128,7 @@
             <if test="createTime != null">createTime,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null and id != ''">#{id},</if>
+            <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>
@@ -158,7 +158,7 @@
         delete
         from cm_auto_type AS cm_auto_type
         <where>
-            <if test="id != null "> and cm_auto_type.id = #{id}</if>
+            <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>

+ 24 - 12
src/main/resources/mappings/modules/autoType/CmAutoTypeRecordMapper.xml

@@ -29,7 +29,7 @@
         <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 cm_auto_type_record.id = #{id}</if>
+            <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>
@@ -42,7 +42,7 @@
         <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 cm_auto_type_record.id = #{id}</if>
+            <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">
@@ -66,15 +66,21 @@
 
     <select id="findList" parameterType="CmAutoTypeRecord" resultMap="CmAutoTypeRecordResult">
         <include refid="selectCmAutoTypeRecordVo"/>
-        <if test="type != null  and type == '1'">
-            ,i.guidanceImage,i.title
+        <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.authorId=i.id and cm_auto_type_record.type =1
+        <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 cm_auto_type_record.id = #{id}</if>
+            <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">
@@ -92,6 +98,14 @@
             <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
@@ -101,7 +115,7 @@
         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 cm_auto_type_record.id = #{id}</if>
+            <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>
@@ -125,7 +139,7 @@
         select id
         from cm_auto_type_record AS cm_auto_type_record
         <where>  cm_auto_type_record.delFlag = 0
-            <if test="id != null "> and cm_auto_type_record.id = #{id}</if>
+            <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>
@@ -137,7 +151,6 @@
     <insert id="addCmAutoTypeRecord" parameterType="CmAutoTypeRecord" useGeneratedKeys="true" keyProperty="id">
         insert into cm_auto_type_record
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null and id != ''">id,</if>
             <if test="type != null and type != ''">type,</if>
             <if test="authorId != null">authorId,</if>
             <if test="autoStatus != null and autoStatus != ''">autoStatus,</if>
@@ -146,7 +159,6 @@
             <if test="createTime != null">createTime,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null and id != ''">#{id},</if>
             <if test="type != null and type != ''">#{type},</if>
             <if test="authorId != null">#{authorId},</if>
             <if test="autoStatus != null and autoStatus != ''">#{autoStatus},</if>
@@ -178,7 +190,7 @@
         delete
         from cm_auto_type_record AS cm_auto_type_record
         <where>
-            <if test="id != null "> and cm_auto_type_record.id = #{id}</if>
+            <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>

+ 2 - 2
src/main/resources/mappings/modules/user/CmSpMapper.xml

@@ -240,8 +240,8 @@
 	</update>
 
 	<insert id="choseManager">
-		insert into cm_serviceteam_manager (serviceProviderId,delflag,validFlag)
-		values (#{serviceProviderID},0,1)
+		insert into cm_serviceteam_manager (serviceProviderId,delflag)
+		values (#{serviceProviderID},0)
 	</insert>
 
 	<select id="findByUserId" resultType="com.caimei.modules.user.entity.NewCmSp">

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

@@ -1393,7 +1393,7 @@
 
     <select id="getClubIds" resultType="String">
         SELECT
-        clubID
+        a.clubID
         FROM club a
         <include refid="newCmClubJoins"/>
         LEFT JOIN (SELECT userID, activeState, customerValue FROM cm_organ_value_system WHERE stage = 0 AND delType = 1)

+ 100 - 89
src/main/webapp/WEB-INF/views/modules/autoType/autoTypeList.jsp

@@ -5,87 +5,99 @@
     <title>推送方式设置</title>
     <meta name="decorator" content="default"/>
     <style>
-        body {
+        .body {
             padding: 30px;
         }
     </style>
 </head>
 <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"}>选择需要推送的文章
-            </button>
+<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>
-    </div>
-</form>
+    </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="id" htmlEscape="false" maxlength="11" class="input-mini"/>
-        <label>标题:</label>
-        <form:input path="createTime" 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>引导图</th>
-        <th>文章标题</th>
-        <th>推送类型</th>
-        <th>推送时间</th>
-    </tr>
-    </thead>
-    <tbody>
-    <c:forEach items="${page.list}" var="item">
+    <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>
-            <td>${item.authorId}</td>
-            <td><img src="${item.guidanceImage}" 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>
+            <th>ID</th>
+            <th>${cmAutoTypeRecord.type==1?"引导图":"PC端图片"}</th>
+            <th>${cmAutoTypeRecord.type==1?"文章":"活动"}标题</th>
+            <th>推送类型</th>
+            <th>推送时间</th>
         </tr>
-    </c:forEach>
-    </tbody>
-</table>
-<div class="pagination">${page}</div>
+        </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();
             },
@@ -116,16 +128,18 @@
 
     })
 
+    var items = null;
+    var type = $('#type').val();
+    var title = type == 1 ? "选择文章" : "选择活动";
 
     function checkInfo() {
-        let url = "${ctx}/autoType/findAddPage";
-        let title = "选择文章";
-        let buttons={"取消": '-1',"下一步": '1'}
-        iframe(url, title,buttons, submitInfo)
+        let url = type == 1 ? "${ctx}/autoType/findAddPage" : "${ctx}/autoType/findCmImageAddPage";
+        let buttons = {"取消": '-1', "下一步": '1'}
+        iframe(url, title, buttons, submitInfo)
     }
 
-    var items =null;
-    var submitInfo =  function (v, h, f) {
+
+    var submitInfo = function (v, h, f) {
         //确定
         let $jboxFrame = top.$('#jbox-iframe');
         let $mainFrame = top.$('#mainFrame');
@@ -133,9 +147,8 @@
             items = $jboxFrame[0].contentWindow.getCheckedItems(0);
             if (items.length > 0) {
                 let url = "${ctx}/autoType/findClubAddPage";
-                let title = "选择文章";
-                let buttons={ "取消": '-1',"上一步": '0',"发送": '1'}
-                iframe(url, title,buttons,submitClub)
+                let buttons = {"取消": '-1', "上一步": '0', "发送": '1'}
+                iframe(url, title, buttons, submitClub)
             } else {
                 top.$.jBox.tip("请先勾选文章...");
                 return false;
@@ -144,8 +157,8 @@
         return true;
     }
 
-    var submitClub =  function (v, h, f){
-        if ('0' == v){
+    var submitClub = function (v, h, f) {
+        if ('0' == v) {
             checkInfo()
         }
         //确定
@@ -153,30 +166,28 @@
         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": 1,"autoStatus": 1,"infoIds": infoIds})
-            }else if (ids.length > 0)  {
-                addRecord({"type": 1,"autoStatus": 1,"infoIds": infoIds,"clubIds": clubIds})
-            }else {
+            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;
             }
-            console.log(ids);
-            console.log(items);
         }
         return true
     }
 
-    function addRecord(data){
-        // {"type": type,"infoIds": infoIds,"clubIds": clubIds}
+    function addRecord(data) {
         $.ajax({
-            url: "${ctx}/bulkpurchase/contractOrder/enCode",
+            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');
                 }

+ 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>

+ 3 - 0
src/main/webapp/WEB-INF/views/modules/cmpage/cmImageList.jsp

@@ -158,6 +158,9 @@
 			</c:if>
 		</a></li>
 		</shiro:hasPermission>
+		<c:if test="${cmImage.flag eq 4}">
+			<li><a href="${ctx}/autoType/list?type=2">活动推送</a></li>
+		</c:if>
 	</ul>
 	<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}"/>