Sfoglia il codice sorgente

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

zhijiezhao 3 anni fa
parent
commit
1332178acc
59 ha cambiato i file con 3957 aggiunte e 30 eliminazioni
  1. 3 0
      src/main/java/com/caimei/modules/baike/dao/CmBaikeProductDao.java
  2. 45 0
      src/main/java/com/caimei/modules/baike/entity/CmBaikeProduct.java
  3. 11 0
      src/main/java/com/caimei/modules/baike/service/CmBaikeProductService.java
  4. 41 3
      src/main/java/com/caimei/modules/baike/web/CmBaikeProductController.java
  5. 2 0
      src/main/java/com/caimei/modules/hehe/dao/CmHeheActivityProductDao.java
  6. 21 0
      src/main/java/com/caimei/modules/hehe/dao/CmHeheCollageDao.java
  7. 25 0
      src/main/java/com/caimei/modules/hehe/dao/CmHeheCollageProductDao.java
  8. 26 0
      src/main/java/com/caimei/modules/hehe/dao/CmHeheReductionDao.java
  9. 7 0
      src/main/java/com/caimei/modules/hehe/dao/HeHeNewOrderDao.java
  10. 120 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheCollage.java
  11. 99 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheCollageMember.java
  12. 116 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheCollageProduct.java
  13. 1 1
      src/main/java/com/caimei/modules/hehe/entity/CmHeheCoupon.java
  14. 1 1
      src/main/java/com/caimei/modules/hehe/entity/CmHeheCouponOrderRecord.java
  15. 1 1
      src/main/java/com/caimei/modules/hehe/entity/CmHeheReceiveUser.java
  16. 102 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheReduction.java
  17. 70 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheReductionUser.java
  18. 3 0
      src/main/java/com/caimei/modules/hehe/service/CmHeheActivityProductService.java
  19. 91 0
      src/main/java/com/caimei/modules/hehe/service/CmHeheCollageProductService.java
  20. 62 0
      src/main/java/com/caimei/modules/hehe/service/CmHeheCollageService.java
  21. 102 0
      src/main/java/com/caimei/modules/hehe/service/CmHeheReductionService.java
  22. 6 1
      src/main/java/com/caimei/modules/hehe/service/HeHeNewOrderService.java
  23. 85 0
      src/main/java/com/caimei/modules/hehe/web/CmHeheCollageController.java
  24. 109 0
      src/main/java/com/caimei/modules/hehe/web/CmHeheCollageProductController.java
  25. 132 0
      src/main/java/com/caimei/modules/hehe/web/CmHeheReductionController.java
  26. 2 2
      src/main/java/com/caimei/modules/info/web/InfoController.java
  27. 38 0
      src/main/java/com/caimei/modules/order/entity/NewOrder.java
  28. 15 0
      src/main/java/com/caimei/modules/order/service/NewOrderService.java
  29. 1 1
      src/main/resources/config/beta/caimei.properties
  30. 20 2
      src/main/resources/mappings/modules/baike/CmBaikeProductMapper.xml
  31. 8 5
      src/main/resources/mappings/modules/hehe/CmHeheActivityProductMapper.xml
  32. 123 0
      src/main/resources/mappings/modules/hehe/CmHeheCollageMapper.xml
  33. 136 0
      src/main/resources/mappings/modules/hehe/CmHeheCollageProductMapper.xml
  34. 150 0
      src/main/resources/mappings/modules/hehe/CmHeheReductionMapper.xml
  35. 18 4
      src/main/resources/mappings/modules/hehe/HeHeNewOrderMapper.xml
  36. 5 1
      src/main/resources/mappings/modules/order/OrderMapper.xml
  37. 192 0
      src/main/webapp/WEB-INF/views/modules/baike/auditBaike.jsp
  38. 360 0
      src/main/webapp/WEB-INF/views/modules/baike/checkBaikePage.jsp
  39. 0 1
      src/main/webapp/WEB-INF/views/modules/baike/cmBaikeProductForm.jsp
  40. 162 0
      src/main/webapp/WEB-INF/views/modules/baike/shopBaikeProductList.jsp
  41. 24 0
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/applyRefoundForm.jsp
  42. 24 1
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/orderReturnRecord.jsp
  43. 21 0
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/refundRecord.jsp
  44. 54 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageForm.jsp
  45. 123 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageList.jsp
  46. 78 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageMemberList.jsp
  47. 205 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageProductForm.jsp
  48. 144 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageProductList.jsp
  49. 1 1
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCouponForm.jsp
  50. 2 2
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCouponList.jsp
  51. 107 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheReductionForm.jsp
  52. 223 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheReductionList.jsp
  53. 82 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheReductionUserList.jsp
  54. 21 1
      src/main/webapp/WEB-INF/views/modules/hehe/heheNewOrderDetail.jsp
  55. 17 0
      src/main/webapp/WEB-INF/views/modules/hehe/heheNewOrderList.jsp
  56. 1 1
      src/main/webapp/WEB-INF/views/modules/hehe/receiveDetailsList.jsp
  57. 185 0
      src/main/webapp/WEB-INF/views/modules/hehe/resetTime.jsp
  58. 134 0
      src/main/webapp/WEB-INF/views/modules/hehe/toAddCollageProduct.jsp
  59. 0 1
      src/main/webapp/WEB-INF/views/modules/weisha/cmOrganizeProductList.jsp

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

@@ -7,6 +7,7 @@ import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.caimei.modules.baike.entity.CmBaikeProduct;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -47,4 +48,6 @@ public interface CmBaikeProductDao extends CrudDao<CmBaikeProduct> {
     void insertProductQuestion(@Param("question") String question,@Param("answer") String answer,@Param("productId") String productId);
 
     Integer findTopLength();
+
+    void auditBaike(@Param("id") String id,@Param("auditStatus") Integer auditStatus,@Param("failReason") String failReason,@Param("publishTime") Date publishTime);
 }

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

@@ -17,6 +17,8 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	
 	private static final long serialVersionUID = 1L;
 	private Integer commodityType;		// 分类:1产品,2仪器
+	private Integer publishSource;		// 百科发布来源:1采美,2供应商
+	private Integer shopId;		// 供应商id,publishSource为2时才有值
 	private String name;		// 名称
 	private String alias;		// 别名
 	private String discription;		// 描述
@@ -41,6 +43,8 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	private Integer typeId;		// 分类id
 	private Integer topPosition;		// 置顶位
 	private Integer status;		// 状态:0停用,1启用
+	private Integer auditStatus;	//百科审核状态:1待审核,2审核通过,3审核失败
+	private String failReason;	//审核失败理由
 	private Date addTime;		// 添加时间
 
 
@@ -50,6 +54,7 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	private List<String> authImageList;			// 产品认证图片列表
 	private List<String> displayImageList;		// 效果展示图片列表
 	private List<CmBaikeProductQuestion> questionList;		//问题列表
+	private String shopName;		//供应商名称
 	
 	public CmBaikeProduct() {
 		super();
@@ -330,4 +335,44 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
     public void setSeoKeyword(String seoKeyword) {
         this.seoKeyword = seoKeyword;
     }
+
+	public Integer getPublishSource() {
+		return publishSource;
+	}
+
+	public void setPublishSource(Integer publishSource) {
+		this.publishSource = publishSource;
+	}
+
+	public Integer getShopId() {
+		return shopId;
+	}
+
+	public void setShopId(Integer shopId) {
+		this.shopId = shopId;
+	}
+
+	public Integer getAuditStatus() {
+		return auditStatus;
+	}
+
+	public void setAuditStatus(Integer auditStatus) {
+		this.auditStatus = auditStatus;
+	}
+
+	public String getFailReason() {
+		return failReason;
+	}
+
+	public void setFailReason(String failReason) {
+		this.failReason = failReason;
+	}
+
+	public String getShopName() {
+		return shopName;
+	}
+
+	public void setShopName(String shopName) {
+		this.shopName = shopName;
+	}
 }

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

@@ -1,9 +1,11 @@
 package com.caimei.modules.baike.service;
 
+import java.util.Date;
 import java.util.List;
 
 import com.caimei.modules.baike.entity.CmBaikeProductParam;
 import com.caimei.modules.baike.entity.CmBaikeProductQuestion;
+import com.caimei.modules.info.entity.Info;
 import com.caimei.modules.miniprogram.utils.UploadPicUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import org.springframework.stereotype.Service;
@@ -131,4 +133,13 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 		cmBaikeProduct.setTopFlag(1);
 		return cmBaikeProductDao.findList(cmBaikeProduct);
 	}
+
+	@Transactional(readOnly = false)
+	public void auditBaike(CmBaikeProduct cmBaikeProduct) {
+		Date publishTime = null;
+		if (cmBaikeProduct.getAuditStatus() == 2) {
+			publishTime = new Date();
+		}
+		cmBaikeProductDao.auditBaike(cmBaikeProduct.getId(), cmBaikeProduct.getAuditStatus(), cmBaikeProduct.getFailReason(), publishTime);
+	}
 }

+ 41 - 3
src/main/java/com/caimei/modules/baike/web/CmBaikeProductController.java

@@ -78,7 +78,11 @@ public class CmBaikeProductController extends BaseController {
 		model.addAttribute("typeList", typeList);
 		model.addAttribute("commodityType", commodityType);
 		model.addAttribute("topLength", null == topLength ? 0 : topLength);
-        return "modules/baike/cmBaikeProductList";
+		if (null != cmBaikeProduct.getPublishSource() && 2 == cmBaikeProduct.getPublishSource()) {
+			return "modules/baike/shopBaikeProductList";
+		} else {
+			return "modules/baike/cmBaikeProductList";
+		}
 	}
 
 	@RequestMapping(value = "form")
@@ -116,7 +120,7 @@ public class CmBaikeProductController extends BaseController {
         String commodityType = cmBaikeProduct.getCommodityType() == 1 ? "产品" : "仪器";
         addMessage(redirectAttributes, "保存" + commodityType + "成功");
 		cleanRedisCache();
-        return "redirect:" + Global.getAdminPath() + "/baike/cmBaikeProduct/?repage&commodityType=" + cmBaikeProduct.getCommodityType();
+		return "redirect:" + Global.getAdminPath() + "/baike/cmBaikeProduct/?repage&commodityType=" + cmBaikeProduct.getCommodityType() + "&publishSource=1";
 	}
 	
 	@RequestMapping(value = "delete")
@@ -124,7 +128,7 @@ public class CmBaikeProductController extends BaseController {
 		cmBaikeProductService.delete(cmBaikeProduct);
 		addMessage(redirectAttributes, "删除产品成功");
 		cleanRedisCache();
-        return "redirect:" + Global.getAdminPath() + "/baike/cmBaikeProduct/?repage&commodityType=" + cmBaikeProduct.getCommodityType();
+        return "redirect:" + Global.getAdminPath() + "/baike/cmBaikeProduct/?repage&commodityType=" + cmBaikeProduct.getCommodityType() + "&publishSource=1";
 	}
 
     @RequestMapping(value = "updateStatus")
@@ -189,4 +193,38 @@ public class CmBaikeProductController extends BaseController {
 //		generateUtils.generateBaikePage(1);
 //		generateUtils.generateBaikePage(2);
 	}
+
+	@RequestMapping(value = "check")
+	public String checkInfo(CmBaikeProduct cmBaikeProduct,Model model) {
+		model.addAttribute("cmBaikeProduct", cmBaikeProduct);
+		// 商品类型
+		String commodityType = cmBaikeProduct.getCommodityType() == 1 ? "产品" : "仪器";
+		// 参数列表
+		List<CmBaikeProductParam> paramList = cmBaikeProductDao.findParamList(cmBaikeProduct.getId());
+		cmBaikeProduct.setParamList(paramList);
+		// 产品/仪器认证图片列表
+		List<String> authImageList = cmBaikeProductDao.findImageList(cmBaikeProduct.getId(), 1);
+		cmBaikeProduct.setAuthImageList(authImageList);
+		// 效果展示图片列表
+		List<String> displayImageList = cmBaikeProductDao.findImageList(cmBaikeProduct.getId(), 2);
+		cmBaikeProduct.setDisplayImageList(displayImageList);
+		// 问题列表
+		List<CmBaikeProductQuestion> questionList = cmBaikeProductDao.findQuestionList(cmBaikeProduct.getId());
+		cmBaikeProduct.setQuestionList(questionList);
+		model.addAttribute("commodityType", commodityType);
+		return "modules/baike/checkBaikePage";
+	}
+
+	@RequestMapping(value = "toAuditPage")
+	public String toAuditPage(CmBaikeProduct cmBaikeProduct,Model model) {
+		model.addAttribute("cmBaikeProduct", cmBaikeProduct);
+		return "modules/baike/auditBaike";
+	}
+
+	@RequestMapping(value = "auditBaike")
+	@ResponseBody
+	public Boolean auditBaike(CmBaikeProduct cmBaikeProduct) {
+		cmBaikeProductService.auditBaike(cmBaikeProduct);
+		return true;
+	}
 }

+ 2 - 0
src/main/java/com/caimei/modules/hehe/dao/CmHeheActivityProductDao.java

@@ -70,4 +70,6 @@ public interface CmHeheActivityProductDao extends CrudDao<CmHeheActivityProduct>
      * @param productId
      */
     void deleteUserActivity(Integer productId);
+
+    List<Integer> findCollageProductId();
 }

+ 21 - 0
src/main/java/com/caimei/modules/hehe/dao/CmHeheCollageDao.java

@@ -0,0 +1,21 @@
+package com.caimei.modules.hehe.dao;
+
+import com.caimei.modules.hehe.entity.CmHeheCollageMember;
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import com.caimei.modules.hehe.entity.CmHeheCollage;
+
+import java.util.List;
+
+/**
+ * 呵呵商城拼团记录DAO接口
+ * @author Aslee
+ * @version 2021-12-14
+ */
+@MyBatisDao
+public interface CmHeheCollageDao extends CrudDao<CmHeheCollage> {
+
+    List<Integer> getCollageOrderIds(String collageId);
+
+    List<CmHeheCollageMember> findMemberList(CmHeheCollageMember cmHeheCollageMember);
+}

+ 25 - 0
src/main/java/com/caimei/modules/hehe/dao/CmHeheCollageProductDao.java

@@ -0,0 +1,25 @@
+package com.caimei.modules.hehe.dao;
+
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import com.caimei.modules.hehe.entity.CmHeheCollageProduct;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 呵呵商城拼团商品DAO接口
+ * @author Aslee
+ * @version 2021-12-14
+ */
+@MyBatisDao
+public interface CmHeheCollageProductDao extends CrudDao<CmHeheCollageProduct> {
+
+    void updateStatus(@Param("id") Integer id,@Param("status") Integer status);
+
+    List<Integer> findExistProductIds();
+
+    List<Integer> findActivityProductIds();
+
+    Integer getProductId(Integer heheProductId);
+}

+ 26 - 0
src/main/java/com/caimei/modules/hehe/dao/CmHeheReductionDao.java

@@ -0,0 +1,26 @@
+package com.caimei.modules.hehe.dao;
+
+import com.caimei.modules.hehe.entity.CmHeheReductionUser;
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import com.caimei.modules.hehe.entity.CmHeheReduction;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 呵呵商城分享减免DAO接口
+ * @author Aslee
+ * @version 2021-12-15
+ */
+@MyBatisDao
+public interface CmHeheReductionDao extends CrudDao<CmHeheReduction> {
+
+    void updateStatus(@Param("id") String id,@Param("status") Integer status);
+
+    void updateTime(CmHeheReduction cmHeheReduction);
+
+    List<CmHeheReductionUser> findUserList(CmHeheReductionUser cmHeheReductionUser);
+
+    List<CmHeheReduction> getAllTime();
+}

+ 7 - 0
src/main/java/com/caimei/modules/hehe/dao/HeHeNewOrderDao.java

@@ -27,4 +27,11 @@ public interface HeHeNewOrderDao extends CrudDao<NewOrder> {
      * @return
      */
     CmHeheCouponOrderRecord findOrderCouponRecord(Integer orderID);
+
+    /**
+     * 查询分享减免条件金额
+     * @param orderID
+     * @return
+     */
+    Double findReductionTouchPrice(Integer orderID);
 }

+ 120 - 0
src/main/java/com/caimei/modules/hehe/entity/CmHeheCollage.java

@@ -0,0 +1,120 @@
+package com.caimei.modules.hehe.entity;
+
+import java.util.Date;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * 呵呵商城拼团记录Entity
+ * @author Aslee
+ * @version 2021-12-14
+ */
+public class CmHeheCollage extends DataEntity<CmHeheCollage> {
+	
+	private static final long serialVersionUID = 1L;
+	private Integer productId;		// 拼团商品id
+	private Double price;		// 拼团价
+	private Integer memberNum;		// 拼团人数
+	private Integer status;		// 拼团状态:1拼团中,已拼成
+	private Date startTime;		// 开始时间
+	private Date completeTime;		// 成团时间
+	private Date endTime;		// 结束时间
+
+	private String productName;		// 商品名称
+	private String shopName;		// 供应商名称
+	private List<Integer> orderIdList;	// 订单id列表
+	
+	public CmHeheCollage() {
+		super();
+	}
+
+	public CmHeheCollage(String id){
+		super(id);
+	}
+
+	public Integer getProductId() {
+		return productId;
+	}
+
+	public void setProductId(Integer productId) {
+		this.productId = productId;
+	}
+	
+	public Double getPrice() {
+		return price;
+	}
+
+	public void setPrice(Double price) {
+		this.price = price;
+	}
+	
+	public Integer getMemberNum() {
+		return memberNum;
+	}
+
+	public void setMemberNum(Integer memberNum) {
+		this.memberNum = memberNum;
+	}
+	
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getStartTime() {
+		return startTime;
+	}
+
+	public void setStartTime(Date startTime) {
+		this.startTime = startTime;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getCompleteTime() {
+		return completeTime;
+	}
+
+	public void setCompleteTime(Date completeTime) {
+		this.completeTime = completeTime;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getEndTime() {
+		return endTime;
+	}
+
+	public void setEndTime(Date endTime) {
+		this.endTime = endTime;
+	}
+
+	public String getProductName() {
+		return productName;
+	}
+
+	public void setProductName(String productName) {
+		this.productName = productName;
+	}
+
+	public String getShopName() {
+		return shopName;
+	}
+
+	public void setShopName(String shopName) {
+		this.shopName = shopName;
+	}
+
+	public List<Integer> getOrderIdList() {
+		return orderIdList;
+	}
+
+	public void setOrderIdList(List<Integer> orderIdList) {
+		this.orderIdList = orderIdList;
+	}
+}

+ 99 - 0
src/main/java/com/caimei/modules/hehe/entity/CmHeheCollageMember.java

@@ -0,0 +1,99 @@
+package com.caimei.modules.hehe.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 呵呵商城拼团成员Entity
+ * @author Aslee
+ * @version 2021-12-14
+ */
+public class CmHeheCollageMember extends DataEntity<CmHeheCollageMember> {
+
+	private static final long serialVersionUID = 1L;
+	private Integer collageId;		// 拼团id
+	private Integer userId;		// 用户id
+	private Integer orderId;		// 订单id
+	private Integer launchFlag;		// 拼主标识:0不是,1是
+
+	private String nickName;		// 微信昵称
+	private String mobile;			// 手机号
+	private Integer userIdentity;	// 用户身份:1普通用户,2分销者
+	private Date orderTime;	// 下单时间
+	private String orderNo;			// 订单编号
+
+	public Integer getCollageId() {
+		return collageId;
+	}
+
+	public void setCollageId(Integer collageId) {
+		this.collageId = collageId;
+	}
+
+	public Integer getUserId() {
+		return userId;
+	}
+
+	public void setUserId(Integer userId) {
+		this.userId = userId;
+	}
+
+	public Integer getOrderId() {
+		return orderId;
+	}
+
+	public void setOrderId(Integer orderId) {
+		this.orderId = orderId;
+	}
+
+	public Integer getLaunchFlag() {
+		return launchFlag;
+	}
+
+	public void setLaunchFlag(Integer launchFlag) {
+		this.launchFlag = launchFlag;
+	}
+
+	public String getNickName() {
+		return nickName;
+	}
+
+	public void setNickName(String nickName) {
+		this.nickName = nickName;
+	}
+
+	public String getMobile() {
+		return mobile;
+	}
+
+	public void setMobile(String mobile) {
+		this.mobile = mobile;
+	}
+
+	public Integer getUserIdentity() {
+		return userIdentity;
+	}
+
+	public void setUserIdentity(Integer userIdentity) {
+		this.userIdentity = userIdentity;
+	}
+
+	public Date getOrderTime() {
+		return orderTime;
+	}
+
+	public void setOrderTime(Date orderTime) {
+		this.orderTime = orderTime;
+	}
+
+	public String getOrderNo() {
+		return orderNo;
+	}
+
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+}

+ 116 - 0
src/main/java/com/caimei/modules/hehe/entity/CmHeheCollageProduct.java

@@ -0,0 +1,116 @@
+package com.caimei.modules.hehe.entity;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * 呵呵商城拼团商品Entity
+ * @author Aslee
+ * @version 2021-12-14
+ */
+public class CmHeheCollageProduct extends DataEntity<CmHeheCollageProduct> {
+	
+	private static final long serialVersionUID = 1L;
+	private Integer productId;		// 商品id
+	private Double price;		// 拼团价格
+	private Integer limitedNum;		// 单人限购量
+	private Integer unlimitedFlag;		// 不限购买量标识:1不限制,0限制
+	private Integer memberNum;		// 拼团人数
+	private Integer status;		// 商品状态:0已下架,1已上架
+	private Date addTime;		// 添加时间
+
+	private String shopName;	// 供应商名称
+	private String productName;	// 商品名称
+	private String productImage;	// 商品图片
+	
+	public CmHeheCollageProduct() {
+		super();
+	}
+
+	public CmHeheCollageProduct(String id){
+		super(id);
+	}
+
+	public Integer getProductId() {
+		return productId;
+	}
+
+	public void setProductId(Integer productId) {
+		this.productId = productId;
+	}
+	
+	public Double getPrice() {
+		return price;
+	}
+
+	public void setPrice(Double price) {
+		this.price = price;
+	}
+	
+	public Integer getLimitedNum() {
+		return limitedNum;
+	}
+
+	public void setLimitedNum(Integer limitedNum) {
+		this.limitedNum = limitedNum;
+	}
+	
+	public Integer getUnlimitedFlag() {
+		return unlimitedFlag;
+	}
+
+	public void setUnlimitedFlag(Integer unlimitedFlag) {
+		this.unlimitedFlag = unlimitedFlag;
+	}
+	
+	public Integer getMemberNum() {
+		return memberNum;
+	}
+
+	public void setMemberNum(Integer memberNum) {
+		this.memberNum = memberNum;
+	}
+	
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getAddTime() {
+		return addTime;
+	}
+
+	public void setAddTime(Date addTime) {
+		this.addTime = addTime;
+	}
+
+	public String getShopName() {
+		return shopName;
+	}
+
+	public void setShopName(String shopName) {
+		this.shopName = shopName;
+	}
+
+	public String getProductName() {
+		return productName;
+	}
+
+	public void setProductName(String productName) {
+		this.productName = productName;
+	}
+
+	public String getProductImage() {
+		return productImage;
+	}
+
+	public void setProductImage(String productImage) {
+		this.productImage = productImage;
+	}
+}

+ 1 - 1
src/main/java/com/caimei/modules/hehe/entity/CmHeheCoupon.java

@@ -22,7 +22,7 @@ public class CmHeheCoupon extends DataEntity<CmHeheCoupon> {
 	private Date endTime;		// 下架时间
 	private Integer startNowFlag;		// 立即上架标记 0否 1是
 	private Integer permanentFlag;		// 永久上架标记 0否 1是
-	private Integer couponType;		// 劵类型 1活动券 2专享券 3新人券 4好友分享券 5好友消费券
+	private Integer couponType;		// 劵类型 1活动券 2专享券 3新人券 4好友邀请券 5好友消费券
 	private Integer productType;		// 优惠商品:1全商城商品 2指定商品(活动券有效)
 	private Integer receivePeriod;		// 领取期限(天)
 	private Integer receiveFlag;		// 领取期限同上下架时间标记(在上下架期间内都可领取)

+ 1 - 1
src/main/java/com/caimei/modules/hehe/entity/CmHeheCouponOrderRecord.java

@@ -22,7 +22,7 @@ public class CmHeheCouponOrderRecord implements Serializable {
      */
     private Integer receiveCouponId;
     /**
-     * 劵类型 1活动券 2专享券 3新人券 4好友分享券 5好友消费券
+     * 劵类型 1活动券 2专享券 3新人券 4好友邀请券 5好友消费券
      */
     private Integer couponType;
     /**

+ 1 - 1
src/main/java/com/caimei/modules/hehe/entity/CmHeheReceiveUser.java

@@ -29,7 +29,7 @@ public class CmHeheReceiveUser extends DataEntity<CmHeheReceiveUser> {
     private String nickName;    //微信昵称
     private String mobile;      //手机号
     private Integer userIdentity;       // 用户身份:1普通用户 2分销者
-    private Integer couponType;        // 劵类型 1活动券 2专享券 3新人券 4好友分享券 5好友消费券
+    private Integer couponType;        // 劵类型 1活动券 2专享券 3新人券 4好友邀请券 5好友消费券
     private BigDecimal couponAmount;        // 优惠券金额(面值)
     private BigDecimal touchPrice;        // 优惠满减条件金额
     private Integer couponStatus;    // 状态 0未生效 1已生效 2已关闭 3已失效

+ 102 - 0
src/main/java/com/caimei/modules/hehe/entity/CmHeheReduction.java

@@ -0,0 +1,102 @@
+package com.caimei.modules.hehe.entity;
+
+import org.hibernate.validator.constraints.Length;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * 呵呵商城分享减免Entity
+ * @author Aslee
+ * @version 2021-12-15
+ */
+public class CmHeheReduction extends DataEntity<CmHeheReduction> {
+	
+	private static final long serialVersionUID = 1L;
+	private String name;		// 活动名称
+	private Double reducedAmount;		// 减免金额
+	private Double touchPrice;		// 减免条件
+	private Integer shareNum;		// 分享次数
+	private Date startTime;		// 上架时间
+	private Date endTime;		// 下架时间
+	private Date addTime;		// 添加时间
+
+	private Integer status;		// 状态:1待上架,2已上架,3已下架
+
+	public CmHeheReduction() {
+		super();
+	}
+
+	public CmHeheReduction(String id){
+		super(id);
+	}
+
+	@Length(min=0, max=30, message="活动名称长度必须介于 0 和 30 之间")
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Double getReducedAmount() {
+		return reducedAmount;
+	}
+
+	public void setReducedAmount(Double reducedAmount) {
+		this.reducedAmount = reducedAmount;
+	}
+
+	public Double getTouchPrice() {
+		return touchPrice;
+	}
+
+	public void setTouchPrice(Double touchPrice) {
+		this.touchPrice = touchPrice;
+	}
+
+	public Integer getShareNum() {
+		return shareNum;
+	}
+
+	public void setShareNum(Integer shareNum) {
+		this.shareNum = shareNum;
+	}
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getStartTime() {
+		return startTime;
+	}
+
+	public void setStartTime(Date startTime) {
+		this.startTime = startTime;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getEndTime() {
+		return endTime;
+	}
+
+	public void setEndTime(Date endTime) {
+		this.endTime = endTime;
+	}
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getAddTime() {
+		return addTime;
+	}
+
+	public void setAddTime(Date addTime) {
+		this.addTime = addTime;
+	}
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+}

+ 70 - 0
src/main/java/com/caimei/modules/hehe/entity/CmHeheReductionUser.java

@@ -0,0 +1,70 @@
+package com.caimei.modules.hehe.entity;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+import java.util.Date;
+
+/**
+ * 呵呵商城分享减免用户Entity
+ * @author Aslee
+ * @version 2021-12-14
+ */
+public class CmHeheReductionUser extends DataEntity<CmHeheReductionUser> {
+
+	private static final long serialVersionUID = 1L;
+	private Integer reductionId;		// 分享减免id
+	private Integer userId;		// 用户id
+	private Integer shareType;		// 分享类型:1微信好友,2微信朋友圈
+	private Date shareTime;		// 分享时间
+
+	private String nickName;		// 微信昵称
+	private String mobile;			// 手机号
+
+	public Integer getReductionId() {
+		return reductionId;
+	}
+
+	public void setReductionId(Integer reductionId) {
+		this.reductionId = reductionId;
+	}
+
+	public Integer getUserId() {
+		return userId;
+	}
+
+	public void setUserId(Integer userId) {
+		this.userId = userId;
+	}
+
+	public Integer getShareType() {
+		return shareType;
+	}
+
+	public void setShareType(Integer shareType) {
+		this.shareType = shareType;
+	}
+
+	public Date getShareTime() {
+		return shareTime;
+	}
+
+	public void setShareTime(Date shareTime) {
+		this.shareTime = shareTime;
+	}
+
+	public String getNickName() {
+		return nickName;
+	}
+
+	public void setNickName(String nickName) {
+		this.nickName = nickName;
+	}
+
+	public String getMobile() {
+		return mobile;
+	}
+
+	public void setMobile(String mobile) {
+		this.mobile = mobile;
+	}
+}

+ 3 - 0
src/main/java/com/caimei/modules/hehe/service/CmHeheActivityProductService.java

@@ -62,6 +62,9 @@ public class CmHeheActivityProductService extends CrudService<CmHeheActivityProd
 
     public Page<CmHeheProduct> findProductPage(Page<CmHeheProduct> productPage, CmHeheProduct product) {
         List<Integer> productIds = activityProductDao.findActivityProductId();
+        // 已参与拼团商品id
+        List<Integer> collageProductIds = activityProductDao.findCollageProductId();
+        productIds.addAll(collageProductIds);
         product.setIds(productIds);
         product.setPage(productPage);
         List<CmHeheProduct> productList = activityProductDao.findAllHeHeProduct(product);

+ 91 - 0
src/main/java/com/caimei/modules/hehe/service/CmHeheCollageProductService.java

@@ -0,0 +1,91 @@
+package com.caimei.modules.hehe.service;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import com.caimei.modules.hehe.dao.CmHeheFloorProductDao;
+import com.caimei.modules.product.entity.Product;
+import com.caimei.utils.AppUtils;
+import org.apache.commons.lang3.StringUtils;
+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.hehe.entity.CmHeheCollageProduct;
+import com.caimei.modules.hehe.dao.CmHeheCollageProductDao;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import javax.annotation.Resource;
+
+/**
+ * 呵呵商城拼团商品Service
+ * @author Aslee
+ * @version 2021-12-14
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmHeheCollageProductService extends CrudService<CmHeheCollageProductDao, CmHeheCollageProduct> {
+	@Resource
+	private CmHeheFloorProductDao cmHeheFloorProductDao;
+
+	@Resource
+	private CmHeheCollageProductDao cmHeheCollageProductDao;
+
+	public CmHeheCollageProduct get(String id) {
+		return super.get(id);
+	}
+	
+	public List<CmHeheCollageProduct> findList(CmHeheCollageProduct cmHeheCollageProduct) {
+		return super.findList(cmHeheCollageProduct);
+	}
+	
+	public Page<CmHeheCollageProduct> findPage(Page<CmHeheCollageProduct> page, CmHeheCollageProduct cmHeheCollageProduct) {
+		Page<CmHeheCollageProduct> productPage = super.findPage(page, cmHeheCollageProduct);
+		List<CmHeheCollageProduct> productList = productPage.getList();
+		productList.forEach(product -> product.setProductImage(AppUtils.getImageURL("product", product.getProductImage(), 0, "https://www.caimei365.com/")));
+		return productPage;
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(CmHeheCollageProduct cmHeheCollageProduct) {
+		if (!cmHeheCollageProduct.getIsNewRecord()) {
+			CmHeheCollageProduct dbProduct = get(cmHeheCollageProduct.getId());
+			if (!dbProduct.getProductId().equals(cmHeheCollageProduct.getProductId())) {
+				cmHeheCollageProduct.setProductId(cmHeheCollageProductDao.getProductId(cmHeheCollageProduct.getProductId()));
+			}
+		}
+		super.save(cmHeheCollageProduct);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(CmHeheCollageProduct cmHeheCollageProduct) {
+		super.delete(cmHeheCollageProduct);
+	}
+
+    public Page<Product> findProductList(Page<Product> productPage, Product product) {
+		product.setPage(productPage);
+		product.setSearchType(2);
+		// 已参与拼团商品id
+		List<Integer> productIds = cmHeheCollageProductDao.findExistProductIds();
+		// 已参与商品活动商品id
+		List<Integer> actProductIds = cmHeheCollageProductDao.findActivityProductIds();
+		productIds.addAll(actProductIds);
+		product.setIds(productIds);
+		List<Product> productList = cmHeheFloorProductDao.findAllProduct(product);
+		if (productList != null && productList.size() > 0) {
+			productList.forEach(item -> {
+				item.setMainImage(AppUtils.getImageURL("product", item.getMainImage(), 0, "https://www.caimei365.com/"));
+				item.setProductIds(product.getProductIds());
+			});
+		}
+		productPage.setList(productList);
+		return productPage;
+    }
+
+	@Transactional(readOnly = false)
+	public void updateStatus(Integer id, Integer status) {
+		cmHeheCollageProductDao.updateStatus(id, status);
+	}
+}

+ 62 - 0
src/main/java/com/caimei/modules/hehe/service/CmHeheCollageService.java

@@ -0,0 +1,62 @@
+package com.caimei.modules.hehe.service;
+
+import java.util.List;
+
+import com.caimei.modules.hehe.dao.CmHeheCollageProductDao;
+import com.caimei.modules.hehe.entity.CmHeheCollageMember;
+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.hehe.entity.CmHeheCollage;
+import com.caimei.modules.hehe.dao.CmHeheCollageDao;
+
+import javax.annotation.Resource;
+
+/**
+ * 呵呵商城拼团记录Service
+ * @author Aslee
+ * @version 2021-12-14
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmHeheCollageService extends CrudService<CmHeheCollageDao, CmHeheCollage> {
+	@Resource
+	private CmHeheCollageDao cmHeheCollageDao;
+
+	public CmHeheCollage get(String id) {
+		return super.get(id);
+	}
+	
+	public List<CmHeheCollage> findList(CmHeheCollage cmHeheCollage) {
+		return super.findList(cmHeheCollage);
+	}
+	
+	public Page<CmHeheCollage> findPage(Page<CmHeheCollage> page, CmHeheCollage cmHeheCollage) {
+		Page<CmHeheCollage> collagePage = super.findPage(page, cmHeheCollage);
+		List<CmHeheCollage> collageList = collagePage.getList();
+		collageList.forEach(collage->{
+			// 获取已拼团的订单id列表
+			List<Integer> orderIdList = cmHeheCollageDao.getCollageOrderIds(collage.getId());
+			collage.setOrderIdList(orderIdList);
+		});
+		return collagePage;
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(CmHeheCollage cmHeheCollage) {
+		super.save(cmHeheCollage);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(CmHeheCollage cmHeheCollage) {
+		super.delete(cmHeheCollage);
+	}
+
+	public Page<CmHeheCollageMember> getMemberPage(Page<CmHeheCollageMember> memberPage, CmHeheCollageMember cmHeheCollageMember) {
+		cmHeheCollageMember.setPage(memberPage);
+		memberPage.setList(cmHeheCollageDao.findMemberList(cmHeheCollageMember));
+		return memberPage;
+	}
+}

+ 102 - 0
src/main/java/com/caimei/modules/hehe/service/CmHeheReductionService.java

@@ -0,0 +1,102 @@
+package com.caimei.modules.hehe.service;
+
+import java.util.Date;
+import java.util.List;
+
+import com.caimei.modules.hehe.entity.CmHeheReduction;
+import com.caimei.modules.hehe.entity.CmHeheReductionUser;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+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.hehe.entity.CmHeheReduction;
+import com.caimei.modules.hehe.dao.CmHeheReductionDao;
+
+import javax.annotation.Resource;
+
+/**
+ * 呵呵商城分享减免Service
+ * @author Aslee
+ * @version 2021-12-15
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmHeheReductionService extends CrudService<CmHeheReductionDao, CmHeheReduction> {
+	@Resource
+	private CmHeheReductionDao cmHeheReductionDao;
+
+	public CmHeheReduction get(String id) {
+		return super.get(id);
+	}
+	
+	public List<CmHeheReduction> findList(CmHeheReduction cmHeheReduction) {
+		return super.findList(cmHeheReduction);
+	}
+	
+	public Page<CmHeheReduction> findPage(Page<CmHeheReduction> page, CmHeheReduction cmHeheReduction) {
+		Page<CmHeheReduction> reductionPage = super.findPage(page, cmHeheReduction);
+		List<CmHeheReduction> reductionList = reductionPage.getList();
+		reductionList.forEach(this::setReductionStatus);
+		return reductionPage;
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(CmHeheReduction cmHeheReduction) {
+		super.save(cmHeheReduction);
+	}
+
+	/**
+	 * 保证一个时间只存在唯一的活动
+	 * @return
+	 */
+	public Boolean checkTime(String reductionId, Date startTime1, Date endTime1) {
+		List<CmHeheReduction> allTimeList = cmHeheReductionDao.getAllTime();
+		for (int i = 0; i < allTimeList.size(); i++) {
+			CmHeheReduction time = allTimeList.get(i);
+			Date startTime2 = time.getStartTime();
+			Date endTime2 = time.getEndTime();
+			boolean sameTimeFlag = (startTime1.compareTo(startTime2) <= 0 && endTime1.compareTo(startTime2) >= 0)
+					|| (startTime2.compareTo(startTime1) <= 0 && endTime2.compareTo(startTime1) >= 0);
+			if (sameTimeFlag && !(StringUtils.isNotEmpty(reductionId) && reductionId.equals(time.getId()))) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	@Transactional(readOnly = false)
+	public void delete(CmHeheReduction cmHeheReduction) {
+		super.delete(cmHeheReduction);
+	}
+
+	public void setReductionStatus(CmHeheReduction cmHeheReduction) {
+		Date date = new Date();
+		if (cmHeheReduction != null) {
+			if (date.compareTo(cmHeheReduction.getStartTime()) < 0) {
+				cmHeheReduction.setStatus(1);
+			} else if (date.compareTo(cmHeheReduction.getEndTime()) > 0) {
+				cmHeheReduction.setStatus(3);
+			} else {
+				cmHeheReduction.setStatus(2);
+			}
+		}
+	}
+
+	@Transactional(readOnly = false)
+	public void updateStatus(CmHeheReduction cmHeheReduction) {
+		cmHeheReductionDao.updateStatus(cmHeheReduction.getId(), cmHeheReduction.getStatus());
+	}
+
+	@Transactional(readOnly = false)
+	public void updateTime(CmHeheReduction cmHeheReduction) {
+		cmHeheReductionDao.updateTime(cmHeheReduction);
+	}
+
+	public Page<CmHeheReductionUser> getUserPage(Page<CmHeheReductionUser> userPage, CmHeheReductionUser cmHeheReductionUser) {
+		cmHeheReductionUser.setPage(userPage);
+		userPage.setList(cmHeheReductionDao.findUserList(cmHeheReductionUser));
+		return userPage;
+	}
+}

+ 6 - 1
src/main/java/com/caimei/modules/hehe/service/HeHeNewOrderService.java

@@ -78,7 +78,7 @@ public class HeHeNewOrderService extends CrudService<HeHeNewOrderDao, NewOrder>
         else
             newOrder.setRebateOrder("0");
         if (null != newOrder) {
-            // 获取订单优惠记录
+            // 获取订单优惠券使用记录
             if (newOrder.getCouponAmount() != null && newOrder.getCouponAmount() > 0) {
                 CmHeheCouponOrderRecord couponRecord = heHeNewOrderDao.findOrderCouponRecord(newOrder.getOrderID());
                 if (couponRecord != null) {
@@ -86,6 +86,11 @@ public class HeHeNewOrderService extends CrudService<HeHeNewOrderDao, NewOrder>
                     newOrder.setHeheCouponRecord(couponRecord);
                 }
             }
+            // 获取订单分享减免记录
+            if (newOrder.getReductionAmount() != null && newOrder.getReductionAmount() > 0) {
+                Double reductionTouchPrice = heHeNewOrderDao.findReductionTouchPrice(newOrder.getOrderID());
+                newOrder.setReductionTouchPrice(reductionTouchPrice);
+            }
             //获取订单客户
             OrderUserInfo orderUserInfo = orderUserInfoService.findByOrderID(newOrder.getOrderID());
             if (null != orderUserInfo) {

+ 85 - 0
src/main/java/com/caimei/modules/hehe/web/CmHeheCollageController.java

@@ -0,0 +1,85 @@
+package com.caimei.modules.hehe.web;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.caimei.modules.hehe.entity.CmHeheCollageMember;
+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.hehe.entity.CmHeheCollage;
+import com.caimei.modules.hehe.service.CmHeheCollageService;
+
+/**
+ * 呵呵商城拼团记录Controller
+ * @author Aslee
+ * @version 2021-12-14
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/hehe/cmHeheCollage")
+public class CmHeheCollageController extends BaseController {
+
+	@Autowired
+	private CmHeheCollageService cmHeheCollageService;
+	
+	@ModelAttribute
+	public CmHeheCollage get(@RequestParam(required=false) String id) {
+		CmHeheCollage entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = cmHeheCollageService.get(id);
+		}
+		if (entity == null){
+			entity = new CmHeheCollage();
+		}
+		return entity;
+	}
+	
+	@RequestMapping(value = {"list", ""})
+	public String list(CmHeheCollage cmHeheCollage, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<CmHeheCollage> page = cmHeheCollageService.findPage(new Page<CmHeheCollage>(request, response), cmHeheCollage); 
+		model.addAttribute("page", page);
+		return "modules/hehe/cmHeheCollageList";
+	}
+
+	@RequestMapping(value = "form")
+	public String form(CmHeheCollage cmHeheCollage, Model model) {
+		model.addAttribute("cmHeheCollage", cmHeheCollage);
+		return "modules/hehe/cmHeheCollageForm";
+	}
+
+	@RequestMapping(value = "save")
+	public String save(CmHeheCollage cmHeheCollage, Model model, RedirectAttributes redirectAttributes) {
+		if (!beanValidator(model, cmHeheCollage)){
+			return form(cmHeheCollage, model);
+		}
+		cmHeheCollageService.save(cmHeheCollage);
+		addMessage(redirectAttributes, "保存拼团记录成功");
+		return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheCollage/?repage";
+	}
+	
+	@RequestMapping(value = "delete")
+	public String delete(CmHeheCollage cmHeheCollage, RedirectAttributes redirectAttributes) {
+		cmHeheCollageService.delete(cmHeheCollage);
+		addMessage(redirectAttributes, "删除拼团记录成功");
+		return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheCollage/?repage";
+	}
+
+	@RequestMapping(value = "memberList")
+	public String memberList(CmHeheCollageMember cmHeheCollageMember, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<CmHeheCollageMember> page = cmHeheCollageService.getMemberPage(new Page<CmHeheCollageMember>(request, response), cmHeheCollageMember);
+		model.addAttribute("page", page);
+		model.addAttribute("cmHeheCollageMember", cmHeheCollageMember);
+		return "modules/hehe/cmHeheCollageMemberList";
+	}
+
+}

+ 109 - 0
src/main/java/com/caimei/modules/hehe/web/CmHeheCollageProductController.java

@@ -0,0 +1,109 @@
+package com.caimei.modules.hehe.web;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.caimei.modules.product.entity.Product;
+import com.caimei.utils.AppUtils;
+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.bind.annotation.ResponseBody;
+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.hehe.entity.CmHeheCollageProduct;
+import com.caimei.modules.hehe.service.CmHeheCollageProductService;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 呵呵商城拼团商品Controller
+ * @author Aslee
+ * @version 2021-12-14
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/hehe/cmHeheCollageProduct")
+public class CmHeheCollageProductController extends BaseController {
+
+	@Autowired
+	private CmHeheCollageProductService cmHeheCollageProductService;
+	
+	@ModelAttribute
+	public CmHeheCollageProduct get(@RequestParam(required=false) String id) {
+		CmHeheCollageProduct entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = cmHeheCollageProductService.get(id);
+            if (null != entity) {
+                entity.setProductImage(AppUtils.getImageURL("product", entity.getProductImage(), 0, "https://www.caimei365.com/"));
+            }
+		}
+		if (entity == null){
+			entity = new CmHeheCollageProduct();
+		}
+		return entity;
+	}
+	
+	@RequestMapping(value = {"list", ""})
+	public String list(CmHeheCollageProduct cmHeheCollageProduct, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<CmHeheCollageProduct> page = cmHeheCollageProductService.findPage(new Page<CmHeheCollageProduct>(request, response), cmHeheCollageProduct); 
+		model.addAttribute("page", page);
+		return "modules/hehe/cmHeheCollageProductList";
+	}
+
+	@RequestMapping(value = "form")
+	public String form(CmHeheCollageProduct cmHeheCollageProduct, Model model) {
+		model.addAttribute("cmHeheCollageProduct", cmHeheCollageProduct);
+		return "modules/hehe/cmHeheCollageProductForm";
+	}
+
+	@RequestMapping(value = "save")
+	public String save(CmHeheCollageProduct cmHeheCollageProduct, Model model, RedirectAttributes redirectAttributes) {
+		if (!beanValidator(model, cmHeheCollageProduct)){
+			return form(cmHeheCollageProduct, model);
+		}
+		cmHeheCollageProductService.save(cmHeheCollageProduct);
+		addMessage(redirectAttributes, "保存商品成功");
+		return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheCollageProduct/?repage";
+	}
+	
+	@RequestMapping(value = "delete")
+	public String delete(CmHeheCollageProduct cmHeheCollageProduct, RedirectAttributes redirectAttributes) {
+		cmHeheCollageProductService.delete(cmHeheCollageProduct);
+		addMessage(redirectAttributes, "删除商品成功");
+		return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheCollageProduct/?repage";
+	}
+
+	/**
+	 * 选择商品页面
+	 */
+	@RequestMapping(value = "toAddProduct")
+	public String toAddProduct(Product product, Model model, HttpServletRequest request, HttpServletResponse response) {
+		Page<Product> page = cmHeheCollageProductService.findProductList(new Page<Product>(request, response), product);
+		model.addAttribute("page", page);
+		model.addAttribute("productIds", product.getProductIds());
+		return "/modules/hehe/toAddCollageProduct";
+	}
+
+	/**
+	 * 更新上下架状态
+	 */
+	@RequestMapping(value = "updateStatus")
+	@ResponseBody
+	public Map<String, Object> updateStatus(Integer id, Integer status) {
+		cmHeheCollageProductService.updateStatus(id, status);
+		HashMap<String, Object> map = new HashMap<>(2);
+		map.put("success", true);
+		map.put("msg", (1 == status ? "上架" : "下架") + "成功");
+		return map;
+	}
+
+}

+ 132 - 0
src/main/java/com/caimei/modules/hehe/web/CmHeheReductionController.java

@@ -0,0 +1,132 @@
+package com.caimei.modules.hehe.web;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.caimei.modules.hehe.entity.CmHeheCollageMember;
+import com.caimei.modules.hehe.entity.CmHeheReductionUser;
+import com.caimei.modules.info.entity.Info;
+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.bind.annotation.ResponseBody;
+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.hehe.entity.CmHeheReduction;
+import com.caimei.modules.hehe.service.CmHeheReductionService;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 呵呵商城分享减免Controller
+ * @author Aslee
+ * @version 2021-12-15
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/hehe/cmHeheReduction")
+public class CmHeheReductionController extends BaseController {
+
+	@Autowired
+	private CmHeheReductionService cmHeheReductionService;
+	
+	@ModelAttribute
+	public CmHeheReduction get(@RequestParam(required=false) String id) {
+		CmHeheReduction entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = cmHeheReductionService.get(id);
+		}
+		if (entity == null){
+			entity = new CmHeheReduction();
+		}
+		return entity;
+	}
+	
+	@RequestMapping(value = {"list", ""})
+	public String list(CmHeheReduction cmHeheReduction, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<CmHeheReduction> page = cmHeheReductionService.findPage(new Page<CmHeheReduction>(request, response), cmHeheReduction); 
+		model.addAttribute("page", page);
+		return "modules/hehe/cmHeheReductionList";
+	}
+
+	@RequestMapping(value = "form")
+	public String form(CmHeheReduction cmHeheReduction, Model model) {
+		model.addAttribute("cmHeheReduction", cmHeheReduction);
+		return "modules/hehe/cmHeheReductionForm";
+	}
+
+	@RequestMapping(value = "save")
+	public String save(CmHeheReduction cmHeheReduction, Model model, RedirectAttributes redirectAttributes) {
+		if (!beanValidator(model, cmHeheReduction)){
+			return form(cmHeheReduction, model);
+		}
+		cmHeheReductionService.save(cmHeheReduction);
+		addMessage(redirectAttributes, "保存活动成功");
+		return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheReduction/?repage";
+	}
+	
+	@RequestMapping(value = "delete")
+	public String delete(CmHeheReduction cmHeheReduction, RedirectAttributes redirectAttributes) {
+		cmHeheReductionService.delete(cmHeheReduction);
+		addMessage(redirectAttributes, "删除活动成功");
+		return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheReduction/?repage";
+	}
+
+	@RequestMapping(value = "updateStatus")
+	@ResponseBody
+	public String updateStatus(CmHeheReduction cmHeheReduction) {
+		cmHeheReductionService.updateStatus(cmHeheReduction);
+		return "修改成功";
+	}
+
+	@RequestMapping(value = "resetTimePage")
+	public String toAuditPage() {
+		return "modules/hehe/resetTime";
+	}
+
+	@RequestMapping(value = "updateTime")
+	@ResponseBody
+	public String updateTime(CmHeheReduction cmHeheReduction) {
+		cmHeheReductionService.updateTime(cmHeheReduction);
+		return "修改成功";
+	}
+
+	@RequestMapping(value = "userList")
+	public String userList(CmHeheReductionUser cmHeheReductionUser, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<CmHeheReductionUser> page = cmHeheReductionService.getUserPage(new Page<CmHeheReductionUser>(request, response), cmHeheReductionUser);
+		model.addAttribute("page", page);
+		model.addAttribute("cmHeheReductionUser", cmHeheReductionUser);
+		return "modules/hehe/cmHeheReductionUserList";
+	}
+
+	@RequestMapping(value = "checkTime")
+	@ResponseBody
+	public Map<String, Object> checkTime(String reductionId, Date startTime, Date endTime, Integer type) {
+		HashMap<String, Object> map = new HashMap<>(2);
+		if (null != type && 1 == type) {
+			// 待上架直接上架
+			CmHeheReduction cmHeheReduction = cmHeheReductionService.get(reductionId);
+			startTime = new Date();
+			endTime = cmHeheReduction.getEndTime();
+		}
+		Boolean result = cmHeheReductionService.checkTime(reductionId, startTime, endTime);
+		if (result) {
+			map.put("success", true);
+		} else {
+			map.put("success", false);
+			map.put("msg", "当前上下架时间活动已存在");
+		}
+		return map;
+	}
+
+}

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

@@ -172,7 +172,7 @@ public class InfoController extends BaseController {
 		if(StringUtils.equals("1", ltype)) {
 			return "redirect:"+Global.getAdminPath()+"/info/infoLabel/list";
 		}
-		return "redirect:"+Global.getAdminPath()+"/info/info/list?repage";
+		return "redirect:"+Global.getAdminPath()+"/info/info/list?repage&publishSource=1";
 	}
 
 	@RequiresPermissions("info:info:delete")
@@ -188,7 +188,7 @@ public class InfoController extends BaseController {
 		addMessage(redirectAttributes, "删除信息成功");
 		// 删除索引
 		coreServiceUitls.deleteArticleIndex(Integer.valueOf(info.getId()));
-		return "redirect:"+Global.getAdminPath()+"/info/info/?repage";
+		return "redirect:"+Global.getAdminPath()+"/info/info/?repage&publishSource=1";
 	}
 
 	/**

+ 38 - 0
src/main/java/com/caimei/modules/order/entity/NewOrder.java

@@ -142,6 +142,11 @@ public class NewOrder extends DataEntity<NewOrder> {
     private Double couponAmount;    //优惠券抵扣金额
     private CmCouponOrderRecord couponOrderRecord;    //优惠券信息
     private Double svipFullReduction;   //超级会员优惠
+    private Integer collageFlag;    // 拼团订单标识:1拼团订单,0不是
+    private Integer collageStatus;  // 拼团状态:1拼团中,2已拼成
+    private Double reductionAmount;    //分享减免金额
+    private Double reductionTouchPrice; //分享减免条件
+
 
     /**
      * 呵呵商城优惠券
@@ -1091,5 +1096,38 @@ public class NewOrder extends DataEntity<NewOrder> {
     public void setHeheCouponRecord(CmHeheCouponOrderRecord heheCouponRecord) {
         this.heheCouponRecord = heheCouponRecord;
     }
+
+    public Integer getCollageFlag() {
+        return collageFlag;
+    }
+
+    public void setCollageFlag(Integer collageFlag) {
+        this.collageFlag = collageFlag;
+    }
+
+    public Integer getCollageStatus() {
+        return collageStatus;
+    }
+
+    public void setCollageStatus(Integer collageStatus) {
+        this.collageStatus = collageStatus;
+    }
+
+
+    public Double getReductionAmount() {
+        return reductionAmount;
+    }
+
+    public void setReductionAmount(Double reductionAmount) {
+        this.reductionAmount = reductionAmount;
+    }
+
+    public Double getReductionTouchPrice() {
+        return reductionTouchPrice;
+    }
+
+    public void setReductionTouchPrice(Double reductionTouchPrice) {
+        this.reductionTouchPrice = reductionTouchPrice;
+    }
 }
 

+ 15 - 0
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -1032,6 +1032,11 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                     newOrder.setReceiveCouponId(heheCouponRecord.getReceiveCouponId());
                     newOrder.setHeheCouponRecord(heheCouponRecord);
                 }
+                // 获取订单分享减免记录
+                if (newOrder.getReductionAmount() != null && newOrder.getReductionAmount() > 0) {
+                    Double reductionTouchPrice = heHeNewOrderDao.findReductionTouchPrice(newOrder.getOrderID());
+                    newOrder.setReductionTouchPrice(reductionTouchPrice);
+                }
             }
             //获取订单客户
             OrderUserInfo orderUserInfo = orderUserInfoService.findByOrderID(newOrder.getOrderID());
@@ -1153,6 +1158,16 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                     newOrder.setClubCouponId(couponRecord.getClubCouponId());
                     newOrder.setCouponOrderRecord(couponRecord);
                 }
+                CmHeheCouponOrderRecord heheCouponRecord = heHeNewOrderDao.findOrderCouponRecord(newOrder.getOrderID());
+                if (heheCouponRecord != null) {
+                    newOrder.setReceiveCouponId(heheCouponRecord.getReceiveCouponId());
+                    newOrder.setHeheCouponRecord(heheCouponRecord);
+                }
+                // 获取订单分享减免记录
+                if (newOrder.getReductionAmount() != null && newOrder.getReductionAmount() > 0) {
+                    Double reductionTouchPrice = heHeNewOrderDao.findReductionTouchPrice(newOrder.getOrderID());
+                    newOrder.setReductionTouchPrice(reductionTouchPrice);
+                }
             }
             //获取订单客户
             OrderUserInfo orderUserInfo = orderUserInfoService.findByOrderID(cmReturnedPurchase.getOrderID());

+ 1 - 1
src/main/resources/config/beta/caimei.properties

@@ -3,7 +3,7 @@
 #============================#
 
 #oracle database settings
-#jdbc.type=oracle
+#jdbc.type=oraclere
 #jdbc.driver=oracle.jdbc.driver.OracleDriver
 #jdbc.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
 #jdbc.username=root

+ 20 - 2
src/main/resources/mappings/modules/baike/CmBaikeProductMapper.xml

@@ -5,6 +5,9 @@
 	<sql id="cmBaikeProductColumns">
 		a.id AS "id",
 		a.commodityType AS "commodityType",
+		a.publishSource,
+		s.name as "shopName",
+		a.shopId,
 		a.name AS "name",
 		a.alias AS "alias",
 		a.discription AS "discription",
@@ -29,12 +32,15 @@
 		a.typeId AS "typeId",
 		a.topPosition AS "topPosition",
 		a.status AS "status",
+		a.auditStatus,
+		a.failReason,
 		a.addTime AS "addTime",
 		cbt.name as "typeName"
 	</sql>
 	
 	<sql id="cmBaikeProductJoins">
 		left join cm_baike_type cbt on a.typeId = cbt.id
+		left join shop s on a.shopId = s.shopID
 	</sql>
     
 	<select id="get" resultType="CmBaikeProduct">
@@ -42,7 +48,7 @@
 			<include refid="cmBaikeProductColumns"/>
 		FROM cm_baike_product a
 		<include refid="cmBaikeProductJoins"/>
-		WHERE a.id = #{id}
+		WHERE a.id = #{id} and delFlag = 0
 	</select>
 	
 	<select id="findList" resultType="CmBaikeProduct">
@@ -51,7 +57,7 @@
 		FROM cm_baike_product a
 		<include refid="cmBaikeProductJoins"/>
 		<where>
-			
+			delFlag = 0
 			<if test="id != null and id != ''">
 				AND a.id = #{id}
 			</if>
@@ -83,6 +89,9 @@
 			<if test="commodityType != null">
 				and a.commodityType = #{commodityType}
 			</if>
+			<if test="publishSource != null">
+				and a.publishSource = #{publishSource}
+			</if>
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -225,6 +234,15 @@
 	<update id="updateTopPosition">
 		update cm_baike_product set topPosition = #{topPosition} where id = #{id}
 	</update>
+	<update id="auditBaike">
+		update cm_baike_product
+		set auditStatus = #{auditStatus},
+		failReason  = #{failReason}
+		<if test="publishTime != null">
+			,publishTime = #{publishTime}
+		</if>
+		where id = #{id}
+	</update>
 
 	<delete id="delete">
 		DELETE FROM cm_baike_product

+ 8 - 5
src/main/resources/mappings/modules/hehe/CmHeheActivityProductMapper.xml

@@ -125,17 +125,17 @@
 		<if test="ids != null and ids.size() > 0 ">
 			AND a.productId NOT IN
 			<foreach collection="ids" open="(" close=")" item="id" separator=",">
-				#{id}
+				#{id,jdbcType=INTEGER}
 			</foreach>
 		</if>
 		<if test="productId != null">
-			AND a.productId = #{productId}
+			AND a.productId = #{productId,jdbcType=INTEGER}
 		</if>
 		<if test="name != null and name != ''">
-			AND p.name LIKE CONCAT('%',#{name},'%')
+			AND p.name LIKE CONCAT('%',#{name,jdbcType=VARCHAR},'%')
 		</if>
 		<if test="shopName != null and shopName != ''">
-			AND s.name LIKE CONCAT('%',#{shopName},'%')
+			AND s.name LIKE CONCAT('%',#{shopName,jdbcType=VARCHAR},'%')
 		</if>
 	</select>
 
@@ -179,8 +179,11 @@
 	<select id="findActivityByProductId" resultType="integer">
 		SELECT activityId FROM cm_hehe_activity_product WHERE productId = #{productId} AND delFlag = 0
 	</select>
+    <select id="findCollageProductId" resultType="java.lang.Integer">
+		select chcp.productId from cm_hehe_collage_product chcp
+	</select>
 
-	<delete id="deleteUserActivity">
+    <delete id="deleteUserActivity">
 		DELETE FROM cm_hehe_user_activity WHERE productId = #{productId}
 	</delete>
 

+ 123 - 0
src/main/resources/mappings/modules/hehe/CmHeheCollageMapper.xml

@@ -0,0 +1,123 @@
+<?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.hehe.dao.CmHeheCollageDao">
+    
+	<sql id="cmHeheCollageColumns">
+		a.id AS "id",
+		a.productId AS "productId",
+		a.price AS "price",
+		a.memberNum AS "memberNum",
+		a.status AS "status",
+		a.startTime AS "startTime",
+		a.completeTime AS "completeTime",
+		a.endTime AS "endTime",
+		p.name as productName,
+		s.name as shopName
+	</sql>
+	
+	<sql id="cmHeheCollageJoins">
+		left join product p on a.productId = p.productID
+		left join cm_hehe_product hp on p.productID = hp.productId
+		left join shop s on p.shopID = s.shopID
+	</sql>
+    
+	<select id="get" resultType="CmHeheCollage">
+		SELECT 
+			<include refid="cmHeheCollageColumns"/>
+		FROM cm_hehe_collage a
+		<include refid="cmHeheCollageJoins"/>
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="CmHeheCollage">
+		SELECT 
+			<include refid="cmHeheCollageColumns"/>
+		FROM cm_hehe_collage a
+		<include refid="cmHeheCollageJoins"/>
+		<where>
+			a.status != 0
+			<if test="id != null and id != ''">
+				AND a.id = #{id}
+			</if>
+			<if test="status != null">
+				AND a.status = #{status}
+			</if>
+			<if test="productName != null and productName != ''">
+				and p.name like concat('%',#{productName},'%')
+			</if>
+			<if test="shopName != null and shopName != ''">
+				and s.name like concat('%',#{shopName},'%')
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				order by startTime desc
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="CmHeheCollage">
+		SELECT 
+			<include refid="cmHeheCollageColumns"/>
+		FROM cm_hehe_collage a
+		<include refid="cmHeheCollageJoins"/>
+		<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="getCollageOrderIds" resultType="java.lang.Integer">
+		select chcm.orderId from cm_hehe_collage_member chcm left join cm_order co on chcm.orderId = co.orderID
+		where collageId = #{collageId} and co.receiptStatus = 3
+	</select>
+	<select id="findMemberList" resultType="com.caimei.modules.hehe.entity.CmHeheCollageMember">
+		select chu.nickName,cm.launchFlag,chu.mobile,chu.userIdentity,co.orderTime,co.orderNo,co.orderID as orderId
+		from cm_hehe_collage_member cm
+		left join user u on cm.userId = u.userID
+		left join cm_hehe_user chu on u.userID = chu.userId
+		left join cm_order co on cm.orderId = co.orderID
+		where collageId = #{collageId} and co.receiptStatus = 3
+		<if test="nickName != null and nickName != ''">
+			and chu.nickName like concat('%',#{nickName},'%')
+		</if>
+		<if test="mobile != null and mobile != ''">
+			and chu.mobile like concat('%',#{mobile},'%')
+		</if>
+		<if test="orderNo != null and orderNo != ''">
+			and (co.orderID = #{orderNo} or co.orderNo = #{orderNo})
+		</if>
+		order by cm.id
+	</select>
+
+	<insert id="insert" parameterType="CmHeheCollage"  keyProperty="id" useGeneratedKeys="true">
+		INSERT INTO cm_hehe_collage(
+			productId,
+			price
+		) VALUES (
+			#{productId},
+			#{price}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE cm_hehe_collage SET 	
+			productId = #{productId},
+			price = #{price}
+		WHERE id = #{id}
+	</update>
+	
+	<delete id="delete">
+		DELETE FROM cm_hehe_collage
+		WHERE id = #{id}
+	</delete>
+	
+</mapper>

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

@@ -0,0 +1,136 @@
+<?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.hehe.dao.CmHeheCollageProductDao">
+    
+	<sql id="cmHeheCollageProductColumns">
+		a.id AS "id",
+		a.productId AS "productId",
+		a.price AS "price",
+		a.limitedNum AS "limitedNum",
+		a.unlimitedFlag AS "unlimitedFlag",
+		a.memberNum AS "memberNum",
+		a.status AS "status",
+		a.addTime AS "addTime",
+		s.name AS shopName,
+		p.name AS productName,
+		p.mainImage AS productImage
+	</sql>
+	
+	<sql id="cmHeheCollageProductJoins">
+		left join product p on a.productId = p.productID
+		left join cm_hehe_product hp on p.productID = hp.productId
+		left join shop s on p.shopID = s.shopID
+	</sql>
+    
+	<select id="get" resultType="CmHeheCollageProduct">
+		SELECT 
+			<include refid="cmHeheCollageProductColumns"/>
+		FROM cm_hehe_collage_product a
+		<include refid="cmHeheCollageProductJoins"/>
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="CmHeheCollageProduct">
+		SELECT 
+			<include refid="cmHeheCollageProductColumns"/>
+		FROM cm_hehe_collage_product a
+		<include refid="cmHeheCollageProductJoins"/>
+		<where>
+			<if test="id != null and id != ''">
+				AND a.id = #{id}
+			</if>
+			<if test="status != null">
+				AND a.status = #{status}
+			</if>
+			<if test="productName != null and productName != ''">
+				and p.name like concat('%',#{productName},'%')
+			</if>
+			<if test="shopName != null and shopName != ''">
+				and s.name like concat('%',#{shopName},'%')
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				order by a.addTime desc
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="CmHeheCollageProduct">
+		SELECT 
+			<include refid="cmHeheCollageProductColumns"/>
+		FROM cm_hehe_collage_product a
+		<include refid="cmHeheCollageProductJoins"/>
+		<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="findExistProductIds" resultType="java.lang.Integer">
+		select chp.id from cm_hehe_collage_product chcp left join cm_hehe_product chp on chcp.productId = chp.productId
+		where chp.id is not null;
+	</select>
+	<select id="findActivityProductIds" resultType="java.lang.Integer">
+		select chp.id
+		from cm_hehe_activity_product chap
+				 left join cm_hehe_product chp on chap.productId = chp.productId
+		where chp.id is not null and delFlag = 0;
+	</select>
+	<select id="findReductionProductIds" resultType="java.lang.Integer">
+		select chp.id
+		from cm_hehe_reduction chap
+				 left join cm_hehe_product chp on chap.productId = chp.productId;
+	</select>
+	<select id="getProductId" resultType="java.lang.Integer">
+		select productId from cm_hehe_product where id = #{heheProductId}
+	</select>
+
+	<insert id="insert" parameterType="CmHeheCollageProduct"  keyProperty="id" useGeneratedKeys="true">
+		INSERT INTO cm_hehe_collage_product(
+			productId,
+			price,
+			limitedNum,
+			unlimitedFlag,
+			memberNum,
+			status,
+			addTime
+		) VALUES (
+             (select productId from cm_hehe_product where id = #{productId}),
+			#{price},
+			#{limitedNum},
+			#{unlimitedFlag},
+			#{memberNum},
+			#{status},
+			NOW()
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE cm_hehe_collage_product SET 	
+			productId = #{productId},
+			price = #{price},
+			limitedNum = #{limitedNum},
+			unlimitedFlag = #{unlimitedFlag},
+			memberNum = #{memberNum},
+			status = #{status}
+		WHERE id = #{id}
+	</update>
+	<update id="updateStatus">
+		update cm_hehe_collage_product set status = #{status} where id = #{id}
+	</update>
+
+	<delete id="delete">
+		DELETE FROM cm_hehe_collage_product
+		WHERE id = #{id}
+	</delete>
+	
+</mapper>

+ 150 - 0
src/main/resources/mappings/modules/hehe/CmHeheReductionMapper.xml

@@ -0,0 +1,150 @@
+<?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.hehe.dao.CmHeheReductionDao">
+    
+	<sql id="cmHeheReductionColumns">
+		a.id AS "id",
+		a.name AS "name",
+		a.reducedAmount AS "reducedAmount",
+		a.touchPrice AS "touchPrice",
+		a.shareNum AS "shareNum",
+		a.startTime AS "startTime",
+		a.endTime AS "endTime",
+		a.addTime AS "addTime"
+	</sql>
+	
+	<sql id="cmHeheReductionJoins">
+	</sql>
+    
+	<select id="get" resultType="CmHeheReduction">
+		SELECT 
+			<include refid="cmHeheReductionColumns"/>
+		FROM cm_hehe_reduction a
+		<include refid="cmHeheReductionJoins"/>
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="CmHeheReduction">
+		SELECT 
+			<include refid="cmHeheReductionColumns"/>
+		FROM cm_hehe_reduction a
+		<include refid="cmHeheReductionJoins"/>
+		<where>
+			
+			<if test="name != null and name != ''">
+				AND a.name LIKE 
+					<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+			</if>
+			<if test="status != null">
+				<if test="status == 1">
+					and NOW() <![CDATA[ < ]]> a.startTime
+				</if>
+				<if test="status == 2">
+					and NOW() <![CDATA[ >= ]]> a.startTime and NOW() <![CDATA[ <= ]]> a.endTime
+				</if>
+				<if test="status == 3">
+					and NOW() <![CDATA[ > ]]> a.endTime
+				</if>
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				order by a.addTime desc
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="CmHeheReduction">
+		SELECT 
+			<include refid="cmHeheReductionColumns"/>
+		FROM cm_hehe_reduction a
+		<include refid="cmHeheReductionJoins"/>
+		<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="findUserList" resultType="com.caimei.modules.hehe.entity.CmHeheReductionUser">
+        select ru.id,chu.nickName,chu.mobile,ru.shareType,ru.shareTime
+        from cm_hehe_reduction_user ru
+			left join user u on ru.userId = u.userID
+			left join cm_hehe_user chu on u.userID = chu.userId
+        where reductionId = #{reductionId}
+        <if test="nickName != null and nickName != ''">
+            and chu.nickName like concat('%',#{nickName},'%')
+        </if>
+        <if test="mobile != null and mobile != ''">
+            and chu.mobile like concat('%',#{mobile},'%')
+        </if>
+        <if test="shareType != null">
+            and ru.shareType = #{shareType}
+        </if>
+        order by shareTime desc
+    </select>
+	<select id="getAllTime" resultType="com.caimei.modules.hehe.entity.CmHeheReduction">
+		select id, startTime,endTime from cm_hehe_reduction;
+	</select>
+
+	<insert id="insert" parameterType="CmHeheReduction"  keyProperty="id" useGeneratedKeys="true">
+		INSERT INTO cm_hehe_reduction(
+			name,
+			reducedAmount,
+			touchPrice,
+			shareNum,
+			startTime,
+			endTime,
+			addTime
+		) VALUES (
+			#{name},
+			#{reducedAmount},
+			#{touchPrice},
+			#{shareNum},
+			#{startTime},
+			#{endTime},
+			NOW()
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE cm_hehe_reduction SET 	
+			name = #{name},
+			reducedAmount = #{reducedAmount},
+			touchPrice = #{touchPrice},
+			shareNum = #{shareNum},
+			startTime = #{startTime},
+			endTime = #{endTime}
+		WHERE id = #{id}
+	</update>
+	<update id="updateStatus">
+		update cm_hehe_reduction set
+		<if test="status == 3">
+			endTime = NOW()
+		</if>
+		<if test="status == 2">
+			startTime = NOW()
+		</if>
+		where id = #{id}
+	</update>
+	<update id="updateTime">
+		update cm_hehe_reduction
+		set startTime = #{startTime}, endTime = #{endTime}
+		where id = #{id}
+	</update>
+
+	<delete id="delete">
+		DELETE FROM cm_hehe_reduction
+		WHERE id = #{id}
+	</delete>
+	
+</mapper>

+ 18 - 4
src/main/resources/mappings/modules/hehe/HeHeNewOrderMapper.xml

@@ -54,12 +54,17 @@
 		a.affirmPaymentFlag AS affirmPaymentFlag,
 		a.rebateFlag AS rebateFlag,
 		a.zeroCostFlag AS zeroCostFlag,
-        a.couponAmount
+        a.couponAmount,
+        a.reductionAmount,
+        if(chcm.id is not null,1,0) as collageFlag,
+        chc.status as collageStatus
 	</sql>
 
     <select id="get" resultType="newOrder">
         SELECT <include refid="columns"/>
         FROM cm_order a
+        LEFT JOIN cm_hehe_collage_member chcm on a.orderID = chcm.orderId
+        LEFT JOIN cm_hehe_collage chc on chcm.collageId = chc.id
         WHERE a.orderID = #{id}
     </select>
 
@@ -106,22 +111,28 @@
         co.sendOutStatus AS sendOutStatus,
         co.receiptStatus AS receiptStatus,
         co.productCount AS productCount,
-        (SELECT IFNULL(sum(cop.shouldPayFee),0) FROM cm_order_product cop WHERE cop.orderId=co.orderID) AS "shouldPayProduct",
+        (SELECT IFNULL(sum(cop.shouldPayFee),0) FROM cm_order_product cop WHERE cop.orderId=co.orderID) AS
+        "shouldPayProduct",
         co.status AS status,
         co.splitFlag AS splitFlag,
         co.postageOrderFlag AS postageOrderFlag,
         (case when co.orderType = '0' then
-        (select case status when 91 then '采美默认协销经理(官方账号)' else linkMan end from serviceprovider where serviceProviderID = co.spID)
+        (select case status when 91 then '采美默认协销经理(官方账号)' else linkMan end from serviceprovider where serviceProviderID
+        = co.spID)
         else
         ''
         end) AS spName,
-        co.rebateFlag AS rebateFlag
+        co.rebateFlag AS rebateFlag,
+        if(chcm.id is not null,1,0) as collageFlag,
+        chc.status as collageStatus
         FROM cm_order co
         LEFT JOIN bp_order_userinfo bou ON bou.orderId = co.orderID
         LEFT JOIN user u ON u.userID = co.userID
         LEFT JOIN cm_hehe_user c ON u.userID = c.userId
         LEFT JOIN cm_order_product cop ON co.orderID = cop.orderID
         LEFT JOIN product p ON cop.productID = p.productID
+        LEFT JOIN cm_hehe_collage_member chcm on co.orderID = chcm.orderId
+        LEFT JOIN cm_hehe_collage chc on chcm.collageId = chc.id
         <where>
             co.orderType = 2
             <if test="orderID != null and orderID != ''">
@@ -258,5 +269,8 @@
         WHERE
             orderId = #{orderID}
     </select>
+    <select id="findReductionTouchPrice" resultType="java.lang.Double">
+        select touchPrice from cm_hehe_reduction_user where orderId = #{orderID}
+    </select>
 
 </mapper>

+ 5 - 1
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -57,12 +57,16 @@
 		a.zeroCostFlag AS zeroCostFlag,
 		a.organizeStoreId as organizeStoreId,
 		a.couponAmount as couponAmount,
-        a.svipFullReduction as svipFullReduction
+        a.svipFullReduction as svipFullReduction,
+        if(chcm.id is not null,1,0) as collageFlag,
+        chc.status as collageStatus
 	</sql>
 
     <select id="get" resultType="newOrder">
 		SELECT <include refid="columns"/>
 		FROM cm_order a
+		LEFT JOIN cm_hehe_collage_member chcm on a.orderID = chcm.orderId
+		LEFT JOIN cm_hehe_collage chc on chcm.collageId = chc.id
 		WHERE a.orderID = #{id}
 	</select>
 

+ 192 - 0
src/main/webapp/WEB-INF/views/modules/baike/auditBaike.jsp

@@ -0,0 +1,192 @@
+<%@ 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>
+        .controls .new-tag {
+            display: inline-block;
+            width: 78px;
+            height: 30px;
+            border: 1px solid #e5e5e5;
+            border-radius: 5px;
+            margin: 7px;
+            text-align: center;
+            line-height: 30px;
+            font-size: 14px;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            cursor: pointer;
+        }
+
+        .controls .new-tag.active {
+            border-color: #e15616;
+            color: #e15616;
+        }
+
+        #tagInput {
+            width: 263px;
+            margin: 7px;
+            display: inline-block;
+            height: 30px;
+        }
+
+        .controls .tags-operate .tag-add {
+            height: 40px;
+            line-height: 40px;
+            vertical-align: middle;
+        }
+
+        .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;
+        }
+
+        .control-group{
+            margin-top: 40px;
+        }
+    </style>
+
+</head>
+<body>
+<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/audit" method="post" class="form-horizontal">
+    <sys:message content="${message}"/>
+    <div class="control-group">
+        <label class="control-label">审核状态</label>
+        <div class="controls">
+            <input type="radio" name="auditStatus" value="2" onclick="updateAuditStatus(2)" ${empty cmBaikeProduct.auditStatus?'checked=checked':cmBaikeProduct.auditStatus eq 1?'checked=checked':''}> 审核通过
+            <input type="radio" name="auditStatus" value="3" onclick="updateAuditStatus(3)" ${cmBaikeProduct.auditStatus eq 3?'checked=checked':''}> 审核失败
+        </div>
+    </div>
+    <div class="control-group" id="failReasonDiv" style="${empty cmBaikeProduct.auditStatus or cmBaikeProduct.auditStatus eq 1?'display: none':''}">
+        <label class="control-label">失败原因</label>
+        <div class="controls">
+            <textarea style="width: 400px;height: 90px" id="failReason">${cmBaikeProduct.failReason}</textarea>
+        </div>
+    </div>
+</form:form>
+
+<script>
+    function getCheckedItems() {
+        var items = new Array();
+        items.push({
+            auditStatus: $("input[name='auditStatus']:checked").val(),
+            failReason: $("#failReason").val()
+        });
+        return items;
+    }
+
+    function updateAuditStatus(auditStatus) {
+        var elementById = document.getElementById("failReasonDiv");
+        if (auditStatus === 2) {
+            elementById.style.cssText = "display:none";
+        } else {
+            elementById.style.cssText = "";
+        }
+    }
+</script>
+</body>
+</html>
+

+ 360 - 0
src/main/webapp/WEB-INF/views/modules/baike/checkBaikePage.jsp

@@ -0,0 +1,360 @@
+<%@ page import="com.thinkgem.jeesite.common.config.Global" %>
+<%@ 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>
+		.titleClass{
+			font-weight: bolder;
+			margin-left: -40px;
+		}
+		.keyClass{
+			font-weight: bolder;
+		}
+		.paramRow {
+			margin-top: 10px;
+		}
+	</style>
+	<style>
+		.clearfix::after{
+			content: "";
+			display: block;
+			clear: both;
+		}
+		.iconBox{
+			font-size: 0;
+		}/*
+		.controls{
+			margin-left: 0 !important;
+		}*/
+		.controls .conList{
+			display: inline-block;
+			margin-right: 15px;
+		}
+		.conList .btn:nth-of-type(1){
+			margin-left: 25px;
+		}
+		.select2-choice{
+			width: 100px;
+		}
+		.upload-content {
+			float: left;
+			margin-top: -100px;
+			margin-right: -40px;
+		}
+		.upload-content .conList .btn:nth-of-type(1) {
+			width: 90px;
+			height: 100px;
+			border: 2px solid #eee;
+			background: #fff;
+			position: relative;
+		}
+		.upload-content .conList .btn:nth-of-type(1)>div {
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+			color: #666;
+		}
+		.upload-content .conList .btn:nth-of-type(1) span {
+			font-size: 35px;
+		}
+		.upload-content .conList .btn:nth-of-type(1) h5 {
+			color: #666;
+		}
+		.cancel-upload {
+			background: transparent;
+			border: none;
+			box-shadow: none;
+			position: relative;
+			top: -38px;
+			left: -25px;
+			cursor: pointer;
+			z-index: 100;
+		}
+		.upload-content .conList ol li {
+			width: 114px;
+			min-height: 80px;
+			text-align: center;
+			background: #fff;
+			position: relative;
+			top: 120px;
+			margin-left: 2px;
+			height: 100px;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			box-sizing: border-box;
+		}
+		.hide-pic {
+			display: none !important;
+		}
+		.upload-image-list{
+			width: 660px;
+			float: left;
+		}
+	</style>
+	<style>
+		.iconBox{
+			font-size: 0;
+		}
+		.controls .conList{
+			display: inline-block;
+			margin-right: 15px;
+		}
+		.conList .btn:nth-of-type(1){
+			margin-left: 25px;
+		}
+		.select2-choice{
+			width: 100px;
+		}
+		.upload-content {
+			float: left;
+			margin-top: -70px;
+			margin-left: 20px !important;
+		}
+		.upload-content .conList .btn:nth-of-type(1) {
+			width: 90px;
+			height: 100px;
+			border: 2px solid #eee;
+			background: #fff;
+			position: relative;
+		}
+		.upload-content .conList .btn:nth-of-type(1)>div {
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+			color: #666;
+		}
+		.upload-content .conList .btn:nth-of-type(1) span {
+			font-size: 35px;
+		}
+		.upload-content .conList .btn:nth-of-type(1) h5 {
+			color: #666;
+		}
+		.cancel-upload {
+			background: transparent;
+			border: none;
+			box-shadow: none;
+			position: relative;
+			top: -38px;
+			left: -25px;
+			cursor: pointer;
+			z-index: 100;
+		}
+		.hide-pic {
+			display: none !important;
+		}
+	</style>
+	<script type="text/javascript">
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/baike/cmBaikeProduct/?commodityType=${cmBaikeProduct.commodityType}&publishSource=${cmBaikeProduct.publishSource}">${commodityType}</a></li>
+		<li class="active"><a href="${ctx}/baike/cmBaikeProduct/check?id=${cmBaikeProduct.id}">查看</a></li>
+	</ul><br/>
+	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" method="post" class="form-horizontal">
+		<div class="control-group">
+			<label class="control-label titleClass">${commodityType}简述</label>
+		</div>
+		<div class="control-group">
+			<label class="control-label">${commodityType}名称:</label>
+			<div class="controls">
+				${cmBaikeProduct.name}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">${commodityType}别名:</label>
+			<div class="controls">
+				${cmBaikeProduct.alias}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">${commodityType}概述:</label>
+			<div class="controls" style="width:812px">
+				${cmBaikeProduct.discription}
+            </div>
+		</div>
+        <div class="control-group">
+            <label class="control-label">SEO关键词:</label>
+            <div class="controls">
+				${cmBaikeProduct.seoKeyword}
+            </div>
+        </div>
+		<div class="control-group">
+			<label class="control-label">${commodityType}图片:</label>
+			<div class="controls">
+				<a href="${cmBaikeProduct.image}" style="cursor: pointer;margin-left: 20px" target="_blank"><img src="${cmBaikeProduct.image}" style="width: 120px"></a>
+			</div>
+		</div>
+        <div style="${cmBaikeProduct.commodityType eq 2?'':'display:none'}" >
+            <div class="control-group">
+                <label class="control-label titleClass">正品识别</label>
+            </div>
+            <div class="control-group">
+                <label class="control-label">认证链接:</label>
+                <div class="controls">
+					${cmBaikeProduct.authLink}
+                </div>
+            </div>
+			<div class="control-group">
+				<label class="control-label">认证二维码:</label>
+				<div class="controls">
+					<a href="${cmBaikeProduct.authQrCode}" style="cursor: pointer;margin-left: 20px" target="_blank"><img src="${cmBaikeProduct.authQrCode}" style="width: 120px"></a>
+				</div>
+			</div>
+        </div>
+		<div class="paramList">
+			<div class="control-group">
+				<label class="control-label titleClass">${commodityType}参数</label>
+			</div>
+			<c:forEach items="${cmBaikeProduct.paramList}" var="productParam" varStatus="index">
+				<div class="control-group">
+					<label class="control-label">${productParam.name}:</label>
+					<div class="controls">
+						${productParam.content}
+					</div>
+				</div>
+			</c:forEach>
+		</div>
+		<div class="control-group">
+			<label class="control-label keyClass">${commodityType}优点:</label>
+			<div class="controls" style="width:812px">
+				${cmBaikeProduct.advantage}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label keyClass">${commodityType}缺点:</label>
+			<div class="controls" style="width:812px">
+				${cmBaikeProduct.disadvantage}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label keyClass">${commodityType}原理:</label>
+			<div class="controls" style="width:812px">
+				${cmBaikeProduct.principle}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label titleClass">${commodityType}档案</label>
+		</div>
+		<div class="control-group">
+			<label class="control-label">品牌:</label>
+			<div class="controls">
+				${cmBaikeProduct.brand}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">产地:</label>
+			<div class="controls">
+				${cmBaikeProduct.producePlace}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">上市时间:</label>
+			<div class="controls">
+				<fmt:formatDate value="${cmBaikeProduct.marketTime}" pattern="yyyy-MM-dd HH:mm"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">公司/厂商:</label>
+			<div class="controls">
+				${cmBaikeProduct.company}
+			</div>
+		</div>
+		<div class="control-group" style="position: relative">
+			<label class="control-label">NMPA认证时间:</label>
+			<div class="controls">
+				<fmt:formatDate value="${cmBaikeProduct.nmpaTime}" pattern="yyyy-MM-dd HH:mm"/>
+			</div>
+		</div>
+		<div class="control-group" style="width: 1000px">
+			<label class="control-label keyClass">${commodityType}认证:</label>
+			<div class="controls">
+				<c:forEach items="${cmBaikeProduct.authImageList}" var="authImage" varStatus="index">
+					<a href="${authImage}" style="cursor: pointer;margin-left: 20px" target="_blank"><img src="${authImage}" style="width: 120px"></a>
+				</c:forEach>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label keyClass">适应人群:</label>
+			<div class="controls" style="width:812px">
+				${cmBaikeProduct.adaptiveMan}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label keyClass">不适应人群:</label>
+			<div class="controls" style="width:812px">
+				${cmBaikeProduct.unAdaptiveMan}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label keyClass">术前术后:</label>
+			<div class="controls" style="width:812px">
+				${cmBaikeProduct.aroundOperation}
+			</div>
+		</div>
+		<div class="control-group" style="width: 1000px">
+			<label class="control-label keyClass">效果展示:</label>
+			<div class="controls">
+				<c:forEach items="${cmBaikeProduct.displayImageList}" var="displayImage" varStatus="index">
+					<a href="${displayImage}" style="cursor: pointer;margin-left: 20px" target="_blank"><img src="${displayImage}" style="width: 120px"></a>
+				</c:forEach>
+			</div>
+		</div>
+        <div class="questionList">
+            <div class="control-group">
+                <label class="control-label keyClass">常见问题:</label>
+            </div>
+			<c:forEach items="${cmBaikeProduct.questionList}" var="question" varStatus="index">
+				<div class="control-group">
+					<label class="control-label">问题${index.index+1}:</label>
+					<div class="controls">
+						${question.question}
+					</div>
+				</div>
+				<div class="control-group">
+					<label class="control-label">答:</label>
+					<div class="controls">
+						${question.answer}
+					</div>
+				</div>
+			</c:forEach>
+        </div>
+
+		<div class="control-group">
+			<label class="control-label keyClass">发布时间:</label>
+			<div class="controls">
+				<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label keyClass">基础浏览量:</label>
+			<div class="controls">
+				${cmBaikeProduct.basePv}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label keyClass">产品类别:</label>
+			<div class="controls">
+				${cmBaikeProduct.typeName}
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label keyClass">状态:</label>
+			<div class="controls">
+				${cmBaikeProduct.status eq 1?'已启用':'已停用'}
+			</div>
+		</div>
+	</form:form>
+
+<% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
+<script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
+<script>
+</script>
+</body>
+</html>

+ 0 - 1
src/main/webapp/WEB-INF/views/modules/baike/cmBaikeProductForm.jsp

@@ -154,7 +154,6 @@
 			//$("#name").focus();
 			$("#inputForm").validate({
 				submitHandler: function(form){
-					debugger
 					var commodityType = '${commodityType}';
 					var mainImage = $("#image").val();
 					var authImage0 = $("#authImage0").val() == undefined?'':$("#authImage0").val();

+ 162 - 0
src/main/webapp/WEB-INF/views/modules/baike/shopBaikeProductList.jsp

@@ -0,0 +1,162 @@
+<%@ 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;}
+		.topSelect{
+			width: 80px;
+			position: absolute;
+			right: 60px;
+			background-color: white;
+		}
+	</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=${cmBaikeProduct.commodityType eq 1?"active":""}><a href="${ctx}/baike/cmBaikeProduct/?commodityType=1&publishSource=2">产品</a></li>
+		<li class=${cmBaikeProduct.commodityType eq 2?"active":""}><a href="${ctx}/baike/cmBaikeProduct/?commodityType=2&publishSource=2">仪器</a></li>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/" method="post" class="breadcrumb form-search">
+		<form:hidden path="commodityType"/>
+		<form:hidden path="publishSource"/>
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<div class="ul-form">
+			 <label>ID:</label>
+				<form:input path="id" htmlEscape="false" class="input-medium"/>
+			 <label>${commodityType}名称:</label>
+				<form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
+			 <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>审核状态:</label>
+				<form:select path="auditStatus" class="input-mini">
+					<form:option value="" label="全部"/>
+					<form:option value="1" label="待审核"/>
+					<form:option value="2" label="审核通过"/>
+					<form:option value="3" label="审核失败"/>
+				</form:select>
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>ID</th>
+				<th>${commodityType}名称</th>
+				<th>${commodityType}分类</th>
+				<th>浏览量</th>
+				<th>审核状态</th>
+				<th>发布时间</th>
+				<th>供应商</th>
+				<th>添加时间</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmBaikeProduct" varStatus="index">
+			<tr>
+				<td>
+					${cmBaikeProduct.id}
+				</td>
+				<td>
+					${cmBaikeProduct.name}
+				</td>
+				<td>
+					${cmBaikeProduct.typeName}
+				</td>
+				<td>
+					${cmBaikeProduct.actualPv}
+				</td>
+				<td>
+					<font color="${cmBaikeProduct.auditStatus eq 1?'black':cmBaikeProduct.auditStatus eq 2?'#2FA4E7':cmBaikeProduct.auditStatus eq 3?'red':'#2FA4E7'}"> ${cmBaikeProduct.auditStatus eq 1?'待审核':cmBaikeProduct.auditStatus eq 2?'审核通过':cmBaikeProduct.auditStatus eq 3?'审核失败':'审核通过'}</font>
+				</td>
+				<td>
+					<c:if test="${cmBaikeProduct.auditStatus eq 2}">
+						<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm"/>
+					</c:if>
+					<c:if test="${cmBaikeProduct.auditStatus ne 2}">
+						--
+					</c:if>
+				</td>
+				<td>
+					${cmBaikeProduct.shopName}
+				</td>
+				<td>
+					<fmt:formatDate value="${cmBaikeProduct.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					<a href="javascript:;" style="display: ${cmBaikeProduct.auditStatus eq 1 or cmBaikeProduct.auditStatus eq 3?'':'none'}"
+					   onclick="auditBaike(${cmBaikeProduct.id})">审核</a>
+					<a href="${ctx}/baike/cmBaikeProduct/check?id=${cmBaikeProduct.id}
+					&commodityType=${cmBaikeProduct.commodityType}&publishSource=2">查看</a>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+<script type="text/javascript">
+	function auditBaike(productId) {
+		var url = "${ctx}/baike/cmBaikeProduct/toAuditPage?id=" + productId;
+		var title = "审核";
+		top.$.jBox("iframe:"+url, {
+			iframeScrolling: 'yes',
+			width: 800,
+			height: 350,
+			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(0);
+					if (items.length > 0) {
+						var auditStatus = items[0].auditStatus;
+						var failReason = items[0].failReason.trim();
+						if (auditStatus === '2') {
+							failReason = '';
+						}
+						if (auditStatus === '3' && failReason === '') {
+							top.$.jBox.tip("请输入失败原因");
+							return false;
+						}
+						$.post("${ctx}/baike/cmBaikeProduct/auditBaike?id="+productId+"&auditStatus=" + auditStatus + "&failReason=" + failReason, function (data) {
+							top.$.jBox.tip("审核成功");
+							setTimeout(function () {
+								$("#searchForm").submit();
+							}, 200);
+						});
+					} else {
+						top.$.jBox.tip("请先勾选商品...");
+						return false;
+					}
+				}
+				return true;
+			}
+		});
+	}
+</script>
+</body>
+</html>

+ 24 - 0
src/main/webapp/WEB-INF/views/modules/bulkpurchase/applyRefoundForm.jsp

@@ -334,6 +334,11 @@
             <td>
                 下单时间:${order.orderTime}
             </td>
+            <c:if test="${order.orderType eq 2}">
+                <td>
+                    订单类型:${order.collageFlag eq 1?'拼团订单':'独立订单'}
+                </td>
+            </c:if>
             <td colspan="2">
                 订单状态:
                 <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
@@ -368,6 +373,9 @@
                         </font>
                     </a>
                 </c:if>
+                <c:if test="${order.reductionAmount > 0}">
+                    (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})
+                </c:if>
             </td>
             <td>
                 应收总额:¥<fmt:formatNumber type="number" value="${order.payableAmount}" pattern="0.00" maxFractionDigits="2" />(账户余额抵扣:${order.balancePayFee})
@@ -408,6 +416,21 @@
                     <font color="green">已收款</font>
                 </c:if></td>
             </td>
+            <c:if test="${order.orderType eq 2}">
+                <td>
+                    拼团状态:
+                    <c:choose>
+                        <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
+                            <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">
+                                    ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
+                            </font>
+                        </c:when>
+                        <c:otherwise>
+                            -
+                        </c:otherwise>
+                    </c:choose>
+                </td>
+            </c:if>
             <td>
                 发货状态:
                 <c:if test="${order.sendOutStatus == 1}">
@@ -492,6 +515,7 @@
                                         </td>
                                         <td style="width: 275px;">
                                             单价:¥<fmt:formatNumber type="number" value="${newOrderProduct.price}"  pattern="0.00" maxFractionDigits="2" />
+                                            <c:if test="${order.collageFlag eq 1}"><font color="red">(拼团价)</font></c:if>
                                         </td>
                                         <td >
                                             折扣 :${newOrderProduct.discount}%

+ 24 - 1
src/main/webapp/WEB-INF/views/modules/bulkpurchase/orderReturnRecord.jsp

@@ -345,6 +345,11 @@
                 <td>
                     下单时间:${order.orderTime}
                 </td>
+                <c:if test="${order.orderType eq 2}">
+                    <td>
+                        订单类型:${order.collageFlag eq 1?'拼团订单':'独立订单'}
+                    </td>
+                </c:if>
                 <td colspan="2">
                     订单状态:
                     <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
@@ -379,6 +384,9 @@
                             </font>
                         </a>
                     </c:if>
+                    <c:if test="${order.reductionAmount > 0}">
+                        (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})
+                    </c:if>
                 </td>
                 <td>
                     应收总额:¥<fmt:formatNumber type="number" value="${order.payableAmount}" pattern="0.00" maxFractionDigits="2" />(账户余额抵扣:${order.balancePayFee})
@@ -420,6 +428,21 @@
                         <font color="green">已收款</font>
                     </c:if></td>
                 </td>
+                <c:if test="${order.orderType eq 2}">
+                    <td>
+                        拼团状态:
+                        <c:choose>
+                            <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
+                                <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">
+                                        ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
+                                </font>
+                            </c:when>
+                            <c:otherwise>
+                                -
+                            </c:otherwise>
+                        </c:choose>
+                    </td>
+                </c:if>
                 <td>
                     发货状态:
                     <c:if test="${order.sendOutStatus == 1}">
@@ -501,7 +524,7 @@
                                             <img style="width: 100px;height: 100px"  src="${cmReturnedPurchaseProduct.mainImage}">
                                             <font title="${cmReturnedPurchaseProduct.name}">${fns:abbr(cmReturnedPurchaseProduct.name,30)}</font>
                                         </td>
-                                        <td>单价:¥${cmReturnedPurchaseProduct.price}</td>
+                                        <td>单价:¥${cmReturnedPurchaseProduct.price}<c:if test="${order.collageFlag eq 1}"><font color="red">(拼团价)</font></c:if></td>                                            <c:if test="${order.collageFlag eq 1}"><font color="red">(拼团价)</font></c:if>
                                         <td>折扣:${cmReturnedPurchaseProduct.discount}</td>
                                         <td>折后单价:¥${cmReturnedPurchaseProduct.discountPrice}</td>
                                         <td>购买数量(赠品数)X${cmReturnedPurchaseProduct.num}(${cmReturnedPurchaseProduct.presentNum})</td>

+ 21 - 0
src/main/webapp/WEB-INF/views/modules/bulkpurchase/refundRecord.jsp

@@ -125,6 +125,9 @@
         <td>
             <c:if test="${order.organizeID != 1}">
                 订单类型:${fns:getDictLabel(order.orderType,'order_type' ,'' )}
+                <c:if test="${order.orderType eq 2}">
+                    ${order.collageFlag eq 1?'拼团订单':'独立订单'}
+                </c:if>
             </c:if>
         </td>
         <td>
@@ -143,6 +146,21 @@
         <td>
             收款状态:${fns:getDictLabel(order.receiptStatus,'receiptStatus' ,'' )}
         </td>
+        <c:if test="${order.orderType eq 2}">
+            <td>
+                拼团状态:
+                <c:choose>
+                    <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
+                        <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">
+                                ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
+                        </font>
+                    </c:when>
+                    <c:otherwise>
+                        -
+                    </c:otherwise>
+                </c:choose>
+            </td>
+        </c:if>
         <td>
             付款状态:${fns:getDictLabel(order.payStatus,'payStatus' ,'' )}
             <c:if test="${order.zeroCostFlag eq 1}">
@@ -198,6 +216,9 @@
                     </font>
                 </a>
             </c:if>
+            <c:if test="${order.reductionAmount > 0}">
+                (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})
+            </c:if>
         </td>
         <td>
             应收总额:¥${order.payableAmount}

+ 54 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageForm.jsp

@@ -0,0 +1,54 @@
+<%@ 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}/hehe/cmHeheCollage/">拼团记录列表</a></li>
+		<li class="active"><a href="${ctx}/hehe/cmHeheCollage/form?id=${cmHeheCollage.id}">拼团记录<shiro:hasPermission name="hehe:cmHeheCollage:edit">${not empty cmHeheCollage.id?'编辑':'添加'}</shiro:hasPermission><shiro:lacksPermission name="hehe:cmHeheCollage:edit">查看</shiro:lacksPermission></a></li>
+	</ul><br/>
+	<form:form id="inputForm" modelAttribute="cmHeheCollage" action="${ctx}/hehe/cmHeheCollage/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>		
+		<div class="control-group">
+			<label class="control-label">拼团商品id:</label>
+			<div class="controls">
+				<form:input path="productId" htmlEscape="false" class="input-xlarge  digits"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">拼团价:</label>
+			<div class="controls">
+				<form:input path="price" htmlEscape="false" class="input-xlarge  number"/>
+			</div>
+		</div>
+		<div class="form-actions">
+			<shiro:hasPermission name="hehe:cmHeheCollage:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
+			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+		</div>
+	</form:form>
+</body>
+</html>

+ 123 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageList.jsp

@@ -0,0 +1,123 @@
+<%@ 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}/hehe/cmHeheCollage/">拼团记录</a></li>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmHeheCollage" action="${ctx}/hehe/cmHeheCollage/" method="post" class="breadcrumb form-search">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<div class="ul-form">
+			 <label>ID:</label>
+				<form:input path="id" htmlEscape="false" class="input-medium"/>
+			 <label>商品名称:</label>
+				<form:input path="productName" htmlEscape="false" class="input-medium"/>
+			 <label>供应商名称:</label>
+				<form:input path="shopName" htmlEscape="false" class="input-medium"/>
+			 <label>状态:</label>
+				<form:select path="status" class="input-medium">
+					<form:option value="" label="请选择"/>
+					<form:option value="1" label="拼团中"/>
+					<form:option value="2" label="已拼成"/>
+				</form:select>
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>ID</th>
+				<th>商品名称</th>
+				<th>供应商名称</th>
+				<th>拼团价格</th>
+				<th>拼团人数</th>
+				<th>开始时间</th>
+				<th>结束时间</th>
+				<th>已拼人数</th>
+				<th>关联订单</th>
+				<th>状态</th>
+				<th>成团时间</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmHeheCollage">
+			<tr>
+				<td>
+					${cmHeheCollage.id}
+				</td>
+				<td>
+					${cmHeheCollage.productName}
+				</td>
+				<td>
+					${cmHeheCollage.shopName}
+				</td>
+				<td>
+					${cmHeheCollage.price}
+				</td>
+				<td>
+					${cmHeheCollage.memberNum}
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheCollage.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheCollage.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					${cmHeheCollage.status eq 2?cmHeheCollage.memberNum:cmHeheCollage.orderIdList.size()}
+				</td>
+				<td>
+					<c:forEach items="${cmHeheCollage.orderIdList}" var="orderId" varStatus="index">
+						<a href="${ctx}/hehe/new/order/detail?id=${orderId}">${orderId}${index.index lt (cmHeheCollage.orderIdList.size()-1)?',':''}</a>
+					</c:forEach>
+				</td>
+				<td>
+					<c:if test="${cmHeheCollage.status eq 1}">
+						<font color="#00CC00">拼团中</font>
+					</c:if>
+					<c:if test="${cmHeheCollage.status ne 1}">
+						<font color="red">已拼成</font>
+					</c:if>
+				</td>
+				<td>
+
+					<c:if test="${cmHeheCollage.status eq 1}">
+						-
+					</c:if>
+					<c:if test="${cmHeheCollage.status ne 1}">
+						<fmt:formatDate value="${cmHeheCollage.completeTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+					</c:if>
+				</td>
+				<td>
+					<a href="${ctx}/hehe/cmHeheCollage/memberList?collageId=${cmHeheCollage.id}">拼团成员</a>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

+ 78 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageMemberList.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"/>
+	<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><a href="${ctx}/hehe/cmHeheCollage/">拼团记录</a></li>
+		<li class="active"><a href="${ctx}/hehe/cmHeheCollage/memberList?collageId=${cmHeheCollageMember.collageId}">拼团成员</a></li>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmHeheCollageMember" action="${ctx}/hehe/cmHeheCollage/memberList" method="post" class="breadcrumb form-search">
+		<form:hidden path="collageId"/>
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<div class="ul-form">
+			 <label>微信昵称:</label>
+				<form:input path="nickName" htmlEscape="false" class="input-medium"/>
+			 <label>手机号:</label>
+				<form:input path="mobile" htmlEscape="false" class="input-medium"/>
+			 <label>订单ID/订单编号:</label>
+				<form:input path="orderNo" htmlEscape="false" class="input-medium"/>
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>微信昵称</th>
+				<th>手机号</th>
+				<th>身份</th>
+				<th>下单时间</th>
+				<th>关联订单</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmHeheCollageMember">
+			<tr>
+				<td>
+					${cmHeheCollageMember.nickName}<font color="red">${cmHeheCollageMember.launchFlag eq 1?'(拼主)':''}</font>
+				</td>
+				<td>
+					${cmHeheCollageMember.mobile}
+				</td>
+				<td>
+					${cmHeheCollageMember.userIdentity eq 1 ? "普通用户" : "分销者"}
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheCollageMember.orderTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					<a href="${ctx}/hehe/new/order/detail?id=${cmHeheCollageMember.orderId}">${cmHeheCollageMember.orderNo}(${cmHeheCollageMember.orderId})</a>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

+ 205 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageProductForm.jsp

@@ -0,0 +1,205 @@
+<%@ 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){
+					var productId = $("#productId").val();
+					if (productId == '') {
+						alertx("请选择商品");
+						return false;
+					}
+					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}/hehe/cmHeheCollageProduct/">商品列表</a></li>
+		<li class="active"><a href="${ctx}/hehe/cmHeheCollageProduct/form?id=${cmHeheCollageProduct.id}">商品${not empty cmHeheCollageProduct.id?'编辑':'添加'}</a></li>
+	</ul><br/>
+	<form:form id="inputForm" modelAttribute="cmHeheCollageProduct" action="${ctx}/hehe/cmHeheCollageProduct/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>
+		<form:hidden path="productId"/>
+		<form:hidden path="unlimitedFlag"/>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>商品:</label>
+			<div class="controls">
+				<label class="noProd"><a href="JavaScript:;" onclick="showSelect()">请选择加入呵呵商城的商品</a></label>
+			</div>
+			<table id="contentTable" class="table table-striped table-bordered table-condensed hasProd">
+				<thead>
+				<th>商品ID</th>
+				<th>图片</th>
+				<th>商品名称</th>
+				<th>供应商</th>
+				<th>操作</th>
+				</thead>
+				<tbody id="contentTbody">
+				<tr>
+					<td id="productIdTd">${cmHeheCollageProduct.productId}</td>
+					<td><img id="productImageTd" src="${cmHeheCollageProduct.productImage}" width="50px" height="50px"></td>
+					<td id="productNameTd">${cmHeheCollageProduct.productName}</td>
+					<td id="shopNameTd">${cmHeheCollageProduct.shopName}</td>
+					<td>
+						<a href="javaScript:;"
+						   onclick="deleteProduct()">删除</a>
+					</td>
+				</tr>
+				</tbody>
+			</table>
+		</div>
+		<div class="hasProd">
+			<div class="control-group">
+				<label class="control-label"><font color="red">*</font>拼团价格:</label>
+				<div class="controls">
+					<form:input path="price" htmlEscape="false" class="input-xlarge  number required"/>
+				</div>
+			</div>
+			<div class="control-group">
+				<label class="control-label"><font color="red">*</font>单人限购量:</label>
+				<div class="controls">
+					<input type="number" id="limitedNum" name="limitedNum" onkeyup="onlynum(this)" value="${cmHeheCollageProduct.limitedNum}" min="1" required>
+					<input type="checkbox" id="unlimitedFlag" name="unlimitedFlag" class="formCheck" value="${cmHeheCollageProduct.unlimitedFlag eq 1?1:0}"
+						${cmHeheCollageProduct.unlimitedFlag eq 1 ? "checked" : ""} onclick="changeCondition()" />不限
+					<input id="limitedNumTemp" type="hidden" value="${cmHeheCollageProduct.limitedNum}">
+				</div>
+			</div>
+			<div class="control-group">
+				<label class="control-label"><font color="red">*</font>拼团人数:</label>
+				<div class="controls">
+					<form:input path="memberNum" htmlEscape="false" class="input-xlarge  digits required"/>
+				</div>
+			</div>
+		</div>
+
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>商品状态:</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>
+<script>
+	$(function () {
+		showInfo();
+	});
+
+	function showInfo() {
+		var productId = $("#productId").val();
+		if (productId != '') {
+			$(".hasProd").show();
+			$(".noProd").hide();
+		} else {
+			$(".hasProd").hide();
+			$(".noProd").show();
+		}
+		var unlimitedFlag = $("#unlimitedFlag").val();
+		if (unlimitedFlag == '') {
+			$("#unlimitedFlag").val(0);
+			unlimitedFlag = '0';
+		}
+		if (unlimitedFlag === '1') {
+			$("#limitedNum").attr('readonly', true);
+			$("#limitedNum").attr('required', false);
+		} else {
+			$("#limitedNum").attr('readonly', false);
+			$("#limitedNum").attr('required', true);
+		}
+	}
+
+	function changeCondition() {
+		var obj = $("#unlimitedFlag");
+		var val = obj.val();
+		if (val === '1') {
+			obj.val(0);
+			val = '0';
+		} else {
+			obj.val(1);
+			val = '1';
+		}
+		var inputObj = $("#limitedNum");
+		// 临时数据
+		var tempObj = $("#limitedNumTemp");
+		if (val === '1') {
+			inputObj.attr('readonly', true);
+			inputObj.attr('required', false);
+			tempObj.val(inputObj.val());
+			inputObj.val('');
+		} else {
+			inputObj.attr('readonly', false);
+			inputObj.attr('required', true);
+			inputObj.val(tempObj.val());
+			tempObj.val('');
+		}
+	}
+
+	function showSelect() {
+		var url = "${ctx}/hehe/cmHeheCollageProduct/toAddProduct";
+		var title = '';
+		title = "选择商品";
+		top.$.jBox("iframe:" + url, {
+			iframeScrolling: 'yes',
+			width: $(top.document).width() - 400,
+			height: $(top.document).height() - 160,
+			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();
+					$("#productId").val(items[0].productId);
+					$("#productIdTd").text(items[0].productId);
+					$("#productImageTd").attr('src', items[0].image);
+					$("#productNameTd").text(items[0].productName);
+					$("#shopNameTd").text(items[0].shopName);
+					showInfo();
+				}
+				return true;
+			}
+		});
+	}
+
+	function deleteProduct() {
+		$("#productId").val('');
+		showInfo();
+	}
+
+	/**
+	 * @param obj
+	 * jquery控制input只能输入数字
+	 */
+	function onlynum(obj) {
+		obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+	}
+</script>
+</body>
+</html>

+ 144 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageProductList.jsp

@@ -0,0 +1,144 @@
+<%@ 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}/hehe/cmHeheCollageProduct/">商品列表</a></li>
+		<li><a href="${ctx}/hehe/cmHeheCollageProduct/form">商品添加</a></li>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmHeheCollageProduct" action="${ctx}/hehe/cmHeheCollageProduct/" method="post" class="breadcrumb form-search">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<div class="ul-form">
+			 <label>商品ID:</label>
+				<form:input path="id" htmlEscape="false" class="input-medium" onkeyup="onlynum(this)"/>
+			 <label>商品名称:</label>
+				<form:input path="productName" htmlEscape="false" class="input-medium"/>
+			 <label>供应商名称:</label>
+				<form:input path="shopName" htmlEscape="false" class="input-medium"/>
+			 <label>商品状态:</label>
+				<form:select path="status" class="input-medium">
+					<form:option value="" label="请选择"/>
+					<form:option value="1" label="已上架"/>
+					<form:option value="0" label="已下架"/>
+				</form:select>
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>商品ID</th>
+				<th>商品图片</th>
+				<th>商品名称</th>
+				<th>供应商名称</th>
+				<th>拼团人数</th>
+				<th>拼团价格</th>
+				<th>单人限购量</th>
+				<th>状态</th>
+				<th>添加时间</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmHeheCollageProduct">
+			<tr>
+				<td>
+					${cmHeheCollageProduct.id}
+				</td>
+				<td>
+					<img src="${cmHeheCollageProduct.productImage}" style="width: 50px;"/>
+				</td>
+				<td>
+					${cmHeheCollageProduct.productName}
+				</td>
+				<td>
+					${cmHeheCollageProduct.shopName}
+				</td>
+				<td>
+					${cmHeheCollageProduct.memberNum}
+				</td>
+				<td>
+					${cmHeheCollageProduct.price}
+				</td>
+				<td>
+					${cmHeheCollageProduct.unlimitedFlag eq 1?'不限': cmHeheCollageProduct.limitedNum}
+				</td>
+				<td>
+					<c:if test="${cmHeheCollageProduct.status eq 1}">
+						<font color="#00CC00">已上架</font>
+					</c:if>
+					<c:if test="${cmHeheCollageProduct.status ne 1}">
+						<font color="red">已下架</font>
+					</c:if>
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheCollageProduct.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+    				<a href="${ctx}/hehe/cmHeheCollageProduct/form?id=${cmHeheCollageProduct.id}">编辑</a>
+					<a href="javascript:;" onclick="updateProductStatus(${cmHeheCollageProduct.id},${cmHeheCollageProduct.status})">${cmHeheCollageProduct.status eq 1?'下架':'上架'}</a>
+					<a href="${ctx}/hehe/cmHeheCollageProduct/delete?id=${cmHeheCollageProduct.id}" onclick="return confirmx('确认要删除该商品吗?', this.href)">删除</a>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+<script>
+	function updateProductStatus(id,status) {
+		var submit = function (v, h, f) {
+			if (v == true) {
+				$.post("${ctx}/hehe/cmHeheCollageProduct/updateStatus", {
+					'id': id,
+					'status': (status == 1 ? 0 : 1)
+				}, function (data) {
+					if (data.success) {
+						$.jBox.tip(data.msg, 'info');
+						setTimeout(function () {
+							$("#searchForm").submit();
+						},1000)
+					} else {
+						$.jBox.tip(data.msg, 'error');
+					}
+				}, "JSON");
+			}
+		};
+		if(1 == status){
+			$.jBox.confirm("确定下架该商品吗?", "提示", submit, { buttons: { '确认': true, '取消': false} });
+		}else{
+			$.jBox.confirm("确定上架该商品吗?", "提示", submit, { buttons: { '确认': true, '取消': false} });
+		}
+	}
+
+	/**
+	 * @param obj
+	 * jquery控制input只能输入数字
+	 */
+	function onlynum(obj) {
+		obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+	}
+</script>
+</body>
+</html>

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

@@ -99,7 +99,7 @@
 <body>
 	<ul class="nav nav-tabs">
 		<li><a href="${ctx}/hehe/cmHeheCoupon/?couponType=${cmHeheCoupon.couponType}">优惠券列表</a></li>
-		<li class="active"><a href="${ctx}/hehe/cmHeheCoupon/form?id=${cmHeheCoupon.id}&couponType=${cmHeheCoupon.couponType}">${not empty cmHeheCoupon.id?'编辑':'添加'}${cmHeheCoupon.couponType eq 1?'活动':cmHeheCoupon.couponType eq 2?'专享':cmHeheCoupon.couponType eq 3?'新人':cmHeheCoupon.couponType eq 4?'好友分享':'好友消费'}券</a></li>
+		<li class="active"><a href="${ctx}/hehe/cmHeheCoupon/form?id=${cmHeheCoupon.id}&couponType=${cmHeheCoupon.couponType}">${not empty cmHeheCoupon.id?'编辑':'添加'}${cmHeheCoupon.couponType eq 1?'活动':cmHeheCoupon.couponType eq 2?'专享':cmHeheCoupon.couponType eq 3?'新人':cmHeheCoupon.couponType eq 4?'好友邀请':'好友消费'}券</a></li>
 	</ul><br/>
 	<form:form id="inputForm" modelAttribute="cmHeheCoupon" action="${ctx}/hehe/cmHeheCoupon/save" method="post" class="form-horizontal">
 		<form:hidden path="id"/>

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

@@ -25,7 +25,7 @@
 		<li class="${cmHeheCoupon.couponType eq 1?'active':''}"><a href="${ctx}/hehe/cmHeheCoupon/?couponType=1">活动券</a></li>
 		<li class="${cmHeheCoupon.couponType eq 2?'active':''}"><a href="${ctx}/hehe/cmHeheCoupon/?couponType=2">专享券</a></li>
 		<li class="${cmHeheCoupon.couponType eq 3?'active':''}"><a href="${ctx}/hehe/cmHeheCoupon/?couponType=3">新人券</a></li>
-		<li class="${cmHeheCoupon.couponType eq 4?'active':''}"><a href="${ctx}/hehe/cmHeheCoupon/?couponType=4">好友分享券</a></li>
+		<li class="${cmHeheCoupon.couponType eq 4?'active':''}"><a href="${ctx}/hehe/cmHeheCoupon/?couponType=4">好友邀请券</a></li>
 		<li class="${cmHeheCoupon.couponType eq 5?'active':''}"><a href="${ctx}/hehe/cmHeheCoupon/?couponType=5">好友消费券</a></li>
 	</ul>
 	<form:form id="searchForm" modelAttribute="cmHeheCoupon" action="${ctx}/hehe/cmHeheCoupon/" method="post" class="breadcrumb form-search">
@@ -44,7 +44,7 @@
 				</form:select>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
 			<a class="btn btn-primary" href="${ctx}/hehe/cmHeheCoupon/form?couponType=${cmHeheCoupon.couponType}" style="margin-left: 15px">
-				添加${cmHeheCoupon.couponType eq 1?'活动':cmHeheCoupon.couponType eq 2?'专享':cmHeheCoupon.couponType eq 3?'新人':cmHeheCoupon.couponType eq 4?'好友分享':'好友消费'}券
+				添加${cmHeheCoupon.couponType eq 1?'活动':cmHeheCoupon.couponType eq 2?'专享':cmHeheCoupon.couponType eq 3?'新人':cmHeheCoupon.couponType eq 4?'好友邀请':'好友消费'}券
 			</a>
 			<div class="clearfix"></div>
 		</div>

+ 107 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheReductionForm.jsp

@@ -0,0 +1,107 @@
+<%@ 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){
+					var reducedAmount = $("#reducedAmount").val() * 1;
+					var touchPrice = $("#touchPrice").val() * 1;
+					if (reducedAmount >= touchPrice) {
+						alertx("减免金额必须小于减免条件金额");
+						return false;
+					}
+					var startTime = $("#startTime").val();
+					var endTime = $("#endTime").val();
+					if (startTime >= endTime) {
+						alertx("下架时间不能早于上架时间");
+						return false;
+					}
+					var reductionId = $("#id").val();
+					// 检查时间是否与其他活动时间重叠
+					$.post('${ctx}/hehe/cmHeheReduction/checkTime?startTime=' + startTime + '&endTime=' + endTime + '&reductionId=' + reductionId,function (data) {
+						if (!data.success) {
+							alertx(data.msg);
+							return false;
+						} else {
+							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}/hehe/cmHeheReduction/">分享减免活动列表</a></li>
+		<li class="active"><a href="${ctx}/hehe/cmHeheReduction/form?id=${cmHeheReduction.id}">活动${not empty cmHeheReduction.id?'编辑':'添加'}</a></li>
+	</ul><br/>
+	<form:form id="inputForm" modelAttribute="cmHeheReduction" action="${ctx}/hehe/cmHeheReduction/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>
+		<div style="margin-bottom: 10px">
+			<label><font color="red">分享减免适合在某些节日或者主题活动时创建,且适用于所有用户以及商城全部商品。</font></label>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>活动名称:</label>
+			<div class="controls">
+				<form:input path="name" htmlEscape="false" maxlength="30" class="input-xlarge required" placeholder="30个汉字以内"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>减免金额:</label>
+			<div class="controls">
+				<form:input path="reducedAmount" htmlEscape="false" class="input-xlarge number required"/> 元
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>减免条件:</label>
+			<div class="controls">
+				订单商品总额满
+				<form:input path="touchPrice" htmlEscape="false" class="input-xlarge number required"/> 元
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>分享次数:</label>
+			<div class="controls">
+				<form:input path="shareNum" htmlEscape="false" min="1" class="input-xlarge digits required"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>上架时间:</label>
+			<div class="controls">
+				<input id="startTime" name="startTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
+					value="<fmt:formatDate value="${cmHeheReduction.startTime}" pattern="yyyy-MM-dd HH:mm"/>"
+					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>下架时间:</label>
+			<div class="controls">
+				<input id="endTime" name="endTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
+					value="<fmt:formatDate value="${cmHeheReduction.endTime}" pattern="yyyy-MM-dd HH:mm"/>"
+					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
+			</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>

+ 223 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheReductionList.jsp

@@ -0,0 +1,223 @@
+<%@ 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}/hehe/cmHeheReduction/">分享减免活动列表</a></li>
+		<li><a href="${ctx}/hehe/cmHeheReduction/form">活动添加</a></li>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmHeheReduction" action="${ctx}/hehe/cmHeheReduction/" method="post" class="breadcrumb form-search">
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<div class="ul-form">
+			 <label>活动名称:</label>
+				<form:input path="name" htmlEscape="false" maxlength="30" class="input-medium"/>
+			<label>状态:</label>
+				<form:select path="status" class="input-medium">
+					<form:option value="" label="全部"/>
+					<form:option value="1" label="待上架"/>
+					<form:option value="2" label="已上架"/>
+					<form:option value="3" label="已下架"/>
+				</form:select>
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>ID</th>
+				<th>活动名称</th>
+				<th>减免金额</th>
+				<th>减免条件</th>
+				<th>上架时间</th>
+				<th>下架时间</th>
+				<th>状态</th>
+				<th>添加时间</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmHeheReduction">
+			<tr>
+				<td>
+					${cmHeheReduction.id}
+				</td>
+				<td>
+					${cmHeheReduction.name}
+				</td>
+				<td>
+					${cmHeheReduction.reducedAmount}
+				</td>
+				<td>
+					满${cmHeheReduction.touchPrice}
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheReduction.startTime}" pattern="yyyy-MM-dd HH:mm"/>
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheReduction.endTime}" pattern="yyyy-MM-dd HH:mm"/>
+				</td>
+				<td>
+					<font color="${cmHeheReduction.status eq 1?'#2FA4E7':cmHeheReduction.status eq 2?'#FF0000':'#999999'}">
+						${cmHeheReduction.status eq 1?'待上架':cmHeheReduction.status eq 2?'已上架':'已下架'}
+					</font>
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheReduction.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					<a href="javascript:;" onclick="updateStatus(${cmHeheReduction.id},${cmHeheReduction.status})">
+							${cmHeheReduction.status eq 2?'下架':'上架'}
+					</a>
+    				<a href="javascript:;" onclick="editReduction(${cmHeheReduction.id},${cmHeheReduction.status})">编辑</a>
+					<a href="javascript:;" onclick="deleteReduction(${cmHeheReduction.id},${cmHeheReduction.status})">删除</a>
+					<a href="${ctx}/hehe/cmHeheReduction/userList?reductionId=${cmHeheReduction.id}">分享用户</a>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+<script>
+	function updateStatus(reductionId,status) {
+		if (status !== 3) {
+			if (status === 2) {
+				status = 3;
+				// 已上架活动下架
+				var submit = function (v, h, f) {
+					if (v == true) {
+						$.post("${ctx}/hehe/cmHeheReduction/updateStatus?id="+reductionId+"&status="+status,function (data) {
+							top.$.jBox.tip('下架活动成功');
+							setTimeout(function () {
+								$("#searchForm").submit();
+							}, 1000);
+						});
+					}
+				};
+				$.jBox.confirm("确定下架该活动吗?", "提示", submit, {buttons: {'确认': true, '取消': false}});
+			} else {
+				debugger
+				status = 2;
+				// 待上架活动上架
+				var submit = function (v, h, f) {
+					if (v == true) {
+						var startTime = new Date();
+						// 检查时间是否与其他活动时间重叠
+						$.post('${ctx}/hehe/cmHeheReduction/checkTime?reductionId=' + reductionId + "&type=1", function (data) {
+							if (!data.success) {
+								top.$.jBox.tip(data.msg);
+								return false;
+							} else {
+								$.post("${ctx}/hehe/cmHeheReduction/updateStatus?id=" + reductionId + "&status=" + status, function (data) {
+									top.$.jBox.tip('上架活动成功');
+									setTimeout(function () {
+										$("#searchForm").submit();
+									}, 1000);
+								});
+							}
+						});
+					}
+				};
+				$.jBox.confirm("确定上架该活动吗?", "提示", submit, {buttons: {'确认': true, '取消': false}});
+			}
+		} else {
+			//已下架活动上架需重新设置上下架时间
+			var url = "${ctx}/hehe/cmHeheReduction/resetTimePage";
+			var title = "提示";
+			top.$.jBox("iframe:"+url, {
+				iframeScrolling: 'yes',
+				width: 800,
+				height: 350,
+				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()) {
+						debugger
+						var items = $jboxFrame[0].contentWindow.getCheckedItems(0);
+						if (items.length > 0) {
+							var startTime = items[0].startTime;
+							var endTime = items[0].endTime;
+							if (startTime === '') {
+								top.$.jBox.tip("请选择上架时间");
+								return false;
+							}
+							if (endTime === '') {
+								top.$.jBox.tip("请选择下架时间");
+								return false;
+							}
+							// 检查时间是否与其他活动时间重叠
+							$.post('${ctx}/hehe/cmHeheReduction/checkTime?startTime=' + startTime + '&endTime=' + endTime + '&reductionId=' + reductionId + "&type=" + 2, function (data) {
+								if (!data.success) {
+									top.$.jBox.tip(data.msg);
+									return false;
+								} else {
+									$.post("${ctx}/hehe/cmHeheReduction/updateTime?id=" + reductionId + "&startTime=" + startTime + "&endTime=" + endTime, function (data) {
+										top.$.jBox.tip("修改成功");
+										setTimeout(function () {
+											$("#searchForm").submit();
+										}, 1000);
+									});
+								}
+							});
+						} else {
+							top.$.jBox.tip("请先勾选商品...");
+							return false;
+						}
+					}
+					return true;
+				}
+			});
+		}
+
+	}
+
+	function editReduction(reductionId,status) {
+		var href = "${ctx}/hehe/cmHeheReduction/form?id=" + reductionId;
+		if (status === 2) {
+			alertx('请下架后再编辑');
+		} else {
+			window.location.href = href;
+		}
+	}
+
+	function deleteReduction(reductionId,status) {
+		var href = "${ctx}/hehe/cmHeheReduction/delete?id=" + reductionId;
+		if (status === 2) {
+			alertx('请下架后再删除');
+		} else {
+			var submit = function (v, h, f) {
+				if (v == true) {
+					window.location.href = href;
+				}
+			}
+			$.jBox.confirm("确定要删除该活动吗?", "提示", submit, {buttons: {'确认': true, '取消': false}});
+		}
+	}
+</script>
+</body>
+</html>

+ 82 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheReductionUserList.jsp

@@ -0,0 +1,82 @@
+<%@ 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><a href="${ctx}/hehe/cmHeheReduction">分享减免活动列表</a></li>
+		<li class="active"><a href="${ctx}/hehe/cmHeheReduction/userList?reductionId=${cmHeheReductionUser.reductionId}">领取用户列表</a></li>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmHeheReductionUser" action="${ctx}/hehe/cmHeheReduction/userList" method="post" class="breadcrumb form-search">
+		<form:hidden path="reductionId"/>
+		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+		<div class="ul-form">
+			 <label>微信昵称:</label>
+				<form:input path="nickName" htmlEscape="false" class="input-medium"/>
+			 <label>手机号:</label>
+				<form:input path="mobile" htmlEscape="false" class="input-medium"/>
+			 <label>分享渠道:</label>
+				<form:select path="shareType" class="input-medium">
+					<form:option value="" label="全部"/>
+					<form:option value="1" label="微信好友"/>
+					<form:option value="2" label="微信朋友圈"/>
+				</form:select>
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>ID</th>
+				<th>微信昵称</th>
+				<th>手机号</th>
+				<th>分享渠道</th>
+				<th>分享时间</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmHeheReductionUser">
+			<tr>
+				<td>
+					${cmHeheReductionUser.id}
+				</td>
+				<td>
+					${cmHeheReductionUser.nickName}
+				</td>
+				<td>
+					${cmHeheReductionUser.mobile}
+				</td>
+				<td>
+					${cmHeheReductionUser.shareType eq 1 ? "微信好友" : "微信朋友圈"}
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheReductionUser.shareTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

+ 21 - 1
src/main/webapp/WEB-INF/views/modules/hehe/heheNewOrderDetail.jsp

@@ -86,7 +86,7 @@
         <td>返佣订单: ${(order.rebateOrder ne '0' || order.rebateFlag eq '1')?'是':'否'}</td>
     </tr>
     <tr>
-        <td>订单类型: <c:if test="${order.orderType == 1}">自主订单</c:if><c:if test="${order.orderType == 0}">协销订单</c:if></td>
+        <td>订单类型: ${order.collageFlag eq 1?'拼团订单':'独立订单'}</td>
         <td>订单来源: ${fns:getDictLabel(order.orderSource,"bp_orderSource","" )}</td>
         <td>订单状态:
             <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
@@ -201,6 +201,11 @@
                     </font>
                 </a>
             </c:if>
+            <c:if test="${order.reductionAmount > 0}">
+                <font color="red">
+                    (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})
+                </font>
+            </c:if>
         </td>
     </tr>
     <tr>
@@ -344,6 +349,20 @@
             </div>
         </td>
     </tr>
+    <tr>
+        <td>拼团状态:
+            <c:choose>
+                <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
+                    <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">
+                            ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
+                    </font>
+                </c:when>
+                <c:otherwise>
+                    -
+                </c:otherwise>
+            </c:choose>
+        </td>
+    </tr>
     <c:if test="${order.promotionFullReduction gt 0 || order.promotionalGiftsCount gt 0}">
         <tr>
             <c:if test="${order.promotionFullReduction gt 0}">
@@ -480,6 +499,7 @@
                                         </c:if>
                                     </a>
                                 </c:if>
+                                <c:if test="${order.collageFlag eq 1}"><font color="red">(拼团价)</font></c:if>
                             </span>
                             <span>折扣: ${op.discount}%</span>
                             <span>折后单价:

+ 17 - 0
src/main/webapp/WEB-INF/views/modules/hehe/heheNewOrderList.jsp

@@ -769,11 +769,13 @@
 <div class="data-title">
     <ul>
         <li>订单ID</li>
+        <li>订单类型</li>
         <li>订单编号</li>
         <li>买家</li>
         <li>收货人</li>
         <li>订单状态</li>
         <li>收款状态</li>
+        <li>拼团状态</li>
         <li>付款状态</li>
         <li>发货状态</li>
         <li>退款状态</li>
@@ -786,6 +788,9 @@
         <%--颜色区分分期不分期订单以及终止订单--%>
         <ul class="spileOrder" data-id="${order.orderNo}">
             <li>${order.orderID}</li>
+            <li>
+                ${order.collageFlag eq 1?'拼团订单':'独立订单'}
+            </li>
             <li style="position: relative">${order.orderNo}
             </li>
             <li>
@@ -848,6 +853,18 @@
                     </c:if>
                 </c:if>
             </li>
+            <li>
+                <c:choose>
+                    <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
+                        <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">
+                            ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
+                        </font>
+                    </c:when>
+                    <c:otherwise>
+                        -
+                    </c:otherwise>
+                </c:choose>
+            </li>
             <li>
                 <c:if test="${order.payStatus == 1}">
                     待付款

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

@@ -38,7 +38,7 @@
 					<form:option value="1" label="活动券"/>
 					<form:option value="2" label="专享券"/>
 					<form:option value="3" label="新人券"/>
-					<form:option value="4" label="好友分享券"/>
+					<form:option value="4" label="好友邀请券"/>
 					<form:option value="5" label="好友消费券"/>
 				</form:select>
 			<label>状态:</label>

+ 185 - 0
src/main/webapp/WEB-INF/views/modules/hehe/resetTime.jsp

@@ -0,0 +1,185 @@
+<%@ 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>
+        .controls .new-tag {
+            display: inline-block;
+            width: 78px;
+            height: 30px;
+            border: 1px solid #e5e5e5;
+            border-radius: 5px;
+            margin: 7px;
+            text-align: center;
+            line-height: 30px;
+            font-size: 14px;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            cursor: pointer;
+        }
+
+        .controls .new-tag.active {
+            border-color: #e15616;
+            color: #e15616;
+        }
+
+        #tagInput {
+            width: 263px;
+            margin: 7px;
+            display: inline-block;
+            height: 30px;
+        }
+
+        .controls .tags-operate .tag-add {
+            height: 40px;
+            line-height: 40px;
+            vertical-align: middle;
+        }
+
+        .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;
+        }
+
+        .control-group{
+            margin-top: 40px;
+        }
+    </style>
+
+</head>
+<body>
+<form:form id="inputForm" modelAttribute="info" action="${ctx}/info/info/audit" method="post" class="form-horizontal">
+    <sys:message content="${message}"/>
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font>上架时间</label>
+        <div class="controls">
+            <input id="startTime" name="startTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
+                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
+        </div>
+    </div>
+    <div class="control-group">
+        <label class="control-label"><font color="red">*</font>下架时间</label>
+        <div class="controls">
+            <input id="endTime" name="endTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
+                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
+        </div>
+    </div>
+</form:form>
+
+<script>
+    function getCheckedItems() {
+        var items = new Array();
+        items.push({
+            startTime: $("#startTime").val(),
+            endTime: $("#endTime").val()
+        });
+        return items;
+    }
+
+</script>
+</body>
+</html>
+

+ 134 - 0
src/main/webapp/WEB-INF/views/modules/hehe/toAddCollageProduct.jsp

@@ -0,0 +1,134 @@
+<%@ 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"/>
+    <style type="text/css">
+        .table td i{margin:0 2px;}
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            //弹出框去滚动条
+            top.$('#jbox-content').css("overflow-y","hidden");
+            show_title(30);
+
+//			反选
+            $('body').on('click','input[name="info"]',function() {
+                var allInputLength = $('input[name="info"]').length - $('input[name="info"]:disabled').length,
+                    allInputCheckedLength = $('input[name="info"]:checked').length,
+                    checkAllEle= $('.check-all');
+//			    判断选中长度和总长度,如果相等就是全选否则取消全选
+                if(allInputLength === allInputCheckedLength) {
+                    checkAllEle.attr('checked', true);
+                } else {
+                    checkAllEle.attr('checked', false);
+                }
+            })
+        });
+        function page(n,s){
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
+        }
+
+        function getCheckedItems(){
+            var items = [];
+            var $items = $('.check-item:checked');
+            $items.each(function(){
+                var product = JSON.parse($(this).val());
+                items.push({
+                    "id": "",
+                    "productId": product.productID,
+                    "image": product.mainImage,
+                    "productName": product.name,
+                    "shopName": product.shopName,
+                    "sort": 1,
+                    "status": "1",
+                    "addTime": ""
+                })
+            });
+            return items;
+        }
+
+        function allCkbfun(ckb){
+            var isChecked = ckb.checked;
+            $(".check-item").each2(function () {
+                var attr = $(this).attr("disabled");
+                if (attr != 'disabled') {
+                    $(this).attr('checked', isChecked);
+                }
+            });
+        }
+
+        /**
+         * @param obj
+         * jquery控制input只能输入数字
+         */
+        function onlynum(obj) {
+            obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+        }
+
+        /**
+         * @param obj
+         * jquery控制input只能输入数字和两位小数(金额)
+         */
+        function num(obj) {
+            obj.value = obj.value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
+            obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
+            obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个, 清除多余的
+            obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+            obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
+        }
+
+    </script>
+</head>
+<body>
+<form:form id="searchForm" modelAttribute="product" action="${ctx}/hehe/cmHeheCollageProduct/toAddProduct?productIds=${productIds}" method="post" class="breadcrumb form-search">
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <div class="ul-form">
+        <label>商品ID:</label>
+        <form:input path="productID" htmlEscape="false"  maxlength="8" class="input-mini" onchange="onlynum(this)"/>
+        <label>商品名称:</label>
+        <form:input path="name" htmlEscape="false" class="input-medium" maxlength="20"/>
+        <label>供应商:</label>
+        <form:input path="shopName" 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>商品图片</th>
+        <th>商品名称</th>
+        <th>供应商</th>
+    </tr>
+    <tbody>
+    <c:if test="${not empty page.list}">
+        <c:forEach items="${page.list}" var="item">
+            <tr id="${item.productID}" class="itemtr">
+                    <%--已过滤添加过的商品和未上架的商品--%>
+                <th>
+                    <input class="check-item"  type="radio" name="info" value='${fns:toJson(item)}'/>
+                </th>
+                <td>${item.productID}</td>
+                <td><img src="${item.mainImage}" width="50px" height="50px"></td>
+                <td>${item.name}</td>
+                <td>${item.shopName}</td>
+            </tr>
+        </c:forEach>
+    </c:if>
+    </tbody>
+</table>
+<c:if test="${empty page.list}">
+    <p style="text-align: center;"><font  color="#1e90ff">暂无数据……</font></p>
+</c:if>
+<div class="pagination">${page}</div>
+</body>
+</html>

+ 0 - 1
src/main/webapp/WEB-INF/views/modules/weisha/cmOrganizeProductList.jsp

@@ -97,7 +97,6 @@
 
 		// 商品下架、下架
 		function updateStatus(id,status) {
-			debugger
 			var submit = function (v, h, f) {
 				if (v == true) {
 					$.post("${ctx}/weisha/cmOrganizeProduct/updateStatus", {