Browse Source

呵呵老后台列表

zhijiezhao 1 năm trước cách đây
mục cha
commit
611f88411f
24 tập tin đã thay đổi với 366 bổ sung47 xóa
  1. 1 1
      src/main/java/com/caimei365/manager/controller/hehe/floor/HeHeHomeApi.java
  2. 1 1
      src/main/java/com/caimei365/manager/controller/hehe/order/HeHeOrderApi.java
  3. 31 1
      src/main/java/com/caimei365/manager/controller/hehe/product/HeHeProductApi.java
  4. 1 1
      src/main/java/com/caimei365/manager/controller/hehe/user/HeHeUserApi.java
  5. 6 0
      src/main/java/com/caimei365/manager/dao/hehe/HeHeProductDao.java
  6. 3 1
      src/main/java/com/caimei365/manager/entity/hehe/floor/HeHeHomeType.java
  7. 4 0
      src/main/java/com/caimei365/manager/entity/hehe/floor/ProductFloor.java
  8. 61 0
      src/main/java/com/caimei365/manager/entity/hehe/product/CollageProduct.java
  9. 61 0
      src/main/java/com/caimei365/manager/entity/hehe/product/CollageRecord.java
  10. 8 3
      src/main/java/com/caimei365/manager/entity/hehe/product/DiscountActivity.java
  11. 8 3
      src/main/java/com/caimei365/manager/entity/hehe/product/HeHeActivity.java
  12. 2 0
      src/main/java/com/caimei365/manager/entity/hehe/product/HeHeBigType.java
  13. 3 1
      src/main/java/com/caimei365/manager/entity/hehe/product/HeHeImage.java
  14. 4 1
      src/main/java/com/caimei365/manager/entity/hehe/product/HeHeProduct.java
  15. 3 1
      src/main/java/com/caimei365/manager/entity/hehe/product/InsideDiscount.java
  16. 7 3
      src/main/java/com/caimei365/manager/entity/hehe/product/ShareReduction.java
  17. 3 1
      src/main/java/com/caimei365/manager/entity/hehe/user/HeHeUser.java
  18. 2 1
      src/main/java/com/caimei365/manager/service/hehe/floor/impl/HeHeHomeServiceImpl.java
  19. 3 1
      src/main/java/com/caimei365/manager/service/hehe/order/impl/HeHeOrderServiceImpl.java
  20. 4 0
      src/main/java/com/caimei365/manager/service/hehe/product/HeHeProductService.java
  21. 50 13
      src/main/java/com/caimei365/manager/service/hehe/product/impl/HeHeProductServiceImpl.java
  22. 2 1
      src/main/java/com/caimei365/manager/service/hehe/user/impl/HeHeUserServiceImpl.java
  23. 97 12
      src/main/resources/mapper/hehe/HeHeProductDao.xml
  24. 1 1
      src/main/resources/mapper/hehe/HeHeUserDao.xml

+ 1 - 1
src/main/java/com/caimei365/manager/controller/hehe/floor/HomeApi.java → src/main/java/com/caimei365/manager/controller/hehe/floor/HeHeHomeApi.java

@@ -15,7 +15,7 @@ import javax.annotation.Resource;
 
 @RestController
 @RequestMapping("/HeHe")
-public class HomeApi {
+public class HeHeHomeApi {
     @Resource
     private HeHeHomeService homeService;
 

+ 1 - 1
src/main/java/com/caimei365/manager/controller/hehe/order/OrderApi.java → src/main/java/com/caimei365/manager/controller/hehe/order/HeHeOrderApi.java

@@ -9,7 +9,7 @@ import javax.annotation.Resource;
 
 @RestController
 @RequestMapping("/HeHe")
-public class OrderApi {
+public class HeHeOrderApi {
 
     @Resource
     private HeHeOrderService orderService;

+ 31 - 1
src/main/java/com/caimei365/manager/controller/hehe/product/ProductApi.java → src/main/java/com/caimei365/manager/controller/hehe/product/HeHeProductApi.java

@@ -14,7 +14,7 @@ import javax.annotation.Resource;
 
 @RestController
 @RequestMapping("/HeHe")
-public class ProductApi {
+public class HeHeProductApi {
 
     @Resource
     private HeHeProductService productService;
@@ -108,4 +108,34 @@ public class ProductApi {
                                                                      @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
         return productService.insideDiscountList(discount, pageNum, pageSize);
     }
+
+    /**
+     * 拼团商品列表
+     *
+     * @param collage
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/collage/product")
+    public ResponseJson<PaginationVo<CollageProduct>> CollageProductList(CollageProduct collage,
+                                                                         @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                         @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return productService.CollageProductList(collage, pageNum, pageSize);
+    }
+
+    /**
+     * 拼团记录列表
+     *
+     * @param collage
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping("/collage/record")
+    public ResponseJson<PaginationVo<CollageRecord>> CollageRecordList(CollageRecord collage,
+                                                                       @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                       @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return productService.CollageRecordList(collage, pageNum, pageSize);
+    }
 }

+ 1 - 1
src/main/java/com/caimei365/manager/controller/hehe/user/UserApi.java → src/main/java/com/caimei365/manager/controller/hehe/user/HeHeUserApi.java

@@ -17,7 +17,7 @@ import javax.annotation.Resource;
  */
 @RestController
 @RequestMapping("/HeHe")
-public class UserApi {
+public class HeHeUserApi {
 
     @Resource
     private HeHeUserService userService;

+ 6 - 0
src/main/java/com/caimei365/manager/dao/hehe/HeHeProductDao.java

@@ -21,4 +21,10 @@ public interface HeHeProductDao {
     List<ShareReduction> findShareReductionList(ShareReduction reduction);
 
     List<InsideDiscount> findInsideDiscountList(InsideDiscount discount);
+
+    List<CollageProduct> findCollageProductList(CollageProduct collage);
+
+    List<CollageRecord> findCollageRecordList(CollageRecord collage);
+
+    List<Integer> getCollageOrderIds(Integer id);
 }

+ 3 - 1
src/main/java/com/caimei365/manager/entity/hehe/floor/HeHeHomeType.java

@@ -1,6 +1,7 @@
 package com.caimei365.manager.entity.hehe.floor;
 
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 
@@ -25,6 +26,7 @@ public class HeHeHomeType {
     /**
      * 添加时间
      */
-    private Date addTime;
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String addTime;
 
 }

+ 4 - 0
src/main/java/com/caimei365/manager/entity/hehe/floor/ProductFloor.java

@@ -1,6 +1,7 @@
 package com.caimei365.manager.entity.hehe.floor;
 
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 
 @Data
@@ -47,4 +48,7 @@ public class ProductFloor {
      * 图片信息json格式数据
      */
     private String images;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String createDate;
 }

+ 61 - 0
src/main/java/com/caimei365/manager/entity/hehe/product/CollageProduct.java

@@ -0,0 +1,61 @@
+package com.caimei365.manager.entity.hehe.product;
+
+import com.caimei365.manager.entity.caimei.svip.CmSku;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * 呵呵商城拼团商品Entity
+ */
+@Data
+public class CollageProduct {
+
+	private Integer id;
+	/**
+	 * 商品id
+	 */
+	private Integer productId;
+	/**
+	 * 列表展示的最低拼团价格
+	 */
+	private Double price;
+	/**
+	 * 单人限购量
+	 */
+	private Integer limitedNum;
+	/**
+	 * 不限购买量标识:1不限制,0限制
+	 */
+	private Integer unlimitedFlag;
+	/**
+	 * 拼团人数
+	 */
+	private Integer memberNum;
+	/**
+	 * 商品状态:0已下架,1已上架
+	 */
+	private Integer status;
+	/**
+	 * 添加时间
+	 */
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date addTime;
+	private List<CmSku> skus;
+	/**
+	 * 供应商名称
+	 */
+	private String shopName;
+	/**
+	 * 商品名称
+	 */
+	private String productName;
+	/**
+	 * 商品图片
+	 */
+	private String productImage;
+
+}

+ 61 - 0
src/main/java/com/caimei365/manager/entity/hehe/product/CollageRecord.java

@@ -0,0 +1,61 @@
+package com.caimei365.manager.entity.hehe.product;
+
+import java.util.Date;
+import java.util.List;
+
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+
+/**
+ * 呵呵商城拼团记录Entity
+ */
+@Data
+public class CollageRecord {
+
+
+	private Integer id;
+	/**
+	 * 拼团商品id
+	 */
+	private Integer productId;
+	/**
+	 * 拼团价
+	 */
+	private Double price;
+	/**
+	 * 拼团人数
+	 */
+	private Integer memberNum;
+	/**
+	 * 拼团状态:1拼团中,已拼成
+	 */
+	private Integer status;
+	/**
+	 * 开始时间
+	 */
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String startTime;
+	/**
+	 * 成团时间
+	 */
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String completeTime;
+	/**
+	 * 结束时间
+	 */
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String endTime;
+	/**
+	 * 商品名称
+	 */
+	private String productName;
+	/**
+	 * 供应商名称
+	 */
+	private String shopName;
+	/**
+	 * 订单id列表
+	 */
+	private List<Integer> orderIdList;
+}

+ 8 - 3
src/main/java/com/caimei365/manager/entity/hehe/product/DiscountActivity.java

@@ -1,6 +1,8 @@
 package com.caimei365.manager.entity.hehe.product;
 
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
 import java.util.Date;
 
 /**
@@ -16,15 +18,18 @@ public class DiscountActivity {
 	/**
 	 * 上架时间
 	 */
-	private Date onlineTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String onlineTime;
 	/**
 	 * 下架时间
 	 */
-	private Date offlineTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String offlineTime;
 	/**
 	 * 创建时间
 	 */
-	private Date addTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String addTime;
 	/**
 	 * 状态:1待上架,2已上架,3已下架
 	 */

+ 8 - 3
src/main/java/com/caimei365/manager/entity/hehe/product/HeHeActivity.java

@@ -1,6 +1,8 @@
 package com.caimei365.manager.entity.hehe.product;
 
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
 import java.util.Date;
 
 
@@ -30,15 +32,18 @@ public class HeHeActivity  {
 	/**
 	 * 开始时间
 	 */
-	private Date beginTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String beginTime;
 	/**
 	 * 结束时间
 	 */
-	private Date endTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String endTime;
 	/**
 	 * 创建时间
 	 */
-	private Date addTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String addTime;
 	/**
 	 * 活动状态:1未开始,2进行中,3已结束
 	 */

+ 2 - 0
src/main/java/com/caimei365/manager/entity/hehe/product/HeHeBigType.java

@@ -1,6 +1,7 @@
 package com.caimei365.manager.entity.hehe.product;
 
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 @Data
 public class HeHeBigType {
@@ -41,6 +42,7 @@ public class HeHeBigType {
     /**
      * 添加时间
      */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private String addTime;
     /**
      * sortIndex

+ 3 - 1
src/main/java/com/caimei365/manager/entity/hehe/product/HeHeImage.java

@@ -2,6 +2,7 @@ package com.caimei365.manager.entity.hehe.product;
 
 
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 
@@ -47,6 +48,7 @@ public class HeHeImage {
 	/**
 	 * 添加时间
 	 */
-	private Date addTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String addTime;
 
 }

+ 4 - 1
src/main/java/com/caimei365/manager/entity/hehe/product/HeHeProduct.java

@@ -2,6 +2,7 @@ package com.caimei365.manager.entity.hehe.product;
 
 import com.caimei365.manager.entity.caimei.svip.CmSku;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -9,6 +10,7 @@ import java.util.List;
 
 @Data
 public class HeHeProduct {
+    private Integer id;
     /**
      * 对应采美商品id
      */
@@ -56,7 +58,8 @@ public class HeHeProduct {
     /**
      * 添加时间
      */
-    private Date addTime;
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String addTime;
     /**
      * 商品名称
      */

+ 3 - 1
src/main/java/com/caimei365/manager/entity/hehe/product/InsideDiscount.java

@@ -1,6 +1,7 @@
 package com.caimei365.manager.entity.hehe.product;
 
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 
@@ -31,7 +32,8 @@ public class InsideDiscount {
 	/**
 	 * 创建时间
 	 */
-	private Date addTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String addTime;
 	/**
 	 * 商品json数据
 	 */

+ 7 - 3
src/main/java/com/caimei365/manager/entity/hehe/product/ShareReduction.java

@@ -2,6 +2,7 @@ package com.caimei365.manager.entity.hehe.product;
 
 
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 
@@ -31,15 +32,18 @@ public class ShareReduction {
 	/**
 	 * 上架时间
 	 */
-	private Date startTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String startTime;
 	/**
 	 * 下架时间
 	 */
-	private Date endTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String endTime;
 	/**
 	 * 添加时间
 	 */
-	private Date addTime;
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private String addTime;
 	/**
 	 * 状态:1待上架,2已上架,3已下架
 	 */

+ 3 - 1
src/main/java/com/caimei365/manager/entity/hehe/user/HeHeUser.java

@@ -1,6 +1,7 @@
 package com.caimei365.manager.entity.hehe.user;
 
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 
@@ -37,5 +38,6 @@ public class HeHeUser {
     /**
      * 添加时间
      */
-    private Date addTime;
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String addTime;
 }

+ 2 - 1
src/main/java/com/caimei365/manager/service/hehe/floor/impl/HeHeHomeServiceImpl.java

@@ -9,6 +9,7 @@ import com.caimei365.manager.entity.hehe.floor.ProductFloor;
 import com.caimei365.manager.entity.hehe.product.HeHeImage;
 import com.caimei365.manager.service.hehe.floor.HeHeHomeService;
 import com.github.pagehelper.PageHelper;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -17,7 +18,7 @@ import java.util.List;
 @Service
 public class HeHeHomeServiceImpl implements HeHeHomeService {
 
-    @Resource
+    @Autowired
     private HeHeHomeDao homeDao;
 
     @Override

+ 3 - 1
src/main/java/com/caimei365/manager/service/hehe/order/impl/HeHeOrderServiceImpl.java

@@ -1,12 +1,14 @@
 package com.caimei365.manager.service.hehe.order.impl;
 
+import com.caimei365.manager.dao.hehe.HeHeOrderDao;
 import com.caimei365.manager.service.hehe.order.HeHeOrderService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 
 @Service
 public class HeHeOrderServiceImpl implements HeHeOrderService {
-    @Resource
+    @Autowired
     private HeHeOrderDao orderDao;
 }

+ 4 - 0
src/main/java/com/caimei365/manager/service/hehe/product/HeHeProductService.java

@@ -16,4 +16,8 @@ public interface HeHeProductService {
     ResponseJson<PaginationVo<ShareReduction>> shareReductionList(ShareReduction reduction, int pageNum, int pageSize);
 
     ResponseJson<PaginationVo<InsideDiscount>> insideDiscountList(InsideDiscount discount, int pageNum, int pageSize);
+
+    ResponseJson<PaginationVo<CollageProduct>> CollageProductList(CollageProduct collage, int pageNum, int pageSize);
+
+    ResponseJson<PaginationVo<CollageRecord>> CollageRecordList(CollageRecord collage, int pageNum, int pageSize);
 }

+ 50 - 13
src/main/java/com/caimei365/manager/service/hehe/product/impl/HeHeProductServiceImpl.java

@@ -11,10 +11,13 @@ import com.caimei365.manager.entity.hehe.product.*;
 import com.caimei365.manager.service.hehe.product.HeHeProductService;
 import com.github.pagehelper.PageHelper;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
 
@@ -22,7 +25,7 @@ import java.util.List;
 @Slf4j
 public class HeHeProductServiceImpl implements HeHeProductService {
 
-    @Resource
+    @Autowired
     private HeHeProductDao productDao;
 
     @Override
@@ -89,28 +92,62 @@ public class HeHeProductServiceImpl implements HeHeProductService {
         return ResponseJson.success(page);
     }
 
+    @Override
+    public ResponseJson<PaginationVo<CollageProduct>> CollageProductList(CollageProduct collage, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CollageProduct> list = productDao.findCollageProductList(collage);
+        list.forEach(product -> {
+            product.setProductImage(AppUtils.getImageURL("product", product.getProductImage(), 0, "https://www.caimei365.com/"));
+        });
+        PaginationVo<CollageProduct> page = new PaginationVo<>(list);
+        return ResponseJson.success(page);
+    }
+
+    @Override
+    public ResponseJson<PaginationVo<CollageRecord>> CollageRecordList(CollageRecord collage, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<CollageRecord> list = productDao.findCollageRecordList(collage);
+        list.forEach(col->{
+            // 获取已拼团的订单id列表
+            List<Integer> orderIdList = productDao.getCollageOrderIds(col.getId());
+            col.setOrderIdList(orderIdList);
+        });
+        PaginationVo<CollageRecord> page = new PaginationVo<>(list);
+        return ResponseJson.success(page);
+    }
+
     public void setShareReductionStatus(ShareReduction reduction) {
         Date date = new Date();
+        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         if (reduction != null) {
-            if (date.compareTo(reduction.getStartTime()) < 0) {
-                reduction.setStatus(1);
-            } else if (date.compareTo(reduction.getEndTime()) > 0) {
-                reduction.setStatus(3);
-            } else {
-                reduction.setStatus(2);
+            try {
+                if (date.compareTo(formatter.parse(reduction.getStartTime())) < 0) {
+                    reduction.setStatus(1);
+                } else if (date.compareTo(formatter.parse(reduction.getEndTime())) > 0) {
+                    reduction.setStatus(3);
+                } else {
+                    reduction.setStatus(2);
+                }
+            } catch (ParseException e) {
+                throw new RuntimeException(e);
             }
         }
     }
 
     public void setActivityStatus(DiscountActivity activity) {
         Date date = new Date();
+        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         if (activity != null) {
-            if (date.compareTo(activity.getOnlineTime()) < 0) {
-                activity.setStatus(1);
-            } else if (date.compareTo(activity.getOfflineTime()) > 0) {
-                activity.setStatus(3);
-            } else {
-                activity.setStatus(2);
+            try {
+                if (date.compareTo(formatter.parse(activity.getOnlineTime())) < 0) {
+                    activity.setStatus(1);
+                } else if (date.compareTo(formatter.parse(activity.getOfflineTime())) > 0) {
+                    activity.setStatus(3);
+                } else {
+                    activity.setStatus(2);
+                }
+            } catch (ParseException e) {
+                throw new RuntimeException(e);
             }
         }
     }

+ 2 - 1
src/main/java/com/caimei365/manager/service/hehe/user/impl/HeHeUserServiceImpl.java

@@ -8,6 +8,7 @@ import com.caimei365.manager.entity.hehe.user.HeHeUser;
 import com.caimei365.manager.service.hehe.user.HeHeUserService;
 import com.github.pagehelper.PageHelper;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -17,7 +18,7 @@ import java.util.List;
 @Slf4j
 public class HeHeUserServiceImpl implements HeHeUserService {
 
-    @Resource
+    @Autowired
     private HeHeUserDao userDao;
 
     @Override

+ 97 - 12
src/main/resources/mapper/hehe/HeHeProductDao.xml

@@ -26,16 +26,16 @@
         left join cm_hehe_activity_product chap on a.productId = chap.productId
         left join cm_hehe_floor_product chfp on a.productId = chfp.productId
         <where>
-            <if test="productId != null and productId != ''">
+            <if test="productId != null">
                 AND a.productId = #{productId}
             </if>
-            <if test="validFlag != null and validFlag != ''">
+            <if test="validFlag != null">
                 AND a.validFlag = #{validFlag}
             </if>
-            <if test="includedTax != null and includedTax != ''">
+            <if test="includedTax != null">
                 AND a.includedTax = #{includedTax}
             </if>
-            <if test="invoiceType != null and invoiceType != ''">
+            <if test="invoiceType != null">
                 AND a.invoiceType = #{invoiceType}
             </if>
             <if test="id != null and id != ''">
@@ -72,7 +72,7 @@
     </select>
 
     <select id="findBigTypeList" resultType="com.caimei365.manager.entity.hehe.product.HeHeBigType">
-        SELECT a.bigTypeID AS "bigTypeID",
+        SELECT a.bigTypeID AS "bigTypeId",
         a.name AS "name",
         a.bigTypeCode AS "bigTypeCode",
         a.wwwValidFlag AS "wwwValidFlag",
@@ -85,8 +85,8 @@
         a.mallType
         FROM bigtype a
         <where>
-            <if test="bigTypeID != null and bigTypeID != ''">
-                AND a.bigTypeID = #{bigTypeID}
+            <if test="bigTypeId != null">
+                AND a.bigTypeID = #{bigTypeId}
             </if>
             <if test="name != null and name != ''">
                 AND a.name LIKE concat('%',#{name},'%')
@@ -94,13 +94,13 @@
             <if test="bigTypeCode != null and bigTypeCode != ''">
                 AND a.bigTypeCode = #{bigTypeCode}
             </if>
-            <if test="wwwValidFlag != null and wwwValidFlag != ''">
+            <if test="wwwValidFlag != null">
                 AND a.wwwValidFlag = #{wwwValidFlag}
             </if>
-            <if test="crmValidFlag != null and crmValidFlag != ''">
+            <if test="crmValidFlag != null">
                 AND a.crmValidFlag = #{crmValidFlag}
             </if>
-            <if test="sortIndex != null and sortIndex != ''">
+            <if test="sortIndex != null">
                 AND a.sortIndex = #{sortIndex}
             </if>
             <if test="typeSort != null and typeSort != '' and typeSort != 'null'">
@@ -184,7 +184,8 @@
         FROM cm_hehe_reduction a
         <where>
             <if test="name != null and name != ''">
-            AND a.name LIKE concat('%',#{name},'%')
+                AND a.name LIKE concat('%',#{name},'%')
+            </if>
             <if test="status != null">
                 <if test="status == 1">
                     and NOW() <![CDATA[ < ]]> a.startTime
@@ -211,7 +212,8 @@
         FROM cm_hehe_discount a
         <where>
             <if test="title != null and title != ''">
-            AND a.title LIKE concat('%',#{title},'%')
+                AND a.title LIKE concat('%',#{title},'%')
+            </if>
             <if test="status != null and status != ''">
                 AND a.status = #{status}
             </if>
@@ -219,4 +221,87 @@
         order by addTime desc
     </select>
 
+    <select id="findCollageProductList" resultType="com.caimei365.manager.entity.hehe.product.CollageProduct">
+        SELECT
+        a.id AS "id",
+        a.productId AS "productId",
+        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,
+        (select collagePrice
+        from cm_hehe_collage_sku
+        where productId = a.productId
+        order by collagePrice asc
+        limit 1) as price
+        FROM cm_hehe_collage_product a
+        left join product p on a.productId = p.productID
+        left join cm_hehe_product chp on p.productID = chp.productId
+        left join shop s on p.shopID = s.shopID
+        <where>
+            chp.id is not null
+            <if test="id != null">
+                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>
+        group by p.productID
+        order by a.addTime desc
+    </select>
+
+    <select id="findCollageRecordList" resultType="com.caimei365.manager.entity.hehe.product.CollageRecord">
+        SELECT
+        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
+        FROM cm_hehe_collage a
+        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
+        <where>
+            a.status != 0 and a.status != 3
+            <if test="id != null">
+                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>
+        order by startTime desc
+    </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 = #{id}
+          and co.receiptStatus = 3
+    </select>
+
+
 </mapper>

+ 1 - 1
src/main/resources/mapper/hehe/HeHeUserDao.xml

@@ -8,7 +8,7 @@
         FROM cm_hehe_user a
         <where>
             <if test="name != null and name != ''">
-                AND a.name LIKE
+                AND a.name LIKE concat('%',#{name},'%')
             </if>
             <if test="mobile != null and mobile != ''">
                 AND a.mobile = #{mobile}