Browse Source

Merge remote-tracking branch 'origin/developerA' into developerH

# Conflicts:
#	src/main/java/com/caimei/modules/coupon/web/CmCouponController.java
#	src/main/resources/mappings/modules/order/OrderMapper.xml
Duan_xu 2 years ago
parent
commit
02a5fa3381
48 changed files with 3095 additions and 115 deletions
  1. 16 0
      src/main/java/com/caimei/modules/baike/dao/CmBaikeProductDao.java
  2. 20 0
      src/main/java/com/caimei/modules/baike/dao/CmBaikeProductRecommendDao.java
  3. 45 0
      src/main/java/com/caimei/modules/baike/entity/CmBaikeProduct.java
  4. 59 0
      src/main/java/com/caimei/modules/baike/entity/CmBaikeProductFile.java
  5. 77 0
      src/main/java/com/caimei/modules/baike/entity/CmBaikeProductRecommend.java
  6. 44 0
      src/main/java/com/caimei/modules/baike/service/CmBaikeProductRecommendService.java
  7. 92 6
      src/main/java/com/caimei/modules/baike/service/CmBaikeProductService.java
  8. 116 5
      src/main/java/com/caimei/modules/baike/web/CmBaikeProductController.java
  9. 80 0
      src/main/java/com/caimei/modules/baike/web/CmBaikeProductRecommendController.java
  10. 7 0
      src/main/java/com/caimei/modules/cmpage/web/CmPageCentreController.java
  11. 0 1
      src/main/java/com/caimei/modules/coupon/web/CmCouponController.java
  12. 9 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheDiscountProduct.java
  13. 32 5
      src/main/java/com/caimei/modules/hehe/entity/CmHeheImage.java
  14. 9 0
      src/main/java/com/caimei/modules/hehe/web/CmHeheImageController.java
  15. 15 0
      src/main/java/com/caimei/modules/info/dao/CmSensitiveWordsDao.java
  16. 2 0
      src/main/java/com/caimei/modules/info/dao/InfoDao.java
  17. 52 0
      src/main/java/com/caimei/modules/info/entity/CmSensitiveWords.java
  18. 44 0
      src/main/java/com/caimei/modules/info/service/CmSensitiveWordsService.java
  19. 79 0
      src/main/java/com/caimei/modules/info/web/CmSensitiveWordsController.java
  20. 9 0
      src/main/java/com/caimei/modules/info/web/InfoController.java
  21. 195 0
      src/main/java/com/caimei/modules/newhome/entity/NewPageFloorContent.java
  22. 5 0
      src/main/java/com/caimei/modules/newhome/service/NewPageFloorService.java
  23. 8 2
      src/main/java/com/caimei/modules/oss/utils/OSSUtils.java
  24. 1 1
      src/main/resources/mappings/modules/archive/CmOrderArchiveMapper.xml
  25. 56 1
      src/main/resources/mappings/modules/baike/CmBaikeProductMapper.xml
  26. 99 0
      src/main/resources/mappings/modules/baike/CmBaikeProductRecommendMapper.xml
  27. 4 2
      src/main/resources/mappings/modules/hehe/CmHeheDiscountMapper.xml
  28. 16 4
      src/main/resources/mappings/modules/hehe/CmHeheImageMapper.xml
  29. 84 0
      src/main/resources/mappings/modules/info/CmSensitiveWordsMapper.xml
  30. 9 1
      src/main/resources/mappings/modules/info/InfoMapper.xml
  31. 44 25
      src/main/resources/mappings/modules/newhome/NewPageFloorMapper.xml
  32. 135 0
      src/main/webapp/WEB-INF/views/modules/baikePage/addProductRecommend.jsp
  33. 386 0
      src/main/webapp/WEB-INF/views/modules/baikePage/auditBaikeProductPage.jsp
  34. 397 4
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.jsp
  35. 1 0
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductList.jsp
  36. 58 0
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductRecommendList.jsp
  37. 236 0
      src/main/webapp/WEB-INF/views/modules/baikePage/recommendForm.jsp
  38. 12 4
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheDiscountForm.jsp
  39. 187 21
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheFloorContentForm.jsp
  40. 64 2
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheImageForm.jsp
  41. 2 1
      src/main/webapp/WEB-INF/views/modules/hehe/toAddDiscountProduct.jsp
  42. 58 5
      src/main/webapp/WEB-INF/views/modules/info/auditInfoPage.jsp
  43. 78 0
      src/main/webapp/WEB-INF/views/modules/info/cmSensitiveWordsForm.jsp
  44. 58 0
      src/main/webapp/WEB-INF/views/modules/info/cmSensitiveWordsList.jsp
  45. 90 20
      src/main/webapp/WEB-INF/views/modules/info/infoForm.jsp
  46. 4 4
      src/main/webapp/WEB-INF/views/modules/info/infoList.jsp
  47. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/recommend.jsp
  48. 0 0
      src/main/webapp/static/sensitiveWords/mint-filter.umd.js

+ 16 - 0
src/main/java/com/caimei/modules/baike/dao/CmBaikeProductDao.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.baike.dao;
 package com.caimei.modules.baike.dao;
 
 
+import com.caimei.modules.baike.entity.CmBaikeProductFile;
 import com.caimei.modules.baike.entity.CmBaikeProductParam;
 import com.caimei.modules.baike.entity.CmBaikeProductParam;
 import com.caimei.modules.baike.entity.CmBaikeProductQuestion;
 import com.caimei.modules.baike.entity.CmBaikeProductQuestion;
 import com.caimei.modules.user.entity.NewCmShop;
 import com.caimei.modules.user.entity.NewCmShop;
@@ -57,4 +58,19 @@ public interface CmBaikeProductDao extends CrudDao<CmBaikeProduct> {
     void offline(Integer id);
     void offline(Integer id);
 
 
     void updateEmptyNum(@Param("id") String id,@Param("emptyNum") Integer emptyNum);
     void updateEmptyNum(@Param("id") String id,@Param("emptyNum") Integer emptyNum);
+
+    Integer checkFileName(@Param("fileName") String fileName, @Param("productId") Integer productId, @Param("fileIds") String fileIds);
+
+    void insertProductFile(CmBaikeProductFile productFile);
+
+    CmBaikeProductFile getProductFileById(Integer fileId);
+
+    void deleteProductFile(Integer fileId);
+
+    void updateProductFile(@Param("fileId") Integer fileId, @Param("productId") Integer productId);
+
+    List<CmBaikeProductFile> findFileList(String id);
+
+    void updateRecommendType(@Param("productId") String productId, @Param("recommendType") Integer recommendType);
+
 }
 }

+ 20 - 0
src/main/java/com/caimei/modules/baike/dao/CmBaikeProductRecommendDao.java

@@ -0,0 +1,20 @@
+package com.caimei.modules.baike.dao;
+
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import com.caimei.modules.baike.entity.CmBaikeProductRecommend;
+
+import java.util.List;
+
+/**
+ * 采美百科相关推荐DAO接口
+ * @author Aslee
+ * @version 2022-06-07
+ */
+@MyBatisDao
+public interface CmBaikeProductRecommendDao extends CrudDao<CmBaikeProductRecommend> {
+
+    List<CmBaikeProductRecommend> findAutoRecommendList(CmBaikeProductRecommend recommend);
+
+    void clearRecommendData(String productId);
+}

+ 45 - 0
src/main/java/com/caimei/modules/baike/entity/CmBaikeProduct.java

@@ -48,6 +48,7 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	private Integer auditStatus;	//百科审核状态:1待审核,2审核通过,3审核失败
 	private Integer auditStatus;	//百科审核状态:1待审核,2审核通过,3审核失败
 	private Integer onlineStatus;	//百科上线状态:1待上线,2已上线,3已下线
 	private Integer onlineStatus;	//百科上线状态:1待上线,2已上线,3已下线
 	private String failReason;	//审核失败理由
 	private String failReason;	//审核失败理由
+	private Integer recommendType;	//推荐类型:1手动推荐,2自动推荐
 	private Integer emptyNum;	//空数据条数
 	private Integer emptyNum;	//空数据条数
 	private Date addTime;		// 添加时间
 	private Date addTime;		// 添加时间
 
 
@@ -58,6 +59,7 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	private List<String> authImageList;			// 产品认证图片列表
 	private List<String> authImageList;			// 产品认证图片列表
 	private List<String> displayImageList;		// 效果展示图片列表
 	private List<String> displayImageList;		// 效果展示图片列表
 	private List<CmBaikeProductQuestion> questionList;		//问题列表
 	private List<CmBaikeProductQuestion> questionList;		//问题列表
+	private List<CmBaikeProductFile> videoList;		//视频列表
 	private List<NewCmShop> shopList;		//供应商列表
 	private List<NewCmShop> shopList;		//供应商列表
 	private String shopName;		//供应商名称
 	private String shopName;		//供应商名称
 	private Integer marketYear;		//上市年
 	private Integer marketYear;		//上市年
@@ -67,6 +69,9 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	private Integer nmpaMonth;		// nmpa月
 	private Integer nmpaMonth;		// nmpa月
 	private Integer nmpaDay;		// nmpa日
 	private Integer nmpaDay;		// nmpa日
 	private Integer auditFlag;		// 是否审核保存,1是
 	private Integer auditFlag;		// 是否审核保存,1是
+	private String fileIds;			// 文件id,以,隔开
+	private String productIds;		// 产品/仪器id,以,隔开
+	private String recommendJson;	// 相关推荐产品/仪器json数据
 
 
 	public CmBaikeProduct() {
 	public CmBaikeProduct() {
 		super();
 		super();
@@ -461,4 +466,44 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	public void setEmptyNum(Integer emptyNum) {
 	public void setEmptyNum(Integer emptyNum) {
 		this.emptyNum = emptyNum;
 		this.emptyNum = emptyNum;
 	}
 	}
+
+	public String getFileIds() {
+		return fileIds;
+	}
+
+	public void setFileIds(String fileIds) {
+		this.fileIds = fileIds;
+	}
+
+	public List<CmBaikeProductFile> getVideoList() {
+		return videoList;
+	}
+
+	public void setVideoList(List<CmBaikeProductFile> videoList) {
+		this.videoList = videoList;
+	}
+
+	public Integer getRecommendType() {
+		return recommendType;
+	}
+
+	public void setRecommendType(Integer recommendType) {
+		this.recommendType = recommendType;
+	}
+
+	public String getProductIds() {
+		return productIds;
+	}
+
+	public void setProductIds(String productIds) {
+		this.productIds = productIds;
+	}
+
+	public String getRecommendJson() {
+		return recommendJson;
+	}
+
+	public void setRecommendJson(String recommendJson) {
+		this.recommendJson = recommendJson;
+	}
 }
 }

+ 59 - 0
src/main/java/com/caimei/modules/baike/entity/CmBaikeProductFile.java

@@ -0,0 +1,59 @@
+package com.caimei.modules.baike.entity;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+import java.util.Date;
+
+/**
+ * 订单资料文件Entity
+ * @author Aslee
+ * @version 2021-07-30
+ */
+public class CmBaikeProductFile extends DataEntity<CmBaikeProductFile> {
+
+	private static final long serialVersionUID = 1L;
+	private Integer productId;		// 产品/仪器id
+	private String fileTitle;			// 文件标题
+	private String fileName;			// 文件名称
+	private String ossName;			// oss名称
+	private String ossUrl;			// oss链接
+
+	public Integer getProductId() {
+		return productId;
+	}
+
+	public void setProductId(Integer productId) {
+		this.productId = productId;
+	}
+
+	public String getFileTitle() {
+		return fileTitle;
+	}
+
+	public void setFileTitle(String fileTitle) {
+		this.fileTitle = fileTitle;
+	}
+
+	public String getFileName() {
+		return fileName;
+	}
+
+	public void setFileName(String fileName) {
+		this.fileName = fileName;
+	}
+
+	public String getOssName() {
+		return ossName;
+	}
+
+	public void setOssName(String ossName) {
+		this.ossName = ossName;
+	}
+	public String getOssUrl() {
+		return ossUrl;
+	}
+
+	public void setOssUrl(String ossUrl) {
+		this.ossUrl = ossUrl;
+	}
+}

+ 77 - 0
src/main/java/com/caimei/modules/baike/entity/CmBaikeProductRecommend.java

@@ -0,0 +1,77 @@
+package com.caimei.modules.baike.entity;
+
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * 采美百科相关推荐Entity
+ * @author Aslee
+ * @version 2022-06-07
+ */
+public class CmBaikeProductRecommend extends DataEntity<CmBaikeProductRecommend> {
+	
+	private static final long serialVersionUID = 1L;
+	private Integer productId;		// 百科产品/仪器id
+	private Integer recommendProductId;		// 相关推荐产品/仪器id
+	private Integer sort;		// 排序值
+
+	private String recommendProductName;		// 相关推荐产品/仪器名称
+	private Integer recommendType;	//推荐类型:1手动推荐,2自动推荐
+	private Integer productTypeId;	//产品/仪器分类id
+	
+	public CmBaikeProductRecommend() {
+		super();
+	}
+
+	public CmBaikeProductRecommend(String id){
+		super(id);
+	}
+
+	public Integer getProductId() {
+		return productId;
+	}
+
+	public void setProductId(Integer productId) {
+		this.productId = productId;
+	}
+	
+	public Integer getRecommendProductId() {
+		return recommendProductId;
+	}
+
+	public void setRecommendProductId(Integer recommendProductId) {
+		this.recommendProductId = recommendProductId;
+	}
+	
+	public Integer getSort() {
+		return sort;
+	}
+
+	public void setSort(Integer sort) {
+		this.sort = sort;
+	}
+
+	public Integer getRecommendType() {
+		return recommendType;
+	}
+
+	public void setRecommendType(Integer recommendType) {
+		this.recommendType = recommendType;
+	}
+
+	public Integer getProductTypeId() {
+		return productTypeId;
+	}
+
+	public void setProductTypeId(Integer productTypeId) {
+		this.productTypeId = productTypeId;
+	}
+
+	public String getRecommendProductName() {
+		return recommendProductName;
+	}
+
+	public void setRecommendProductName(String recommendProductName) {
+		this.recommendProductName = recommendProductName;
+	}
+}

+ 44 - 0
src/main/java/com/caimei/modules/baike/service/CmBaikeProductRecommendService.java

@@ -0,0 +1,44 @@
+package com.caimei.modules.baike.service;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.service.CrudService;
+import com.caimei.modules.baike.entity.CmBaikeProductRecommend;
+import com.caimei.modules.baike.dao.CmBaikeProductRecommendDao;
+
+/**
+ * 采美百科相关推荐Service
+ * @author Aslee
+ * @version 2022-06-07
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmBaikeProductRecommendService extends CrudService<CmBaikeProductRecommendDao, CmBaikeProductRecommend> {
+
+	public CmBaikeProductRecommend get(String id) {
+		return super.get(id);
+	}
+	
+	public List<CmBaikeProductRecommend> findList(CmBaikeProductRecommend cmBaikeProductRecommend) {
+		return super.findList(cmBaikeProductRecommend);
+	}
+	
+	public Page<CmBaikeProductRecommend> findPage(Page<CmBaikeProductRecommend> page, CmBaikeProductRecommend cmBaikeProductRecommend) {
+		return super.findPage(page, cmBaikeProductRecommend);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(CmBaikeProductRecommend cmBaikeProductRecommend) {
+		super.save(cmBaikeProductRecommend);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(CmBaikeProductRecommend cmBaikeProductRecommend) {
+		super.delete(cmBaikeProductRecommend);
+	}
+	
+}

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

@@ -1,21 +1,25 @@
 package com.caimei.modules.baike.service;
 package com.caimei.modules.baike.service;
 
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.io.File;
+import java.util.*;
 
 
-import com.caimei.modules.baike.entity.CmBaikeProductParam;
-import com.caimei.modules.baike.entity.CmBaikeProductQuestion;
+import com.alibaba.fastjson.JSONObject;
+import com.caimei.modules.archive.entity.CmOrderArchiveFile;
+import com.caimei.modules.archive.utils.OssArchiveUtil;
+import com.caimei.modules.baike.dao.CmBaikeProductRecommendDao;
+import com.caimei.modules.baike.entity.*;
 import com.caimei.modules.info.entity.Info;
 import com.caimei.modules.info.entity.Info;
 import com.caimei.modules.miniprogram.utils.UploadPicUtils;
 import com.caimei.modules.miniprogram.utils.UploadPicUtils;
+import com.caimei.modules.oss.utils.OSSUtils;
+import com.caimei.utils.StringUtil;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 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.baike.entity.CmBaikeProduct;
 import com.caimei.modules.baike.dao.CmBaikeProductDao;
 import com.caimei.modules.baike.dao.CmBaikeProductDao;
+import org.springframework.web.multipart.MultipartFile;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 
 
@@ -30,6 +34,9 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 	@Resource
 	@Resource
 	private CmBaikeProductDao cmBaikeProductDao;
 	private CmBaikeProductDao cmBaikeProductDao;
 
 
+	@Resource
+	private CmBaikeProductRecommendDao cmBaikeProductRecommendDao;
+
 	public CmBaikeProduct get(String id) {
 	public CmBaikeProduct get(String id) {
 		CmBaikeProduct cmBaikeProduct = super.get(id);
 		CmBaikeProduct cmBaikeProduct = super.get(id);
 		String marketTime = cmBaikeProduct.getMarketTime();
 		String marketTime = cmBaikeProduct.getMarketTime();
@@ -111,6 +118,14 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
             }
             }
 		}
 		}
 		super.save(cmBaikeProduct);
 		super.save(cmBaikeProduct);
+		String fileIds = cmBaikeProduct.getFileIds();
+		if (StringUtils.isNotEmpty(fileIds)) {
+			for (String id : fileIds.split(",")) {
+				if (StringUtil.isNotBlank(id)) {
+					cmBaikeProductDao.updateProductFile(Integer.valueOf(id),Integer.valueOf(cmBaikeProduct.getId()));
+				}
+			}
+		}
 		if (null != cmBaikeProduct.getAuditFlag() && 1 == cmBaikeProduct.getAuditFlag()) {
 		if (null != cmBaikeProduct.getAuditFlag() && 1 == cmBaikeProduct.getAuditFlag()) {
 			Integer emptyNum = checkComplete(cmBaikeProduct);
 			Integer emptyNum = checkComplete(cmBaikeProduct);
 			cmBaikeProductDao.updateEmptyNum(cmBaikeProduct.getId(), emptyNum);
 			cmBaikeProductDao.updateEmptyNum(cmBaikeProduct.getId(), emptyNum);
@@ -299,4 +314,75 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 		}
 		}
 		return emptyNum;
 		return emptyNum;
 	}
 	}
+
+	@Transactional(readOnly = false)
+    public Map<String, Object> upload(MultipartFile multipartFile,String fileTitle, String fileName, Integer productId, String fileIds) {
+		Map<String, Object> map = new HashMap<>();
+		if (null != productId || StringUtils.isNotEmpty(fileIds)) {
+			Integer fileIdByFileName = cmBaikeProductDao.checkFileName(fileName, productId, fileIds);
+			if (null != fileIdByFileName) {
+				map.put("success", false);
+				map.put("msg", "文件已存在");
+				return map;
+			}
+		}
+		String fileAllName = multipartFile.getOriginalFilename();
+		String fileType = fileAllName.substring(fileAllName.lastIndexOf(".") + 1);
+		String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+		String filePath = uuid + "." + fileType;
+		String contentType = OssArchiveUtil.getContentType(fileAllName);
+		try {
+			//保存本地
+			File file = OSSUtils.ossUpload(multipartFile);
+			logger.info("默认路径>>>" + file.getAbsolutePath());
+			//上传oss
+			String url = OSSUtils.ossUpload(filePath, file, contentType);
+			//删除本地文件
+			OssArchiveUtil.deleteFile(file);
+			//保存关联关系
+			CmBaikeProductFile productFile = new CmBaikeProductFile();
+			productFile.setFileTitle(fileTitle);
+			productFile.setFileName(fileName);
+			productFile.setOssName(filePath);
+			cmBaikeProductDao.insertProductFile(productFile);
+			productFile.setOssUrl(url);
+			map.put("success", true);
+			map.put("msg", "操作成功");
+			map.put("productFile", productFile);
+		} catch (Exception e) {
+			e.printStackTrace();
+			map.put("success", false);
+			map.put("msg", "操作失败");
+			logger.info("上传异常!!!");
+		}
+		return map;
+    }
+
+	@Transactional(readOnly = false)
+	public void deleteFile(Integer fileId) {
+		CmBaikeProductFile productFile = cmBaikeProductDao.getProductFileById(fileId);
+		if (productFile != null) {
+			//删除oss服务器上的文件
+			OSSUtils.deleteSingleFile(productFile.getOssName());
+			cmBaikeProductDao.deleteProductFile(fileId);
+		}
+	}
+
+
+    @Transactional(readOnly = false)
+	public void saveRecommend(CmBaikeProduct cmBaikeProduct) {
+		cmBaikeProductDao.updateRecommendType(cmBaikeProduct.getId(), cmBaikeProduct.getRecommendType());
+		// 清除原来的推荐数据
+		if (1 == cmBaikeProduct.getRecommendType()) {
+			cmBaikeProductRecommendDao.clearRecommendData(cmBaikeProduct.getId());
+			List<CmBaikeProductRecommend> recommendList;
+			if (StringUtils.isNotEmpty(cmBaikeProduct.getRecommendJson())) {
+				recommendList = JSONObject.parseArray(cmBaikeProduct.getRecommendJson(), CmBaikeProductRecommend.class);
+				recommendList.forEach(recommond->{
+					recommond.setProductId(Integer.parseInt(cmBaikeProduct.getId()));
+					cmBaikeProductRecommendDao.insert(recommond);
+				});
+			}
+		}
+	}
 }
 }

+ 116 - 5
src/main/java/com/caimei/modules/baike/web/CmBaikeProductController.java

@@ -5,13 +5,19 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
 import com.caimei.modules.baike.dao.CmBaikeProductDao;
 import com.caimei.modules.baike.dao.CmBaikeProductDao;
-import com.caimei.modules.baike.entity.CmBaikeProductParam;
-import com.caimei.modules.baike.entity.CmBaikeProductQuestion;
-import com.caimei.modules.baike.entity.CmBaikeType;
+import com.caimei.modules.baike.dao.CmBaikeProductRecommendDao;
+import com.caimei.modules.baike.dao.CmBaikeTypeDao;
+import com.caimei.modules.baike.entity.*;
 import com.caimei.modules.baike.service.CmBaikeTypeService;
 import com.caimei.modules.baike.service.CmBaikeTypeService;
+import com.caimei.modules.info.dao.InfoDao;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.opensearch.GenerateUtils;
+import com.caimei.modules.oss.utils.OSSUtils;
+import com.caimei.modules.product.entity.CmProductRecommend;
+import com.caimei.modules.product.entity.Product;
 import com.caimei.modules.user.entity.NewCmShop;
 import com.caimei.modules.user.entity.NewCmShop;
+import com.caimei.utils.AppUtils;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 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;
@@ -19,13 +25,13 @@ import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 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.multipart.MultipartFile;
 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.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.web.BaseController;
 import com.thinkgem.jeesite.common.web.BaseController;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
-import com.caimei.modules.baike.entity.CmBaikeProduct;
 import com.caimei.modules.baike.service.CmBaikeProductService;
 import com.caimei.modules.baike.service.CmBaikeProductService;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
@@ -52,7 +58,13 @@ public class CmBaikeProductController extends BaseController {
     private CmBaikeProductDao cmBaikeProductDao;
     private CmBaikeProductDao cmBaikeProductDao;
 
 
 	@Resource
 	@Resource
-	private GenerateUtils generateUtils;
+	private CmBaikeProductRecommendDao cmBaikeProductRecommendDao;
+
+	@Resource
+	private CmBaikeTypeDao cmBaikeTypeDao;
+
+	@Resource
+	private InfoDao infoDao;
 	
 	
 	@ModelAttribute
 	@ModelAttribute
 	public CmBaikeProduct get(@RequestParam(required=false) String id) {
 	public CmBaikeProduct get(@RequestParam(required=false) String id) {
@@ -106,12 +118,24 @@ public class CmBaikeProductController extends BaseController {
 		// 问题列表
 		// 问题列表
 		List<CmBaikeProductQuestion> questionList = cmBaikeProductDao.findQuestionList(cmBaikeProduct.getId());
 		List<CmBaikeProductQuestion> questionList = cmBaikeProductDao.findQuestionList(cmBaikeProduct.getId());
 		cmBaikeProduct.setQuestionList(questionList);
 		cmBaikeProduct.setQuestionList(questionList);
+		// 视频列表
+		List<CmBaikeProductFile> videoList = cmBaikeProductDao.findFileList(cmBaikeProduct.getId());
+		StringBuilder fileIds = new StringBuilder();
+		videoList.forEach(video->{
+			OSSUtils.getOssUrl(video.getOssName());
+			fileIds.append(video.getId()).append(",");
+		});
+		cmBaikeProduct.setVideoList(videoList);
+		cmBaikeProduct.setFileIds(fileIds.toString());
 		// 供应商列表
 		// 供应商列表
 		List<NewCmShop> shopList = cmBaikeProductDao.findShopList();
 		List<NewCmShop> shopList = cmBaikeProductDao.findShopList();
 		cmBaikeProduct.setShopList(shopList);
 		cmBaikeProduct.setShopList(shopList);
+		// 敏感词
+		String sensitiveWords = infoDao.getSensitiveWords(4);
 		model.addAttribute("cmBaikeProduct", cmBaikeProduct);
 		model.addAttribute("cmBaikeProduct", cmBaikeProduct);
 		model.addAttribute("typeList", typeList);
 		model.addAttribute("typeList", typeList);
 		model.addAttribute("commodityType", commodityType);
 		model.addAttribute("commodityType", commodityType);
+		model.addAttribute("sensitiveWords", sensitiveWords);
 		return "modules/baikePage/cmBaikeProductForm";
 		return "modules/baikePage/cmBaikeProductForm";
 	}
 	}
 
 
@@ -222,6 +246,12 @@ public class CmBaikeProductController extends BaseController {
 		// 问题列表
 		// 问题列表
 		List<CmBaikeProductQuestion> questionList = cmBaikeProductDao.findQuestionList(cmBaikeProduct.getId());
 		List<CmBaikeProductQuestion> questionList = cmBaikeProductDao.findQuestionList(cmBaikeProduct.getId());
 		cmBaikeProduct.setQuestionList(questionList);
 		cmBaikeProduct.setQuestionList(questionList);
+		// 视频列表
+		List<CmBaikeProductFile> videoList = cmBaikeProductDao.findFileList(cmBaikeProduct.getId());
+		videoList.forEach(video->{
+			OSSUtils.getOssUrl(video.getOssName());
+		});
+		cmBaikeProduct.setVideoList(videoList);
 		model.addAttribute("commodityType", commodityType);
 		model.addAttribute("commodityType", commodityType);
 		return "modules/baikePage/checkBaikePage";
 		return "modules/baikePage/checkBaikePage";
 	}
 	}
@@ -261,12 +291,24 @@ public class CmBaikeProductController extends BaseController {
         // 问题列表
         // 问题列表
         List<CmBaikeProductQuestion> questionList = cmBaikeProductDao.findQuestionList(cmBaikeProduct.getId());
         List<CmBaikeProductQuestion> questionList = cmBaikeProductDao.findQuestionList(cmBaikeProduct.getId());
         cmBaikeProduct.setQuestionList(questionList);
         cmBaikeProduct.setQuestionList(questionList);
+		// 视频列表
+		List<CmBaikeProductFile> videoList = cmBaikeProductDao.findFileList(cmBaikeProduct.getId());
+		StringBuilder fileIds = new StringBuilder();
+		videoList.forEach(video->{
+			OSSUtils.getOssUrl(video.getOssName());
+			fileIds.append(video.getId()).append(",");
+		});
+		cmBaikeProduct.setVideoList(videoList);
+		cmBaikeProduct.setFileIds(fileIds.toString());
         model.addAttribute("commodityType", commodityType);
         model.addAttribute("commodityType", commodityType);
 		CmBaikeType cmBaikeType = new CmBaikeType();
 		CmBaikeType cmBaikeType = new CmBaikeType();
 		cmBaikeType.setTypeSort(cmBaikeProduct.getCommodityType());
 		cmBaikeType.setTypeSort(cmBaikeProduct.getCommodityType());
 		// 分类列表
 		// 分类列表
 		List<CmBaikeType> typeList = cmBaikeTypeService.findList(cmBaikeType);
 		List<CmBaikeType> typeList = cmBaikeTypeService.findList(cmBaikeType);
 		model.addAttribute("typeList", typeList);
 		model.addAttribute("typeList", typeList);
+		// 敏感词
+		String sensitiveWords = infoDao.getSensitiveWords(4);
+		model.addAttribute("sensitiveWords", sensitiveWords);
         return "modules/baikePage/auditBaikeProductPage";
         return "modules/baikePage/auditBaikeProductPage";
 	}
 	}
 
 
@@ -283,4 +325,73 @@ public class CmBaikeProductController extends BaseController {
         cmBaikeProductService.offlineInfo(id);
         cmBaikeProductService.offlineInfo(id);
         return true;
         return true;
     }
     }
+
+	@ResponseBody
+	@RequestMapping(value = "upload")
+	public Map<String, Object> upload(@RequestParam("file") MultipartFile file, @RequestParam("fileTitle") String fileTitle, @RequestParam("fileName") String fileName,
+									  @RequestParam("productId") Integer productId, @RequestParam("fileIds") String fileIds) {
+		return cmBaikeProductService.upload(file, fileTitle, fileName, productId, fileIds);
+	}
+
+    /**
+     * 文件删除
+     */
+    @RequestMapping(value = "deleteFile")
+    public void deleteFile(Integer fileId) {
+        cmBaikeProductService.deleteFile(fileId);
+    }
+
+	/**
+	 * 相关商品推荐
+	 *
+	 * @return
+	 */
+	@RequestMapping(value = "recommend/form")
+	public String recommendForm(CmBaikeProduct cmBaikeProduct, Model model) {
+		CmBaikeProductRecommend recommend = new CmBaikeProductRecommend();
+		recommend.setProductId(Integer.parseInt(cmBaikeProduct.getId()));
+		recommend.setRecommendType(cmBaikeProduct.getRecommendType());
+		recommend.setProductTypeId(cmBaikeProduct.getTypeId());
+		// 手动推荐列表
+        List<CmBaikeProductRecommend> manualRecommendList = cmBaikeProductRecommendDao.findList(recommend);
+        // 自动推荐
+        List<CmBaikeProductRecommend> autoRecommendList = cmBaikeProductRecommendDao.findAutoRecommendList(recommend);
+		// 商品类型
+		String commodityType = cmBaikeProduct.getCommodityType() == 1 ? "产品" : "仪器";
+		model.addAttribute("commodityType", commodityType);
+		model.addAttribute("manualRecommendList", manualRecommendList);
+		model.addAttribute("autoRecommendList", autoRecommendList);
+		return "modules/baikePage/recommendForm";
+	}
+
+	/**
+	 * 保存相关推荐
+	 *
+	 * @return
+	 */
+	@RequestMapping(value = "recommend/save")
+	public String recommendSave(CmBaikeProduct cmBaikeProduct, Model model) {
+		cmBaikeProductService.saveRecommend(cmBaikeProduct);
+		return "redirect:" + Global.getAdminPath() + "/baike/cmBaikeProduct/?repage&commodityType=" + cmBaikeProduct.getCommodityType() + "&publishSource=1";
+	}
+
+	/**
+	 * 添加推荐产品
+	 */
+	@RequestMapping("/recommend/products")
+	public String findProductPage(CmBaikeProduct cmBaikeProduct, Model model, HttpServletRequest request, HttpServletResponse response) {
+		cmBaikeProduct.setPublishSource(1);
+		Page<CmBaikeProduct> page = cmBaikeProductService.findPage(new Page<CmBaikeProduct>(request, response), cmBaikeProduct);
+		model.addAttribute("page", page);
+		// 商品类型
+		String commodityType = cmBaikeProduct.getCommodityType() == 1 ? "产品" : "仪器";
+		model.addAttribute("commodityType", commodityType);
+		// 分类列表
+		CmBaikeType cmBaikeType = new CmBaikeType();
+		cmBaikeType.setTypeSort(cmBaikeProduct.getCommodityType());
+		List<CmBaikeType> typeList = cmBaikeTypeDao.findList(cmBaikeType);
+		model.addAttribute("typeList", typeList);
+		return "modules/baikePage/addProductRecommend";
+	}
+
 }
 }

+ 80 - 0
src/main/java/com/caimei/modules/baike/web/CmBaikeProductRecommendController.java

@@ -0,0 +1,80 @@
+package com.caimei.modules.baike.web;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+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.baike.entity.CmBaikeProductRecommend;
+import com.caimei.modules.baike.service.CmBaikeProductRecommendService;
+
+/**
+ * 采美百科相关推荐Controller
+ * @author Aslee
+ * @version 2022-06-07
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/baike/cmBaikeProductRecommend")
+public class CmBaikeProductRecommendController extends BaseController {
+
+	@Autowired
+	private CmBaikeProductRecommendService cmBaikeProductRecommendService;
+	
+	@ModelAttribute
+	public CmBaikeProductRecommend get(@RequestParam(required=false) String id) {
+		CmBaikeProductRecommend entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = cmBaikeProductRecommendService.get(id);
+		}
+		if (entity == null){
+			entity = new CmBaikeProductRecommend();
+		}
+		return entity;
+	}
+	
+	@RequiresPermissions("baike:cmBaikeProductRecommend:view")
+	@RequestMapping(value = {"list", ""})
+	public String list(CmBaikeProductRecommend cmBaikeProductRecommend, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<CmBaikeProductRecommend> page = cmBaikeProductRecommendService.findPage(new Page<CmBaikeProductRecommend>(request, response), cmBaikeProductRecommend); 
+		model.addAttribute("page", page);
+		return "modules/baike/cmBaikeProductRecommendList";
+	}
+
+	@RequiresPermissions("baike:cmBaikeProductRecommend:view")
+	@RequestMapping(value = "form")
+	public String form(CmBaikeProductRecommend cmBaikeProductRecommend, Model model) {
+		model.addAttribute("cmBaikeProductRecommend", cmBaikeProductRecommend);
+		return "modules/baike/cmBaikeProductRecommendForm";
+	}
+
+	@RequiresPermissions("baike:cmBaikeProductRecommend:edit")
+	@RequestMapping(value = "save")
+	public String save(CmBaikeProductRecommend cmBaikeProductRecommend, Model model, RedirectAttributes redirectAttributes) {
+		if (!beanValidator(model, cmBaikeProductRecommend)){
+			return form(cmBaikeProductRecommend, model);
+		}
+		cmBaikeProductRecommendService.save(cmBaikeProductRecommend);
+		addMessage(redirectAttributes, "保存相关推荐成功");
+		return "redirect:"+Global.getAdminPath()+"/baike/cmBaikeProductRecommend/?repage";
+	}
+	
+	@RequiresPermissions("baike:cmBaikeProductRecommend:delete")
+	@RequestMapping(value = "delete")
+	public String delete(CmBaikeProductRecommend cmBaikeProductRecommend, RedirectAttributes redirectAttributes) {
+		cmBaikeProductRecommendService.delete(cmBaikeProductRecommend);
+		addMessage(redirectAttributes, "删除相关推荐成功");
+		return "redirect:"+Global.getAdminPath()+"/baike/cmBaikeProductRecommend/?repage";
+	}
+
+}

+ 7 - 0
src/main/java/com/caimei/modules/cmpage/web/CmPageCentreController.java

@@ -4,6 +4,8 @@ import com.caimei.modules.cmpage.entity.CmImage;
 import com.caimei.modules.cmpage.entity.CmPageCentre;
 import com.caimei.modules.cmpage.entity.CmPageCentre;
 import com.caimei.modules.cmpage.service.CmImageService;
 import com.caimei.modules.cmpage.service.CmImageService;
 import com.caimei.modules.cmpage.service.CmPageCentreService;
 import com.caimei.modules.cmpage.service.CmPageCentreService;
+import com.caimei.modules.hehe.dao.CmHeheProductDao;
+import com.caimei.modules.hehe.entity.CmHeheProduct;
 import com.caimei.modules.newhome.entity.NewPageFloorContent;
 import com.caimei.modules.newhome.entity.NewPageFloorContent;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.product.entity.ActType;
 import com.caimei.modules.product.entity.ActType;
@@ -51,6 +53,9 @@ public class CmPageCentreController extends BaseController {
     @Autowired
     @Autowired
     private ActTypeService actTypeService;
     private ActTypeService actTypeService;
 
 
+    @Resource
+    private CmHeheProductDao cmHeheProductDao;
+
     @Autowired
     @Autowired
     private RedisService redisService;
     private RedisService redisService;
     @Resource
     @Resource
@@ -240,6 +245,8 @@ public class CmPageCentreController extends BaseController {
             return "modules/newhome/beautyFloorContentForm";
             return "modules/newhome/beautyFloorContentForm";
         }
         }
         if ("8".equals(newPageFloorContent.getType())) {
         if ("8".equals(newPageFloorContent.getType())) {
+            List<CmHeheProduct> productList = cmHeheProductDao.findList(new CmHeheProduct());
+            model.addAttribute("productList", productList);
             return "modules/hehe/cmHeheFloorContentForm";
             return "modules/hehe/cmHeheFloorContentForm";
         }
         }
         return "modules/newhome/newPageFloorContentForm";
         return "modules/newhome/newPageFloorContentForm";

+ 0 - 1
src/main/java/com/caimei/modules/coupon/web/CmCouponController.java

@@ -348,7 +348,6 @@ public class CmCouponController extends BaseController {
         }
         }
 
 
     @RequestMapping(value = "save")
     @RequestMapping(value = "save")
-    @Async("new_coupn")
     public String save(CmCoupon cmCoupon, Model model, RedirectAttributes redirectAttributes) throws ParseException {
     public String save(CmCoupon cmCoupon, Model model, RedirectAttributes redirectAttributes) throws ParseException {
         if (!beanValidator(model, cmCoupon)) {
         if (!beanValidator(model, cmCoupon)) {
             return form(cmCoupon, model);
             return form(cmCoupon, model);

+ 9 - 0
src/main/java/com/caimei/modules/hehe/entity/CmHeheDiscountProduct.java

@@ -15,6 +15,7 @@ public class CmHeheDiscountProduct implements Serializable {
     private Integer productId;      //商品id
     private Integer productId;      //商品id
     private Integer status;        //状态 0停用 1启用
     private Integer status;        //状态 0停用 1启用
     private Integer shopId;     //供应商id(对应店铺券)
     private Integer shopId;     //供应商id(对应店铺券)
+    private Double discountPrice;   //折扣价,若设置了折扣价则以折扣价购买,否则按优惠折扣率计算价格
     private Integer sort;       //排序值
     private Integer sort;       //排序值
     private Date addTime;       //添加时间
     private Date addTime;       //添加时间
 
 
@@ -101,4 +102,12 @@ public class CmHeheDiscountProduct implements Serializable {
     public void setShopName(String shopName) {
     public void setShopName(String shopName) {
         this.shopName = shopName;
         this.shopName = shopName;
     }
     }
+
+    public Double getDiscountPrice() {
+        return discountPrice;
+    }
+
+    public void setDiscountPrice(Double discountPrice) {
+        this.discountPrice = discountPrice;
+    }
 }
 }

+ 32 - 5
src/main/java/com/caimei/modules/hehe/entity/CmHeheImage.java

@@ -16,7 +16,10 @@ public class CmHeheImage extends DataEntity<CmHeheImage> {
 	private static final long serialVersionUID = 1L;
 	private static final long serialVersionUID = 1L;
 	private String topic;		// 主题
 	private String topic;		// 主题
 	private String image;		// 图片
 	private String image;		// 图片
-	private String link;		// 跳转链接
+	private Integer jumpType;		// 跳转类型:1链接,2商品,3图片
+	private String jumpLink;		// 跳转链接
+	private Integer jumpProductId;		// 跳转链接
+	private String jumpImage;		// 跳转链接
 	private String sort;		// 排序值
 	private String sort;		// 排序值
 	private String status;		// 小程序状态:1启用,2停用
 	private String status;		// 小程序状态:1启用,2停用
 	private Date addTime;		// 添加时间
 	private Date addTime;		// 添加时间
@@ -72,11 +75,35 @@ public class CmHeheImage extends DataEntity<CmHeheImage> {
 		this.addTime = addTime;
 		this.addTime = addTime;
 	}
 	}
 
 
-	public String getLink() {
-		return link;
+	public String getJumpLink() {
+		return jumpLink;
 	}
 	}
 
 
-	public void setLink(String link) {
-		this.link = link;
+	public void setJumpLink(String jumpLink) {
+		this.jumpLink = jumpLink;
+	}
+
+	public Integer getJumpProductId() {
+		return jumpProductId;
+	}
+
+	public void setJumpProductId(Integer jumpProductId) {
+		this.jumpProductId = jumpProductId;
+	}
+
+	public String getJumpImage() {
+		return jumpImage;
+	}
+
+	public void setJumpImage(String jumpImage) {
+		this.jumpImage = jumpImage;
+	}
+
+	public Integer getJumpType() {
+		return jumpType;
+	}
+
+	public void setJumpType(Integer jumpType) {
+		this.jumpType = jumpType;
 	}
 	}
 }
 }

+ 9 - 0
src/main/java/com/caimei/modules/hehe/web/CmHeheImageController.java

@@ -1,8 +1,11 @@
 package com.caimei.modules.hehe.web;
 package com.caimei.modules.hehe.web;
 
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
+import com.caimei.modules.hehe.dao.CmHeheProductDao;
+import com.caimei.modules.hehe.entity.CmHeheProduct;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
 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,6 +24,7 @@ import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.caimei.modules.hehe.entity.CmHeheImage;
 import com.caimei.modules.hehe.entity.CmHeheImage;
 import com.caimei.modules.hehe.service.CmHeheImageService;
 import com.caimei.modules.hehe.service.CmHeheImageService;
 
 
+import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
 import static com.caimei.modules.newhome.web.NewPageQualitySupplierController.isInteger;
 import static com.caimei.modules.newhome.web.NewPageQualitySupplierController.isInteger;
@@ -38,6 +42,9 @@ public class CmHeheImageController extends BaseController {
     @Autowired
     @Autowired
     private CmHeheImageService cmHeheImageService;
     private CmHeheImageService cmHeheImageService;
 
 
+    @Resource
+    private CmHeheProductDao cmHeheProductDao;
+
     @ModelAttribute
     @ModelAttribute
     public CmHeheImage get(@RequestParam(required = false) String id) {
     public CmHeheImage get(@RequestParam(required = false) String id) {
         CmHeheImage entity = null;
         CmHeheImage entity = null;
@@ -60,6 +67,8 @@ public class CmHeheImageController extends BaseController {
     @RequestMapping(value = "form")
     @RequestMapping(value = "form")
     public String form(CmHeheImage cmHeheImage, Model model) {
     public String form(CmHeheImage cmHeheImage, Model model) {
         model.addAttribute("cmHeheImage", cmHeheImage);
         model.addAttribute("cmHeheImage", cmHeheImage);
+        List<CmHeheProduct> productList = cmHeheProductDao.findList(new CmHeheProduct());
+        model.addAttribute("productList", productList);
         return "modules/hehe/cmHeheImageForm";
         return "modules/hehe/cmHeheImageForm";
     }
     }
 
 

+ 15 - 0
src/main/java/com/caimei/modules/info/dao/CmSensitiveWordsDao.java

@@ -0,0 +1,15 @@
+package com.caimei.modules.info.dao;
+
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import com.caimei.modules.info.entity.CmSensitiveWords;
+
+/**
+ * 敏感词库DAO接口
+ * @author Aslee
+ * @version 2022-06-01
+ */
+@MyBatisDao
+public interface CmSensitiveWordsDao extends CrudDao<CmSensitiveWords> {
+	
+}

+ 2 - 0
src/main/java/com/caimei/modules/info/dao/InfoDao.java

@@ -36,5 +36,7 @@ public interface InfoDao extends CrudDao<Info> {
 
 
     void offlineInfo(Integer id);
     void offlineInfo(Integer id);
 
 
+    String getSensitiveWords(@Param("checkPoint") Integer checkPoint);
+
     void deleteInfo(String id);
     void deleteInfo(String id);
 }
 }

+ 52 - 0
src/main/java/com/caimei/modules/info/entity/CmSensitiveWords.java

@@ -0,0 +1,52 @@
+package com.caimei.modules.info.entity;
+
+import org.hibernate.validator.constraints.Length;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * 敏感词库Entity
+ * @author Aslee
+ * @version 2022-06-01
+ */
+public class CmSensitiveWords extends DataEntity<CmSensitiveWords> {
+	
+	private static final long serialVersionUID = 1L;
+	private String words;		// 敏感词
+	private String checkPoints;		// 检查位置:1供应商端文章,2供应商端百科,3管理员端文章,4管理员端百科
+	private String status;		// 状态:1启用,0停用
+	
+	public CmSensitiveWords() {
+		super();
+	}
+
+	public CmSensitiveWords(String id){
+		super(id);
+	}
+
+	public String getWords() {
+		return words;
+	}
+
+	public void setWords(String words) {
+		this.words = words;
+	}
+	
+	@Length(min=0, max=45, message="检查位置:1供应商端文章,2供应商端百科,3管理员端文章,4管理员端百科长度必须介于 0 和 45 之间")
+	public String getCheckPoints() {
+		return checkPoints;
+	}
+
+	public void setCheckPoints(String checkPoints) {
+		this.checkPoints = checkPoints;
+	}
+	
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+	
+}

+ 44 - 0
src/main/java/com/caimei/modules/info/service/CmSensitiveWordsService.java

@@ -0,0 +1,44 @@
+package com.caimei.modules.info.service;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.service.CrudService;
+import com.caimei.modules.info.entity.CmSensitiveWords;
+import com.caimei.modules.info.dao.CmSensitiveWordsDao;
+
+/**
+ * 敏感词库Service
+ * @author Aslee
+ * @version 2022-06-01
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmSensitiveWordsService extends CrudService<CmSensitiveWordsDao, CmSensitiveWords> {
+
+	public CmSensitiveWords get(String id) {
+		return super.get(id);
+	}
+	
+	public List<CmSensitiveWords> findList(CmSensitiveWords cmSensitiveWords) {
+		return super.findList(cmSensitiveWords);
+	}
+	
+	public Page<CmSensitiveWords> findPage(Page<CmSensitiveWords> page, CmSensitiveWords cmSensitiveWords) {
+		return super.findPage(page, cmSensitiveWords);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(CmSensitiveWords cmSensitiveWords) {
+		super.save(cmSensitiveWords);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(CmSensitiveWords cmSensitiveWords) {
+		super.delete(cmSensitiveWords);
+	}
+	
+}

+ 79 - 0
src/main/java/com/caimei/modules/info/web/CmSensitiveWordsController.java

@@ -0,0 +1,79 @@
+package com.caimei.modules.info.web;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+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.CmSensitiveWords;
+import com.caimei.modules.info.service.CmSensitiveWordsService;
+
+/**
+ * 敏感词库Controller
+ * @author Aslee
+ * @version 2022-06-01
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/info/cmSensitiveWords")
+public class CmSensitiveWordsController extends BaseController {
+
+	@Autowired
+	private CmSensitiveWordsService cmSensitiveWordsService;
+	
+	@ModelAttribute
+	public CmSensitiveWords get(@RequestParam(required=false) String id) {
+		CmSensitiveWords entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = cmSensitiveWordsService.get(id);
+		}
+		if (entity == null){
+			entity = new CmSensitiveWords();
+		}
+		return entity;
+	}
+	
+	@RequestMapping(value = {"list", ""})
+	public String list(CmSensitiveWords cmSensitiveWords, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<CmSensitiveWords> page = cmSensitiveWordsService.findPage(new Page<CmSensitiveWords>(request, response), cmSensitiveWords); 
+		model.addAttribute("page", page);
+		return "modules/info/cmSensitiveWordsList";
+	}
+
+	@RequestMapping(value = "form")
+	public String form(CmSensitiveWords cmSensitiveWords, Model model) {
+		model.addAttribute("cmSensitiveWords", cmSensitiveWords);
+		return "modules/info/cmSensitiveWordsForm";
+	}
+
+	@RequestMapping(value = "save")
+	public String save(CmSensitiveWords cmSensitiveWords, Model model, RedirectAttributes redirectAttributes) {
+		if (!beanValidator(model, cmSensitiveWords)){
+			return form(cmSensitiveWords, model);
+		}
+		cmSensitiveWordsService.save(cmSensitiveWords);
+		addMessage(redirectAttributes, "保存敏感词库成功");
+		if ("1".equals(cmSensitiveWords.getId())) {
+			return "redirect:"+Global.getAdminPath()+"/info/cmSensitiveWords/form?id=1";
+		}
+		return "redirect:"+Global.getAdminPath()+"/info/cmSensitiveWords/?repage";
+	}
+	
+	@RequestMapping(value = "delete")
+	public String delete(CmSensitiveWords cmSensitiveWords, RedirectAttributes redirectAttributes) {
+		cmSensitiveWordsService.delete(cmSensitiveWords);
+		addMessage(redirectAttributes, "删除敏感词库成功");
+		return "redirect:"+Global.getAdminPath()+"/info/cmSensitiveWords/?repage";
+	}
+
+}

+ 9 - 0
src/main/java/com/caimei/modules/info/web/InfoController.java

@@ -6,6 +6,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
+import com.caimei.modules.info.dao.InfoDao;
 import com.caimei.modules.info.entity.CmInfoDocSyn;
 import com.caimei.modules.info.entity.CmInfoDocSyn;
 import com.caimei.modules.info.service.CmInfoDocSynService;
 import com.caimei.modules.info.service.CmInfoDocSynService;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.opensearch.GenerateUtils;
@@ -55,6 +56,8 @@ public class InfoController extends BaseController {
 	private RedisService redisService;
 	private RedisService redisService;
     @Resource
     @Resource
     private GenerateUtils generateUtils;
     private GenerateUtils generateUtils;
+	@Autowired
+	private InfoDao infoDao;
 	@ModelAttribute
 	@ModelAttribute
 	public Info get(@RequestParam(required=false) String id) {
 	public Info get(@RequestParam(required=false) String id) {
 		Info entity = null;
 		Info entity = null;
@@ -134,9 +137,12 @@ public class InfoController extends BaseController {
 		}
 		}
 		InfoType infoType = new InfoType();
 		InfoType infoType = new InfoType();
 		List<InfoType> typeList = infoTypeService.findList(infoType);
 		List<InfoType> typeList = infoTypeService.findList(infoType);
+		// 敏感词
+		String sensitiveWords = infoDao.getSensitiveWords(3);
 		model.addAttribute("typeList", typeList);
 		model.addAttribute("typeList", typeList);
 		model.addAttribute("info", info);
 		model.addAttribute("info", info);
 		model.addAttribute("ltype", ltype);
 		model.addAttribute("ltype", ltype);
+		model.addAttribute("sensitiveWords", sensitiveWords);
 		return "modules/info/infoForm";
 		return "modules/info/infoForm";
 	}
 	}
 
 
@@ -308,6 +314,9 @@ public class InfoController extends BaseController {
 		List<InfoType> typeList = infoTypeService.findList(infoType);
 		List<InfoType> typeList = infoTypeService.findList(infoType);
 		model.addAttribute("typeList", typeList);
 		model.addAttribute("typeList", typeList);
 		model.addAttribute("info", info);
 		model.addAttribute("info", info);
+		// 敏感词
+		String sensitiveWords = infoDao.getSensitiveWords(3);
+		model.addAttribute("sensitiveWords", sensitiveWords);
 		return "modules/info/auditInfoPage";
 		return "modules/info/auditInfoPage";
     }
     }
 
 

+ 195 - 0
src/main/java/com/caimei/modules/newhome/entity/NewPageFloorContent.java

@@ -173,6 +173,81 @@ public class NewPageFloorContent implements Serializable {
      */
      */
     private Date displayDate3;
     private Date displayDate3;
 
 
+    /**
+     * 跳转商品id1(颜选)
+     */
+    private Integer productId1;
+
+    /**
+     * 跳转商品id2(颜选)
+     */
+    private Integer productId2;
+
+    /**
+     * 跳转商品id3(颜选)
+     */
+    private Integer productId3;
+
+    /**
+     * 跳转商品id4(颜选)
+     */
+    private Integer productId4;
+
+    /**
+     * 跳转商品id5(颜选)
+     */
+    private Integer productId5;
+
+    /**
+     * 跳转图片1(颜选)
+     */
+    private String jumpImage1;
+
+    /**
+     * 跳转图片2(颜选)
+     */
+    private String jumpImage2;
+
+    /**
+     * 跳转图片3(颜选)
+     */
+    private String jumpImage3;
+
+    /**
+     * 跳转图片4(颜选)
+     */
+    private String jumpImage4;
+
+    /**
+     * 跳转图片5(颜选)
+     */
+    private String jumpImage5;
+
+    /**
+     * 跳转类型1(颜选):1链接,2商品,3图片
+     */
+    private Integer jumpType1;
+
+    /**
+     * 跳转类型2(颜选):1链接,2商品,3图片
+     */
+    private Integer jumpType2;
+
+    /**
+     * 跳转类型3(颜选):1链接,2商品,3图片
+     */
+    private Integer jumpType3;
+
+    /**
+     * 跳转类型4(颜选):1链接,2商品,3图片
+     */
+    private Integer jumpType4;
+
+    /**
+     * 跳转类型5(颜选):1链接,2商品,3图片
+     */
+    private Integer jumpType5;
+
     public Integer getId() {
     public Integer getId() {
         return id;
         return id;
     }
     }
@@ -436,4 +511,124 @@ public class NewPageFloorContent implements Serializable {
     public void setFormType(String formType) {
     public void setFormType(String formType) {
         this.formType = formType;
         this.formType = formType;
     }
     }
+
+    public Integer getProductId1() {
+        return productId1;
+    }
+
+    public void setProductId1(Integer productId1) {
+        this.productId1 = productId1;
+    }
+
+    public Integer getProductId2() {
+        return productId2;
+    }
+
+    public void setProductId2(Integer productId2) {
+        this.productId2 = productId2;
+    }
+
+    public Integer getProductId3() {
+        return productId3;
+    }
+
+    public void setProductId3(Integer productId3) {
+        this.productId3 = productId3;
+    }
+
+    public Integer getProductId4() {
+        return productId4;
+    }
+
+    public void setProductId4(Integer productId4) {
+        this.productId4 = productId4;
+    }
+
+    public Integer getProductId5() {
+        return productId5;
+    }
+
+    public void setProductId5(Integer productId5) {
+        this.productId5 = productId5;
+    }
+
+    public String getJumpImage1() {
+        return jumpImage1;
+    }
+
+    public void setJumpImage1(String jumpImage1) {
+        this.jumpImage1 = jumpImage1;
+    }
+
+    public String getJumpImage2() {
+        return jumpImage2;
+    }
+
+    public void setJumpImage2(String jumpImage2) {
+        this.jumpImage2 = jumpImage2;
+    }
+
+    public String getJumpImage3() {
+        return jumpImage3;
+    }
+
+    public void setJumpImage3(String jumpImage3) {
+        this.jumpImage3 = jumpImage3;
+    }
+
+    public String getJumpImage4() {
+        return jumpImage4;
+    }
+
+    public void setJumpImage4(String jumpImage4) {
+        this.jumpImage4 = jumpImage4;
+    }
+
+    public String getJumpImage5() {
+        return jumpImage5;
+    }
+
+    public void setJumpImage5(String jumpImage5) {
+        this.jumpImage5 = jumpImage5;
+    }
+
+    public Integer getJumpType1() {
+        return jumpType1;
+    }
+
+    public void setJumpType1(Integer jumpType1) {
+        this.jumpType1 = jumpType1;
+    }
+
+    public Integer getJumpType2() {
+        return jumpType2;
+    }
+
+    public void setJumpType2(Integer jumpType2) {
+        this.jumpType2 = jumpType2;
+    }
+
+    public Integer getJumpType3() {
+        return jumpType3;
+    }
+
+    public void setJumpType3(Integer jumpType3) {
+        this.jumpType3 = jumpType3;
+    }
+
+    public Integer getJumpType4() {
+        return jumpType4;
+    }
+
+    public void setJumpType4(Integer jumpType4) {
+        this.jumpType4 = jumpType4;
+    }
+
+    public Integer getJumpType5() {
+        return jumpType5;
+    }
+
+    public void setJumpType5(Integer jumpType5) {
+        this.jumpType5 = jumpType5;
+    }
 }
 }

+ 5 - 0
src/main/java/com/caimei/modules/newhome/service/NewPageFloorService.java

@@ -112,6 +112,11 @@ public class NewPageFloorService extends CrudService<NewPageFloorDao, NewPageFlo
         floorContent.setAppletsAdsImage3(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage3()));
         floorContent.setAppletsAdsImage3(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage3()));
         floorContent.setAppletsAdsImage4(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage4()));
         floorContent.setAppletsAdsImage4(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage4()));
         floorContent.setAppletsAdsImage5(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage5()));
         floorContent.setAppletsAdsImage5(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage5()));
+        floorContent.setJumpImage1(UploadPicUtils.saveImageToServer(floorContent.getJumpImage1()));
+        floorContent.setJumpImage2(UploadPicUtils.saveImageToServer(floorContent.getJumpImage2()));
+        floorContent.setJumpImage3(UploadPicUtils.saveImageToServer(floorContent.getJumpImage3()));
+        floorContent.setJumpImage4(UploadPicUtils.saveImageToServer(floorContent.getJumpImage4()));
+        floorContent.setJumpImage5(UploadPicUtils.saveImageToServer(floorContent.getJumpImage5()));
         int templateType = 0;
         int templateType = 0;
         String templateTypeStr = floorContent.getTemplateType();
         String templateTypeStr = floorContent.getTemplateType();
         if (StringUtils.isNotEmpty(templateTypeStr)){
         if (StringUtils.isNotEmpty(templateTypeStr)){

+ 8 - 2
src/main/java/com/caimei/modules/oss/utils/OSSUtils.java

@@ -90,12 +90,18 @@ public class OSSUtils {
         if (".vsd".equalsIgnoreCase(fileExtension)) {
         if (".vsd".equalsIgnoreCase(fileExtension)) {
             return "application/vnd.visio";
             return "application/vnd.visio";
         }
         }
-        if (".ppt".equalsIgnoreCase(fileExtension) || "pptx".equalsIgnoreCase(fileExtension)) {
+        if (".ppt".equalsIgnoreCase(fileExtension)  ) {
             return "application/vnd.ms-powerpoint";
             return "application/vnd.ms-powerpoint";
         }
         }
-        if (".doc".equalsIgnoreCase(fileExtension) || "docx".equalsIgnoreCase(fileExtension)) {
+        if (".pptx".equalsIgnoreCase(fileExtension)) {
+            return "application/vnd.openxmlformats-officedocument.presentationml.presentation";
+        }
+        if (".doc".equalsIgnoreCase(fileExtension)) {
             return "application/msword";
             return "application/msword";
         }
         }
+        if ("docx".equalsIgnoreCase(fileExtension)) {
+            return "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
+        }
         if (".xml".equalsIgnoreCase(fileExtension)) {
         if (".xml".equalsIgnoreCase(fileExtension)) {
             return "text/xml";
             return "text/xml";
         }
         }

+ 1 - 1
src/main/resources/mappings/modules/archive/CmOrderArchiveMapper.xml

@@ -138,7 +138,7 @@
             fileName = #{fileName}
             fileName = #{fileName}
             <if test="orderArchiveId != null || (fileIds != null and fileIds != '')">
             <if test="orderArchiveId != null || (fileIds != null and fileIds != '')">
                 and(
                 and(
-                <if test="orderArchiveId != null || (fileIds != null and fileIds != '')">
+                <if test="orderArchiveId != null">
                     orderArchiveId = #{orderArchiveId}
                     orderArchiveId = #{orderArchiveId}
                 </if>
                 </if>
                 <if test="fileIds != null and fileIds != ''">
                 <if test="fileIds != null and fileIds != ''">

+ 56 - 1
src/main/resources/mappings/modules/baike/CmBaikeProductMapper.xml

@@ -37,6 +37,7 @@
         a.onlineStatus,
         a.onlineStatus,
 		a.failReason,
 		a.failReason,
 		a.addTime AS "addTime",
 		a.addTime AS "addTime",
+		a.recommendType,
 		cbt.name as "typeName"
 		cbt.name as "typeName"
 	</sql>
 	</sql>
 	
 	
@@ -103,6 +104,12 @@
             <if test="shopName != null and shopName != ''">
             <if test="shopName != null and shopName != ''">
                 AND s.name LIKE concat('%',#{shopName},'%')
                 AND s.name LIKE concat('%',#{shopName},'%')
             </if>
             </if>
+			<if test="productIds != null and productIds != ''">
+				and a.id not in
+				<foreach item="productId" collection="productIds.split(',')" open="(" separator="," close=")">
+					#{productId}
+				</foreach>
+			</if>
 		</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 != ''">
@@ -148,8 +155,38 @@
 		select s.shopID,u.name from shop s
 		select s.shopID,u.name from shop s
 						 LEFT JOIN user u ON u.userID = s.userID where s.status = 90 order by s.shopID desc;
 						 LEFT JOIN user u ON u.userID = s.userID where s.status = 90 order by s.shopID desc;
 	</select>
 	</select>
+    <select id="checkFileName" resultType="java.lang.Integer">
+		select id from cm_baike_product_file
+		<where>
+			fileName = #{fileName}
+			<if test="productId != null || (fileIds != null and fileIds != '')">
+				and(
+				<if test="productId != null">
+					productId = #{productId}
+				</if>
+				<if test="fileIds != null and fileIds != ''">
+					or id in
+					<foreach collection="fileIds.split(',')" item="fileId" index="index" open="(" separator=","
+							 close=")">
+						#{fileId}
+					</foreach>
+				</if>
+				)
+			</if>
+		</where>
+	</select>
+	<select id="getProductFileById" resultType="com.caimei.modules.baike.entity.CmBaikeProductFile">
+		select productId, fileTitle, fileName, ossName
+		from cm_baike_product_file
+		where id = #{fileId}
+	</select>
+	<select id="findFileList" resultType="com.caimei.modules.baike.entity.CmBaikeProductFile">
+		select id, productId, fileTitle, fileName, ossName
+		from cm_baike_product_file
+		where productId = #{id}
+	</select>
 
 
-    <insert id="insert" parameterType="CmBaikeProduct"  keyProperty="id" useGeneratedKeys="true">
+	<insert id="insert" parameterType="CmBaikeProduct"  keyProperty="id" useGeneratedKeys="true">
 		INSERT INTO cm_baike_product(
 		INSERT INTO cm_baike_product(
 			commodityType,
 			commodityType,
 			name,
 			name,
@@ -223,6 +260,11 @@
 		values (#{productId}, #{question}, #{answer})
 		values (#{productId}, #{question}, #{answer})
 	</insert>
 	</insert>
 
 
+	<insert id="insertProductFile" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
+		insert into cm_baike_product_file(fileTitle, fileName, ossName)
+		values (#{fileTitle}, #{fileName}, #{ossName})
+	</insert>
+
 	<update id="update">
 	<update id="update">
 		UPDATE cm_baike_product SET 	
 		UPDATE cm_baike_product SET 	
 			name = #{name},
 			name = #{name},
@@ -284,6 +326,16 @@
 	<update id="updateEmptyNum">
 	<update id="updateEmptyNum">
 		update cm_baike_product set emptyNum = #{emptyNum} where id = #{id}
 		update cm_baike_product set emptyNum = #{emptyNum} where id = #{id}
 	</update>
 	</update>
+	<update id="updateProductFile">
+		update cm_baike_product_file
+		set productId = #{productId}
+		where id = #{fileId}
+	</update>
+	<update id="updateRecommendType">
+		update cm_baike_product
+		set recommendType = #{recommendType}
+		where id = #{productId}
+	</update>
 
 
 	<delete id="delete">
 	<delete id="delete">
 		DELETE FROM cm_baike_product
 		DELETE FROM cm_baike_product
@@ -298,5 +350,8 @@
 	<delete id="deleteQuestionsByProductId">
 	<delete id="deleteQuestionsByProductId">
 		delete from cm_baike_product_question where productId = #{id}
 		delete from cm_baike_product_question where productId = #{id}
 	</delete>
 	</delete>
+	<delete id="deleteProductFile">
+		delete from cm_baike_product_file where id = #{fileId}
+	</delete>
 
 
 </mapper>
 </mapper>

+ 99 - 0
src/main/resources/mappings/modules/baike/CmBaikeProductRecommendMapper.xml

@@ -0,0 +1,99 @@
+<?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.baike.dao.CmBaikeProductRecommendDao">
+    
+	<sql id="cmBaikeProductRecommendColumns">
+		a.id AS "id",
+		a.productId AS "productId",
+		a.recommendProductId AS "recommendProductId",
+		a.sort AS "sort",
+		cbp.name as recommendProductName
+	</sql>
+	
+	<sql id="cmBaikeProductRecommendJoins">
+		left join cm_baike_product cbp on a.recommendProductId = cbp.id
+	</sql>
+    
+	<select id="get" resultType="CmBaikeProductRecommend">
+		SELECT 
+			<include refid="cmBaikeProductRecommendColumns"/>
+		FROM cm_baike_product_recommend a
+		<include refid="cmBaikeProductRecommendJoins"/>
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="CmBaikeProductRecommend">
+		SELECT 
+			<include refid="cmBaikeProductRecommendColumns"/>
+		FROM cm_baike_product_recommend a
+		<include refid="cmBaikeProductRecommendJoins"/>
+		<where>
+		    cbp.delFlag = 0
+			<if test="productId != null">
+				and a.productId = #{productId}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				order by -a.sort desc
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="CmBaikeProductRecommend">
+		SELECT 
+			<include refid="cmBaikeProductRecommendColumns"/>
+		FROM cm_baike_product_recommend a
+		<include refid="cmBaikeProductRecommendJoins"/>
+		<where>
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+	<select id="findAutoRecommendList" resultType="com.caimei.modules.baike.entity.CmBaikeProductRecommend">
+		select id as recommendProductId, name as recommendProductName
+		from cm_baike_product
+		where typeId = #{productTypeId} and delFlag = 0 and onlineStatus = 2 and status = 1
+		order by addTime desc
+		limit 15
+	</select>
+
+	<insert id="insert" parameterType="CmBaikeProductRecommend"  keyProperty="id" useGeneratedKeys="true">
+		INSERT INTO cm_baike_product_recommend(
+			productId,
+			recommendProductId,
+			sort
+		) VALUES (
+			#{productId},
+			#{recommendProductId},
+			#{sort}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE cm_baike_product_recommend SET 	
+			productId = #{productId},
+			recommendProductId = #{recommendProductId},
+			sort = #{sort}
+		WHERE id = #{id}
+	</update>
+	
+	<delete id="delete">
+		DELETE FROM cm_baike_product_recommend
+		WHERE id = #{id}
+	</delete>
+	<delete id="clearRecommendData">
+		delete
+		from cm_baike_product_recommend
+		where productId = #{productId}
+	</delete>
+
+</mapper>

+ 4 - 2
src/main/resources/mappings/modules/hehe/CmHeheDiscountMapper.xml

@@ -112,12 +112,12 @@
 
 
 	<insert id="insertDiscountProduct">
 	<insert id="insertDiscountProduct">
 		INSERT INTO `cm_hehe_discount_product` (
 		INSERT INTO `cm_hehe_discount_product` (
-			`discountId`, `productId`, `status`,
+			`discountId`, `productId`, discountPrice, `status`,
 			`sort`, `addTime`
 			`sort`, `addTime`
 		)
 		)
 		VALUES
 		VALUES
 		(
 		(
-			#{discountId}, #{productId}, #{status},
+			#{discountId}, #{productId}, #{discountPrice}, #{status},
 			#{sort}, #{addTime}
 			#{sort}, #{addTime}
 		)
 		)
 	</insert>
 	</insert>
@@ -135,6 +135,7 @@
 			<if test="sort != null">
 			<if test="sort != null">
 				`sort` = #{sort},
 				`sort` = #{sort},
 			</if>
 			</if>
+			discountPrice = #{discountPrice}
 		</set>
 		</set>
 		WHERE
 		WHERE
 		`id` = #{id}
 		`id` = #{id}
@@ -154,6 +155,7 @@
 			cca.id,
 			cca.id,
 			cca.discountId,
 			cca.discountId,
 			cca.productId,
 			cca.productId,
+            cca.discountPrice,
 			cca.status,
 			cca.status,
 			cca.sort,
 			cca.sort,
 			cca.addTime,
 			cca.addTime,

+ 16 - 4
src/main/resources/mappings/modules/hehe/CmHeheImageMapper.xml

@@ -6,7 +6,10 @@
 		a.id AS "id",
 		a.id AS "id",
 		a.topic AS "topic",
 		a.topic AS "topic",
 		a.image AS "image",
 		a.image AS "image",
-		a.link,
+		a.jumpType,
+		a.jumpLink,
+		a.jumpProductId,
+		a.jumpImage,
 		a.sort AS "sort",
 		a.sort AS "sort",
 		a.status AS "status",
 		a.status AS "status",
 		a.addTime AS "addTime"
 		a.addTime AS "addTime"
@@ -71,14 +74,20 @@
 		INSERT INTO cm_hehe_image(
 		INSERT INTO cm_hehe_image(
 			topic,
 			topic,
 			image,
 			image,
-		    link,
+		    jumpType,
+		    jumpLink,
+		    jumpProductId,
+		    jumpImage,
 			sort,
 			sort,
 			status,
 			status,
 			addTime
 			addTime
 		) VALUES (
 		) VALUES (
 			#{topic},
 			#{topic},
 			#{image},
 			#{image},
-			#{link},
+		    #{jumpType},
+			#{jumpLink},
+			#{jumpProductId},
+			#{jumpImage},
 			#{sort},
 			#{sort},
 			#{status},
 			#{status},
 			NOW()
 			NOW()
@@ -89,7 +98,10 @@
 		UPDATE cm_hehe_image SET 	
 		UPDATE cm_hehe_image SET 	
 			topic = #{topic},
 			topic = #{topic},
 			image = #{image},
 			image = #{image},
-			link = #{link},
+			jumpType = #{jumpType},
+			jumpLink = #{jumpLink},
+			jumpProductId = #{jumpProductId},
+			jumpImage = #{jumpImage},
 			sort = #{sort},
 			sort = #{sort},
 			status = #{status},
 			status = #{status},
 			addTime = #{addTime}
 			addTime = #{addTime}

+ 84 - 0
src/main/resources/mappings/modules/info/CmSensitiveWordsMapper.xml

@@ -0,0 +1,84 @@
+<?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.info.dao.CmSensitiveWordsDao">
+    
+	<sql id="cmSensitiveWordsColumns">
+		a.id AS "id",
+		a.words AS "words",
+		a.checkPoints AS "checkPoints",
+		a.status AS "status"
+	</sql>
+	
+	<sql id="cmSensitiveWordsJoins">
+	</sql>
+    
+	<select id="get" resultType="CmSensitiveWords">
+		SELECT 
+			<include refid="cmSensitiveWordsColumns"/>
+		FROM cm_sensitive_words a
+		<include refid="cmSensitiveWordsJoins"/>
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="CmSensitiveWords">
+		SELECT 
+			<include refid="cmSensitiveWordsColumns"/>
+		FROM cm_sensitive_words a
+		<include refid="cmSensitiveWordsJoins"/>
+		<where>
+			
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="CmSensitiveWords">
+		SELECT 
+			<include refid="cmSensitiveWordsColumns"/>
+		FROM cm_sensitive_words a
+		<include refid="cmSensitiveWordsJoins"/>
+		<where>
+			
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert" parameterType="CmSensitiveWords"  keyProperty="id" useGeneratedKeys="true">
+		INSERT INTO cm_sensitive_words(
+			id,
+			words,
+			checkPoints,
+			status
+		) VALUES (
+			#{id},
+			#{words},
+			#{checkPoints},
+			#{status}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE cm_sensitive_words SET 	
+			words = #{words},
+			checkPoints = #{checkPoints},
+			status = #{status}
+		WHERE id = #{id}
+	</update>
+	
+	<delete id="delete">
+		DELETE FROM cm_sensitive_words
+		WHERE id = #{id}
+	</delete>
+	
+</mapper>

+ 9 - 1
src/main/resources/mappings/modules/info/InfoMapper.xml

@@ -152,8 +152,16 @@
 			</otherwise>
 			</otherwise>
 		</choose>
 		</choose>
 	</select>
 	</select>
+    <select id="getSensitiveWords" resultType="java.lang.String">
+		select words
+		from cm_sensitive_words
+		where id = 1 and status = 1
+		<if test="checkPoint != null">
+			and checkPoints like concat('%',#{checkPoint},'%')
+		</if>
+	</select>
 
 
-	<insert id="insert" parameterType="Info"  keyProperty="id" useGeneratedKeys="true">
+    <insert id="insert" parameterType="Info"  keyProperty="id" useGeneratedKeys="true">
 		INSERT INTO info(
 		INSERT INTO info(
 			typeId,
 			typeId,
 			title,
 			title,

+ 44 - 25
src/main/resources/mappings/modules/newhome/NewPageFloorMapper.xml

@@ -259,39 +259,58 @@
 											  `appletsAdsImage2`, `appletsAdsImage3`, `appletsAdsImage4`,
 											  `appletsAdsImage2`, `appletsAdsImage3`, `appletsAdsImage4`,
 											  `appletsAdsImage5`, adsLink1,
 											  `appletsAdsImage5`, adsLink1,
 											  adsLink2, adsLink3, adsLink4, adsLink5, centreId, displayDate1,
 											  adsLink2, adsLink3, adsLink4, adsLink5, centreId, displayDate1,
-											  displayDate2, displayDate3)
+											  displayDate2, displayDate3, productId1, productId2, productId3,
+											  productId4, productId5,
+											  jumpImage1, jumpImage2, jumpImage3, jumpImage4, jumpImage5, jumpType1,
+											  jumpType2, jumpType3, jumpType4, jumpType5)
 		VALUES (#{floorId}, #{templateType}, #{pcAdsImage1},
 		VALUES (#{floorId}, #{templateType}, #{pcAdsImage1},
 				#{pcAdsImage2}, #{pcAdsImage3}, #{pcAdsImage4}, #{pcAdsImage5}, #{appletsAdsImage1},
 				#{pcAdsImage2}, #{pcAdsImage3}, #{pcAdsImage4}, #{pcAdsImage5}, #{appletsAdsImage1},
 				#{appletsAdsImage2}, #{appletsAdsImage3}, #{appletsAdsImage4}, #{appletsAdsImage5}, #{adsLink1},
 				#{appletsAdsImage2}, #{appletsAdsImage3}, #{appletsAdsImage4}, #{appletsAdsImage5}, #{adsLink1},
 				#{adsLink2}, #{adsLink3}, #{adsLink4}, #{adsLink5}, #{centreId}, #{displayDate1}, #{displayDate2},
 				#{adsLink2}, #{adsLink3}, #{adsLink4}, #{adsLink5}, #{centreId}, #{displayDate1}, #{displayDate2},
-				#{displayDate3})
+				#{displayDate3}, #{productId1}, #{productId2}, #{productId3}, #{productId4}, #{productId5},
+				#{jumpImage1}, #{jumpImage2}, #{jumpImage3}, #{jumpImage4}, #{jumpImage5}, #{jumpType1}, #{jumpType2},
+				#{jumpType3}, #{jumpType4}, #{jumpType5})
 	</insert>
 	</insert>
 
 
 	<update id="updateFloorContent">
 	<update id="updateFloorContent">
 		UPDATE
 		UPDATE
-		  `new_page_floor_content`
-		SET
-		  `floorId` = #{floorId},
-		  `centreId` = #{centreId},
-		  `templateType` = #{templateType},
-		  `pcAdsImage1` = #{pcAdsImage1},
-		  `pcAdsImage2` = #{pcAdsImage2},
-		  `pcAdsImage3` = #{pcAdsImage3},
-		  `pcAdsImage4` = #{pcAdsImage4},
-		  `pcAdsImage5` = #{pcAdsImage5},
-		  `appletsAdsImage1` = #{appletsAdsImage1},
-		  `appletsAdsImage2` = #{appletsAdsImage2},
-		  `appletsAdsImage3` = #{appletsAdsImage3},
-		  `appletsAdsImage4` = #{appletsAdsImage4},
-		  `appletsAdsImage5` = #{appletsAdsImage5},
-		  `adsLink1` = #{adsLink1},
-		  `adsLink2` = #{adsLink2},
-		  `adsLink3` = #{adsLink3},
-		  `adsLink4` = #{adsLink4},
-		  `adsLink5` = #{adsLink5},
-		  `displayDate1` = #{displayDate1},
-		  `displayDate2` = #{displayDate2},
-		  `displayDate3` = #{displayDate3}
+			`new_page_floor_content`
+		SET `floorId`          = #{floorId},
+			`centreId`         = #{centreId},
+			`templateType`     = #{templateType},
+			`pcAdsImage1`      = #{pcAdsImage1},
+			`pcAdsImage2`      = #{pcAdsImage2},
+			`pcAdsImage3`      = #{pcAdsImage3},
+			`pcAdsImage4`      = #{pcAdsImage4},
+			`pcAdsImage5`      = #{pcAdsImage5},
+			`appletsAdsImage1` = #{appletsAdsImage1},
+			`appletsAdsImage2` = #{appletsAdsImage2},
+			`appletsAdsImage3` = #{appletsAdsImage3},
+			`appletsAdsImage4` = #{appletsAdsImage4},
+			`appletsAdsImage5` = #{appletsAdsImage5},
+			`adsLink1`         = #{adsLink1},
+			`adsLink2`         = #{adsLink2},
+			`adsLink3`         = #{adsLink3},
+			`adsLink4`         = #{adsLink4},
+			`adsLink5`         = #{adsLink5},
+			`displayDate1`     = #{displayDate1},
+			`displayDate2`     = #{displayDate2},
+			`displayDate3`     = #{displayDate3},
+			productId1         = #{productId1},
+			productId2         = #{productId2},
+			productId3         = #{productId3},
+			productId4         = #{productId4},
+			productId5         = #{productId5},
+			jumpImage1         = #{jumpImage1},
+			jumpImage2         = #{jumpImage2},
+			jumpImage3         = #{jumpImage3},
+			jumpImage4         = #{jumpImage4},
+			jumpImage5         = #{jumpImage5},
+			jumpType1          = #{jumpType1},
+			jumpType2          = #{jumpType2},
+			jumpType3          = #{jumpType3},
+			jumpType4          = #{jumpType4},
+			jumpType5          = #{jumpType5}
 		WHERE `id` = #{id}
 		WHERE `id` = #{id}
 	</update>
 	</update>
 
 

+ 135 - 0
src/main/webapp/WEB-INF/views/modules/baikePage/addProductRecommend.jsp

@@ -0,0 +1,135 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: Administrator
+  Date: 2020/4/9
+  Time: 19:54
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ 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 () {
+            $("#searchForm").validate({
+                submitHandler: function (form) {
+                    var isSubMitFlag = true;
+                    var typeId = $("#typeId").val();
+                    var name = $("#name").val();
+                    if (typeId == '' && name == '') {
+                        alertx("请选择仪器分类");
+                        return false;
+                    }
+                    if (isSubMitFlag) {
+                        form.submit();
+                    }
+                }
+            })
+        });
+    </script>
+</head>
+<body>
+<br/>
+<form:form id="searchForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/recommend/products" 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}"/>
+<%--    <form:hidden path="productIds"/>--%>
+    <form:hidden path="productIds"/>
+    <form:hidden path="commodityType"/>
+    <div class="ul-form">
+        <label>${commodityType}分类:</label>
+        <form:select path="typeId" class="input-medium">
+            <form:option value="" label="请选择"/>
+            <form:options items="${typeList}" itemLabel="name" itemValue="id"
+                          htmlEscape="false"/>
+        </form:select>
+        <label>${commodityType}名称:</label>
+        <form:input path="name" htmlEscape="false" class="input-medium" maxlength="20"/>
+        &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;"></th>
+        <th>ID</th>
+        <th>${commodityType}名称</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='${fns:toJson(item)}'/>
+                </th>
+                <td>${item.id}</td>
+                <td>${item.name}</td>
+                <td>
+                    <input class="input-small sort-input" name="" value="1">
+                </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>
+<script type="text/javascript">
+    $(document).ready(function () {
+        //弹出框去滚动条
+        top.$('#jbox-content').css("overflow-y", "hidden");
+        show_title(30);
+    });
+
+
+    function page(n, s) {
+        $("#pageNo").val(n);
+        $("#pageSize").val(s);
+        $("#searchForm").submit();
+        return false;
+    }
+
+    function getCheckedItems() {
+        var items = [];
+        $('.check-item:checked').each(function(){
+            var sort = $(this).parents(".itemtr").find(".sort-input").val();
+            console.log("sort:" + sort);
+            var product = JSON.parse($(this).val());
+            var item = {
+                "recommendProductId": product.id,
+                "recommendProductName": product.name,
+                "sort": sort
+            };
+            items.push(item);
+        });
+        return items;
+    }
+
+    function clickAllSelect(ckb) {
+        var isChecked = ckb.checked;
+        $(".check-item").attr('checked', isChecked);
+    }
+
+    /**
+     * @param obj
+     * jquery控制input只能输入数字
+     */
+    function onlynum(obj) {
+        obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+    }
+</script>
+</body>
+</html>
+

+ 386 - 0
src/main/webapp/WEB-INF/views/modules/baikePage/auditBaikeProductPage.jsp

@@ -16,6 +16,10 @@
 		.paramRow {
 		.paramRow {
 			margin-top: 10px;
 			margin-top: 10px;
 		}
 		}
+
+		.red {
+			color: red;
+		}
 	</style>
 	</style>
 	<style>
 	<style>
 		.clearfix::after{
 		.clearfix::after{
@@ -151,6 +155,111 @@
 		.select2-choice{
 		.select2-choice{
 			width: 200px
 			width: 200px
 		}
 		}
+
+		.upload {
+			position: relative;
+			display: inline-block;
+			background: #D0EEFF;
+			border: 1px solid #99D3F5;
+			border-radius: 4px;
+			padding: 4px 12px;
+			color: #1E88C7;
+			text-decoration: none;
+			text-indent: 0;
+			line-height: 20px;
+			margin-left: 20px;
+			cursor: pointer;
+			width: 52px;
+			height: 20px;
+		}
+
+		.upload input {
+			position: absolute;
+			width: 170px;
+			font-size: 20px;
+			right: 0;
+			top: 0;
+			opacity: 0;
+			cursor: pointer;
+		}
+
+		.upload:hover {
+			background: #AADFFD;
+			border-color: #78C3F3;
+			color: #004974;
+			text-decoration: none;
+		}
+
+		.add-submit {
+			position: relative;
+			display: inline;
+			background: #D0EEFF;
+			border: 1px solid #99D3F5;
+			border-radius: 4px;
+			padding: 4px 12px;
+			color: #1E88C7;
+			text-decoration: none;
+			text-indent: 0;
+			line-height: 20px;
+			margin-left: 20px;
+			cursor: pointer;
+			width: 52px;
+			height: 30px;
+		}
+
+		.add-submit input {
+			position: absolute;
+			width: 50px;
+			font-size: 20px;
+			right: 0;
+			top: 0;
+			opacity: 0;
+			cursor: pointer;
+		}
+
+		.add-submit:hover {
+			background: #AADFFD;
+			border-color: #78C3F3;
+			color: #004974;
+			text-decoration: none;
+		}
+
+		.upload-loading{
+			display: none;
+			width: 32px;
+			height: 32px;
+			margin-left: 10px;
+		}
+		.upload-loading img{
+			width: 16px;
+			height: 16px;
+			margin: 0 auto 0;
+		}
+
+		#file-list-display {
+			width: 600px;
+			height: auto;
+			float: left;
+			margin-left: 20px;
+		}
+
+		#file-list-display p {
+			line-height: 30px;
+			font-size: 14px;
+			color: #333333;
+			margin: 0;
+		}
+
+		#file-list-display p .del {
+			color: #2fa4e7;
+			font-size: 12px;
+			cursor: pointer;
+			margin-left: 20px;
+		}
+
+		.Main-content{
+			height: 100px;
+		}
 	</style>
 	</style>
 	<script type="text/javascript">
 	<script type="text/javascript">
 		$(document).ready(function() {
 		$(document).ready(function() {
@@ -180,6 +289,7 @@
 	</ul><br/>
 	</ul><br/>
 	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save?auditFlag=1" method="post" class="form-horizontal">
 	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save?auditFlag=1" method="post" class="form-horizontal">
 		<form:hidden path="id"/>
 		<form:hidden path="id"/>
+		<form:hidden path="fileIds"/>
 		<form:hidden path="commodityType"/>
 		<form:hidden path="commodityType"/>
 		<form:hidden path="shopId"/>
 		<form:hidden path="shopId"/>
 		<sys:message content="${message}"/>
 		<sys:message content="${message}"/>
@@ -190,24 +300,28 @@
 			<label class="control-label">${commodityType}名称:</label>
 			<label class="control-label">${commodityType}名称:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="name" htmlEscape="false" class="input-xlarge "/>
 				<form:input path="name" htmlEscape="false" class="input-xlarge "/>
+				<label id="nameSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">${commodityType}别名:</label>
 			<label class="control-label">${commodityType}别名:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="alias" htmlEscape="false" class="input-xlarge " placeholder="输入英文名或者其他名称"/>
 				<form:input path="alias" htmlEscape="false" class="input-xlarge " placeholder="输入英文名或者其他名称"/>
+				<label id="aliasSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">${commodityType}概述:</label>
 			<label class="control-label">${commodityType}概述:</label>
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
                 <textarea type="text" id="discription" name="discription" style="position: relative;height: 100px; width: 450px;"  >${cmBaikeProduct.discription}</textarea>
                 <textarea type="text" id="discription" name="discription" style="position: relative;height: 100px; width: 450px;"  >${cmBaikeProduct.discription}</textarea>
+				<label id="discriptionSensitiveWords" class="red"></label>
             </div>
             </div>
 		</div>
 		</div>
 		<div class="control-group" style="position: relative">
 		<div class="control-group" style="position: relative">
 			<label class="control-label">${commodityType}链接:</label>
 			<label class="control-label">${commodityType}链接:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="productLink" htmlEscape="false" class="input-xxlarge " placeholder="输入采美商城的相关商品详情链接,便于用户精准找到"/>
 				<form:input path="productLink" htmlEscape="false" class="input-xxlarge " placeholder="输入采美商城的相关商品详情链接,便于用户精准找到"/>
+				<label id="productLinkSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -224,6 +338,42 @@
                 </div>
                 </div>
             </div>
             </div>
 		</div>
 		</div>
+		<div class="control-group">
+			<div class="control-group">
+				<label class="control-label keyClass">相关视频(各视频大小不超过50M,最多上传6个)</label>
+			</div>
+			<div class="control-group">
+				<label class="control-label">标题:</label>
+				<div class="controls">
+					<input id="fileTitle" style="width: 457px" htmlEscape="false" >
+				</div>
+				<label class="control-label" style="margin-top:10px">视频路径:</label>
+				<div class="controls" style="margin-top:10px">
+					<input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true" class="input-xlarge required" />
+					<div class="upload">
+						<input type="file" name="file" id="productFile" accept=".mp4" >选择文件
+					</div>
+					<div class="add-submit">
+						<input id="addSubmit" type="button" value="上传"/>上传&nbsp;
+					</div>
+					<div class="upload-loading">
+						<img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
+					</div>
+				</div>
+			</div>
+			<div class="control-group">
+				<div id='file-list-display' style="margin-left:180px">
+					<c:if test="${not empty cmBaikeProduct.videoList}">
+						<c:forEach items="${cmBaikeProduct.videoList}" var="videoFile" varStatus="statusIndex">
+							<p>${videoFile.fileTitle}
+								<span class="del"><a onclick="previewVideo('${videoFile.ossUrl}')">预览</a></span>
+								<span class="del" onclick="dataDelete(this,'${videoFile.id}')">删除</span>
+							</p>
+						</c:forEach>
+					</c:if>
+				</div>
+			</div>
+		</div>
         <div style="${cmBaikeProduct.commodityType eq 2?'':'display:none'}" >
         <div style="${cmBaikeProduct.commodityType eq 2?'':'display:none'}" >
             <div class="control-group">
             <div class="control-group">
                 <label class="control-label titleClass">正品识别</label>
                 <label class="control-label titleClass">正品识别</label>
@@ -232,6 +382,7 @@
                 <label class="control-label">认证链接:</label>
                 <label class="control-label">认证链接:</label>
                 <div class="controls">
                 <div class="controls">
                     <form:input path="authLink" htmlEscape="false" class="input-xxlarge " cssStyle="position: relative"/>
                     <form:input path="authLink" htmlEscape="false" class="input-xxlarge " cssStyle="position: relative"/>
+					<label id="authLinkSensitiveWords" class="red"></label>
                 </div>
                 </div>
             </div>
             </div>
 			<div class="control-group">
 			<div class="control-group">
@@ -255,42 +406,54 @@
 			<div class="controls paramRow" id="paramRow0">
 			<div class="controls paramRow" id="paramRow0">
 				<input name="paramList[0].name" htmlEscape="false" class="input-small "
 				<input name="paramList[0].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:型号">
 					   placeholder="例如:型号">
+				<label id="param0SensitiveWords" class="red"></label>
 				<input name="paramList[0].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[0].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+				<label id="content0SensitiveWords" class="red"></label>
 			</div>
 			</div>
 			<div class="controls paramRow" id="paramRow1">
 			<div class="controls paramRow" id="paramRow1">
 				<input name="paramList[1].name" htmlEscape="false" class="input-small "
 				<input name="paramList[1].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:性质类型">
 					   placeholder="例如:性质类型">
+				<label id="param1SensitiveWords" class="red"></label>
 				<input name="paramList[1].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[1].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+				<label id="content1SensitiveWords" class="red"></label>
 				<a onclick="deleteParam(1)" style="cursor: pointer">删除</a>
 				<a onclick="deleteParam(1)" style="cursor: pointer">删除</a>
 			</div>
 			</div>
 			<div class="controls paramRow" id="paramRow2">
 			<div class="controls paramRow" id="paramRow2">
 				<input name="paramList[2].name" htmlEscape="false" class="input-small "
 				<input name="paramList[2].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:成分">
 					   placeholder="例如:成分">
+				<label id="param2SensitiveWords" class="red"></label>
 				<input name="paramList[2].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[2].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+				<label id="content2SensitiveWords" class="red"></label>
 				<a onclick="deleteParam(2)" style="cursor: pointer">删除</a>
 				<a onclick="deleteParam(2)" style="cursor: pointer">删除</a>
 			</div>
 			</div>
 			<div class="controls paramRow" id="paramRow3">
 			<div class="controls paramRow" id="paramRow3">
 				<input name="paramList[3].name" htmlEscape="false" class="input-small "
 				<input name="paramList[3].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:规格">
 					   placeholder="例如:规格">
+				<label id="param3SensitiveWords" class="red"></label>
 				<input name="paramList[3].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[3].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+				<label id="content3SensitiveWords" class="red"></label>
 				<a onclick="deleteParam(3)" style="cursor: pointer">删除</a>
 				<a onclick="deleteParam(3)" style="cursor: pointer">删除</a>
 			</div>
 			</div>
 			<div class="controls paramRow" id="paramRow4">
 			<div class="controls paramRow" id="paramRow4">
 				<input name="paramList[4].name" htmlEscape="false" class="input-small "
 				<input name="paramList[4].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:性质类型">
 					   placeholder="例如:性质类型">
+				<label id="param4SensitiveWords" class="red"></label>
 				<input name="paramList[4].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[4].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+				<label id="content4SensitiveWords" class="red"></label>
 				<a onclick="deleteParam(4)" style="cursor: pointer">删除</a>
 				<a onclick="deleteParam(4)" style="cursor: pointer">删除</a>
 			</div>
 			</div>
 			<div class="controls paramRow" id="paramRow5">
 			<div class="controls paramRow" id="paramRow5">
 				<input name="paramList[5].name" htmlEscape="false" class="input-small "
 				<input name="paramList[5].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:性质类型">
 					   placeholder="例如:性质类型">
+				<label id="param5SensitiveWords" class="red"></label>
 				<input name="paramList[5].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[5].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+				<label id="content5SensitiveWords" class="red"></label>
 				<a onclick="deleteParam(5)" style="cursor: pointer">删除</a>
 				<a onclick="deleteParam(5)" style="cursor: pointer">删除</a>
 			</div>
 			</div>
 		</div>
 		</div>
@@ -299,6 +462,7 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="advantage" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="advantage" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="advantageEditor" class="contentEditor">${cmBaikeProduct.advantage}</div>
 				<div id="advantageEditor" class="contentEditor">${cmBaikeProduct.advantage}</div>
+				<label id="advantageSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -306,6 +470,7 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="disadvantage" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="disadvantage" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="disadvantageEditor" class="contentEditor">${cmBaikeProduct.disadvantage}</div>
 				<div id="disadvantageEditor" class="contentEditor">${cmBaikeProduct.disadvantage}</div>
+				<label id="disadvantageSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -313,12 +478,14 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="principle" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="principle" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="principleEditor" class="contentEditor">${cmBaikeProduct.principle}</div>
 				<div id="principleEditor" class="contentEditor">${cmBaikeProduct.principle}</div>
+				<label id="principleSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">SEO关键词:</label>
 			<label class="control-label">SEO关键词:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="seoKeyword" htmlEscape="false" style="position: relative" class="input-xlarge"/>
 				<form:input path="seoKeyword" htmlEscape="false" style="position: relative" class="input-xlarge"/>
+				<label id="seoKeywordSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -328,12 +495,14 @@
 			<label class="control-label">品牌:</label>
 			<label class="control-label">品牌:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="brand" htmlEscape="false" class="input-xlarge "/>
 				<form:input path="brand" htmlEscape="false" class="input-xlarge "/>
+				<label id="brandSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">产地:</label>
 			<label class="control-label">产地:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="producePlace" htmlEscape="false" class="input-xlarge "/>
 				<form:input path="producePlace" htmlEscape="false" class="input-xlarge "/>
+				<label id="producePlaceSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -348,6 +517,7 @@
 			<label class="control-label">供应商:</label>
 			<label class="control-label">供应商:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="company" htmlEscape="false" class="input-xlarge "/>
 				<form:input path="company" htmlEscape="false" class="input-xlarge "/>
+				<label id="companySensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group" style="position: relative">
 		<div class="control-group" style="position: relative">
@@ -393,6 +563,7 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="adaptiveMan" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="adaptiveMan" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="adaptiveManEditor" class="contentEditor">${cmBaikeProduct.adaptiveMan}</div>
 				<div id="adaptiveManEditor" class="contentEditor">${cmBaikeProduct.adaptiveMan}</div>
+				<label id="adaptiveManSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -400,6 +571,7 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="unAdaptiveMan" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="unAdaptiveMan" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="unAdaptiveManEditor" class="contentEditor">${cmBaikeProduct.unAdaptiveMan}</div>
 				<div id="unAdaptiveManEditor" class="contentEditor">${cmBaikeProduct.unAdaptiveMan}</div>
+				<label id="unAdaptiveManSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -407,6 +579,7 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="aroundOperation" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="aroundOperation" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="aroundOperationEditor" class="contentEditor">${cmBaikeProduct.aroundOperation}</div>
 				<div id="aroundOperationEditor" class="contentEditor">${cmBaikeProduct.aroundOperation}</div>
+				<label id="aroundOperationSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group" style="width: 1000px">
 		<div class="control-group" style="width: 1000px">
@@ -448,18 +621,21 @@
                 <label class="control-label">问题1:</label>
                 <label class="control-label">问题1:</label>
                 <div class="controls">
                 <div class="controls">
                     <input name="questionList[0].question" style="width: 550px" htmlEscape="false" class="input-xlarge ">
                     <input name="questionList[0].question" style="width: 550px" htmlEscape="false" class="input-xlarge ">
+					<label id="question0SensitiveWords" class="red"></label>
                 </div>
                 </div>
             </div>
             </div>
             <div class="control-group" id="answerRow0">
             <div class="control-group" id="answerRow0">
                 <label class="control-label">答:</label>
                 <label class="control-label">答:</label>
                 <div class="controls">
                 <div class="controls">
                     <input name="questionList[0].answer" style="width: 550px" htmlEscape="false" class="input-xlarge ">
                     <input name="questionList[0].answer" style="width: 550px" htmlEscape="false" class="input-xlarge ">
+					<label id="answer0SensitiveWords" class="red"></label>
                 </div>
                 </div>
             </div>
             </div>
             <div class="control-group" id="questionRow1">
             <div class="control-group" id="questionRow1">
                 <label class="control-label">问题2:</label>
                 <label class="control-label">问题2:</label>
                 <div class="controls">
                 <div class="controls">
                     <input name="questionList[1].question" style="width: 550px" htmlEscape="false" class="input-xlarge  questionInput">
                     <input name="questionList[1].question" style="width: 550px" htmlEscape="false" class="input-xlarge  questionInput">
+					<label id="question1SensitiveWords" class="red"></label>
                     <a id="questionDelBtn1" onclick="deleteQuestion(1)" style="cursor: pointer">删除</a>
                     <a id="questionDelBtn1" onclick="deleteQuestion(1)" style="cursor: pointer">删除</a>
                 </div>
                 </div>
             </div>
             </div>
@@ -467,6 +643,7 @@
                 <label class="control-label">答:</label>
                 <label class="control-label">答:</label>
                 <div class="controls">
                 <div class="controls">
                     <input name="questionList[1].answer" style="width: 550px" htmlEscape="false" class="input-xlarge  questionInput">
                     <input name="questionList[1].answer" style="width: 550px" htmlEscape="false" class="input-xlarge  questionInput">
+					<label id="answer1SensitiveWords" class="red"></label>
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
@@ -528,6 +705,7 @@
 
 
 <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
 <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
 <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
 <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
+<script type="text/javascript" src="${ctxStatic}/sensitiveWords/mint-filter.umd.js"></script>
 <script>
 <script>
 	var paramIndex = 6;
 	var paramIndex = 6;
 	var questionIndex = 2;
 	var questionIndex = 2;
@@ -713,6 +891,184 @@
 			$('input[name="' + questionInput + '"]').val(questionArray[i]);
 			$('input[name="' + questionInput + '"]').val(questionArray[i]);
 			$('input[name="' + answerInput + '"]').val(answerArray[i]);
 			$('input[name="' + answerInput + '"]').val(answerArray[i]);
 		}
 		}
+
+		var fileIds = $("#fileIds").val();
+		//点击上传按钮后上传文件
+		$('#addSubmit').click(function () {
+			var fileIdArr = fileIds.split(',');
+			if (fileIdArr.length >= 7) {
+				alertx('最多上传6个视频');
+				return;
+			}
+			var filesById = document.getElementById('productFile');
+			var files = $('#productFile');
+			var fileList = files.prop('files');
+			var fileTitle = $('#fileTitle').val();
+			var fileName = $('#uploadFileName').val();
+			if (fileTitle == '') {
+				alertx('请输入视频标题')
+				return;
+			}
+			if (files === '' || files.length == 0 || fileName == '') {
+				alertx('请选择上传文件');
+				return;
+			}
+			$("#fileTitle").val("");
+			$("#uploadFileName").val("");
+			var data = new FormData();
+			var productId = $("#id").val();
+			data.append('file', fileList[0]);
+			data.append('fileTitle', fileTitle);
+			data.append('fileName', fileName);
+			data.append('productId', productId);
+			data.append('fileIds', fileIds);
+			$('.upload-loading').css("display", "inline");
+			$.ajax({
+				url: "${ctx}/baike/cmBaikeProduct/upload",
+				data: data,
+				type: "POST",
+				processData: false,
+				contentType: false,
+				dataType: "json",
+				success: function (res) {
+					if (res.success) {
+						filesById.value = '';
+						renderFileList(res.productFile);
+						$('.upload-loading').hide();
+					} else {
+						$.jBox.tip(res.msg, 'error');
+						$("#uploadFileName").val(fileName);
+						$('.upload-loading').hide();
+					}
+
+				},
+				error: function (json) {
+
+				}
+			});
+		})
+
+		var fileList = [];
+		var files = document.getElementById("productFile"), renderFileList;
+		//选择上传文件后显示文件名称
+		files.addEventListener("change", function (event) {
+			var name = event.target.files[0].name;
+			console.log(name)
+			$('#uploadFileName').val(name);
+		});
+		var fileListDisplay = document.getElementById('file-list-display');
+		renderFileList = function (data) {
+			fileIds += data.id + ',';
+			console.log(fileIds);
+			$('#fileIds').val(fileIds);
+			fileList.push({fileTitle: data.fileTitle, id: data.id, ossUrl: data.ossUrl});
+			fileList.forEach(function (file, index) {
+				var fileDisplayEl = document.createElement("p");
+				var deleteFile = document.createElement("span");
+				var viewFile = document.createElement("span");
+				var viewFileUrl = document.createElement("a");
+				//预览链接
+				viewFileUrl.innerHTML = '预览';
+				viewFileUrl.setAttribute("onclick", "previewVideo('" + file.ossUrl + "')");
+				viewFileUrl.setAttribute("target", "_blank");
+				//预览按钮
+				viewFile.className = 'viewFile';
+				console.log(viewFile);
+				viewFile.setAttribute("class","del");
+				viewFile.appendChild(viewFileUrl);
+				//删除按钮
+				deleteFile.innerHTML = '删除';
+				deleteFile.className = 'deleteFile';
+				console.log(deleteFile);
+				deleteFile.setAttribute("class","del");
+				deleteFile.setAttribute("onclick", "dataDelete(this, " + file.id + ")");
+
+				fileDisplayEl.setAttribute("id", file.id);
+				fileDisplayEl.innerHTML = file.fileTitle;
+				fileDisplayEl.appendChild(viewFile);
+				fileDisplayEl.appendChild(deleteFile);
+				fileListDisplay.appendChild(fileDisplayEl);
+			});
+			fileList.splice(0, fileList.length);
+		};
+
+		var commodityType = $("#commodityType").val();
+		var name = $("#name").val();
+		var alias = $("#alias").val();
+		var discription = $("#discription").val();
+		var productLink = $("#productLink").val();
+		var authLink = $("#authLink").val();
+		var advantage = $("#advantage").val();
+		var disadvantage = $("#disadvantage").val();
+		var principle = $("#principle").val();
+		var seoKeyword = $("#seoKeyword").val();
+		var brand = $("#brand").val();
+		var producePlace = $("#producePlace").val();
+		var company = $("#company").val();
+		var adaptiveMan = $("#adaptiveMan").val();
+		var unAdaptiveMan = $("#unAdaptiveMan").val();
+		var aroundOperation = $("#aroundOperation").val();
+		// 检测敏感词
+		var propertyMap = new Map();
+		propertyMap.set("name", name);
+		propertyMap.set("alias", alias);
+		propertyMap.set("discription", discription);
+		propertyMap.set("productLink", productLink);
+		for (var i = 0; i <= 20; i++) {
+			var paramName = "\"paramList[" + i + "].name\"";
+			var contentName = "\"paramList[" + i + "].content\"";
+			var param = $('input[name=' + paramName + ']').val();
+			var content = $('input[name=' + contentName + ']').val();
+			if ( param === undefined || param === '') {
+				break;
+			} else {
+				propertyMap.set("param" + i, param);
+				propertyMap.set("content" + i, content);
+			}
+		}
+		propertyMap.set("advantage", advantage);
+		propertyMap.set("disadvantage", disadvantage);
+		propertyMap.set("principle", principle);
+		propertyMap.set("seoKeyword", seoKeyword);
+		propertyMap.set("brand", brand);
+		propertyMap.set("producePlace", producePlace);
+		propertyMap.set("company", company);
+		propertyMap.set("adaptiveMan", adaptiveMan);
+		propertyMap.set("unAdaptiveMan", unAdaptiveMan);
+		propertyMap.set("aroundOperation", aroundOperation);
+		if (2 == commodityType) {
+			propertyMap.set("authLink", authLink);
+		}
+		for (var i = 0; i <= 20; i++) {
+			var questionName = "\"questionList[" + i + "].question\"";
+			var answerName = "\"questionList[" + i + "].answer\"";
+			var question = $('input[name=' + questionName + ']').val();
+			var answer = $('input[name=' + answerName + ']').val();
+			if (question === undefined || question === '') {
+				break;
+			} else {
+				propertyMap.set("question" + i, question);
+				propertyMap.set("answer" + i, answer);
+			}
+		}
+		var sensitiveWords = '${sensitiveWords}';
+		const mint = new MintFilter(sensitiveWords.split('|'));
+		var filterSync = '';
+		var touchWords = '';
+		var touchNum = 0;
+		propertyMap.forEach(function (value,key,map) {
+			filterSync = mint.filterSync(value);
+			filterSync.words.forEach(word=>{
+				touchWords += touchWords === '' ? word : "," + word;
+			})
+			if (touchWords !== '') {
+				// 增加敏感词触发数量
+				touchNum++;
+				// 设置敏感词提示
+				$("#" + key + "SensitiveWords").text("敏感词:" + touchWords);
+				touchWords = '';
+			}
+		});
 	})
 	})
 
 
 	//删除参数
 	//删除参数
@@ -847,6 +1203,36 @@
 	function onlynum(obj) {
 	function onlynum(obj) {
 		obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
 		obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
 	}
 	}
+
+	//删除文件
+	function dataDelete(that, id) {
+		console.log($(that).text());
+		$(that).parent().remove();
+		var fileIds = $("#fileIds").val();
+		if (fileIds.indexOf(id)) {
+			fileIds = fileIds.replace(id + ',', '');
+			$("#fileIds").val(fileIds);
+		}
+		$.ajax({
+			url: "${ctx}/baike/cmBaikeProduct/deleteFile",
+			data: {"fileId": id},
+			async: false,
+			type: "POST"
+		});
+	}
+
+	function previewVideo(url) {
+		var url = "${ctx}/archive/cmProductArchiveContent/preview?url=" + encodeURIComponent(url);
+		var title = "视频播放";
+		top.$.jBox("iframe:" + url, {
+			iframeScrolling: 'yes',
+			width: 1000,
+			height: 750,
+			persistent: true,
+			title: title,
+			buttons: {"关闭": '-1'}
+		});
+	}
 </script>
 </script>
 </body>
 </body>
 </html>
 </html>

+ 397 - 4
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.jsp

@@ -151,16 +151,126 @@
 		.select2-choice{
 		.select2-choice{
 			width: 200px
 			width: 200px
 		}
 		}
+
+		.red {
+			color: red;
+		}
+
+
+
+		.upload {
+			position: relative;
+			display: inline-block;
+			background: #D0EEFF;
+			border: 1px solid #99D3F5;
+			border-radius: 4px;
+			padding: 4px 12px;
+			color: #1E88C7;
+			text-decoration: none;
+			text-indent: 0;
+			line-height: 20px;
+			margin-left: 20px;
+			cursor: pointer;
+			width: 52px;
+			height: 20px;
+		}
+
+		.upload input {
+			position: absolute;
+			width: 170px;
+			font-size: 20px;
+			right: 0;
+			top: 0;
+			opacity: 0;
+			cursor: pointer;
+		}
+
+		.upload:hover {
+			background: #AADFFD;
+			border-color: #78C3F3;
+			color: #004974;
+			text-decoration: none;
+		}
+
+		.add-submit {
+			position: relative;
+			display: inline;
+			background: #D0EEFF;
+			border: 1px solid #99D3F5;
+			border-radius: 4px;
+			padding: 4px 12px;
+			color: #1E88C7;
+			text-decoration: none;
+			text-indent: 0;
+			line-height: 20px;
+			margin-left: 20px;
+			cursor: pointer;
+			width: 52px;
+			height: 30px;
+		}
+
+		.add-submit input {
+			position: absolute;
+			width: 50px;
+			font-size: 20px;
+			right: 0;
+			top: 0;
+			opacity: 0;
+			cursor: pointer;
+		}
+
+		.add-submit:hover {
+			background: #AADFFD;
+			border-color: #78C3F3;
+			color: #004974;
+			text-decoration: none;
+		}
+
+		.upload-loading{
+			 display: none;
+			 width: 32px;
+			 height: 32px;
+			 margin-left: 10px;
+		 }
+		.upload-loading img{
+			width: 16px;
+			height: 16px;
+			margin: 0 auto 0;
+		}
+
+		#file-list-display {
+			 width: 600px;
+			 height: auto;
+			 float: left;
+			 margin-left: 20px;
+		 }
+
+		#file-list-display p {
+			line-height: 30px;
+			font-size: 14px;
+			color: #333333;
+			margin: 0;
+		}
+
+		#file-list-display p .del {
+			color: #2fa4e7;
+			font-size: 12px;
+			cursor: pointer;
+			margin-left: 20px;
+		}
+
+		.Main-content{
+			height: 100px;
+		}
 	</style>
 	</style>
 	<script type="text/javascript">
 	<script type="text/javascript">
 		$(document).ready(function() {
 		$(document).ready(function() {
 			//$("#name").focus();
 			//$("#name").focus();
 			$("#inputForm").validate({
 			$("#inputForm").validate({
 				submitHandler: function(form){
 				submitHandler: function(form){
-					var status = $("#status").val();
+					var status = $("input[name='status']:checked").val();
 					var commodityType = $("#commodityType").val();
 					var commodityType = $("#commodityType").val();
 					// 计算空数据条数
 					// 计算空数据条数
-
 					var propertyArr = [];
 					var propertyArr = [];
 					var name = $("#name").val();
 					var name = $("#name").val();
 					var alias = $("#alias").val();
 					var alias = $("#alias").val();
@@ -226,12 +336,87 @@
 						}
 						}
 					}
 					}
 					$("#emptyNum").val(emptyNum);
 					$("#emptyNum").val(emptyNum);
+
+					// 检测敏感词
+					var propertyMap = new Map();
+					propertyMap.set("name", name);
+					propertyMap.set("alias", alias);
+					propertyMap.set("discription", discription);
+					propertyMap.set("productLink", productLink);
+					for (var i = 0; i <= 20; i++) {
+						var paramName = "\"paramList[" + i + "].name\"";
+						var contentName = "\"paramList[" + i + "].content\"";
+						var param = $('input[name=' + paramName + ']').val();
+						var content = $('input[name=' + contentName + ']').val();
+						if ( param === undefined || param === '') {
+							break;
+						} else {
+							propertyMap.set("param" + i, param);
+							propertyMap.set("content" + i, content);
+						}
+					}
+					propertyMap.set("advantage", advantage);
+					propertyMap.set("disadvantage", disadvantage);
+					propertyMap.set("principle", principle);
+					propertyMap.set("seoKeyword", seoKeyword);
+					propertyMap.set("brand", brand);
+					propertyMap.set("producePlace", producePlace);
+					propertyMap.set("company", company);
+					propertyMap.set("adaptiveMan", adaptiveMan);
+					propertyMap.set("unAdaptiveMan", unAdaptiveMan);
+					propertyMap.set("aroundOperation", aroundOperation);
+                    if (2 == commodityType) {
+                        propertyMap.set("authLink", authLink);
+                    }
+					for (var i = 0; i <= 20; i++) {
+						var questionName = "\"questionList[" + i + "].question\"";
+						var answerName = "\"questionList[" + i + "].answer\"";
+						var question = $('input[name=' + questionName + ']').val();
+						var answer = $('input[name=' + answerName + ']').val();
+						if (question === undefined || question === '') {
+							break;
+						} else {
+							propertyMap.set("question" + i, question);
+							propertyMap.set("answer" + i, answer);
+						}
+					}
+					var sensitiveWords = '${sensitiveWords}';
+					const mint = new MintFilter(sensitiveWords.split('|'));
+					var filterSync = '';
+					var touchWords = '';
+					var touchNum = 0;
+					propertyMap.forEach(function (value,key,map) {
+						filterSync = mint.filterSync(value);
+						filterSync.words.forEach(word=>{
+							touchWords += touchWords === '' ? word : "," + word;
+						})
+						if (touchWords !== '') {
+							// 增加敏感词触发数量
+							touchNum++;
+							// 设置敏感词提示
+							$("#" + key + "SensitiveWords").text("敏感词:" + touchWords);
+							touchWords = '';
+						}
+					});
 					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') {
-								loading('正在提交,请稍等...');
-								form.submit();
+								if (touchNum > 0) {
+									var msg = 1 == status?"当前发布内容存在敏感词,已为您标记在输入框下方," +
+											"请修改后,再进行保存发布,强行保存发布将会导致审核不通过!":
+											"当前内容存在敏感词,已为您标记在输入框下方,建议修改后再进行保存!否则," +
+											"将会影响发布时审核不通过!";
+									top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+										if (v == 'ok') {
+                                            loading('正在提交,请稍等...');
+                                            form.submit();
+										}
+									}, {buttonsFocus: 1, persistent: true});
+								} else{
+                                    loading('正在提交,请稍等...');
+                                    form.submit();
+                                }
 							}
 							}
 						}, {buttonsFocus: 1, persistent: true});
 						}, {buttonsFocus: 1, persistent: true});
 					} else {
 					} else {
@@ -259,6 +444,7 @@
 	</ul><br/>
 	</ul><br/>
 	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" method="post" class="form-horizontal">
 	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" method="post" class="form-horizontal">
 		<form:hidden path="id"/>
 		<form:hidden path="id"/>
+		<form:hidden path="fileIds"/>
 		<form:hidden path="commodityType"/>
 		<form:hidden path="commodityType"/>
 		<form:hidden path="emptyNum"/>
 		<form:hidden path="emptyNum"/>
 		<sys:message content="${message}"/>
 		<sys:message content="${message}"/>
@@ -269,18 +455,21 @@
 			<label class="control-label">${commodityType}名称:</label>
 			<label class="control-label">${commodityType}名称:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="name" htmlEscape="false" class="input-xlarge "/>
 				<form:input path="name" htmlEscape="false" class="input-xlarge "/>
+				<label id="nameSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">${commodityType}别名:</label>
 			<label class="control-label">${commodityType}别名:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="alias" htmlEscape="false" class="input-xlarge " placeholder="输入英文名或者其他名称"/>
 				<form:input path="alias" htmlEscape="false" class="input-xlarge " placeholder="输入英文名或者其他名称"/>
+				<label id="aliasSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">${commodityType}概述:</label>
 			<label class="control-label">${commodityType}概述:</label>
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
                 <textarea type="text" id="discription" name="discription" style="position: relative;height: 100px; width: 450px;"  >${cmBaikeProduct.discription}</textarea>
                 <textarea type="text" id="discription" name="discription" style="position: relative;height: 100px; width: 450px;"  >${cmBaikeProduct.discription}</textarea>
+                <label id="discriptionSensitiveWords" class="red"></label>
             </div>
             </div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -296,6 +485,7 @@
 			<label class="control-label">${commodityType}链接:</label>
 			<label class="control-label">${commodityType}链接:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="productLink" htmlEscape="false" class="input-xxlarge " placeholder="输入采美商城的相关商品详情链接,便于用户精准找到"/>
 				<form:input path="productLink" htmlEscape="false" class="input-xxlarge " placeholder="输入采美商城的相关商品详情链接,便于用户精准找到"/>
+                <label id="productLinkSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -312,6 +502,43 @@
                 </div>
                 </div>
             </div>
             </div>
 		</div>
 		</div>
+		<div class="control-group">
+			<div class="control-group">
+				<label class="control-label keyClass">相关视频(各视频大小不超过50M,最多上传6个)</label>
+			</div>
+			<div class="control-group">
+				<label class="control-label">标题:</label>
+				<div class="controls">
+					<input id="fileTitle" style="width: 457px" htmlEscape="false" >
+				</div>
+				<label class="control-label" style="margin-top:10px">视频路径:</label>
+				<div class="controls" style="margin-top:10px">
+					<input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true" class="input-xlarge required" />
+					<div class="upload">
+						<input type="file" name="file" id="productFile" accept=".mp4" >选择文件
+					</div>
+					<div class="add-submit">
+						<input id="addSubmit" type="button" value="上传"/>上传&nbsp;
+					</div>
+					<div class="upload-loading">
+						<img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
+					</div>
+				</div>
+			</div>
+			<div class="control-group">
+				<div id='file-list-display' style="margin-left:180px">
+					<c:if test="${not empty cmBaikeProduct.videoList}">
+						<c:forEach items="${cmBaikeProduct.videoList}" var="videoFile" varStatus="statusIndex">
+							<p>${videoFile.fileTitle}
+								<span class="del"><a onclick="previewVideo('${videoFile.ossUrl}')">预览</a></span>
+								<span class="del" onclick="dataDelete(this,'${videoFile.id}')">删除</span>
+							</p>
+						</c:forEach>
+					</c:if>
+				</div>
+			</div>
+		</div>
+
         <div style="${cmBaikeProduct.commodityType eq 2?'':'display:none'}" >
         <div style="${cmBaikeProduct.commodityType eq 2?'':'display:none'}" >
             <div class="control-group">
             <div class="control-group">
                 <label class="control-label titleClass">正品识别</label>
                 <label class="control-label titleClass">正品识别</label>
@@ -320,6 +547,7 @@
                 <label class="control-label">认证链接:</label>
                 <label class="control-label">认证链接:</label>
                 <div class="controls">
                 <div class="controls">
                     <form:input path="authLink" htmlEscape="false" class="input-xxlarge " cssStyle="position: relative"/>
                     <form:input path="authLink" htmlEscape="false" class="input-xxlarge " cssStyle="position: relative"/>
+                    <label id="authLinkSensitiveWords" class="red"></label>
                 </div>
                 </div>
             </div>
             </div>
 			<div class="control-group">
 			<div class="control-group">
@@ -343,42 +571,54 @@
 			<div class="controls paramRow" id="paramRow0">
 			<div class="controls paramRow" id="paramRow0">
 				<input name="paramList[0].name" htmlEscape="false" class="input-small "
 				<input name="paramList[0].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:型号">
 					   placeholder="例如:型号">
+                <label id="param0SensitiveWords" class="red"></label>
 				<input name="paramList[0].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[0].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+                <label id="content0SensitiveWords" class="red"></label>
 			</div>
 			</div>
 			<div class="controls paramRow" id="paramRow1">
 			<div class="controls paramRow" id="paramRow1">
 				<input name="paramList[1].name" htmlEscape="false" class="input-small "
 				<input name="paramList[1].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:性质类型">
 					   placeholder="例如:性质类型">
+                <label id="param1SensitiveWords" class="red"></label>
 				<input name="paramList[1].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[1].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+                <label id="content1SensitiveWords" class="red"></label>
 				<a onclick="deleteParam(1)" style="cursor: pointer">删除</a>
 				<a onclick="deleteParam(1)" style="cursor: pointer">删除</a>
 			</div>
 			</div>
 			<div class="controls paramRow" id="paramRow2">
 			<div class="controls paramRow" id="paramRow2">
 				<input name="paramList[2].name" htmlEscape="false" class="input-small "
 				<input name="paramList[2].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:成分">
 					   placeholder="例如:成分">
+                <label id="param2SensitiveWords" class="red"></label>
 				<input name="paramList[2].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[2].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+                <label id="content2SensitiveWords" class="red"></label>
 				<a onclick="deleteParam(2)" style="cursor: pointer">删除</a>
 				<a onclick="deleteParam(2)" style="cursor: pointer">删除</a>
 			</div>
 			</div>
 			<div class="controls paramRow" id="paramRow3">
 			<div class="controls paramRow" id="paramRow3">
 				<input name="paramList[3].name" htmlEscape="false" class="input-small "
 				<input name="paramList[3].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:规格">
 					   placeholder="例如:规格">
+                <label id="param3SensitiveWords" class="red"></label>
 				<input name="paramList[3].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[3].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+                <label id="content3SensitiveWords" class="red"></label>
 				<a onclick="deleteParam(3)" style="cursor: pointer">删除</a>
 				<a onclick="deleteParam(3)" style="cursor: pointer">删除</a>
 			</div>
 			</div>
 			<div class="controls paramRow" id="paramRow4">
 			<div class="controls paramRow" id="paramRow4">
 				<input name="paramList[4].name" htmlEscape="false" class="input-small "
 				<input name="paramList[4].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:性质类型">
 					   placeholder="例如:性质类型">
+                <label id="param4SensitiveWords" class="red"></label>
 				<input name="paramList[4].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[4].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+                <label id="content4SensitiveWords" class="red"></label>
 				<a onclick="deleteParam(4)" style="cursor: pointer">删除</a>
 				<a onclick="deleteParam(4)" style="cursor: pointer">删除</a>
 			</div>
 			</div>
 			<div class="controls paramRow" id="paramRow5">
 			<div class="controls paramRow" id="paramRow5">
 				<input name="paramList[5].name" htmlEscape="false" class="input-small "
 				<input name="paramList[5].name" htmlEscape="false" class="input-small "
 					   placeholder="例如:性质类型">
 					   placeholder="例如:性质类型">
+                <label id="param5SensitiveWords" class="red"></label>
 				<input name="paramList[5].content" htmlEscape="false" class="input-xlarge "
 				<input name="paramList[5].content" htmlEscape="false" class="input-xlarge "
 					   placeholder="输入参数信息">
 					   placeholder="输入参数信息">
+                <label id="content5SensitiveWords" class="red"></label>
 				<a onclick="deleteParam(5)" style="cursor: pointer">删除</a>
 				<a onclick="deleteParam(5)" style="cursor: pointer">删除</a>
 			</div>
 			</div>
 		</div>
 		</div>
@@ -387,6 +627,7 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="advantage" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="advantage" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="advantageEditor" class="contentEditor">${cmBaikeProduct.advantage}</div>
 				<div id="advantageEditor" class="contentEditor">${cmBaikeProduct.advantage}</div>
+                <label id="advantageSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -394,6 +635,7 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="disadvantage" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="disadvantage" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="disadvantageEditor" class="contentEditor">${cmBaikeProduct.disadvantage}</div>
 				<div id="disadvantageEditor" class="contentEditor">${cmBaikeProduct.disadvantage}</div>
+                <label id="disadvantageSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -401,12 +643,14 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="principle" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="principle" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="principleEditor" class="contentEditor">${cmBaikeProduct.principle}</div>
 				<div id="principleEditor" class="contentEditor">${cmBaikeProduct.principle}</div>
+                <label id="principleSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">SEO关键词:</label>
 			<label class="control-label">SEO关键词:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="seoKeyword" htmlEscape="false" style="position: relative" class="input-xlarge"/>
 				<form:input path="seoKeyword" htmlEscape="false" style="position: relative" class="input-xlarge"/>
+                <label id="seoKeywordSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -416,12 +660,14 @@
 			<label class="control-label">品牌:</label>
 			<label class="control-label">品牌:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="brand" htmlEscape="false" class="input-xlarge "/>
 				<form:input path="brand" htmlEscape="false" class="input-xlarge "/>
+                <label id="brandSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">产地:</label>
 			<label class="control-label">产地:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="producePlace" htmlEscape="false" class="input-xlarge "/>
 				<form:input path="producePlace" htmlEscape="false" class="input-xlarge "/>
+                <label id="producePlaceSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -436,6 +682,7 @@
 			<label class="control-label">供应商:</label>
 			<label class="control-label">供应商:</label>
 			<div class="controls">
 			<div class="controls">
 				<form:input path="company" htmlEscape="false" class="input-xlarge "/>
 				<form:input path="company" htmlEscape="false" class="input-xlarge "/>
+                <label id="companySensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group" style="position: relative">
 		<div class="control-group" style="position: relative">
@@ -481,6 +728,7 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="adaptiveMan" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="adaptiveMan" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="adaptiveManEditor" class="contentEditor">${cmBaikeProduct.adaptiveMan}</div>
 				<div id="adaptiveManEditor" class="contentEditor">${cmBaikeProduct.adaptiveMan}</div>
+                <label id="adaptiveManSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -488,6 +736,7 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="unAdaptiveMan" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="unAdaptiveMan" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="unAdaptiveManEditor" class="contentEditor">${cmBaikeProduct.unAdaptiveMan}</div>
 				<div id="unAdaptiveManEditor" class="contentEditor">${cmBaikeProduct.unAdaptiveMan}</div>
+                <label id="unAdaptiveManSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -495,6 +744,7 @@
 			<div class="controls" style="width:812px">
 			<div class="controls" style="width:812px">
 				<form:textarea path="aroundOperation" htmlEscape="false" class="input-xlarge  hide" />
 				<form:textarea path="aroundOperation" htmlEscape="false" class="input-xlarge  hide" />
 				<div id="aroundOperationEditor" class="contentEditor">${cmBaikeProduct.aroundOperation}</div>
 				<div id="aroundOperationEditor" class="contentEditor">${cmBaikeProduct.aroundOperation}</div>
+                <label id="aroundOperationSensitiveWords" class="red"></label>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group" style="width: 1000px">
 		<div class="control-group" style="width: 1000px">
@@ -536,18 +786,21 @@
                 <label class="control-label">问题1:</label>
                 <label class="control-label">问题1:</label>
                 <div class="controls">
                 <div class="controls">
                     <input name="questionList[0].question" style="width: 550px" htmlEscape="false" class="input-xlarge ">
                     <input name="questionList[0].question" style="width: 550px" htmlEscape="false" class="input-xlarge ">
+                    <label id="question0SensitiveWords" class="red"></label>
                 </div>
                 </div>
             </div>
             </div>
             <div class="control-group" id="answerRow0">
             <div class="control-group" id="answerRow0">
                 <label class="control-label">答:</label>
                 <label class="control-label">答:</label>
                 <div class="controls">
                 <div class="controls">
                     <input name="questionList[0].answer" style="width: 550px" htmlEscape="false" class="input-xlarge ">
                     <input name="questionList[0].answer" style="width: 550px" htmlEscape="false" class="input-xlarge ">
+                    <label id="answer0SensitiveWords" class="red"></label>
                 </div>
                 </div>
             </div>
             </div>
             <div class="control-group" id="questionRow1">
             <div class="control-group" id="questionRow1">
                 <label class="control-label">问题2:</label>
                 <label class="control-label">问题2:</label>
                 <div class="controls">
                 <div class="controls">
                     <input name="questionList[1].question" style="width: 550px" htmlEscape="false" class="input-xlarge  questionInput">
                     <input name="questionList[1].question" style="width: 550px" htmlEscape="false" class="input-xlarge  questionInput">
+                    <label id="question1SensitiveWords" class="red"></label>
                     <a id="questionDelBtn1" onclick="deleteQuestion(1)" style="cursor: pointer">删除</a>
                     <a id="questionDelBtn1" onclick="deleteQuestion(1)" style="cursor: pointer">删除</a>
                 </div>
                 </div>
             </div>
             </div>
@@ -555,6 +808,7 @@
                 <label class="control-label">答:</label>
                 <label class="control-label">答:</label>
                 <div class="controls">
                 <div class="controls">
                     <input name="questionList[1].answer" style="width: 550px" htmlEscape="false" class="input-xlarge  questionInput">
                     <input name="questionList[1].answer" style="width: 550px" htmlEscape="false" class="input-xlarge  questionInput">
+                    <label id="answer1SensitiveWords" class="red"></label>
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
@@ -596,6 +850,7 @@
 
 
 <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
 <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
 <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
 <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
+<script type="text/javascript" src="${ctxStatic}/sensitiveWords/mint-filter.umd.js"></script>
 <script>
 <script>
 	var paramIndex = 6;
 	var paramIndex = 6;
 	var questionIndex = 2;
 	var questionIndex = 2;
@@ -715,7 +970,9 @@
 			while (index < paramListSize) {
 			while (index < paramListSize) {
 				$(".paramList").append("<div class=\"controls paramRow\" id=\"paramRow" + index + "\">\n" +
 				$(".paramList").append("<div class=\"controls paramRow\" id=\"paramRow" + index + "\">\n" +
 						"\t\t\t\t<input name=\"paramList[" + index + "].name\" htmlEscape=\"false\" class=\"input-small \" placeholder=\"参数名称\">\n" +
 						"\t\t\t\t<input name=\"paramList[" + index + "].name\" htmlEscape=\"false\" class=\"input-small \" placeholder=\"参数名称\">\n" +
+						"\t\t\t\t<label id=\"param" + index + "SensitiveWords\" class=\"red\"></label>\n" +
 						"\t\t\t\t<input name=\"paramList[" + index + "].content\" htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"输入参数信息\">\n" +
 						"\t\t\t\t<input name=\"paramList[" + index + "].content\" htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"输入参数信息\">\n" +
+						"\t\t\t\t<label id=\"content" + index + "SensitiveWords\" class=\"red\"></label>\n" +
 						"\t\t\t\t<a onclick=\"deleteParam(" + index + ")\" style=\"cursor: pointer\">删除</a>\n" +
 						"\t\t\t\t<a onclick=\"deleteParam(" + index + ")\" style=\"cursor: pointer\">删除</a>\n" +
 						"            </div>");
 						"            </div>");
 				index = index + 1;
 				index = index + 1;
@@ -751,6 +1008,7 @@
 						"                <label class=\"control-label\">问题" + (index+1) + ":</label>\n" +
 						"                <label class=\"control-label\">问题" + (index+1) + ":</label>\n" +
 						"                <div class=\"controls\">\n" +
 						"                <div class=\"controls\">\n" +
 						"                    <input name=\"questionList[" + index + "].question\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +
 						"                    <input name=\"questionList[" + index + "].question\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +
+						"\t\t\t\t<label id=\"question" + index + "SensitiveWords\" class=\"red\"></label>\n" +
 						"\t\t\t\t<a id=\"questionDelBtn" + index + "\" onclick=\"deleteQuestion(" + index + ")\" style=\"cursor: pointer\">删除</a>\n" +
 						"\t\t\t\t<a id=\"questionDelBtn" + index + "\" onclick=\"deleteQuestion(" + index + ")\" style=\"cursor: pointer\">删除</a>\n" +
 						"                </div>\n" +
 						"                </div>\n" +
 						"            </div>\n" +
 						"            </div>\n" +
@@ -758,6 +1016,7 @@
 						"                <label class=\"control-label\">答:</label>\n" +
 						"                <label class=\"control-label\">答:</label>\n" +
 						"                <div class=\"controls\">\n" +
 						"                <div class=\"controls\">\n" +
 						"                    <input name=\"questionList[" + index + "].answer\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +
 						"                    <input name=\"questionList[" + index + "].answer\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +
+						"\t\t\t\t<label id=\"answer" + index + "SensitiveWords\" class=\"red\"></label>\n" +
 						"                </div>\n" +
 						"                </div>\n" +
 						"            </div>");
 						"            </div>");
 				index = index + 1;
 				index = index + 1;
@@ -781,6 +1040,106 @@
 			$('input[name="' + questionInput + '"]').val(questionArray[i]);
 			$('input[name="' + questionInput + '"]').val(questionArray[i]);
 			$('input[name="' + answerInput + '"]').val(answerArray[i]);
 			$('input[name="' + answerInput + '"]').val(answerArray[i]);
 		}
 		}
+
+		var fileIds = $("#fileIds").val();
+		//点击上传按钮后上传文件
+		$('#addSubmit').click(function () {
+			var fileIdArr = fileIds.split(',');
+			if (fileIdArr.length >= 7) {
+				alertx('最多上传6个视频');
+				return;
+			}
+			var filesById = document.getElementById('productFile');
+			var files = $('#productFile');
+			var fileList = files.prop('files');
+			var fileTitle = $('#fileTitle').val();
+			var fileName = $('#uploadFileName').val();
+			if (fileTitle == '') {
+				alertx('请输入视频标题')
+				return;
+			}
+			if (files === '' || files.length == 0 || fileName == '') {
+				alertx('请选择上传文件');
+				return;
+			}
+			$("#fileTitle").val("");
+			$("#uploadFileName").val("");
+			var data = new FormData();
+			var productId = $("#id").val();
+			data.append('file', fileList[0]);
+			data.append('fileTitle', fileTitle);
+			data.append('fileName', fileName);
+			data.append('productId', productId);
+			data.append('fileIds', fileIds);
+			$('.upload-loading').css("display", "inline");
+			$.ajax({
+				url: "${ctx}/baike/cmBaikeProduct/upload",
+				data: data,
+				type: "POST",
+				processData: false,
+				contentType: false,
+				dataType: "json",
+				success: function (res) {
+					if (res.success) {
+						filesById.value = '';
+						renderFileList(res.productFile);
+						$('.upload-loading').hide();
+					} else {
+						$.jBox.tip(res.msg, 'error');
+						$("#uploadFileName").val(fileName);
+						$('.upload-loading').hide();
+					}
+
+				},
+				error: function (json) {
+
+				}
+			});
+		})
+
+		var fileList = [];
+		var files = document.getElementById("productFile"), renderFileList;
+		//选择上传文件后显示文件名称
+		files.addEventListener("change", function (event) {
+			var name = event.target.files[0].name;
+			console.log(name)
+			$('#uploadFileName').val(name);
+		});
+		var fileListDisplay = document.getElementById('file-list-display');
+		renderFileList = function (data) {
+			fileIds += data.id + ',';
+			console.log(fileIds);
+			$('#fileIds').val(fileIds);
+			fileList.push({fileTitle: data.fileTitle, id: data.id, ossUrl: data.ossUrl});
+			fileList.forEach(function (file, index) {
+				var fileDisplayEl = document.createElement("p");
+				var deleteFile = document.createElement("span");
+				var viewFile = document.createElement("span");
+				var viewFileUrl = document.createElement("a");
+				//预览链接
+				viewFileUrl.innerHTML = '预览';
+				viewFileUrl.setAttribute("onclick", "previewVideo('" + file.ossUrl + "')");
+				viewFileUrl.setAttribute("target", "_blank");
+				//预览按钮
+				viewFile.className = 'viewFile';
+				console.log(viewFile);
+				viewFile.setAttribute("class","del");
+				viewFile.appendChild(viewFileUrl);
+				//删除按钮
+				deleteFile.innerHTML = '删除';
+				deleteFile.className = 'deleteFile';
+				console.log(deleteFile);
+				deleteFile.setAttribute("class","del");
+				deleteFile.setAttribute("onclick", "dataDelete(this, " + file.id + ")");
+
+				fileDisplayEl.setAttribute("id", file.id);
+				fileDisplayEl.innerHTML = file.fileTitle;
+				fileDisplayEl.appendChild(viewFile);
+				fileDisplayEl.appendChild(deleteFile);
+				fileListDisplay.appendChild(fileDisplayEl);
+			});
+			fileList.splice(0, fileList.length);
+		};
 	})
 	})
 
 
 	//删除参数
 	//删除参数
@@ -792,7 +1151,9 @@
 	function addParam() {
 	function addParam() {
 		$(".paramList").append("<div class=\"controls paramRow\" id=\"paramRow" + paramIndex + "\">\n" +
 		$(".paramList").append("<div class=\"controls paramRow\" id=\"paramRow" + paramIndex + "\">\n" +
 				"\t\t\t\t<input name=\"paramList[" + paramIndex + "].name\" htmlEscape=\"false\" class=\"input-small \" placeholder=\"例如:性质类型\">\n" +
 				"\t\t\t\t<input name=\"paramList[" + paramIndex + "].name\" htmlEscape=\"false\" class=\"input-small \" placeholder=\"例如:性质类型\">\n" +
+				"\t\t\t\t<label id=\"param" + paramIndex + "SensitiveWords\" class=\"red\"></label>\n" +
 				"\t\t\t\t<input name=\"paramList[" + paramIndex + "].content\" htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"输入参数信息\">\n" +
 				"\t\t\t\t<input name=\"paramList[" + paramIndex + "].content\" htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"输入参数信息\">\n" +
+				"\t\t\t\t<label id=\"content" + paramIndex + "SensitiveWords\" class=\"red\"></label>\n" +
 				"\t\t\t\t<a onclick=\"deleteParam(" + paramIndex + ")\" style=\"cursor: pointer\">删除</a>\n" +
 				"\t\t\t\t<a onclick=\"deleteParam(" + paramIndex + ")\" style=\"cursor: pointer\">删除</a>\n" +
 				"            </div>")
 				"            </div>")
 		paramIndex = paramIndex + 1;
 		paramIndex = paramIndex + 1;
@@ -813,6 +1174,7 @@
             "                <label class=\"control-label\">问题" + (questionIndex+1) + ":</label>\n" +
             "                <label class=\"control-label\">问题" + (questionIndex+1) + ":</label>\n" +
             "                <div class=\"controls\">\n" +
             "                <div class=\"controls\">\n" +
             "                    <input name=\"questionList[" + questionIndex + "].question\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +
             "                    <input name=\"questionList[" + questionIndex + "].question\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +
+				"\t\t\t\t<label id=\"question" + questionIndex + "SensitiveWords\" class=\"red\"></label>\n" +
             "\t\t\t\t<a id=\"questionDelBtn" + questionIndex + "\" onclick=\"deleteQuestion(" + questionIndex + ")\" style=\"cursor: pointer\">删除</a>\n" +
             "\t\t\t\t<a id=\"questionDelBtn" + questionIndex + "\" onclick=\"deleteQuestion(" + questionIndex + ")\" style=\"cursor: pointer\">删除</a>\n" +
             "                </div>\n" +
             "                </div>\n" +
             "            </div>\n" +
             "            </div>\n" +
@@ -820,6 +1182,7 @@
             "                <label class=\"control-label\">答:</label>\n" +
             "                <label class=\"control-label\">答:</label>\n" +
             "                <div class=\"controls\">\n" +
             "                <div class=\"controls\">\n" +
             "                    <input name=\"questionList[" + questionIndex + "].answer\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +
             "                    <input name=\"questionList[" + questionIndex + "].answer\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +
+				"\t\t\t\t<label id=\"answer" + questionIndex + "SensitiveWords\" class=\"red\"></label>\n" +
             "                </div>\n" +
             "                </div>\n" +
             "            </div>")
             "            </div>")
         $("#questionDelBtn" + (questionIndex - 1)).attr("style", "display:none;cursor: pointer");
         $("#questionDelBtn" + (questionIndex - 1)).attr("style", "display:none;cursor: pointer");
@@ -906,6 +1269,36 @@
 	function onlynum(obj) {
 	function onlynum(obj) {
 		obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
 		obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
 	}
 	}
+
+	//删除文件
+	function dataDelete(that, id) {
+		console.log($(that).text());
+		$(that).parent().remove();
+		var fileIds = $("#fileIds").val();
+		if (fileIds.indexOf(id)) {
+			fileIds = fileIds.replace(id + ',', '');
+			$("#fileIds").val(fileIds);
+		}
+		$.ajax({
+			url: "${ctx}/baike/cmBaikeProduct/deleteFile",
+			data: {"fileId": id},
+			async: false,
+			type: "POST"
+		});
+	}
+
+	function previewVideo(url) {
+		var url = "${ctx}/archive/cmProductArchiveContent/preview?url=" + encodeURIComponent(url);
+		var title = "视频播放";
+		top.$.jBox("iframe:" + url, {
+			iframeScrolling: 'yes',
+			width: 1000,
+			height: 750,
+			persistent: true,
+			title: title,
+			buttons: {"关闭": '-1'}
+		});
+	}
 </script>
 </script>
 </body>
 </body>
 </html>
 </html>

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductList.jsp

@@ -143,6 +143,7 @@
 							</tbody>
 							</tbody>
 						</table>
 						</table>
 					</div>
 					</div>
+					<a href="${ctx}/baike/cmBaikeProduct/recommend/form?id=${cmBaikeProduct.id}">相关推荐</a>
 				</td>
 				</td>
 			</tr>
 			</tr>
 		</c:forEach>
 		</c:forEach>

+ 58 - 0
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductRecommendList.jsp

@@ -0,0 +1,58 @@
+<%@ 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 th{text-align: center;}
+		.table td{text-align: center;}
+	</style>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			
+		});
+		function page(n,s){
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+        	return false;
+        }
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li class="active"><a href="${ctx}/baike/cmBaikeProductRecommend/">相关推荐列表</a></li>
+		<shiro:hasPermission name="baike:cmBaikeProductRecommend:edit"><li><a href="${ctx}/baike/cmBaikeProductRecommend/form">相关推荐添加</a></li></shiro:hasPermission>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmBaikeProductRecommend" action="${ctx}/baike/cmBaikeProductRecommend/" 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">
+			&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>
+				<shiro:hasPermission name="baike:cmBaikeProductRecommend:edit"><th>操作</th></shiro:hasPermission>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmBaikeProductRecommend">
+			<tr>
+				<shiro:hasPermission name="baike:cmBaikeProductRecommend:edit"><td>
+    				<a href="${ctx}/baike/cmBaikeProductRecommend/form?id=${cmBaikeProductRecommend.id}">编辑</a>
+    				<shiro:hasPermission name="baike:cmBaikeProductRecommend:delete">
+					<a href="${ctx}/baike/cmBaikeProductRecommend/delete?id=${cmBaikeProductRecommend.id}" onclick="return confirmx('确认要删除该相关推荐吗?', this.href)">删除</a>
+					</shiro:hasPermission>
+				</td></shiro:hasPermission>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

+ 236 - 0
src/main/webapp/WEB-INF/views/modules/baikePage/recommendForm.jsp

@@ -0,0 +1,236 @@
+<%@ page import="java.util.Date" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>相关推荐管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			//$("#name").focus();
+			$("#inputForm").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);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/baike/cmBaikeProduct/?commodityType=${cmBaikeProduct.commodityType}">${commodityType}</a></li>
+		<li class="active"><a href="${ctx}/baike/cmBaikeProduct/recommend/form?id=${cmBaikeProduct.id}">相关推荐编辑</a></li>
+	</ul><br/>
+	<table class="table table-striped table-bordered table-condensed">
+		<p><b>${commodityType}名称:</b>${cmBaikeProduct.name}</p>
+		<p><b>推荐列表</b><font color="red">(当前列表推荐数 <span class="recommendCount"></span>, 最多可推荐15条)</font></p>
+		<input class="btn btn-primary manualData" id="showSelectBtn" style="width: 70px;margin-bottom: 10px"
+			   onclick="showSelect()" value="添加"/>
+		<thead>
+		<tr>
+			<th>ID</th>
+			<th>${commodityType}名称</th>
+			<th class="manualData" style="${cmBaikeProduct.recommendType ne 1?'display:none':''}">排序</th>
+			<th class="manualData" style="${cmBaikeProduct.recommendType ne 1?'display:none':''}">操作</th>
+		</tr>
+		</thead>
+		<tbody id="productTbody">
+		</tbody>
+	</table>
+	<div class="flex-wrap">
+		<div class="item">
+			<label><font color="red">*</font><b>设置类型:</b></label>
+			<input type="radio" name="recommendType" value="1"  onchange="changeRecommendType()" ${cmBaikeProduct.recommendType == 1 ? "checked" : ""} />手动选择<b class="line">|</b>
+			<input type="radio" name="recommendType" value="2" onchange="changeRecommendType()" ${cmBaikeProduct.recommendType == 2 ? "checked" : ""} />自动选择
+			<span style="color:#D0D0D0;">(设置自动选择后,系统将自动推荐相同分类中的排序前15个进行推荐)</span>
+		</div>
+	</div>
+	<div class="form-actions">
+		<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+		<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+	</div>
+<script>
+
+	var productImageList = [];
+	// 手动列表
+	var manualImageList = [];
+	// 自动列表
+	var autoImageList = [];
+	var productIds = '';
+	var recommendCount = 0;
+	var recommendType = ${cmBaikeProduct.recommendType};
+
+	$(function () {
+		//数据填充
+		<c:forEach items="${manualRecommendList}" var="product" varStatus="index">
+			manualImageList.push({
+				recommendProductId: "${product.recommendProductId}",
+				recommendProductName: "${product.recommendProductName}",
+				sort: "${product.sort}"
+			});
+		</c:forEach>
+		<c:forEach items="${autoRecommendList}" var="product" varStatus="index">
+			autoImageList.push({
+				recommendProductId: "${product.recommendProductId}",
+				recommendProductName: "${product.recommendProductName}",
+				sort: 0,
+				createDate: '<fmt:formatDate value="<%=new Date()%>" pattern="yyyy-MM-dd HH:mm:ss"/>'
+			});
+		</c:forEach>
+		batchSaveSort()
+	})
+
+	//点击添加
+	function showSelect() {
+		if (recommendCount >= 15) {
+			alertx('最多只能推荐15条');
+			return;
+		}
+		var commodityType = '${cmBaikeProduct.commodityType}';
+		var typeId = '${cmBaikeProduct.typeId}';
+		var url = "${ctx}/baike/cmBaikeProduct/recommend/products?productIds=" + productIds + "&commodityType=" + commodityType + "&typeId=" + typeId;
+		title = '添加${commodityType}';
+		width = 700;
+		height = 600;
+		top.$.jBox("iframe:" + url, {
+			iframeScrolling: 'yes',
+			width: width,
+			height: height,
+			persistent: true,
+			title: title,
+			buttons: {"确定": '1', "取消": '-1'},
+			submit: function (v, h, f) {
+				//确定
+				var $jboxFrame = top.$('#jbox-iframe');
+				var $mainFrame = top.$('#mainFrame');
+				if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
+					var items = $jboxFrame[0].contentWindow.getCheckedItems();
+					console.log(items);
+					items.forEach(item =>{
+						items.createDate = '<fmt:formatDate value="<%=new Date()%>" pattern="yyyy-MM-dd HH:mm:ss"/>';
+						manualImageList.push(item);
+					})
+					batchSaveSort();
+				}
+				return true;
+			}
+		});
+	}
+
+	/**
+	 * 一键排序
+	 */
+	function batchSaveSort() {
+		if (recommendType == 1) {
+			productImageList = manualImageList;
+		} else {
+			productImageList = autoImageList;
+		}
+		productImageList.sort(sort);
+		insertHtml();
+	}
+
+	//根据sort值 从小到大排序
+	function sort(a, b) {
+		return ((a.sort - b.sort) == 0 ? (a.createDate > b.createDate ? -1 : 1) : (a.sort - b.sort));
+	}
+
+	function insertHtml() {
+		var html = '';
+		productIds = '';
+		recommendCount = 0;
+		productImageList.forEach(function (item, index) {
+			recommendCount++;
+			html += appendProductHtml(item, index);
+			productIds += item.recommendProductId + ",";
+		});
+		$(".recommendCount").text(recommendCount);
+		$("#productTbody").html(html);
+	}
+
+
+
+	//相关图片列表数据
+	function appendProductHtml(data, index) {
+		var html = '<tr>' +
+				'<td>' +
+				data.recommendProductId +
+				'</td>' +
+				'<td>' + data.recommendProductName + '</td>' +
+				(recommendType == 1?
+				'<td>' +
+				'<input name="sort" style="width:50px;" value="' + data.sort + '"  onkeyup="onlynum(this)"  onchange="changeSort(' + index + ',this)"></td>' +
+				'</td>' +
+				'<td>' +
+				'   <a href="javascript:;" onclick="delect(' + index + ')">删除</a>' +
+				'</td>':'') +
+				'</tr>';
+		return html;
+	}
+
+	/**
+	 * 删除操作
+	 */
+	function delect(index) {
+		return confirmx("确定删除该数据吗?", function () {
+			var image = getImage(index);
+			if (image.recommendProductId != '') {
+				productIds = productIds.replace(image.recommendProductId, "");
+			}
+			productImageList.splice(index, 1);
+			insertHtml();
+		});
+	}
+
+	function changeSort(index, sortThis) {
+		var sort = sortThis.value;
+		var image = getImage(index);
+		image.sort = sort;
+	}
+
+	function getImage(index) {
+		var image = productImageList[index];
+		return image;
+	}
+
+	$('body').on('click','#btnSubmit',function () {
+		if (recommendCount > 15) {
+			alertx("最多只能添加15条相关商品");
+			return;
+		}
+		var url = "${ctx}/baike/cmBaikeProduct/recommend/save?id=" + ${cmBaikeProduct.id} + "&recommendType=" + recommendType;
+		if (recommendType == 1) {
+			//只有选择了手动推荐相关商品单选框才修改相关商品数据
+			var recommendJson = JSON.stringify(manualImageList);
+			url += "&recommendJson=" + recommendJson;
+		}
+		//保留搜索条件
+		<%--url += "&searchName=${product.searchName}&searchShopID=${product.searchShopID}&searchShopName=${product.searchShopName}&searchBigTypeID=${product.searchBigTypeID}&searchSmallTypeID=${product.searchSmallTypeID}&searchTinyTypeID=${product.searchTinyTypeID}&searchValidFlag=${product.searchValidFlag}&searchActStatus=${product.searchActStatus}&searchProductType=${product.searchProductType}&searchBrandID=${product.searchBrandID}&searchPreferredFlag=${product.searchPreferredFlag}";--%>
+		window.location.href = url;
+	});
+
+
+	function changeRecommendType(){
+		recommendType = $("input[name='recommendType']:checked").val();
+		if (recommendType == 1) {
+			$(".manualData").css('display', 'table-cell');
+			productImageList = manualImageList;
+		} else if (recommendType == 2) {
+			$(".manualData").css('display', 'none');
+			productImageList = autoImageList;
+		}
+		batchSaveSort();
+	}
+</script>
+</body>
+</html>

+ 12 - 4
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheDiscountForm.jsp

@@ -112,6 +112,7 @@
 						<th>商品名称</th>
 						<th>商品名称</th>
 						<th>供应商</th>
 						<th>供应商</th>
 						<th>状态</th>
 						<th>状态</th>
+						<th>折扣价</th>
 						<th>排序</th>
 						<th>排序</th>
 						<th>添加时间</th>
 						<th>添加时间</th>
 						<th>操作</th>
 						<th>操作</th>
@@ -165,6 +166,7 @@
 			image: "${product.image}",
 			image: "${product.image}",
 			productName: "${product.productName}",
 			productName: "${product.productName}",
 			shopName: "${product.shopName}",
 			shopName: "${product.shopName}",
+			discountPrice: "${product.discountPrice}",
 			sort: "${product.sort}",
 			sort: "${product.sort}",
 			status: "${product.status}",
 			status: "${product.status}",
 			addTime: "<fmt:formatDate value="${product.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
 			addTime: "<fmt:formatDate value="${product.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
@@ -228,7 +230,6 @@
 
 
 	//用户添加
 	//用户添加
 	function userShowSelect() {
 	function userShowSelect() {
-		debugger
 		var url = "${ctx}/hehe/cmHeheDiscount/toAddUser?userIds=" + userIds;
 		var url = "${ctx}/hehe/cmHeheDiscount/toAddUser?userIds=" + userIds;
 		var title = '';
 		var title = '';
 		title = "选择用户";
 		title = "选择用户";
@@ -308,6 +309,9 @@
 				'</td>' +
 				'</td>' +
 				'</td>' +
 				'</td>' +
 				'<td>' +
 				'<td>' +
+				'<input type="number" name="discountPrice" style="width:80px;" value="' + data.discountPrice + '" onchange="changeDiscountPrice(' + index + ',this)"></td>' +
+				'</td>' +
+				'<td>' +
 				'<input name="sort" style="width:50px;" value="' + data.sort + '"  onkeyup="onlynum(this)"  onchange="changeSort(' + index + ',this)"></td>' +
 				'<input name="sort" style="width:50px;" value="' + data.sort + '"  onkeyup="onlynum(this)"  onchange="changeSort(' + index + ',this)"></td>' +
 				'</td>' +
 				'</td>' +
 				'<td>' +
 				'<td>' +
@@ -375,13 +379,17 @@
 
 
 	function changeSort(index, sortThis) {
 	function changeSort(index, sortThis) {
 		var sort = sortThis.value;
 		var sort = sortThis.value;
-		if (sort <= 0) {
-
-		}
 		var image = imageList[index];
 		var image = imageList[index];
 		image.sort = sort;
 		image.sort = sort;
 	}
 	}
 
 
+	function changeDiscountPrice(index, sortThis) {
+		debugger
+		var discountPrice = sortThis.value;
+		var image = imageList[index];
+		image.discountPrice = discountPrice;
+	}
+
 	function updateStatus(status, index) {
 	function updateStatus(status, index) {
 		var image = imageList[index];
 		var image = imageList[index];
 		confirmx(status == 0 ? '确定停用吗?' : '确定启用吗?', function () {
 		confirmx(status == 0 ? '确定停用吗?' : '确定启用吗?', function () {

+ 187 - 21
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheFloorContentForm.jsp

@@ -155,6 +155,10 @@
         #displayDateDiv {
         #displayDateDiv {
             height: 30px;
             height: 30px;
         }
         }
+
+        .relative-pst {
+            margin-top: 20px !important;
+        }
     </style>
     </style>
     <script type="text/javascript">
     <script type="text/javascript">
         $(document).ready(function () {
         $(document).ready(function () {
@@ -225,6 +229,17 @@
                         $(".Image4 .cancel-upload").click();
                         $(".Image4 .cancel-upload").click();
                         $(".Image5 .cancel-upload").click();
                         $(".Image5 .cancel-upload").click();
                     }
                     }
+                    for (var i = 1; i <= 5; i++) {
+                        var jumpTypeName = 'jumpType' + i;
+                        var jumpType = $("input[name=" + jumpTypeName + "]:checked").val();
+                        if (3 == jumpType) {
+                            var jumpImage = $("#jumpIcon"+i).val();
+                            if (jumpImage == '') {
+                                alertx("请上传广告图" + i + "跳转图片");
+                                return false;
+                            }
+                        }
+                    }
                     $("#formType").val(8);
                     $("#formType").val(8);
                     loading('正在提交,请稍等...');
                     loading('正在提交,请稍等...');
                     form.submit();
                     form.submit();
@@ -373,10 +388,35 @@
                                 </div>
                                 </div>
                             </div>
                             </div>
                             <div style="float: left">
                             <div style="float: left">
-                                <span class="help-inline"></span>链接:
-                                <div class="controls">
-                                    <form:input path="adsLink1" htmlEscape="false" maxlength="255"
-                                                class="input-xlarge"/>
+                                <span class="help-inline"></span>跳转方式:
+                                <div style="margin-left: 100px">
+                                    <div>
+                                        <input type="radio" name="jumpType1" value="1" onchange="changeJumpType(1)" ${(floorContent.jumpType1 eq null || floorContent.jumpType1 eq 1 )? "checked" : ""} />链接:
+                                        <form:input path="adsLink1" htmlEscape="false" maxlength="255"
+                                                    class="input-xlarge"/>
+                                    </div>
+                                    <div style="margin-top: 20px">
+                                        <input type="radio" name="jumpType1" value="2" onchange="changeJumpType(1)" ${floorContent.jumpType1 eq 2? "checked" : ""} />产品:
+                                        <form:select path="productId1" class="select-ele input-xlarge">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${productList}" itemLabel="name" itemValue="productId"
+                                                          htmlEscape="false"/>
+                                        </form:select>
+                                    </div>
+                                </div>
+                            </div>
+                            <div style="float: left;margin: 25px 0px 0px 100px">
+                                <span class="help-inline"></span>
+                                <input type="radio" name="jumpType1" value="3" onchange="changeJumpType(1)" ${floorContent.jumpType1 eq 3? "checked" : ""} />图片:
+                                <div class="controls upload-content iconBox" id="jumpImage1">
+                                    <div class="conList">
+                                        <form:hidden id="jumpIcon1" path="jumpImage1" htmlEscape="false" maxlength="255"
+                                                     class="input-xlarge required"/>
+                                        <sys:ckfinder input="jumpIcon1" type="images" uploadPath="/photo"
+                                                      selectMultiple="false"
+                                                      maxWidth="100" maxHeight="100"/> <br>
+                                        <label>建议图片分辨率750px*1624px</label>
+                                    </div>
                                 </div>
                                 </div>
                             </div>
                             </div>
                         </div>
                         </div>
@@ -395,10 +435,35 @@
                                 </div>
                                 </div>
                             </div>
                             </div>
                             <div style="float: left">
                             <div style="float: left">
-                                <span class="help-inline"></span>链接:
-                                <div class="controls">
-                                    <form:input path="adsLink2" htmlEscape="false" maxlength="255"
-                                                class="input-xlarge"/>
+                                <span class="help-inline"></span>跳转方式:
+                                <div style="margin-left: 100px">
+                                    <div>
+                                        <input type="radio" name="jumpType2" value="1" onchange="changeJumpType(2)" ${(floorContent.jumpType2 eq null || floorContent.jumpType2 eq 1 )? "checked" : ""} />链接:
+                                        <form:input path="adsLink1" htmlEscape="false" maxlength="255"
+                                                    class="input-xlarge"/>
+                                    </div>
+                                    <div style="margin-top: 20px">
+                                        <input type="radio" name="jumpType2" value="2" onchange="changeJumpType(2)" ${floorContent.jumpType2 eq 2? "checked" : ""} />产品:
+                                        <form:select path="productId2" class="select-ele input-xlarge">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${productList}" itemLabel="name" itemValue="productId"
+                                                          htmlEscape="false"/>
+                                        </form:select>
+                                    </div>
+                                </div>
+                            </div>
+                            <div style="float: left;margin: 25px 0px 0px 100px">
+                                <span class="help-inline"></span>
+                                <input type="radio" name="jumpType2" value="3" onchange="changeJumpType(2)" ${floorContent.jumpType2 eq 3? "checked" : ""} />图片:
+                                <div class="controls upload-content iconBox" id="jumpImage2">
+                                    <div class="conList">
+                                        <form:hidden id="jumpIcon2" path="jumpImage2" htmlEscape="false" maxlength="255"
+                                                     class="input-xlarge required"/>
+                                        <sys:ckfinder input="jumpIcon2" type="images" uploadPath="/photo"
+                                                      selectMultiple="false"
+                                                      maxWidth="100" maxHeight="100"/> <br>
+                                        <label>建议图片分辨率750px*1624px</label>
+                                    </div>
                                 </div>
                                 </div>
                             </div>
                             </div>
                         </div>
                         </div>
@@ -417,10 +482,35 @@
                                 </div>
                                 </div>
                             </div>
                             </div>
                             <div style="float: left">
                             <div style="float: left">
-                                <span class="help-inline"></span>链接:
-                                <div class="controls">
-                                    <form:input path="adsLink3" htmlEscape="false" maxlength="255"
-                                                class="input-xlarge"/>
+                                <span class="help-inline"></span>跳转方式:
+                                <div style="margin-left: 100px">
+                                    <div>
+                                        <input type="radio" name="jumpType3" value="1" onchange="changeJumpType(3)" ${(floorContent.jumpType3 eq null || floorContent.jumpType3 eq 1 )? "checked" : ""} />链接:
+                                        <form:input path="adsLink3" htmlEscape="false" maxlength="255"
+                                                    class="input-xlarge"/>
+                                    </div>
+                                    <div style="margin-top: 20px">
+                                        <input type="radio" name="jumpType3" value="2" onchange="changeJumpType(3)" ${floorContent.jumpType3 eq 2? "checked" : ""} />产品:
+                                        <form:select path="productId3" class="select-ele input-xlarge">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${productList}" itemLabel="name" itemValue="productId"
+                                                          htmlEscape="false"/>
+                                        </form:select>
+                                    </div>
+                                </div>
+                            </div>
+                            <div style="float: left;margin: 25px 0px 0px 100px">
+                                <span class="help-inline"></span>
+                                <input type="radio" name="jumpType3" value="3" onchange="changeJumpType(3)" ${floorContent.jumpType3 eq 3? "checked" : ""} />图片:
+                                <div class="controls upload-content iconBox" id="jumpImage3">
+                                    <div class="conList">
+                                        <form:hidden id="jumpIcon3" path="jumpImage3" htmlEscape="false" maxlength="255"
+                                                     class="input-xlarge required"/>
+                                        <sys:ckfinder input="jumpIcon3" type="images" uploadPath="/photo"
+                                                      selectMultiple="false"
+                                                      maxWidth="100" maxHeight="100"/> <br>
+                                        <label>建议图片分辨率750px*1624px</label>
+                                    </div>
                                 </div>
                                 </div>
                             </div>
                             </div>
                         </div>
                         </div>
@@ -439,10 +529,35 @@
                                 </div>
                                 </div>
                             </div>
                             </div>
                             <div style="float: left">
                             <div style="float: left">
-                                <span class="help-inline"></span>链接:
-                                <div class="controls">
-                                    <form:input path="adsLink4" htmlEscape="false" maxlength="255"
-                                                class="input-xlarge"/>
+                                <span class="help-inline"></span>跳转方式:
+                                <div style="margin-left: 100px">
+                                    <div>
+                                        <input type="radio" name="jumpType4" value="1" onchange="changeJumpType(4)" ${(floorContent.jumpType4 eq null || floorContent.jumpType4 eq 1 )? "checked" : ""} />链接:
+                                        <form:input path="adsLink4" htmlEscape="false" maxlength="255"
+                                                    class="input-xlarge"/>
+                                    </div>
+                                    <div style="margin-top: 20px">
+                                        <input type="radio" name="jumpType4" value="2" onchange="changeJumpType(4)" ${floorContent.jumpType4 eq 2? "checked" : ""} />产品:
+                                        <form:select path="productId4" class="select-ele input-xlarge">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${productList}" itemLabel="name" itemValue="productId"
+                                                          htmlEscape="false"/>
+                                        </form:select>
+                                    </div>
+                                </div>
+                            </div>
+                            <div style="float: left;margin: 25px 0px 0px 100px">
+                                <span class="help-inline"></span>
+                                <input type="radio" name="jumpType4" value="3" onchange="changeJumpType(4)" ${floorContent.jumpType4 eq 3? "checked" : ""} />图片:
+                                <div class="controls upload-content iconBox" id="jumpImage4">
+                                    <div class="conList">
+                                        <form:hidden id="jumpIcon4" path="jumpImage4" htmlEscape="false" maxlength="255"
+                                                     class="input-xlarge required"/>
+                                        <sys:ckfinder input="jumpIcon4" type="images" uploadPath="/photo"
+                                                      selectMultiple="false"
+                                                      maxWidth="100" maxHeight="100"/> <br>
+                                        <label>建议图片分辨率750px*1624px</label>
+                                    </div>
                                 </div>
                                 </div>
                             </div>
                             </div>
                         </div>
                         </div>
@@ -461,10 +576,35 @@
                                 </div>
                                 </div>
                             </div>
                             </div>
                             <div style="float: left">
                             <div style="float: left">
-                                <span class="help-inline"></span>链接:
-                                <div class="controls">
-                                    <form:input path="adsLink5" htmlEscape="false" maxlength="255"
-                                                class="input-xlarge"/>
+                                <span class="help-inline"></span>跳转方式:
+                                <div style="margin-left: 100px">
+                                    <div>
+                                        <input type="radio" name="jumpType5" value="1" onchange="changeJumpType(5)" ${(floorContent.jumpType5 eq null || floorContent.jumpType5 eq 1 )? "checked" : ""} />链接:
+                                        <form:input path="adsLink5" htmlEscape="false" maxlength="255"
+                                                    class="input-xlarge"/>
+                                    </div>
+                                    <div style="margin-top: 20px">
+                                        <input type="radio" name="jumpType5" value="2" onchange="changeJumpType(5)" ${floorContent.jumpType5 eq 2? "checked" : ""} />产品:
+                                        <form:select path="productId5" class="select-ele input-xlarge">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${productList}" itemLabel="name" itemValue="productId"
+                                                          htmlEscape="false"/>
+                                        </form:select>
+                                    </div>
+                                </div>
+                            </div>
+                            <div style="float: left;margin: 25px 0px 0px 100px">
+                                <span class="help-inline"></span>
+                                <input type="radio" name="jumpType5" value="3" onchange="changeJumpType(5)" ${floorContent.jumpType5 eq 3? "checked" : ""} />图片:
+                                <div class="controls upload-content iconBox" id="jumpImage5">
+                                    <div class="conList">
+                                        <form:hidden id="jumpIcon5" path="jumpImage5" htmlEscape="false" maxlength="255"
+                                                     class="input-xlarge required"/>
+                                        <sys:ckfinder input="jumpIcon5" type="images" uploadPath="/photo"
+                                                      selectMultiple="false"
+                                                      maxWidth="100" maxHeight="100"/> <br>
+                                        <label>建议图片分辨率750px*1624px</label>
+                                    </div>
                                 </div>
                                 </div>
                             </div>
                             </div>
                         </div>
                         </div>
@@ -542,7 +682,7 @@
                 }
                 }
             })
             })
         });
         });
-        for (var i = 0; i < 5; i++) {
+        for (var i = 0; i < 10; i++) {
             var observeEle = document.getElementsByClassName('upload-content')[i];
             var observeEle = document.getElementsByClassName('upload-content')[i];
             observer.observe(observeEle, MutationObserverConfig)
             observer.observe(observeEle, MutationObserverConfig)
         }
         }
@@ -682,6 +822,15 @@
                     $("#appletsAdsImage" + i + " .cancel-upload").click();
                     $("#appletsAdsImage" + i + " .cancel-upload").click();
                 }
                 }
             });
             });
+            $("#jumpImage" + i).find("input.input-xlarge").each(function (j, ele) {
+                if ($(ele).val() && $(ele).val() != '') {
+                    $(ele).next().find("li").css("z-index", "99");
+                    $(ele).parents(".conList").find(".cancel-upload").show();
+                    $(ele).parents(".conList").next().removeClass("hide-pic");
+                } else {
+                    $("#jumpImage" + i + " .cancel-upload").click();
+                }
+            });
         }
         }
     }
     }
 
 
@@ -940,6 +1089,23 @@
         $("#redirectFlag").val(redirectFlag);
         $("#redirectFlag").val(redirectFlag);
     }
     }
 
 
+    function changeJumpType(index){
+        var jumpTypeName = 'jumpType' + index;
+        var jumpType = $("input[name=" + jumpTypeName + "]:checked").val();
+        var jumpLink = $("#adsLink"+index);
+        var jumpProductId = $("#productId"+index);
+        if (1 == jumpType) {
+            jumpLink.addClass("required");
+            jumpProductId.removeClass("required");
+        }else if (2 == jumpType) {
+            jumpProductId.addClass("required");
+            jumpLink.removeClass("required");
+        } else {
+            jumpProductId.removeClass("required");
+            jumpLink.removeClass("required");
+        }
+    }
+
 </script>
 </script>
 </body>
 </body>
 </html>
 </html>

+ 64 - 2
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheImageForm.jsp

@@ -60,12 +60,29 @@
 		.hide-pic {
 		.hide-pic {
 			display: none !important;
 			display: none !important;
 		}
 		}
+
+		.relative-pst{
+			position: relative;
+		}
 	</style>
 	</style>
 	<script type="text/javascript">
 	<script type="text/javascript">
 		$(document).ready(function() {
 		$(document).ready(function() {
 			//$("#name").focus();
 			//$("#name").focus();
 			$("#inputForm").validate({
 			$("#inputForm").validate({
 				submitHandler: function(form){
 				submitHandler: function(form){
+					var image = $("#image").val();
+					if (image == '') {
+						alertx("请上传轮播图");
+						return false;
+					}
+					var jumpType = $("input[name='jumpType']:checked").val();
+					if (3 == jumpType) {
+						var jumpImage = $("#jumpImage").val();
+						if (jumpImage == '') {
+							alertx("请上传跳转图片");
+							return false;
+						}
+					}
 					loading('正在提交,请稍等...');
 					loading('正在提交,请稍等...');
 					form.submit();
 					form.submit();
 				},
 				},
@@ -108,9 +125,27 @@
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
-			<label class="control-label">链接:</label>
+			<label class="control-label">跳转方式:</label>
 			<div class="controls">
 			<div class="controls">
-				<form:input path="link" htmlEscape="false" class="input-xxlarge"/>
+				<input type="radio" name="jumpType" value="1" class="relative-pst" onchange="changeJumpType()" ${(cmHeheImage.jumpType eq null || cmHeheImage.jumpType eq 1 )? "checked" : ""} />链接:
+				<form:input path="jumpLink" htmlEscape="false" class="input-xxlarge relative-pst"/>
+			</div>
+			<div class="controls" style="margin-top: 10px">
+				<input type="radio" name="jumpType" value="2" class="relative-pst" onchange="changeJumpType()" ${cmHeheImage.jumpType eq 2 ? "checked" : ""} />产品:
+				<form:select path="jumpProductId" class="select-ele input-xlarge">
+					<form:option value="" label="请选择"/>
+					<form:options items="${productList}" itemLabel="name" itemValue="productId"
+								  htmlEscape="false"/>
+				</form:select>
+			</div>
+			<div class="controls upload-content" id="jumpImageBox">
+				<input type="radio" name="jumpType" value="3" onchange="changeJumpType()" ${cmHeheImage.jumpType eq 3 ? "checked" : ""} />图片:
+				<div class="conList iconBox">
+					<form:hidden id="jumpImage" path="jumpImage" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+					<sys:ckfinder input="jumpImage" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+					<br>
+					<label style="margin-left: 20px">建议图片分辨率750px*1624px</label>
+				</div>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="control-group">
 		<div class="control-group">
@@ -140,6 +175,7 @@
 		$('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
 		$('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
 		$('.upload-content .conList').find('.cancel-upload').hide();
 		$('.upload-content .conList').find('.cancel-upload').hide();
 		var observeEle = document.getElementsByClassName('upload-content')[0];
 		var observeEle = document.getElementsByClassName('upload-content')[0];
+		var observeEle1 = document.getElementsByClassName('upload-content')[1];
 		var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
 		var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
 		var MutationObserverConfig = {
 		var MutationObserverConfig = {
 			childList: true,
 			childList: true,
@@ -162,6 +198,7 @@
 			})
 			})
 		});
 		});
 		observer.observe(observeEle, MutationObserverConfig);
 		observer.observe(observeEle, MutationObserverConfig);
+		observer.observe(observeEle1, MutationObserverConfig);
 
 
 		$('body').on('click', '.cancel-upload', function () {
 		$('body').on('click', '.cancel-upload', function () {
 			var wrapper = $(this).closest('.conList');
 			var wrapper = $(this).closest('.conList');
@@ -186,8 +223,17 @@
 						$(ele).parents(".conList").next().removeClass("hide-pic")
 						$(ele).parents(".conList").next().removeClass("hide-pic")
 					}
 					}
 				})
 				})
+				$("#jumpImageBox").find("input.input-xlarge").each(function (i, ele) {
+					if ($(ele).val()) {
+						$(ele).next().find("li").css("z-index", "99");
+						$(ele).parents(".conList").find(".cancel-upload").show();
+						$(ele).parents(".conList").next().removeClass("hide-pic")
+					}
+				})
 			}, 200);
 			}, 200);
 		});
 		});
+
+		changeJumpType();
 	});
 	});
 
 
 	/**
 	/**
@@ -197,6 +243,22 @@
 	function onlynum(obj) {
 	function onlynum(obj) {
 		obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
 		obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
 	}
 	}
+
+	function changeJumpType() {
+		var jumpType = $("input[name='jumpType']:checked").val();
+		var jumpLink = $("#jumpLink");
+		var jumpProductId = $("#jumpProductId");
+		if (1 == jumpType) {
+			jumpLink.addClass("required");
+			jumpProductId.removeClass("required");
+		}else if (2 == jumpType) {
+			jumpProductId.addClass("required");
+			jumpLink.removeClass("required");
+		} else {
+			jumpProductId.removeClass("required");
+			jumpLink.removeClass("required");
+		}
+	}
 </script>
 </script>
 </body>
 </body>
 </html>
 </html>

+ 2 - 1
src/main/webapp/WEB-INF/views/modules/hehe/toAddDiscountProduct.jsp

@@ -47,7 +47,8 @@
                     "shopName": product.shopName,
                     "shopName": product.shopName,
                     "sort": 1,
                     "sort": 1,
                     "status": "1",
                     "status": "1",
-                    "addTime": ""
+                    "addTime": "",
+                    "discountPrice": ""
                 })
                 })
             });
             });
             return items;
             return items;

+ 58 - 5
src/main/webapp/WEB-INF/views/modules/info/auditInfoPage.jsp

@@ -27,12 +27,16 @@
 	<table border="0" cellspacing="0" cellpadding="0" width="100%">
 	<table border="0" cellspacing="0" cellpadding="0" width="100%">
 		<tr>
 		<tr>
 			<th><span class="red">*</span>文章标题:</th>
 			<th><span class="red">*</span>文章标题:</th>
-			<td colspan="3"><form:input path="title" htmlEscape="false" maxlength="100" class="input-xxlarge required"/></td>
+			<td colspan="3">
+				<form:input path="title" htmlEscape="false" maxlength="100" class="input-xxlarge required"/>
+				<label id="titleSensitiveWords" class="red"></label>
+			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>文章标签:</th>
 			<th><span class="red">*</span>文章标签:</th>
 			<td colspan="3">
 			<td colspan="3">
 				<form:input path="label" htmlEscape="false" maxlength="100" class="input-xxlarge required"/>
 				<form:input path="label" htmlEscape="false" maxlength="100" class="input-xxlarge required"/>
+				<label id="labelSensitiveWords" class="red"></label>
 				<span class="help-inline">多个标签之间请用逗号分隔开</span>
 				<span class="help-inline">多个标签之间请用逗号分隔开</span>
 				<div class="init-label"></div>
 				<div class="init-label"></div>
 				<input id="labelName" type="text" placeholder="在此处输入标签,将自动关联到文章标签" class="input-xlarge"/>
 				<input id="labelName" type="text" placeholder="在此处输入标签,将自动关联到文章标签" class="input-xlarge"/>
@@ -41,19 +45,31 @@
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>SEO关键词:</th>
 			<th><span class="red">*</span>SEO关键词:</th>
-			<td colspan="3"><form:input path="keyword" htmlEscape="false" maxlength="50" class="input-xxlarge required"/></td>
+			<td colspan="3">
+				<form:input path="keyword" htmlEscape="false" maxlength="50" class="input-xxlarge required"/>
+				<label id="keywordSensitiveWords" class="red"></label>
+			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>发布人:</th>
 			<th><span class="red">*</span>发布人:</th>
-			<td colspan="3"><form:input path="publisher" htmlEscape="false" maxlength="50" class="input-xxlarge required"/></td>
+			<td colspan="3">
+				<form:input path="publisher" htmlEscape="false" maxlength="50" class="input-xxlarge required"/>
+				<label id="publisherSensitiveWords" class="red"></label>
+			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>来源:</th>
 			<th><span class="red">*</span>来源:</th>
-			<td colspan="3"><form:input path="source" htmlEscape="false" maxlength="50" class="input-xlarge"/></td>
+			<td colspan="3">
+				<form:input path="source" htmlEscape="false" maxlength="50" class="input-xlarge"/>
+				<label id="sourceSensitiveWords" class="red"></label>
+			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>推荐语(描述):</th>
 			<th><span class="red">*</span>推荐语(描述):</th>
-			<td colspan="3"><form:textarea path="recommendContent" htmlEscape="false" maxlength="1000" class="input-xxlarge required"/></td>
+			<td colspan="3">
+				<form:textarea path="recommendContent" htmlEscape="false" maxlength="1000" class="input-xxlarge required"/>
+				<label id="recommendContentSensitiveWords" class="red"></label>
+			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>文章内容:</th>
 			<th><span class="red">*</span>文章内容:</th>
@@ -62,6 +78,7 @@
 					<form:textarea path="infoContent" class="input-xlarge hide"/>
 					<form:textarea path="infoContent" class="input-xlarge hide"/>
 					<!-- 富文本编辑器 -->
 					<!-- 富文本编辑器 -->
 					<div id="infoDetailEditor">${info.infoContent}</div>
 					<div id="infoDetailEditor">${info.infoContent}</div>
+					<label id="infoContentSensitiveWords" class="red"></label>
 				</div>
 				</div>
 			</td>
 			</td>
 		</tr>
 		</tr>
@@ -157,6 +174,7 @@
 <%--<script src="https://cdn.bootcdn.net/ajax/libs/jquery-validate/1.19.3/jquery.validate.min.js"></script>--%>
 <%--<script src="https://cdn.bootcdn.net/ajax/libs/jquery-validate/1.19.3/jquery.validate.min.js"></script>--%>
 <script type="text/javascript" src="${ctxStatic}/jquery-validation/1.19.3/jquery.validate.js"></script>
 <script type="text/javascript" src="${ctxStatic}/jquery-validation/1.19.3/jquery.validate.js"></script>
 <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
 <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
+<script type="text/javascript" src="${ctxStatic}/sensitiveWords/mint-filter.umd.js"></script>
 <script type="text/javascript">
 <script type="text/javascript">
 	$(document).ready(function() {
 	$(document).ready(function() {
 		//$("#name").focus();
 		//$("#name").focus();
@@ -235,6 +253,41 @@
 				setLabel(label);
 				setLabel(label);
 			}
 			}
 		});
 		});
+
+
+		var title = $("#title").val();
+		var label = $("#label").val();
+		var keyword = $("#keyword").val();
+		var publisher = $("#publisher").val();
+		var source = $("#source").val();
+		var recommendContent = $("#recommendContent").val();
+		var infoContent = $("#infoContent").val();// 检测敏感词
+		var propertyMap = new Map();
+		propertyMap.set("title", title);
+		propertyMap.set("label", label);
+		propertyMap.set("keyword", keyword);
+		propertyMap.set("publisher", publisher);
+		propertyMap.set("source", source);
+		propertyMap.set("recommendContent", recommendContent);
+		propertyMap.set("infoContent", infoContent);
+		var sensitiveWords = '${sensitiveWords}';
+		const mint = new MintFilter(sensitiveWords.split('|'));
+		var filterSync = '';
+		var touchWords = '';
+		var touchNum = 0;
+		propertyMap.forEach(function (value,key,map) {
+			filterSync = mint.filterSync(value);
+			filterSync.words.forEach(word=>{
+				touchWords += touchWords === '' ? word : "," + word;
+			})
+			if (touchWords !== '') {
+				// 增加敏感词触发数量
+				touchNum++;
+				// 设置敏感词提示
+				$("#" + key + "SensitiveWords").text("敏感词:" + touchWords);
+				touchWords = '';
+			}
+		});
 	});
 	});
 
 
 	function updateAuditStatus(auditStatus) {
 	function updateAuditStatus(auditStatus) {

+ 78 - 0
src/main/webapp/WEB-INF/views/modules/info/cmSensitiveWordsForm.jsp

@@ -0,0 +1,78 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>敏感词库管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			//$("#name").focus();
+			$("#inputForm").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);
+					}
+				}
+			});
+		});
+		
+		function changeCheckPoints() {
+			var checkPoints = '';
+			$("input[name='checkPoint']:checked").each(function () {
+				checkPoints += checkPoints === '' ? $(this).val() : "," + $(this).val();
+			});
+			$("#checkPoints").val(checkPoints);
+		}
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li class="active"><a href="${ctx}/info/cmSensitiveWords/form?id=1">敏感词库</a></li>
+	</ul><br/>
+	<form:form id="inputForm" modelAttribute="cmSensitiveWords" action="${ctx}/info/cmSensitiveWords/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>
+		<form:hidden path="checkPoints"/>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>敏感词:</label>
+			<div class="controls">
+				<form:textarea path="words" maxlength="3000" placeholder="支持输入多个敏感词,例如:操|操你妈|傻逼" class="input-xxlarge required"  rows="6" />
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>检测位置:</label>
+			<div class="controls">
+				<div>
+					<input type="checkbox" name="checkPoint" value="1" onclick="changeCheckPoints()" ${fn:contains(cmSensitiveWords.checkPoints,'1')?"checked":""}/>采美文章(文章管理)
+					<input type="checkbox" name="checkPoint" value="2" onclick="changeCheckPoints()" ${fn:contains(cmSensitiveWords.checkPoints,'2')?"checked":""} />采美百科(产品,仪器)
+				</div>
+				<div>
+					<input type="checkbox" name="checkPoint" value="3" onclick="changeCheckPoints()" ${fn:contains(cmSensitiveWords.checkPoints,'3')?"checked":""} />文章中心(文章列表)
+					<input type="checkbox" name="checkPoint" value="4" onclick="changeCheckPoints()" ${fn:contains(cmSensitiveWords.checkPoints,'4')?"checked":""} />采美百科(采美文库)
+				</div>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">状态:</label>
+			<div class="controls">
+				<form:select path="status" class="input-xlarge ">
+					<form:option value="1" label="启用"/>
+					<form:option value="0" label="停用"/>
+				</form:select>
+			</div>
+		</div>
+		<div class="form-actions">
+			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+		</div>
+	</form:form>
+</body>
+</html>

+ 58 - 0
src/main/webapp/WEB-INF/views/modules/info/cmSensitiveWordsList.jsp

@@ -0,0 +1,58 @@
+<%@ 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 th{text-align: center;}
+		.table td{text-align: center;}
+	</style>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			
+		});
+		function page(n,s){
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+        	return false;
+        }
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li class="active"><a href="${ctx}/info/cmSensitiveWords/">敏感词库列表</a></li>
+		<shiro:hasPermission name="info:cmSensitiveWords:edit"><li><a href="${ctx}/info/cmSensitiveWords/form">敏感词库添加</a></li></shiro:hasPermission>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmSensitiveWords" action="${ctx}/info/cmSensitiveWords/" 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">
+			&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>
+				<shiro:hasPermission name="info:cmSensitiveWords:edit"><th>操作</th></shiro:hasPermission>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmSensitiveWords">
+			<tr>
+				<shiro:hasPermission name="info:cmSensitiveWords:edit"><td>
+    				<a href="${ctx}/info/cmSensitiveWords/form?id=${cmSensitiveWords.id}">编辑</a>
+    				<shiro:hasPermission name="info:cmSensitiveWords:delete">
+					<a href="${ctx}/info/cmSensitiveWords/delete?id=${cmSensitiveWords.id}" onclick="return confirmx('确认要删除该敏感词库吗?', this.href)">删除</a>
+					</shiro:hasPermission>
+				</td></shiro:hasPermission>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

+ 90 - 20
src/main/webapp/WEB-INF/views/modules/info/infoForm.jsp

@@ -27,12 +27,16 @@
 	<table border="0" cellspacing="0" cellpadding="0" width="100%">
 	<table border="0" cellspacing="0" cellpadding="0" width="100%">
 		<tr>
 		<tr>
 			<th><span class="red">*</span>文章标题:</th>
 			<th><span class="red">*</span>文章标题:</th>
-			<td colspan="3"><form:input path="title" htmlEscape="false" maxlength="100" class="input-xxlarge required"/></td>
+			<td colspan="3">
+				<form:input path="title" htmlEscape="false" maxlength="100" class="input-xxlarge required"/>
+				<label id="titleSensitiveWords" class="red"></label>
+			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>文章标签:</th>
 			<th><span class="red">*</span>文章标签:</th>
 			<td colspan="3">
 			<td colspan="3">
 				<form:input path="label" htmlEscape="false" maxlength="100" class="input-xxlarge required"/>
 				<form:input path="label" htmlEscape="false" maxlength="100" class="input-xxlarge required"/>
+				<label id="labelSensitiveWords" class="red"></label>
 				<span class="help-inline">多个标签之间请用逗号分隔开</span>
 				<span class="help-inline">多个标签之间请用逗号分隔开</span>
 				<div class="init-label"></div>
 				<div class="init-label"></div>
 				<input id="labelName" type="text" placeholder="在此处输入标签,将自动关联到文章标签" class="input-xlarge"/>
 				<input id="labelName" type="text" placeholder="在此处输入标签,将自动关联到文章标签" class="input-xlarge"/>
@@ -41,19 +45,31 @@
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>SEO关键词:</th>
 			<th><span class="red">*</span>SEO关键词:</th>
-			<td colspan="3"><form:input path="keyword" htmlEscape="false" maxlength="50" class="input-xxlarge required"/></td>
+			<td colspan="3">
+				<form:input path="keyword" htmlEscape="false" maxlength="50" class="input-xxlarge required"/>
+				<label id="keywordSensitiveWords" class="red"></label>
+			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>发布人:</th>
 			<th><span class="red">*</span>发布人:</th>
-			<td colspan="3"><form:input path="publisher" htmlEscape="false" maxlength="50" class="input-xxlarge required"/></td>
+			<td colspan="3">
+				<form:input path="publisher" htmlEscape="false" maxlength="50" class="input-xxlarge required"/>
+				<label id="publisherSensitiveWords" class="red"></label>
+			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>来源:</th>
 			<th><span class="red">*</span>来源:</th>
-			<td colspan="3"><form:input path="source" htmlEscape="false" maxlength="50" class="input-xlarge"/></td>
+			<td colspan="3">
+				<form:input path="source" htmlEscape="false" maxlength="50" class="input-xlarge"/>
+				<label id="sourceSensitiveWords" class="red"></label>
+			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>推荐语(描述):</th>
 			<th><span class="red">*</span>推荐语(描述):</th>
-			<td colspan="3"><form:textarea path="recommendContent" htmlEscape="false" maxlength="1000" class="input-xxlarge required"/></td>
+			<td colspan="3">
+				<form:textarea path="recommendContent" htmlEscape="false" maxlength="1000" class="input-xxlarge required"/>
+				<label id="recommendContentSensitiveWords" class="red"></label>
+			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
 			<th><span class="red">*</span>文章内容:</th>
 			<th><span class="red">*</span>文章内容:</th>
@@ -62,6 +78,7 @@
 					<form:textarea path="infoContent" class="input-xlarge hide"/>
 					<form:textarea path="infoContent" class="input-xlarge hide"/>
 					<!-- 富文本编辑器 -->
 					<!-- 富文本编辑器 -->
 					<div id="infoDetailEditor">${info.infoContent}</div>
 					<div id="infoDetailEditor">${info.infoContent}</div>
+					<label id="infoContentSensitiveWords" class="red"></label>
 				</div>
 				</div>
 			</td>
 			</td>
 		</tr>
 		</tr>
@@ -105,7 +122,8 @@
 		<tr>
 		<tr>
 			<th><span class="red">*</span>状态:</th>
 			<th><span class="red">*</span>状态:</th>
 			<td colspan="3">
 			<td colspan="3">
-				<form:radiobuttons path="enabledStatus" items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false" class="required"/>
+				<form:radiobutton path="enabledStatus" label="发布" value="1" checked="${empty info.enabledStatus?'checked':''}"/>
+				<form:radiobutton path="enabledStatus" label="保存草稿箱" value="0"/>
 			</td>
 			</td>
 		</tr>
 		</tr>
 		<tr>
 		<tr>
@@ -152,55 +170,108 @@
 <%--<script src="https://cdn.bootcdn.net/ajax/libs/jquery-validate/1.19.3/jquery.validate.min.js"></script>--%>
 <%--<script src="https://cdn.bootcdn.net/ajax/libs/jquery-validate/1.19.3/jquery.validate.min.js"></script>--%>
 <script type="text/javascript" src="${ctxStatic}/jquery-validation/1.19.3/jquery.validate.js"></script>
 <script type="text/javascript" src="${ctxStatic}/jquery-validation/1.19.3/jquery.validate.js"></script>
 <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
 <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
+<script type="text/javascript" src="${ctxStatic}/sensitiveWords/mint-filter.umd.js"></script>
 <script type="text/javascript">
 <script type="text/javascript">
 	$(document).ready(function() {
 	$(document).ready(function() {
 		//$("#name").focus();
 		//$("#name").focus();
 		$("#inputForm").validate({
 		$("#inputForm").validate({
 			ignore:"",
 			ignore:"",
 			submitHandler: function(form){
 			submitHandler: function(form){
-				debugger
-				if ($("#title").val() == '') {
+				var status = $("input[name='enabledStatus']:checked").val();
+				var title = $("#title").val();
+				var label = $("#label").val();
+				var keyword = $("#keyword").val();
+				var publisher = $("#publisher").val();
+				var source = $("#source").val();
+				var pubdate = $("#pubdate").val();
+				var recommendContent = $("#recommendContent").val();
+				var infoContent = $("#infoContent").val();
+				var guidanceImage = $("#guidanceImage").val();
+				var basePraise = $("#basePraise").val();
+				var basePv = $("#basePv").val();
+				if (title == '') {
 					alertx("请输入文章标题");
 					alertx("请输入文章标题");
 					return false;
 					return false;
 				}
 				}
-				if ($("#label").val() == '') {
+				if (label == '') {
 					alertx("请输入文章标签");
 					alertx("请输入文章标签");
 					return false;
 					return false;
 				}
 				}
-				if ($("#keyword").val() == '') {
+				if (keyword == '') {
 					alertx("请输入SEO关键词");
 					alertx("请输入SEO关键词");
 					return false;
 					return false;
 				}
 				}
-				if ($("#publisher").val() == '') {
+				if (publisher == '') {
 					alertx("请输入发布人");
 					alertx("请输入发布人");
 					return false;
 					return false;
 				}
 				}
-				if ($("#pubdate").val() == '') {
+				if (pubdate == '') {
 					alertx("请输入发布时间");
 					alertx("请输入发布时间");
 					return false;
 					return false;
 				}
 				}
-				if ($("#recommendContent").val() == '') {
+				if (recommendContent == '') {
 					alertx("请输入推荐语(描述)");
 					alertx("请输入推荐语(描述)");
 					return false;
 					return false;
 				}
 				}
-				if ($("#infoContent").val() == '') {
+				if (infoContent == '') {
 					alertx("请输入文章内容");
 					alertx("请输入文章内容");
 					return false;
 					return false;
 				}
 				}
-				if ($("#guidanceImage").val() == '') {
+				if (guidanceImage == '') {
 					alertx("请上传引导图");
 					alertx("请上传引导图");
 					return false;
 					return false;
 				}
 				}
-				if ($("#basePraise").val() == '') {
+				if (basePraise == '') {
 					alertx("请输入基础点赞");
 					alertx("请输入基础点赞");
 					return false;
 					return false;
 				}
 				}
-				if ($("#basePv").val() == '') {
+				if (basePv == '') {
 					alertx("请输入基础浏览量");
 					alertx("请输入基础浏览量");
 					return false;
 					return false;
 				}
 				}
-				loading('正在提交,请稍等...');
-				form.submit();
+
+				// 检测敏感词
+				var propertyMap = new Map();
+				propertyMap.set("title", title);
+				propertyMap.set("label", label);
+				propertyMap.set("keyword", keyword);
+				propertyMap.set("publisher", publisher);
+				propertyMap.set("source", source);
+				propertyMap.set("recommendContent", recommendContent);
+				propertyMap.set("infoContent", infoContent);
+				var sensitiveWords = '${sensitiveWords}';
+				const mint = new MintFilter(sensitiveWords.split('|'));
+				var filterSync = '';
+				var touchWords = '';
+				var touchNum = 0;
+				propertyMap.forEach(function (value,key,map) {
+					filterSync = mint.filterSync(value);
+					filterSync.words.forEach(word=>{
+						touchWords += touchWords === '' ? word : "," + word;
+					})
+					if (touchWords !== '') {
+						// 增加敏感词触发数量
+						touchNum++;
+						// 设置敏感词提示
+						$("#" + key + "SensitiveWords").text("敏感词:" + touchWords);
+						touchWords = '';
+					}
+				});
+				if (touchNum > 0) {
+					var msg = 1 == status?"当前发布内容存在敏感词,已为您标记在输入框下方," +
+							"请修改后,再进行保存发布,强行保存发布将会导致审核不通过!":
+							"当前内容存在敏感词,已为您标记在输入框下方,建议修改后再进行保存!否则," +
+							"将会影响发布时审核不通过!";
+					top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+						if (v == 'ok') {
+							loading('正在提交,请稍等...');
+							form.submit();
+						}
+					}, {buttonsFocus: 1, persistent: true});
+				} else{
+					loading('正在提交,请稍等...');
+					form.submit();
+				}
 			},
 			},
 			errorContainer: "#messageBox",
 			errorContainer: "#messageBox",
 			errorPlacement: function(error, element) {
 			errorPlacement: function(error, element) {
@@ -233,7 +304,6 @@
 
 
 	//富文本框编辑
 	//富文本框编辑
 	function checkInfo() {
 	function checkInfo() {
-		debugger
 		var infoContent = infoDetailEditor.getData();
 		var infoContent = infoDetailEditor.getData();
 		$("#infoContent").val(infoContent);
 		$("#infoContent").val(infoContent);
 		console.log(infoContent);
 		console.log(infoContent);

+ 4 - 4
src/main/webapp/WEB-INF/views/modules/info/infoList.jsp

@@ -280,13 +280,13 @@
 				</td>
 				</td>
 				<td>
 				<td>
 					<c:if test="${info.enabledStatus eq 1 }">
 					<c:if test="${info.enabledStatus eq 1 }">
-						<a href="javascript:void(0);" onclick="updateStatus('0','${info.id}','enabledStatus','${info.enabledStatus}');" >
-							<img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
+						<font color="green">已发布</font>
+						<a href="javascript:void(0)" onclick="updateStatus('0','${info.id}','enabledStatus','${info.enabledStatus}');" style="cursor: pointer">保存草稿箱
 						</a>
 						</a>
 					</c:if>
 					</c:if>
 					<c:if test="${info.enabledStatus ne 1 }">
 					<c:if test="${info.enabledStatus ne 1 }">
-						<a href="javascript:void(0)" onclick="updateStatus('1','${info.id}','enabledStatus','${info.enabledStatus}');">
-							<img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
+						<font color="red">保存草稿箱</font>
+						<a href="javascript:void(0)" onclick="updateStatus('1','${info.id}','enabledStatus','${info.enabledStatus}');" style="cursor: pointer">发布
 						</a>
 						</a>
 					</c:if>
 					</c:if>
 				</td>
 				</td>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/recommend.jsp

@@ -84,7 +84,7 @@
 			<label><font color="red">*</font><b>设置类型:</b></label>
 			<label><font color="red">*</font><b>设置类型:</b></label>
 			<input type="radio" name="recommendType" value="1"  onchange="changeRecommendType()" ${recommendType == "1" ? "checked" : ""} />手动选择<b class="line">|</b>
 			<input type="radio" name="recommendType" value="1"  onchange="changeRecommendType()" ${recommendType == "1" ? "checked" : ""} />手动选择<b class="line">|</b>
 			<input type="radio" name="recommendType" value="0" onchange="changeRecommendType()" ${(recommendType == "0" || recommendType == ""|| recommendType == null) ? "checked" : ""} />自动选择
 			<input type="radio" name="recommendType" value="0" onchange="changeRecommendType()" ${(recommendType == "0" || recommendType == ""|| recommendType == null) ? "checked" : ""} />自动选择
-			<span style="color:#D0D0D0;">(设置自动选择后,系统将会选择该商品所属相同二级分类中销量前7名的商品进行推荐)<span/>
+			<span style="color:#D0D0D0;">(设置自动选择后,系统将会选择该商品所属相同二级分类中销量前7名的商品进行推荐)</span>
 		</div>
 		</div>
 	</div>
 	</div>
 	<div id="p-list" style="display:none;">
 	<div id="p-list" style="display:none;">

File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/sensitiveWords/mint-filter.umd.js


Some files were not shown because too many files changed in this diff