ソースを参照

呵呵商城拼团

Aslee 3 年 前
コミット
351688a235
31 ファイル変更2207 行追加8 行削除
  1. 21 0
      src/main/java/com/caimei/modules/hehe/dao/CmHeheCollageDao.java
  2. 21 0
      src/main/java/com/caimei/modules/hehe/dao/CmHeheCollageProductDao.java
  3. 15 0
      src/main/java/com/caimei/modules/hehe/dao/CmHeheReductionDao.java
  4. 120 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheCollage.java
  5. 99 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheCollageMember.java
  6. 116 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheCollageProduct.java
  7. 1 1
      src/main/java/com/caimei/modules/hehe/entity/CmHeheCoupon.java
  8. 1 1
      src/main/java/com/caimei/modules/hehe/entity/CmHeheCouponOrderRecord.java
  9. 1 1
      src/main/java/com/caimei/modules/hehe/entity/CmHeheReceiveUser.java
  10. 93 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheReduction.java
  11. 81 0
      src/main/java/com/caimei/modules/hehe/service/CmHeheCollageProductService.java
  12. 62 0
      src/main/java/com/caimei/modules/hehe/service/CmHeheCollageService.java
  13. 44 0
      src/main/java/com/caimei/modules/hehe/service/CmHeheReductionService.java
  14. 85 0
      src/main/java/com/caimei/modules/hehe/web/CmHeheCollageController.java
  15. 107 0
      src/main/java/com/caimei/modules/hehe/web/CmHeheCollageProductController.java
  16. 80 0
      src/main/java/com/caimei/modules/hehe/web/CmHeheReductionController.java
  17. 120 0
      src/main/resources/mappings/modules/hehe/CmHeheCollageMapper.xml
  18. 121 0
      src/main/resources/mappings/modules/hehe/CmHeheCollageProductMapper.xml
  19. 103 0
      src/main/resources/mappings/modules/hehe/CmHeheReductionMapper.xml
  20. 54 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageForm.jsp
  21. 123 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageList.jsp
  22. 92 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageMemberList.jsp
  23. 205 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageProductForm.jsp
  24. 138 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageProductList.jsp
  25. 1 1
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCouponForm.jsp
  26. 2 2
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCouponList.jsp
  27. 82 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheReductionForm.jsp
  28. 84 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheReductionList.jsp
  29. 1 1
      src/main/webapp/WEB-INF/views/modules/hehe/receiveDetailsList.jsp
  30. 134 0
      src/main/webapp/WEB-INF/views/modules/hehe/toAddCollageProduct.jsp
  31. 0 1
      src/main/webapp/WEB-INF/views/modules/weisha/cmOrganizeProductList.jsp

+ 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);
+}

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

@@ -0,0 +1,21 @@
+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();
+}

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

@@ -0,0 +1,15 @@
+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.CmHeheReduction;
+
+/**
+ * 呵呵商城分享减免DAO接口
+ * @author Aslee
+ * @version 2021-12-15
+ */
+@MyBatisDao
+public interface CmHeheReductionDao extends CrudDao<CmHeheReduction> {
+	
+}

+ 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已失效

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

@@ -0,0 +1,93 @@
+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 String reducedAmount;		// 减免金额
+	private String touchPrice;		// 减免条件
+	private String shareNum;		// 分享次数
+	private Date startTime;		// 上架时间
+	private Date endTime;		// 下架时间
+	private Date addTime;		// 添加时间
+	
+	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 String getReducedAmount() {
+		return reducedAmount;
+	}
+
+	public void setReducedAmount(String reducedAmount) {
+		this.reducedAmount = reducedAmount;
+	}
+	
+	public String getTouchPrice() {
+		return touchPrice;
+	}
+
+	public void setTouchPrice(String touchPrice) {
+		this.touchPrice = touchPrice;
+	}
+	
+	public String getShareNum() {
+		return shareNum;
+	}
+
+	public void setShareNum(String 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;
+	}
+	
+}

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

@@ -0,0 +1,81 @@
+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) {
+		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);
+		List<Integer> productIds = cmHeheCollageProductDao.findExistProductIds();
+		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;
+	}
+}

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

@@ -0,0 +1,44 @@
+package com.caimei.modules.hehe.service;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.service.CrudService;
+import com.caimei.modules.hehe.entity.CmHeheReduction;
+import com.caimei.modules.hehe.dao.CmHeheReductionDao;
+
+/**
+ * 呵呵商城分享减免Service
+ * @author Aslee
+ * @version 2021-12-15
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmHeheReductionService extends CrudService<CmHeheReductionDao, CmHeheReduction> {
+
+	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) {
+		return super.findPage(page, cmHeheReduction);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(CmHeheReduction cmHeheReduction) {
+		super.save(cmHeheReduction);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(CmHeheReduction cmHeheReduction) {
+		super.delete(cmHeheReduction);
+	}
+	
+}

+ 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/cmHeheCollageList";
+	}
+
+}

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

@@ -0,0 +1,107 @@
+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);
+			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;
+	}
+
+}

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

@@ -0,0 +1,80 @@
+package com.caimei.modules.hehe.web;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.web.BaseController;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.caimei.modules.hehe.entity.CmHeheReduction;
+import com.caimei.modules.hehe.service.CmHeheReductionService;
+
+/**
+ * 呵呵商城分享减免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;
+	}
+	
+	@RequiresPermissions("hehe:cmHeheReduction:view")
+	@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";
+	}
+
+	@RequiresPermissions("hehe:cmHeheReduction:view")
+	@RequestMapping(value = "form")
+	public String form(CmHeheReduction cmHeheReduction, Model model) {
+		model.addAttribute("cmHeheReduction", cmHeheReduction);
+		return "modules/hehe/cmHeheReductionForm";
+	}
+
+	@RequiresPermissions("hehe:cmHeheReduction:edit")
+	@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";
+	}
+	
+	@RequiresPermissions("hehe:cmHeheReduction:delete")
+	@RequestMapping(value = "delete")
+	public String delete(CmHeheReduction cmHeheReduction, RedirectAttributes redirectAttributes) {
+		cmHeheReductionService.delete(cmHeheReduction);
+		addMessage(redirectAttributes, "删除活动成功");
+		return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheReduction/?repage";
+	}
+
+}

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

@@ -0,0 +1,120 @@
+<?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 cm_hehe_product hp on a.productId = hp.id
+		left join product p on hp.productId = p.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>
+			
+			<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 orderId from cm_hehe_collage_member where collageId = #{collageId}
+	</select>
+	<select id="findMemberList" resultType="com.caimei.modules.hehe.entity.CmHeheCollageMember">
+		select chu.nickName,cm.launchFlag,chu.mobile,chu.userIdentity,co.orderTime,co.orderNo
+		from cm_hehe_collage_member cm
+		left join cm_hehe_user chu on cm.userId = chu.userId
+		left join cm_order co on cm.orderId = co.orderID
+		where collageId = #{collageId}
+		<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>
+	</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>

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

@@ -0,0 +1,121 @@
+<?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 cm_hehe_product hp on a.productId = hp.id
+		left join product p on hp.productId = p.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.String">
+		select productId from cm_hehe_collage_product;
+	</select>
+
+	<insert id="insert" parameterType="CmHeheCollageProduct"  keyProperty="id" useGeneratedKeys="true">
+		INSERT INTO cm_hehe_collage_product(
+			productId,
+			price,
+			limitedNum,
+			unlimitedFlag,
+			memberNum,
+			status,
+			addTime
+		) VALUES (
+			#{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>

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

@@ -0,0 +1,103 @@
+<?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>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="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>
+	
+	<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},
+			#{addTime}
+		)
+	</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>
+	
+	<delete id="delete">
+		DELETE FROM cm_hehe_reduction
+		WHERE id = #{id}
+	</delete>
+	
+</mapper>

+ 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 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?id=${cmHeheCollage.id}">拼团成员</a>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

+ 92 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheCollageMemberList.jsp

@@ -0,0 +1,92 @@
+<%@ 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>
+		<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>
+					${cmHeheCollageMember.orderTime}
+				</td>
+				<td>
+					<a href="${ctx}/hehe/new/order/detail?id=${cmHeheCollageMember.orderId}">${cmHeheCollageMember.orderNo}(${cmHeheCollageMember.orderId})</a>
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheCollageMember.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheCollageMember.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					${cmHeheCollageMember.status eq 2?cmHeheCollageMember.memberNum:cmHeheCollageMember.orderIdList.size}
+				</td>
+				<td>
+					<c:forEach items="${cmHeheCollageMember.orderIdList}" var="orderId" varStatus="index">
+						<a href="${ctx}/hehe/new/order/detail?id=${orderId}">${orderId}${index lt (cmHeheCollageMember.orderIdList.size-1)?',':''}</a>
+					</c:forEach>
+				</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" min="2" class="input-xlarge  digits required"/>
+				</div>
+			</div>
+		</div>
+
+		<div class="control-group">
+			<label class="control-label">商品状态:</label>
+			<div class="controls">
+				<form:select path="status" class="input-xlarge ">
+					<form:option value="1" label="已上架"/>
+					<form:option value="0" label="已下架"/>
+				</form:select>
+			</div>
+		</div>
+		<div class="form-actions">
+			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+		</div>
+	</form:form>
+<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>

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

@@ -0,0 +1,138 @@
+<%@ 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"/>
+			 <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) {
+				debugger
+				$.post("${ctx}/hehe/cmHeheCollageProduct/updateStatus", {
+					'id': id,
+					'status': (status == 1 ? 0 : 1)
+				}, function (data) {
+					debugger
+					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} });
+		}
+	}
+</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>

+ 82 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheReductionForm.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"/>
+	<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/cmHeheReduction/">活动列表</a></li>
+		<li class="active"><a href="${ctx}/hehe/cmHeheReduction/form?id=${cmHeheReduction.id}">活动<shiro:hasPermission name="hehe:cmHeheReduction:edit">${not empty cmHeheReduction.id?'编辑':'添加'}</shiro:hasPermission><shiro:lacksPermission name="hehe:cmHeheReduction:edit">查看</shiro:lacksPermission></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 class="control-group">
+			<label class="control-label">活动名称:</label>
+			<div class="controls">
+				<form:input path="name" htmlEscape="false" maxlength="30" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">减免金额:</label>
+			<div class="controls">
+				<form:input path="reducedAmount" htmlEscape="false" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">减免条件:</label>
+			<div class="controls">
+				<form:input path="touchPrice" htmlEscape="false" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">分享次数:</label>
+			<div class="controls">
+				<form:input path="shareNum" htmlEscape="false" class="input-xlarge "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">上架时间:</label>
+			<div class="controls">
+				<input name="startTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+					value="<fmt:formatDate value="${cmHeheReduction.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">下架时间:</label>
+			<div class="controls">
+				<input name="endTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+					value="<fmt:formatDate value="${cmHeheReduction.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+			</div>
+		</div>
+		<div class="form-actions">
+			<shiro:hasPermission name="hehe:cmHeheReduction: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>

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

@@ -0,0 +1,84 @@
+<%@ 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>
+		<shiro:hasPermission name="hehe:cmHeheReduction:edit"><li><a href="${ctx}/hehe/cmHeheReduction/form">活动添加</a></li></shiro:hasPermission>
+	</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"/>
+			&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>
+				<th>添加时间</th>
+				<shiro:hasPermission name="hehe:cmHeheReduction:edit"><th>操作</th></shiro:hasPermission>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmHeheReduction">
+			<tr>
+				<td><a href="${ctx}/hehe/cmHeheReduction/form?id=${cmHeheReduction.id}">
+					${cmHeheReduction.name}
+				</a></td>
+				<td>
+					${cmHeheReduction.reducedAmount}
+				</td>
+				<td>
+					${cmHeheReduction.touchPrice}
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheReduction.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheReduction.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<td>
+					<fmt:formatDate value="${cmHeheReduction.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
+				</td>
+				<shiro:hasPermission name="hehe:cmHeheReduction:edit"><td>
+    				<a href="${ctx}/hehe/cmHeheReduction/form?id=${cmHeheReduction.id}">编辑</a>
+    				<shiro:hasPermission name="hehe:cmHeheReduction:delete">
+					<a href="${ctx}/hehe/cmHeheReduction/delete?id=${cmHeheReduction.id}" onclick="return confirmx('确认要删除该活动吗?', this.href)">删除</a>
+					</shiro:hasPermission>
+				</td></shiro:hasPermission>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

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

+ 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/cmHeheCoupon/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", {