yangyb před 1 měsícem
rodič
revize
9380ef5d1d
29 změnil soubory, kde provedl 1086 přidání a 138 odebrání
  1. 28 4
      mall-service/src/main/java/com/txz/mall/controller/CombinationController.java
  2. 17 21
      mall-service/src/main/java/com/txz/mall/controller/FlashActivityController.java
  3. 11 1
      mall-service/src/main/java/com/txz/mall/controller/ProductController.java
  4. 16 0
      mall-service/src/main/java/com/txz/mall/dubbo/client/OperatingConfigDubboServiceClient.java
  5. 7 0
      mall-service/src/main/java/com/txz/mall/model/StoreCombination.java
  6. 9 2
      mall-service/src/main/java/com/txz/mall/model/StoreFlashActivity.java
  7. 1 1
      mall-service/src/main/java/com/txz/mall/model/StorePink.java
  8. 9 2
      mall-service/src/main/java/com/txz/mall/service/StoreCombinationService.java
  9. 11 0
      mall-service/src/main/java/com/txz/mall/service/StoreFlashActivityService.java
  10. 9 0
      mall-service/src/main/java/com/txz/mall/service/StoreProductService.java
  11. 4 6
      mall-service/src/main/java/com/txz/mall/service/impl/CategoryServiceImpl.java
  12. 111 51
      mall-service/src/main/java/com/txz/mall/service/impl/StoreCombinationServiceImpl.java
  13. 30 0
      mall-service/src/main/java/com/txz/mall/service/impl/StoreFlashActivityServiceImpl.java
  14. 25 25
      mall-service/src/main/java/com/txz/mall/service/impl/StoreOrderServiceImpl.java
  15. 13 14
      mall-service/src/main/java/com/txz/mall/service/impl/StorePinkServiceImpl.java
  16. 2 1
      mall-service/src/main/java/com/txz/mall/service/impl/StoreProductRuleServiceImpl.java
  17. 129 7
      mall-service/src/main/java/com/txz/mall/service/impl/StoreProductServiceImpl.java
  18. 1 1
      mall-service/src/main/java/com/txz/mall/service/impl/UserSignServiceImpl.java
  19. 1 1
      mall-service/src/main/java/dto/StoreFlashActivityDTO.java
  20. 121 0
      mall-service/src/main/java/dto/StoreProductAddRequest.java
  21. 27 0
      mall-service/src/main/java/dto/StoreProductAttrAddRequest.java
  22. 99 0
      mall-service/src/main/java/dto/StoreProductAttrValueAddRequest.java
  23. 24 0
      mall-service/src/main/java/vo/ActivityProductVO.java
  24. 55 0
      mall-service/src/main/java/vo/GoPinkResponse.java
  25. 151 0
      mall-service/src/main/java/vo/StoreCombinationVO.java
  26. 76 0
      mall-service/src/main/java/vo/StorePinkVO.java
  27. 96 0
      mall-service/src/main/java/vo/StoreProductAttrValueVO.java
  28. 1 0
      mall-service/src/main/resources/mapper/StoreCombinationMapper.xml
  29. 2 1
      mall-service/src/main/resources/mapper/StoreFlashActivityMapper.xml

+ 28 - 4
mall-service/src/main/java/com/txz/mall/controller/CombinationController.java

@@ -15,11 +15,12 @@ import org.slf4j.LoggerFactory;
 import org.springframework.web.bind.annotation.*;
 import tk.mybatis.mapper.entity.Condition;
 import tk.mybatis.mapper.entity.Example;
-import vo.GoPinkVO;
+import vo.GoPinkResponse;
 
 import javax.annotation.Resource;
 import java.util.Date;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * Created by CodeGenerator on 2025/07/14.
@@ -136,7 +137,7 @@ public class CombinationController {
 
     @PostMapping("/addActivityProduct")
     @ApiOperation(value = "添加活动商品")
-    public Result addActivityProduct(@RequestBody List<StoreCombination> list, Long activityId) {
+    public Result addActivityProduct(@RequestBody List<StoreCombination> list, @RequestParam("activityId") Long activityId) {
         if (CollectionUtils.isEmpty(list)) {
             return Result.fail(ResultCode.OBJECT_IS_NULL);
         }
@@ -152,6 +153,29 @@ public class CombinationController {
         return Result.success();
     }
 
+//    @PostMapping("/getActivityProduct")
+//    @ApiOperation(value = "获取活动商品列表")
+//    public Result<PageInfo<ActivityProductVO>> productList(@RequestParam("activityId") Long activityId, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
+//        if (activityId == null) {
+//            return Result.fail(ResultCode.ID_IS_NULL);
+//        }
+//        PageInfo<ActivityProductVO> list = storeCombinationService.getActivityProduct(activityId, page, size);
+//        return Result.success(list);
+//    }
+
+    @PostMapping("/getActivityProductIds")
+    @ApiOperation(value = "获取活动商品ids")
+    public Result<List<Long>> getActivityProductIds(@RequestParam("activityId") Long activityId) {
+        Condition condition = new Condition(StoreCombination.class);
+        Example.Criteria criteria = condition.createCriteria();
+        criteria.andEqualTo("isDelete", 0);
+        criteria.andEqualTo("activityId", activityId);
+        List<StoreCombination> combinationList = storeCombinationService.findByCondition(condition);
+        List<Long> arrayList = combinationList.stream().map(StoreCombination::getProductId).collect(Collectors.toList());
+        return Result.success(arrayList);
+    }
+
+
     /**
      * 去开团
      */
@@ -169,8 +193,8 @@ public class CombinationController {
      */
     @ApiOperation(value = "去拼团")
     @GetMapping(value = "/pink/{pinkId}")
-    public Result<GoPinkVO> goPink(@PathVariable(value = "pinkId") Long pinkId) {
-        GoPinkVO goPinkResponse = storeCombinationService.goPink(pinkId);
+    public Result<GoPinkResponse> goPink(@PathVariable(value = "pinkId") Long pinkId) {
+        GoPinkResponse goPinkResponse = storeCombinationService.goPink(pinkId);
         return Result.success(goPinkResponse);
     }
 

+ 17 - 21
mall-service/src/main/java/com/txz/mall/controller/FlashActivityController.java

@@ -1,18 +1,18 @@
 package com.txz.mall.controller;
 
-import com.github.pagehelper.PageHelper;
+import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.PageInfo;
 import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.StoreFlashActivity;
 import com.txz.mall.service.StoreFlashActivityService;
+import dto.StoreFlashActivityDTO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
 import org.springframework.web.bind.annotation.*;
-import tk.mybatis.mapper.entity.Condition;
-import tk.mybatis.mapper.entity.Example;
 
 import javax.annotation.Resource;
 import java.util.Date;
@@ -33,11 +33,14 @@ public class FlashActivityController {
 
     @PostMapping("/add")
     @ApiOperation(value = "限时活动新增")
-    public Result add(@RequestBody StoreFlashActivity storeFlashActivity) {
-        if (storeFlashActivity == null) {
+    public Result add(@RequestBody StoreFlashActivityDTO dto) {
+        if (dto == null) {
             return Result.fail(ResultCode.OBJECT_IS_NULL);
         }
         try {
+            StoreFlashActivity storeFlashActivity = new StoreFlashActivity();
+            BeanUtils.copyProperties(dto, storeFlashActivity);
+            storeFlashActivity.setContent(JSONObject.toJSONString(dto.getContent()));
             storeFlashActivity.setCreateTime(new Date());
 //            storeFlashActivity.setCreateUserId(userId);
             storeFlashActivityService.save(storeFlashActivity);
@@ -69,14 +72,17 @@ public class FlashActivityController {
 
     @PostMapping("/update")
     @ApiOperation(value = "限时活动更新")
-    public Result update(@RequestBody StoreFlashActivity storeFlashActivity) {
-        if (storeFlashActivity == null) {
+    public Result update(@RequestBody StoreFlashActivityDTO dto) {
+        if (dto == null) {
             return Result.fail(ResultCode.OBJECT_IS_NULL);
         }
-        if (storeFlashActivity.getId() == null) {
+        if (dto.getId() == null) {
             return Result.fail(ResultCode.ID_IS_NULL);
         }
         try {
+            StoreFlashActivity storeFlashActivity = new StoreFlashActivity();
+            BeanUtils.copyProperties(dto, storeFlashActivity);
+            storeFlashActivity.setContent(JSONObject.toJSONString(dto.getContent()));
             storeFlashActivity.setUpdateTime(new Date());
 //            storeFlashActivity.setUpdateUserId(userId);
             storeFlashActivityService.update(storeFlashActivity);
@@ -106,20 +112,10 @@ public class FlashActivityController {
     @PostMapping("/list")
     @ApiOperation(value = "限时活动获取列表")
     public Result<List<StoreFlashActivity>> list(@RequestBody StoreFlashActivity storeFlashActivity, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-        PageHelper.startPage(page, size);
-
-        Condition condition = new Condition(storeFlashActivity.getClass());
-        Example.Criteria criteria = condition.createCriteria();
-        criteria.andEqualTo("isDelete", 0);
-        condition.setOrderByClause("create_time DESC");
         PageInfo pageInfo = null;
-        try {
-            List<StoreFlashActivity> list = storeFlashActivityService.findByCondition(condition);
-            pageInfo = new PageInfo(list);
-        } catch (Exception e) {
-            log.error("查询对象操作异常e:{}", e);
-            return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
-        }
+        List<StoreFlashActivity> arrayList = storeFlashActivityService.activityList(storeFlashActivity, page, size);
+        pageInfo = new PageInfo(arrayList);
         return Result.success(pageInfo);
     }
+
 }

+ 11 - 1
mall-service/src/main/java/com/txz/mall/controller/ProductController.java

@@ -8,12 +8,14 @@ import com.txz.mall.core.Result;
 import com.txz.mall.core.ResultCode;
 import com.txz.mall.model.StoreProduct;
 import com.txz.mall.service.StoreProductService;
+import dto.StoreProductAddRequest;
 import dto.StoreProductDTO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import tk.mybatis.mapper.entity.Condition;
@@ -171,7 +173,7 @@ public class ProductController {
     @PostMapping("/list")
     @ApiOperation(value = "商品获取列表")
     public Result<List<StoreProduct>> list(@RequestBody StoreProductDTO dto, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
-       
+
         PageHelper.startPage(page, size);
 
         Condition condition = new Condition(StoreProduct.class);
@@ -260,4 +262,12 @@ public class ProductController {
         return Result.success(storeProductService.getOrderStatusNum());
     }
 
+    @ApiOperation(value = "新增商品")
+    @PostMapping(value = "/save")
+    public Result<String> save(@RequestBody @Validated StoreProductAddRequest request) {
+        storeProductService.save(request);
+        return Result.success();
+
+    }
+
 }

+ 16 - 0
mall-service/src/main/java/com/txz/mall/dubbo/client/OperatingConfigDubboServiceClient.java

@@ -0,0 +1,16 @@
+package com.txz.mall.dubbo.client;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@Component
+public class OperatingConfigDubboServiceClient {
+
+//    @Reference
+//    private OperatingConfigDubboService operatingConfigDubboService;
+//
+//    public Result<ConfigDTO> getConfigByCode(String code){
+//        return operatingConfigDubboService.getConfigByCode(code);
+//    }
+}

+ 7 - 0
mall-service/src/main/java/com/txz/mall/model/StoreCombination.java

@@ -24,6 +24,13 @@ public class StoreCombination {
     @ApiModelProperty(value = "商品id")
     private Long productId;
 
+    /**
+     * 活动id
+     */
+    @Column(name = "activity_id")
+    @ApiModelProperty(value = "活动id")
+    private Long activityId;
+
     /**
      * 商品名称
      */

+ 9 - 2
mall-service/src/main/java/com/txz/mall/model/StoreFlashActivity.java

@@ -51,6 +51,13 @@ public class StoreFlashActivity {
     @ApiModelProperty(value = "状态 0=关闭 1=开启")
     private Integer status;
 
+    /**
+     * 活动状态 0待开始  1进行中  2已结束
+     */
+    @ApiModelProperty(value = "活动状态 0待开始  1进行中  2已结束")
+    @Column(name = "active_state")
+    private Integer activeState;
+
     /**
      * 创建时间
      */
@@ -90,9 +97,9 @@ public class StoreFlashActivity {
     /**
      * 轮播图
      */
-    @Column(name = "silder_imgs")
+    @Column(name = "slider_img")
     @ApiModelProperty(value = "轮播图")
-    private String silderImgs;
+    private String sliderImg;
 
     /**
      * 内容

+ 1 - 1
mall-service/src/main/java/com/txz/mall/model/StorePink.java

@@ -98,7 +98,7 @@ public class StorePink {
 
     @ApiModelProperty(value = "幸运儿 默认0  1为幸运儿 (团长不能是天选)")
     @Column(name = "l_id")
-    private Long lId;
+    private Integer lId;
 
     /**
      * 是否发送模板消息0未发送1已发送

+ 9 - 2
mall-service/src/main/java/com/txz/mall/service/StoreCombinationService.java

@@ -1,8 +1,10 @@
 package com.txz.mall.service;
 
+import com.github.pagehelper.PageInfo;
 import com.txz.mall.core.Service;
 import com.txz.mall.model.StoreCombination;
-import vo.GoPinkVO;
+import vo.ActivityProductVO;
+import vo.GoPinkResponse;
 
 import java.util.List;
 
@@ -20,6 +22,11 @@ public interface StoreCombinationService extends Service<StoreCombination> {
      */
     void addActivityProduct(List<StoreCombination> list, Long activityId);
 
+    /**
+     * 获取活动商品列表
+     */
+    PageInfo<ActivityProductVO> getActivityProduct(Long activityId, Integer page, Integer size);
+
     /**
      * 去开团
      */
@@ -30,7 +37,7 @@ public interface StoreCombinationService extends Service<StoreCombination> {
      *
      * @param pinkId 拼团团长单ID
      */
-    GoPinkVO goPink(Long pinkId);
+    GoPinkResponse goPink(Long pinkId);
 
     /**
      * 更多拼团信息

+ 11 - 0
mall-service/src/main/java/com/txz/mall/service/StoreFlashActivityService.java

@@ -3,10 +3,21 @@ package com.txz.mall.service;
 import com.txz.mall.core.Service;
 import com.txz.mall.model.StoreFlashActivity;
 
+import java.util.List;
+
 
 /**
  * Created by CodeGenerator on 2025/07/14.
  */
 public interface StoreFlashActivityService extends Service<StoreFlashActivity> {
 
+    /**
+     * 获取活动列表
+     *
+     * @param storeFlashActivity
+     * @param page
+     * @param size
+     * @return
+     */
+    List<StoreFlashActivity> activityList(StoreFlashActivity storeFlashActivity, Integer page, Integer size);
 }

+ 9 - 0
mall-service/src/main/java/com/txz/mall/service/StoreProductService.java

@@ -2,6 +2,7 @@ package com.txz.mall.service;
 
 import com.txz.mall.core.Service;
 import com.txz.mall.model.StoreProduct;
+import dto.StoreProductAddRequest;
 import org.springframework.web.multipart.MultipartFile;
 import vo.StoreProductCountItemVO;
 import vo.StoreProductInfoVO;
@@ -40,4 +41,12 @@ public interface StoreProductService extends Service<StoreProduct> {
      * 获取订单状态数量
      */
     StoreProductCountItemVO getOrderStatusNum();
+
+    /**
+     * 商品添加
+     *
+     * @param request 商品添加参数
+     * @return 添加结果
+     */
+    void save(StoreProductAddRequest request);
 }

+ 4 - 6
mall-service/src/main/java/com/txz/mall/service/impl/CategoryServiceImpl.java

@@ -80,7 +80,7 @@ public class CategoryServiceImpl extends AbstractService<Category> implements Ca
         criteria.andEqualTo("isDelete", 0);
         criteria.andEqualTo("type", type);
 
-        if (null != categoryIdList && categoryIdList.size() > 0) {
+        if (null != categoryIdList && !categoryIdList.isEmpty()) {
             criteria.andIn("id", categoryIdList);
         }
 
@@ -100,20 +100,18 @@ public class CategoryServiceImpl extends AbstractService<Category> implements Ca
         allTree = allTree.stream()
                 .sorted(Comparator
                         .comparing(Category::getSort, Comparator.reverseOrder())
-                        .thenComparing(Comparator.comparing(Category::getId))
+                        .thenComparing(Category::getId)
                 )
                 .collect(Collectors.toList());
         // 根据名称搜索特殊处理 这里仅仅处理两层搜索后有子父级关系的数据
-        if (StringUtils.isNotBlank(name) && allTree.size() > 0) {
+        if (StringUtils.isNotBlank(name) && !allTree.isEmpty()) {
             List<Category> searchCategory = new ArrayList<>();
             List<Long> categoryIds = allTree.stream().map(Category::getId).collect(Collectors.toList());
 
             List<Long> pidList = allTree.stream().filter(c -> c.getPid() > 0 && !categoryIds.contains(c.getPid()))
                     .map(Category::getPid).distinct().collect(Collectors.toList());
             if (CollUtil.isNotEmpty(pidList)) {
-                pidList.forEach(pid -> {
-                    searchCategory.add(this.findById(pid));
-                });
+                pidList.forEach(pid -> searchCategory.add(this.findById(pid)));
             }
             allTree.addAll(searchCategory);
         }

+ 111 - 51
mall-service/src/main/java/com/txz/mall/service/impl/StoreCombinationServiceImpl.java

@@ -4,28 +4,27 @@ import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.txz.mall.constants.Constants;
 import com.txz.mall.core.AbstractService;
 import com.txz.mall.core.ServiceException;
 import com.txz.mall.dao.StoreCombinationMapper;
-import com.txz.mall.model.StoreCombination;
-import com.txz.mall.model.StoreFlashActivity;
-import com.txz.mall.model.StoreOrder;
-import com.txz.mall.model.StorePink;
-import com.txz.mall.service.StoreCombinationService;
-import com.txz.mall.service.StoreFlashActivityService;
-import com.txz.mall.service.StoreOrderService;
-import com.txz.mall.service.StorePinkService;
+import com.txz.mall.model.*;
+import com.txz.mall.service.*;
 import org.apache.commons.lang.time.DateUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import tk.mybatis.mapper.entity.Condition;
 import tk.mybatis.mapper.entity.Example;
-import vo.FlashActivityVO;
-import vo.GoPinkVO;
+import vo.*;
 
 import javax.annotation.Resource;
 import java.util.Date;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 
@@ -38,6 +37,9 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
     @Resource
     private StoreCombinationMapper storeCombinationMapper;
 
+    @Resource
+    private StoreProductService storeProductService;
+
     @Resource
     private StoreFlashActivityService storeFlashActivityService;
 
@@ -47,6 +49,12 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
     @Resource
     private StoreOrderService storeOrderService;
 
+    @Resource
+    private ProductAttrService productAttrService;
+
+    @Resource
+    private ProductAttrValueService productAttrValueService;
+
     @Override
     public void addActivityProduct(List<StoreCombination> list, Long activityId) {
         StoreFlashActivity flashActivity = storeFlashActivityService.findById(activityId);
@@ -63,11 +71,63 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
             storeCombination.setPeople(activityVO.getGroupNumber());
             storeCombination.setEffectiveTime(activityVO.getCountdownTime());
             storeCombination.setStock(activityVO.getInventory());
+            storeCombination.setActivityId(activityId);
+        }
+        //  直接进行覆盖
+        Condition condition = new Condition(StoreFlashActivity.class);
+        Example.Criteria criteria = condition.createCriteria();
+        criteria.andEqualTo("activityId", activityId);
+        criteria.andEqualTo("isDelete", 0);
+        List<StoreFlashActivity> activityList = storeFlashActivityService.findByCondition(condition);
+        if (CollUtil.isNotEmpty(activityList)) {
+            activityList.forEach(item -> {
+                item.setIsDelete(1);
+                storeFlashActivityService.update(item);
+            });
         }
-        List<Long> productCollect = list.stream().map(StoreCombination::getProductId).collect(Collectors.toList());
+        save(list);
+    }
 
+    @Override
+    public PageInfo<ActivityProductVO> getActivityProduct(Long activityId, Integer page, Integer size) {
+        PageHelper.startPage(page, size);
+        PageInfo pageInfo = null;
+        Condition productCondition = new Condition(StoreProduct.class);
+        Example.Criteria productCriteria = productCondition.createCriteria();
+        productCriteria.andEqualTo("isDelete", 0);
+        List<StoreProduct> productList = storeProductService.findByCondition(productCondition);
+        List<Long> productCollect = productList.stream().map(StoreProduct::getId).collect(Collectors.toList());
 
-        save(list);
+        Condition condition = new Condition(StoreCombination.class);
+        Example.Criteria criteria = condition.createCriteria();
+        criteria.andEqualTo("isDelete", 0);
+        criteria.andEqualTo("activityId", activityId);
+        List<StoreCombination> activityList = findByCondition(condition);
+        List<Long> combinationCollect = activityList.stream().map(StoreCombination::getProductId).collect(Collectors.toList());
+
+        Set<Long> combinationSet = new HashSet<>(combinationCollect);
+        Set<Long> productSet = new HashSet<>(productCollect);
+
+        // 交集
+        Set<Long> intersectionSet = new HashSet<>(productSet);
+        intersectionSet.retainAll(combinationSet);
+
+//        List<ActivityProductVO> list = productList.stream()
+//                .map(product -> {
+//                    ActivityProductVO vo = new ActivityProductVO();
+//                    BeanUtils.copyProperties(vo, product); // Spring BeanUtils
+//                    if (intersectionSet.contains(vo.getId())) {
+//                        vo.setIsExist(1);
+//                    } else {
+//                        vo.setIsExist(0);
+//                    }
+//                    return vo;
+//                })
+//                .collect(Collectors.toList());
+//
+//        return new PageInfo(list);
+
+        return null;
     }
 
     @Override
@@ -102,7 +162,7 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
 
 
     @Override
-    public GoPinkVO goPink(Long pinkId) {
+    public GoPinkResponse goPink(Long pinkId) {
         //判断拼团是否完成
         int isOk = 0;
         //判断当前用户是否在团内  0未在 1在
@@ -130,7 +190,7 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
 //
 //        User user = userService.getInfo();
 //
-//        GoPinkResponse goPinkResponse = new GoPinkResponse();
+        GoPinkResponse goPinkResponse = new GoPinkResponse();
         List<StorePink> pinkList;
         if (teamPink.getKId().equals(0L)) {
             pinkList = storePinkService.getListByCidAndKid(teamPink.getCid(), teamPink.getId());
@@ -166,12 +226,12 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
 //        }
 //
 //        // 处理用户头像昵称
-//        List<StorePinkResponse> pinkResponseList = CollUtil.newArrayList();
-//        // 团长
-//        StorePinkResponse storePinkTResponse = new StorePinkResponse();
-//        for (StorePink pink : pinkList) {
-//            if (pink.getKId().equals(0)) {
-//                BeanUtils.copyProperties(pink, storePinkTResponse);
+        List<StorePinkVO> pinkResponseList = CollUtil.newArrayList();
+        // 团长
+        StorePinkVO storePinkTResponse = new StorePinkVO();
+        for (StorePink pink : pinkList) {
+            if (pink.getKId().equals(0)) {
+                BeanUtils.copyProperties(pink, storePinkTResponse);
 //                if (pink.getUid().equals(user.getUid())) {
 //                    storePinkTResponse.setNickname(user.getNickname());
 //                    storePinkTResponse.setAvatar(user.getAvatar());
@@ -180,40 +240,40 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
 //                    storePinkTResponse.setNickname(teamUser.getNickname());
 //                    storePinkTResponse.setAvatar(teamUser.getAvatar());
 //                }
-//                continue;
-//            }
-//            StorePinkResponse storePinkResponse = new StorePinkResponse();
-//            BeanUtils.copyProperties(pink, storePinkResponse);
+                continue;
+            }
+            StorePinkVO storePinkResponse = new StorePinkVO();
+            BeanUtils.copyProperties(pink, storePinkResponse);
 //            User userOne = userService.getById(pink.getUid());
 //            storePinkResponse.setNickname(userOne.getNickname());
 //            storePinkResponse.setAvatar(userOne.getAvatar());
-//            pinkResponseList.add(storePinkResponse);
-//        }
-//
-//        goPinkResponse.setCount(count);
-//        goPinkResponse.setIsOk(isOk);
-//        goPinkResponse.setPinkBool(pinkBool);
-//        goPinkResponse.setUserBool(userBool);
-//        if (userBool == 1) {
+            pinkResponseList.add(storePinkResponse);
+        }
+
+        goPinkResponse.setCount(count);
+        goPinkResponse.setIsOk(isOk);
+        goPinkResponse.setPinkBool(pinkBool);
+        goPinkResponse.setUserBool(userBool);
+        if (userBool == 1) {
 //            pinkList.forEach(e -> {
 //                if (e.getUid().equals(user.getUid())) {
 //                    goPinkResponse.setCurrentPinkOrder(e.getOrderId());
 //                }
 //            });
-//        }
-//        goPinkResponse.setPinkAll(pinkResponseList);
-//        goPinkResponse.setPinkT(storePinkTResponse);
+        }
+        goPinkResponse.setPinkAll(pinkResponseList);
+        goPinkResponse.setPinkT(storePinkTResponse);
 //        goPinkResponse.setUserInfo(user);
-//
-//        // storeCombination部分
-//        StoreCombinationResponse detailResponse = new StoreCombinationResponse();
-//        BeanUtils.copyProperties(storeCombination, detailResponse);
-//        detailResponse.setSpecType(false);
-//        // sku部分
-//        StoreProductAttr spavAttr = new StoreProductAttr();
-//        spavAttr.setProductId(storeCombination.getId());
-//        spavAttr.setType(Constants.PRODUCT_TYPE_PINGTUAN);
-//        List<StoreProductAttr> attrList = storeProductAttrService.getByEntity(spavAttr);
+
+        // storeCombination部分
+        StoreCombinationVO detailResponse = new StoreCombinationVO();
+        BeanUtils.copyProperties(storeCombination, detailResponse);
+        detailResponse.setSpecType(false);
+        // sku部分
+        ProductAttr spavAttr = new ProductAttr();
+        spavAttr.setProductId(storeCombination.getId());
+        spavAttr.setType(Constants.PRODUCT_TYPE_PINGTUAN);
+//        List<ProductAttr> attrList = productAttrService.getByEntity(spavAttr);
 //        List<HashMap<String, Object>> skuAttrList = getSkuAttrList(attrList);
 //        detailResponse.setProductAttr(skuAttrList);
 //        if (CollUtil.isNotEmpty(attrList) && attrList.size() > 1) {
@@ -225,19 +285,19 @@ public class StoreCombinationServiceImpl extends AbstractService<StoreCombinatio
 //        }
 //
 //
-//        StoreProductAttrValue spavValue = new StoreProductAttrValue();
+//        ProductAttrValue spavValue = new ProductAttrValue();
 //        spavValue.setProductId(storeCombination.getId());
 //        spavValue.setType(Constants.PRODUCT_TYPE_PINGTUAN);
-//        List<StoreProductAttrValue> valueList = storeProductAttrValueService.getByEntity(spavValue);
+//        List<ProductAttrValue> valueList = productAttrValueService.getByEntity(spavValue);
 //        // H5 端用于生成skuList
-//        List<StoreProductAttrValueResponse> sPAVResponses = new ArrayList<>();
-//        for (StoreProductAttrValue storeProductAttrValue : valueList) {
-//            StoreProductAttrValueResponse atr = new StoreProductAttrValueResponse();
+//        List<StoreProductAttrValueVO> sPAVResponses = new ArrayList<>();
+//        for (ProductAttrValue storeProductAttrValue : valueList) {
+//            StoreProductAttrValueVO atr = new StoreProductAttrValueVO();
 //            BeanUtils.copyProperties(storeProductAttrValue, atr);
 //            sPAVResponses.add(atr);
 //        }
 //        HashMap<String, Object> skuMap = new HashMap<>();
-//        for (StoreProductAttrValueResponse attrValue : sPAVResponses) {
+//        for (StoreProductAttrValueVO attrValue : sPAVResponses) {
 //            skuMap.put(attrValue.getSuk(), attrValue);
 //        }
 //

+ 30 - 0
mall-service/src/main/java/com/txz/mall/service/impl/StoreFlashActivityServiceImpl.java

@@ -1,13 +1,19 @@
 package com.txz.mall.service.impl;
 
+import com.github.pagehelper.PageHelper;
 import com.txz.mall.core.AbstractService;
 import com.txz.mall.dao.StoreFlashActivityMapper;
 import com.txz.mall.model.StoreFlashActivity;
+import com.txz.mall.service.StoreCombinationService;
 import com.txz.mall.service.StoreFlashActivityService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import tk.mybatis.mapper.entity.Condition;
+import tk.mybatis.mapper.entity.Example;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 
 /**
@@ -16,7 +22,31 @@ import javax.annotation.Resource;
 @Service
 @Transactional
 public class StoreFlashActivityServiceImpl extends AbstractService<StoreFlashActivity> implements StoreFlashActivityService {
+
     @Resource
     private StoreFlashActivityMapper storeFlashActivityMapper;
+    @Resource
+    private StoreCombinationService storeCombinationService;
 
+    @Override
+    public List<StoreFlashActivity> activityList(StoreFlashActivity storeFlashActivity, Integer page, Integer size) {
+        PageHelper.startPage(page, size);
+        Condition condition = new Condition(storeFlashActivity.getClass());
+        Example.Criteria criteria = condition.createCriteria();
+        criteria.andEqualTo("isDelete", 0);
+        condition.setOrderByClause("create_time DESC");
+        if (StringUtils.isNotBlank(storeFlashActivity.getName())) {
+            criteria.andLike("name", "%" + storeFlashActivity.getName() + "%");
+        }
+        if (storeFlashActivity.getId() != null) {
+            criteria.andEqualTo("id", storeFlashActivity.getId());
+        }
+        if (storeFlashActivity.getStatus() != null) {
+            criteria.andEqualTo("status", storeFlashActivity.getStatus());
+        }
+        if (storeFlashActivity.getActiveState() != null) {
+            criteria.andEqualTo("activeState", storeFlashActivity.getActiveState());
+        }
+        return findByCondition(condition);
+    }
 }

+ 25 - 25
mall-service/src/main/java/com/txz/mall/service/impl/StoreOrderServiceImpl.java

@@ -44,31 +44,31 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
             type = null;
         }
         // 全部订单
-        response.setAll(getCount(dateLimit, Constants.ORDER_STATUS_ALL, type));
+        response.setAll(getCount(Constants.ORDER_STATUS_ALL, type));
         // 未支付订单
-        response.setUnPaid(getCount(dateLimit, Constants.ORDER_STATUS_UNPAID, type));
+        response.setUnPaid(getCount(Constants.ORDER_STATUS_UNPAID, type));
         // 未发货订单
-        response.setNotShipped(getCount(dateLimit, Constants.ORDER_STATUS_NOT_SHIPPED, type));
+        response.setNotShipped(getCount(Constants.ORDER_STATUS_NOT_SHIPPED, type));
         // 待收货订单
-        response.setSpike(getCount(dateLimit, Constants.ORDER_STATUS_SPIKE, type));
+        response.setSpike(getCount(Constants.ORDER_STATUS_SPIKE, type));
         // 待评价订单
-        response.setBargain(getCount(dateLimit, Constants.ORDER_STATUS_BARGAIN, type));
+        response.setBargain(getCount(Constants.ORDER_STATUS_BARGAIN, type));
         // 交易完成订单
-        response.setComplete(getCount(dateLimit, Constants.ORDER_STATUS_COMPLETE, type));
+        response.setComplete(getCount(Constants.ORDER_STATUS_COMPLETE, type));
         // 待核销订单
-        response.setToBeWrittenOff(getCount(dateLimit, Constants.ORDER_STATUS_TOBE_WRITTEN_OFF, type));
+        response.setToBeWrittenOff(getCount(Constants.ORDER_STATUS_TOBE_WRITTEN_OFF, type));
         // 退款中订单
-        response.setRefunding(getCount(dateLimit, Constants.ORDER_STATUS_REFUNDING, type));
+        response.setRefunding(getCount(Constants.ORDER_STATUS_REFUNDING, type));
         // 已退款订单
-        response.setRefunded(getCount(dateLimit, Constants.ORDER_STATUS_REFUNDED, type));
+        response.setRefunded(getCount(Constants.ORDER_STATUS_REFUNDED, type));
         // 已删除订单
-        response.setDeleted(getCount(dateLimit, Constants.ORDER_STATUS_DELETED, type));
+        response.setDeleted(getCount(Constants.ORDER_STATUS_DELETED, type));
         return response;
     }
 
     @Override
     public void exportFile(HttpServletResponse response) {
-        OutputStream outputStream = null;
+        OutputStream outputStream;
         try {
             outputStream = response.getOutputStream();
             response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
@@ -140,7 +140,7 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
         return true;
     }
 
-    private Integer getCount(String dateLimit, String status, Integer type) {
+    private Integer getCount(String status, Integer type) {
         //总数只计算时间
         Condition condition = new Condition(StoreOrder.class);
         Example.Criteria criteria = condition.createCriteria();
@@ -163,56 +163,56 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
             return;
         }
         switch (status) {
-            case Constants.ORDER_STATUS_ALL: //全部
+            case Constants.ORDER_STATUS_ALL:
                 break;
-            case Constants.ORDER_STATUS_UNPAID: //未支付
-                criteria.andEqualTo("paid", 0);//支付状态
-                criteria.andEqualTo("status", 0); //订单状态
-                criteria.andEqualTo("isDelete", 0);//删除状态
+            case Constants.ORDER_STATUS_UNPAID:
+                criteria.andEqualTo("paid", 0);
+                criteria.andEqualTo("status", 0);
+                criteria.andEqualTo("isDelete", 0);
                 break;
-            case Constants.ORDER_STATUS_NOT_SHIPPED: //未发货
+            case Constants.ORDER_STATUS_NOT_SHIPPED:
                 criteria.andEqualTo("paid", 1);
                 criteria.andEqualTo("status", 0);
                 criteria.andEqualTo("refundStatus", 0);
                 criteria.andEqualTo("shippingType", 1);
                 criteria.andEqualTo("isDelete", 0);
                 break;
-            case Constants.ORDER_STATUS_SPIKE: //待收货
+            case Constants.ORDER_STATUS_SPIKE:
                 criteria.andEqualTo("paid", 1);
                 criteria.andEqualTo("status", 1);
                 criteria.andEqualTo("refundStatus", 0);
                 criteria.andEqualTo("isDelete", 0);
                 break;
-            case Constants.ORDER_STATUS_BARGAIN: //待评价
+            case Constants.ORDER_STATUS_BARGAIN:
                 criteria.andEqualTo("paid", 1);
                 criteria.andEqualTo("status", 2);
                 criteria.andEqualTo("refundStatus", 0);
                 criteria.andEqualTo("isDelete", 0);
                 break;
-            case Constants.ORDER_STATUS_COMPLETE: //交易完成
+            case Constants.ORDER_STATUS_COMPLETE:
                 criteria.andEqualTo("paid", 1);
                 criteria.andEqualTo("status", 3);
                 criteria.andEqualTo("refundStatus", 0);
                 criteria.andEqualTo("isDelete", 0);
                 break;
-            case Constants.ORDER_STATUS_TOBE_WRITTEN_OFF: //待核销
+            case Constants.ORDER_STATUS_TOBE_WRITTEN_OFF:
                 criteria.andEqualTo("paid", 1);
                 criteria.andEqualTo("status", 0);
                 criteria.andEqualTo("refundStatus", 0);
                 criteria.andEqualTo("shippingType", 2);
                 criteria.andEqualTo("isDelete", 0);
                 break;
-            case Constants.ORDER_STATUS_REFUNDING: //退款中
+            case Constants.ORDER_STATUS_REFUNDING:
                 criteria.andEqualTo("paid", 1);
                 criteria.andIn("refundStatus", Arrays.asList(1, 3));
                 criteria.andEqualTo("isDelete", 0);
                 break;
-            case Constants.ORDER_STATUS_REFUNDED: //已退款
+            case Constants.ORDER_STATUS_REFUNDED:
                 criteria.andEqualTo("paid", 1);
                 criteria.andEqualTo("refundStatus", 2);
                 criteria.andEqualTo("isDelete", 0);
                 break;
-            case Constants.ORDER_STATUS_DELETED: //已删除
+            case Constants.ORDER_STATUS_DELETED:
                 criteria.andEqualTo("isDelete", 1);
                 break;
             default:

+ 13 - 14
mall-service/src/main/java/com/txz/mall/service/impl/StorePinkServiceImpl.java

@@ -11,6 +11,7 @@ import com.txz.mall.model.StorePink;
 import com.txz.mall.service.StoreCombinationService;
 import com.txz.mall.service.StoreOrderService;
 import com.txz.mall.service.StorePinkService;
+import com.txz.mall.util.RandomUtil;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -51,7 +52,7 @@ public class StorePinkServiceImpl extends AbstractService<StorePink> implements
                 .sorted(Comparator.comparing(StorePink::getId).reversed())
                 .collect(Collectors.toList());
         // 将拼团状态提换为订单状态
-        List<StorePinkDetailVO> responseList = pinkList.stream().map(pink -> {
+        return pinkList.stream().map(pink -> {
             StorePinkDetailVO response = new StorePinkDetailVO();
             BeanUtils.copyProperties(pink, response);
             Condition orderCondition = new Condition(StorePink.class);
@@ -66,7 +67,6 @@ public class StorePinkServiceImpl extends AbstractService<StorePink> implements
             }
             return response;
         }).collect(Collectors.toList());
-        return responseList;
     }
 
     /**
@@ -140,19 +140,19 @@ public class StorePinkServiceImpl extends AbstractService<StorePink> implements
                 applyList.addAll(tempApplyList);
             }
         }
-        if (CollUtil.isNotEmpty(pinkFailList) && pinkFailList.size() > 0) {
+        if (CollUtil.isNotEmpty(pinkFailList) && !pinkFailList.isEmpty()) {
 //            boolean failUpdate = updateBatchById(pinkFailList, 100);
 //            if (!failUpdate) {
 //                throw new ServiceException("批量更新拼团状态,拼团未成功部分,失败");
 //            }
         }
-        if (applyList.size() > 0) {
+        if (!applyList.isEmpty()) {
             boolean task = storeOrderService.refundApplyTask(applyList);
             if (!task) {
                 throw new ServiceException("拼团未成功,订单申请退款失败");
             }
         }
-        if (CollUtil.isNotEmpty(pinkSuccessList) && pinkSuccessList.size() > 0) {
+        if (CollUtil.isNotEmpty(pinkSuccessList) && !pinkSuccessList.isEmpty()) {
 //            boolean successUpdate = updateBatchById(pinkSuccessList, 100);
 //            if (!successUpdate) {
 //                throw new ServiceException("批量更新拼团状态,拼团成功部分,失败");
@@ -169,12 +169,6 @@ public class StorePinkServiceImpl extends AbstractService<StorePink> implements
         }
     }
 
-
-    /**
-     * 拼团成功
-     *
-     * @param id
-     */
     @Override
     public void pinkSuccess(Long id) {
         if (ObjectUtil.isNull(id)) {
@@ -224,15 +218,20 @@ public class StorePinkServiceImpl extends AbstractService<StorePink> implements
         if (CollUtil.isEmpty(list)) {
             throw new ServiceException("没有拼团订单");
         }
-        long count = list.stream().filter(i -> i.getLId().equals(1L)).count();
+        long count = list.stream().filter(i -> i.getLId().equals(1)).count();
         if (count >= luckNum) {
             throw new ServiceException("已有天选");
         }
 
-
         List<Long> idCollect = list.stream().map(StorePink::getId).collect(Collectors.toList());
-//        List<Long> randomIds = RandomUtils.getRandomElements(idCollect, 3);
+        List<Long> randomIds = RandomUtil.uniqueRandom(idCollect, (int) luckNum);
 
+        randomIds.forEach(i -> {
+            StorePink luckPink = new StorePink();
+            luckPink.setId(i);
+            luckPink.setLId(1);
+            update(luckPink);
+        });
     }
 
     @Override

+ 2 - 1
mall-service/src/main/java/com/txz/mall/service/impl/StoreProductRuleServiceImpl.java

@@ -1,5 +1,6 @@
 package com.txz.mall.service.impl;
 
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.txz.mall.core.AbstractService;
 import com.txz.mall.core.ServiceException;
 import com.txz.mall.dao.StoreProductRuleMapper;
@@ -28,7 +29,7 @@ public class StoreProductRuleServiceImpl extends AbstractService<StoreProductRul
     @Override
     public void saveRule(StoreProductRule storeProductRule) {
         // 格式  {"id":573,"ruleName":"衣服规格1","ruleValue":"[{\"value\":\"颜色\",\"detail\":[\"蓝色\",\"黄色\"],\"inputVisible\":false},{\"value\":\"尺码\",\"detail\":[\"s码\",\"m码\",\"l码\"],\"inputVisible\":false}]"}
-        if (getListByRuleName(storeProductRule.getRuleName()).size() > 0) {
+        if (CollectionUtils.isEmpty(getListByRuleName(storeProductRule.getRuleName()))) {
             throw new ServiceException("此规格值已经存在");
         }
         save(storeProductRule);

+ 129 - 7
mall-service/src/main/java/com/txz/mall/service/impl/StoreProductServiceImpl.java

@@ -3,7 +3,10 @@ package com.txz.mall.service.impl;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.excel.EasyExcel;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.parser.Feature;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.txz.mall.constants.Constants;
 import com.txz.mall.core.AbstractService;
@@ -17,9 +20,11 @@ import com.txz.mall.service.ProductAttrService;
 import com.txz.mall.service.ProductAttrValueService;
 import com.txz.mall.service.StoreProductService;
 import com.txz.mall.util.EasyExcelUtil;
+import dto.StoreProductAddRequest;
+import dto.StoreProductAttrAddRequest;
+import dto.StoreProductAttrValueAddRequest;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
@@ -33,8 +38,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.io.OutputStream;
 import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 
@@ -47,17 +51,16 @@ import java.util.stream.Collectors;
 public class StoreProductServiceImpl extends AbstractService<StoreProduct> implements StoreProductService {
     @Resource
     private StoreProductMapper storeProductMapper;
-    @Autowired
+    @Resource
     private ProductAttrService attrService;
-
-    @Autowired
+    @Resource
     private ProductAttrValueService attrValueService;
 
     @Override
     public void importFile(MultipartFile file) {
         String name = file.getOriginalFilename();
         String suffix = FileUtil.extName(name);
-        log.info("获取到的文件名为----->{},后缀为----->{},入参------->{}", name, suffix);
+        log.info("获取到的文件名为----->{},后缀为----->{}", name, suffix);
         if ("xlsx".equals(suffix) || "xls".equals(suffix)) {
             throw new ServiceException("请传入xlsx或xls文档格式文件");
         }
@@ -177,4 +180,123 @@ public class StoreProductServiceImpl extends AbstractService<StoreProduct> imple
         response.setRecycle((int) productList.stream().filter(e -> e.getIsRecycle().equals(1)).count());
         return response;
     }
+
+    public void save(StoreProductAddRequest request) {
+        // 多规格需要校验规格参数
+        if (!request.getSpecType()) {
+            if (request.getAttrValue().size() > 1) {
+                throw new ServiceException("单规格商品属性值不能大于1");
+            }
+        }
+        StoreProduct storeProduct = new StoreProduct();
+        BeanUtils.copyProperties(request, storeProduct);
+        storeProduct.setId(null);
+        storeProduct.setIsShow(0);
+
+        // 设置activity活动
+        storeProduct.setActivity(getProductActivityStr(request.getActivity()));
+
+        //主图
+        storeProduct.setImage(storeProduct.getImage());
+
+        //轮播图
+        storeProduct.setSliderImage(storeProduct.getSliderImage());
+        // 展示图
+        if (StrUtil.isNotEmpty(storeProduct.getFlatPattern())) {
+            storeProduct.setFlatPattern(storeProduct.getFlatPattern());
+        }
+
+        List<StoreProductAttrValueAddRequest> attrValueAddRequestList = request.getAttrValue();
+        //计算价格
+        StoreProductAttrValueAddRequest minAttrValue = attrValueAddRequestList.stream().min(Comparator.comparing(StoreProductAttrValueAddRequest::getPrice)).get();
+        storeProduct.setPrice(minAttrValue.getPrice());
+        storeProduct.setOtPrice(minAttrValue.getOtPrice());
+        storeProduct.setCost(minAttrValue.getCost());
+        storeProduct.setStock(attrValueAddRequestList.stream().mapToInt(StoreProductAttrValueAddRequest::getStock).sum());
+
+
+        List<StoreProductAttrAddRequest> addRequestList = request.getAttr();
+        List<ProductAttr> attrList = addRequestList.stream().map(e -> {
+            ProductAttr attr = new ProductAttr();
+            BeanUtils.copyProperties(e, attr);
+            attr.setType(Constants.PRODUCT_TYPE_NORMAL);
+            return attr;
+        }).collect(Collectors.toList());
+
+        List<ProductAttrValue> attrValueList = attrValueAddRequestList.stream().map(e -> {
+            ProductAttrValue attrValue = new ProductAttrValue();
+            BeanUtils.copyProperties(e, attrValue);
+            attrValue.setId(null);
+            attrValue.setSuk(getSku(e.getAttrValue()));
+            attrValue.setQuota(0);
+            attrValue.setQuotaShow(0);
+            attrValue.setType(Constants.PRODUCT_TYPE_NORMAL);
+            attrValue.setImage(e.getImage());
+            return attrValue;
+        }).collect(Collectors.toList());
+
+        save(storeProduct);
+        attrList.forEach(attr -> attr.setProductId(storeProduct.getId()));
+        attrValueList.forEach(value -> value.setProductId(storeProduct.getId()));
+        attrService.save(attrList);
+        attrValueService.save(attrValueList);
+
+        //优惠券
+//            if (CollUtil.isNotEmpty(request.getCouponIds())) {
+//                List<StoreProductCoupon> couponList = new ArrayList<>();
+//                for (Integer couponId : request.getCouponIds()) {
+//                    StoreProductCoupon spc = new StoreProductCoupon(storeProduct.getId(), couponId, DateUtil.getNowTime());
+//                    couponList.add(spc);
+//                }
+//                storeProductCouponService.saveBatch(couponList);
+//            }
+    }
+
+    /**
+     * 商品sku
+     *
+     * @param attrValue json字符串
+     * @return sku
+     */
+    private String getSku(String attrValue) {
+        LinkedHashMap<String, String> linkedHashMap = JSONObject.parseObject(attrValue, LinkedHashMap.class, Feature.OrderedField);
+        Iterator<Map.Entry<String, String>> iterator = linkedHashMap.entrySet().iterator();
+        List<String> strings = CollUtil.newArrayList();
+        while (iterator.hasNext()) {
+            Map.Entry<String, String> next = iterator.next();
+            strings.add(next.getValue());
+        }
+//        List<String> strings = jsonObject.values().stream().map(o -> (String) o).collect(Collectors.toList());
+        return String.join(",", strings);
+    }
+
+    /**
+     * 商品活动字符串
+     *
+     * @param activityList 活动数组
+     * @return 商品活动字符串
+     */
+    private String getProductActivityStr(List<String> activityList) {
+        if (CollUtil.isEmpty(activityList)) {
+            return "0, 1, 2, 3";
+        }
+        List<Integer> activities = new ArrayList<>();
+        activityList.forEach(e -> {
+            switch (e) {
+                case Constants.PRODUCT_TYPE_NORMAL_STR:
+                    activities.add(Constants.PRODUCT_TYPE_NORMAL);
+                    break;
+                case Constants.PRODUCT_TYPE_SECKILL_STR:
+                    activities.add(Constants.PRODUCT_TYPE_SECKILL);
+                    break;
+                case Constants.PRODUCT_TYPE_BARGAIN_STR:
+                    activities.add(Constants.PRODUCT_TYPE_BARGAIN);
+                    break;
+                case Constants.PRODUCT_TYPE_PINGTUAN_STR:
+                    activities.add(Constants.PRODUCT_TYPE_PINGTUAN);
+                    break;
+            }
+        });
+        return activities.stream().map(Object::toString).collect(Collectors.joining(","));
+    }
 }

+ 1 - 1
mall-service/src/main/java/com/txz/mall/service/impl/UserSignServiceImpl.java

@@ -105,7 +105,7 @@ public class UserSignServiceImpl extends AbstractService<UserSign> implements Us
         criteria.andEqualTo("isDelete", 0);
         criteria.andEqualTo("uid", USER_ID);
         criteria.andLike("signDate", new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "%");
-        return userSignMapper.selectByCondition(condition).size() > 0;
+        return !userSignMapper.selectByCondition(condition).isEmpty();
     }
 
     // 获取昨天的签到记录

+ 1 - 1
mall-service/src/main/java/dto/StoreFlashActivityDTO.java

@@ -82,7 +82,7 @@ public class StoreFlashActivityDTO implements Serializable {
      * 轮播图
      */
     @ApiModelProperty(value = "轮播图")
-    private String silderImgs;
+    private String sliderImg;
     /**
      * 内容
      */

+ 121 - 0
mall-service/src/main/java/dto/StoreProductAddRequest.java

@@ -0,0 +1,121 @@
+package dto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.List;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("eb_store_product")
+@ApiModel(value = "StoreProductAddRequest对象", description = "商品添加对象")
+public class StoreProductAddRequest implements Serializable {
+
+    private static final long serialVersionUID = -452373239606480650L;
+
+    @ApiModelProperty(value = "商品id|添加时不填,修改时必填")
+    private Integer id;
+
+    @ApiModelProperty(value = "商品图片", required = true)
+    @NotBlank(message = "商品图片不能为空")
+    @Length(max = 255, message = "商品图片名称长度不能超过255个字符")
+    private String image;
+
+    @ApiModelProperty(value = "轮播图", required = true)
+    @NotBlank(message = "轮播图不能为空")
+    @Length(max = 2000, message = "轮播图名称长度不能超过2000个字符")
+    private String sliderImage;
+
+    @ApiModelProperty(value = "商品名称", required = true)
+    @NotBlank(message = "商品名称不能为空")
+    @Length(max = 128, message = "商品名称长度不能超过128个字符")
+    private String storeName;
+
+    @ApiModelProperty(value = "商品简介", required = true)
+    @NotBlank(message = "商品简介不能为空")
+    @Length(max = 256, message = "商品简介长度不能超过256个字符")
+    private String storeInfo;
+
+    @ApiModelProperty(value = "关键字", required = true)
+    @Length(max = 255, message = "关键字长度不能超过255个字符")
+    @NotBlank(message = "关键字不能为空")
+    private String keyword;
+
+    @ApiModelProperty(value = "分类id|逗号分隔", required = true)
+    @NotBlank(message = "商品分类不能为空")
+    @Length(max = 64, message = "商品分类组合长度不能超过64个字符")
+    private String cateId;
+
+    @ApiModelProperty(value = "单位名", required = true)
+    @NotBlank(message = "单位名称不能为空")
+    @Length(max = 32, message = "单位名长度不能超过32个字符")
+    private String unitName;
+
+    @ApiModelProperty(value = "排序")
+    private Integer sort;
+
+    @ApiModelProperty(value = "是否热卖")
+    private Boolean isHot;
+
+    @ApiModelProperty(value = "是否优惠")
+    private Boolean isBenefit;
+
+    @ApiModelProperty(value = "是否精品")
+    private Boolean isBest;
+
+    @ApiModelProperty(value = "是否新品")
+    private Boolean isNew;
+
+    @ApiModelProperty(value = "是否优品推荐")
+    private Boolean isGood;
+
+    @ApiModelProperty(value = "获得积分")
+    private Integer giveIntegral;
+
+    @ApiModelProperty(value = "是否单独分佣", required = true)
+    @NotNull(message = "是否单独分佣不能为空")
+    private Boolean isSub;
+
+    @ApiModelProperty(value = "虚拟销量")
+    private Integer ficti;
+
+    @ApiModelProperty(value = "运费模板ID", required = true)
+    @NotNull(message = "运费模板不能为空")
+    private Integer tempId;
+
+    @ApiModelProperty(value = "规格 0单 1多", required = true)
+    @NotNull(message = "商品规格类型不能为空")
+    private Boolean specType;
+
+    @ApiModelProperty(value = "活动显示排序 0=默认,1=秒杀,2=砍价,3=拼团")
+    private List<String> activity;
+
+    @ApiModelProperty(value = "商品属性", required = true)
+    @NotEmpty(message = "商品属性不能为空")
+    private List<StoreProductAttrAddRequest> attr;
+
+    @ApiModelProperty(value = "商品属性详情", required = true)
+    @NotEmpty(message = "商品属性详情不能为空")
+    private List<StoreProductAttrValueAddRequest> attrValue;
+
+    @ApiModelProperty(value = "商品描述")
+    private String content;
+
+    @ApiModelProperty(value = "优惠券id集合")
+    private List<Integer> couponIds;
+
+    @ApiModelProperty(value = "展示图")
+    @Length(max = 1000, message = "展示图名称长度不能超过1000个字符")
+    private String flatPattern;
+}

+ 27 - 0
mall-service/src/main/java/dto/StoreProductAttrAddRequest.java

@@ -0,0 +1,27 @@
+package dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "StoreProductAttrAddRequest对象", description = "商品属性添加对象")
+public class StoreProductAttrAddRequest implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "attrID|新增时不填,修改时必填")
+    private Integer id;
+
+    @ApiModelProperty(value = "属性名", required = true)
+    private String attrName;
+
+    @ApiModelProperty(value = "属性值|逗号分隔", required = true)
+    private String attrValues;
+}

+ 99 - 0
mall-service/src/main/java/dto/StoreProductAttrValueAddRequest.java

@@ -0,0 +1,99 @@
+package dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "StoreProductAttrValueAddRequest对象", description = "商品规格属性添加对象")
+public class StoreProductAttrValueAddRequest implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "ID")
+    private Integer id;
+
+    @ApiModelProperty(value = "商品ID|添加时为0,修改时为商品id", example = "0", required = true)
+    @Min(value = 0, message = "请选择商品")
+    private Integer productId;
+
+    @ApiModelProperty(value = "商品规格属性库存", required = true)
+    @NotNull(message = "商品规格属性库存不能为空")
+    @Min(value = 0, message = "库存不能小于0")
+    private Integer stock;
+
+    @ApiModelProperty(value = "sku|活动商品必传")
+    private String suk;
+
+//    @ApiModelProperty(value = "销量", required = true)
+//    @NotNull(message = "销量不能为空")
+//    @Min(value = 0, message = "销量不能小于0")
+//    private Integer sales;
+
+    @ApiModelProperty(value = "规格属性金额", required = true)
+    @NotNull(message = "规格属性金额不能为空")
+    @DecimalMin(value = "0", message = "金额不能小于0")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "图片", required = true)
+    @NotBlank(message = "商品规格属性图片不能为空")
+    private String image;
+
+    @ApiModelProperty(value = "成本价", required = true)
+    @NotNull(message = "规格属性成本价不能为空")
+    @DecimalMin(value = "0", message = "成本价不能小于0")
+    private BigDecimal cost;
+
+    @ApiModelProperty(value = "原价", required = true)
+    @NotNull(message = "规格属性原价不能为空")
+    @DecimalMin(value = "0", message = "原价不能小于0")
+    private BigDecimal otPrice;
+
+    @ApiModelProperty(value = "重量", required = true)
+    @NotNull(message = "规格属性重量不能为空")
+    @DecimalMin(value = "0", message = "重量不能小于0")
+    private BigDecimal weight;
+
+    @ApiModelProperty(value = "体积", required = true)
+    @NotNull(message = "规格属性体积不能为空")
+    @DecimalMin(value = "0", message = "体积不能小于0")
+    private BigDecimal volume;
+
+    @ApiModelProperty(value = "一级返佣", required = true)
+    @NotNull(message = "规格属性一级返佣不能为空")
+    @DecimalMin(value = "0", message = "一级返佣不能小于0")
+    private BigDecimal brokerage;
+
+    @ApiModelProperty(value = "二级返佣", required = true)
+    @NotNull(message = "规格属性二级返佣不能为空")
+    @DecimalMin(value = "0", message = "二级返佣不能小于0")
+    private BigDecimal brokerageTwo;
+
+    @ApiModelProperty(value = "attr_values 创建更新时的属性对应", required = true, example = "{\"尺码\":\"2XL\",\"颜色\":\"DX027白色\"}")
+    @NotBlank(message = "attr_values不能为空")
+    private String attrValue;
+
+    @ApiModelProperty(value = "活动限购数量|活动商品专用字段")
+    private Integer quota;
+
+    @ApiModelProperty(value = "活动限购数量显示|活动商品专用字段,添加时不传")
+    private Integer quotaShow;
+
+//    @ApiModelProperty(value = "是否选中-秒杀用")
+//    private Boolean checked;
+
+    @ApiModelProperty(value = "砍价商品最低价|砍价专用")
+    private BigDecimal minPrice;
+}

+ 24 - 0
mall-service/src/main/java/vo/ActivityProductVO.java

@@ -0,0 +1,24 @@
+package vo;
+
+import com.txz.mall.model.StoreFlashActivity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "StoreProductInfoResponse对象", description = "商品详情响应对象")
+public class ActivityProductVO extends StoreFlashActivity implements Serializable {
+
+    private static final long serialVersionUID = 9215241889318610262L;
+
+    @ApiModelProperty(value = "已经存在的商品ids")
+    private List<Long> productIds;
+}

+ 55 - 0
mall-service/src/main/java/vo/GoPinkResponse.java

@@ -0,0 +1,55 @@
+package vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class GoPinkResponse implements Serializable {
+
+    private static final long serialVersionUID = 1962453930812558918L;
+
+    /**
+     * 拼团剩余人数
+     **/
+    private Integer count;
+
+    /**
+     * 当前拼团订单号
+     **/
+    private String currentPinkOrder;
+
+    /**
+     * 判断拼团是否完成
+     **/
+    private Integer isOk;
+
+    /**
+     * 团员列表
+     **/
+    private List<StorePinkVO> pinkAll;
+
+    /**
+     * 拼团是否成功  0未成功 1成功
+     **/
+    private Integer pinkBool;
+
+    /**
+     * 当前用户是否在团内  0未在 1在
+     **/
+    private Integer userBool;
+
+    /**
+     * 团长信息
+     **/
+    private StorePinkVO pinkT;
+
+    /**
+     * 当前拼团信息
+     **/
+    private StoreCombinationVO storeCombination;
+
+    /** 当前用户信息 **/
+//    private User userInfo;
+}

+ 151 - 0
mall-service/src/main/java/vo/StoreCombinationVO.java

@@ -0,0 +1,151 @@
+package vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+
+
+@Data
+public class StoreCombinationVO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "拼团商品ID")
+    private Integer id;
+
+    @ApiModelProperty(value = "商品id")
+    private Integer productId;
+
+    @ApiModelProperty(value = "商户id")
+    private Integer merId;
+
+    @ApiModelProperty(value = "推荐图")
+    private String image;
+
+    @ApiModelProperty(value = "轮播图")
+    private String images;
+
+    @ApiModelProperty(value = "活动标题")
+    private String title;
+
+    @ApiModelProperty(value = "活动属性")
+    private String attr;
+
+    @ApiModelProperty(value = "参团人数")
+    private Integer people;
+
+    @ApiModelProperty(value = "简介")
+    private String info;
+
+    @ApiModelProperty(value = "价格")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "排序")
+    private Integer sort;
+
+    @ApiModelProperty(value = "销量")
+    private Integer sales;
+
+    @ApiModelProperty(value = "库存")
+    private Integer stock;
+
+    @ApiModelProperty(value = "添加时间")
+    private Long addTime;
+
+    @ApiModelProperty(value = "推荐")
+    private Boolean isHost;
+
+    @ApiModelProperty(value = "商品状态")
+    private Boolean isShow;
+
+    private Boolean isDel;
+
+    private Boolean combination;
+
+    @ApiModelProperty(value = "商户是否可用1可用0不可用")
+    private Boolean merUse;
+
+    @ApiModelProperty(value = "是否包邮1是0否")
+    private Boolean isPostage;
+
+    @ApiModelProperty(value = "邮费")
+    private BigDecimal postage;
+
+    @ApiModelProperty(value = "拼团开始时间")
+    private Long startTime;
+
+    @ApiModelProperty(value = "拼团结束时间")
+    private Long stopTime;
+
+    @ApiModelProperty(value = "拼团结束时间")
+    private String stopTimeStr;
+
+    @ApiModelProperty(value = "拼团订单有效时间(小时)")
+    private Integer effectiveTime;
+
+    @ApiModelProperty(value = "拼图商品成本")
+    private BigDecimal cost;
+
+    @ApiModelProperty(value = "浏览量")
+    private Integer browse;
+
+    @ApiModelProperty(value = "单位名")
+    private String unitName;
+
+    @ApiModelProperty(value = "运费模板ID")
+    private Integer tempId;
+
+    @ApiModelProperty(value = "重量")
+    private BigDecimal weight;
+
+    @ApiModelProperty(value = "体积")
+    private BigDecimal volume;
+
+    @ApiModelProperty(value = "单次购买数量")
+    private Integer num;
+
+    @ApiModelProperty(value = "限购总数")
+    private Integer quota;
+
+    @ApiModelProperty(value = "限量总数显示")
+    private Integer quotaShow;
+
+    @ApiModelProperty(value = "原价")
+    private BigDecimal otPrice;
+
+    @ApiModelProperty(value = "每个订单可购买数量")
+    private Integer onceNum;
+
+    @ApiModelProperty(value = "虚拟成团百分比")
+    private Integer virtualRation;
+
+    @ApiModelProperty(value = "拼团人数")
+    private Integer countPeople;
+
+    @ApiModelProperty(value = "参与人数")
+    private Integer countPeopleAll;
+
+    @ApiModelProperty(value = "成团数量")
+    private Integer countPeoplePink;
+
+    @ApiModelProperty(value = "限量剩余")
+    private Integer remainingQuota;
+
+    @ApiModelProperty(value = "商品规格")
+//    private List<StoreProductAttr> productAttr;
+    private List<HashMap<String, Object>> productAttr;
+
+    @ApiModelProperty(value = "商品规格值")
+//    private List<StoreProductAttrValue> productValue;
+    private HashMap<String, Object> productValue;
+
+    @ApiModelProperty(value = "商品单双规格")
+    private Boolean specType;
+
+    @ApiModelProperty(value = "拼团单属性AttrValueId")
+    private Long aloneAttrValueId;
+}

+ 76 - 0
mall-service/src/main/java/vo/StorePinkVO.java

@@ -0,0 +1,76 @@
+package vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+
+@Data
+public class StorePinkVO {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "拼团ID")
+    private Integer id;
+
+    @ApiModelProperty(value = "用户id")
+    private Integer uid;
+
+    @ApiModelProperty(value = "订单id 生成")
+    private String orderId;
+
+    @ApiModelProperty(value = "订单id  数据库")
+    private Integer orderIdKey;
+
+    @ApiModelProperty(value = "购买商品个数")
+    private Integer totalNum;
+
+    @ApiModelProperty(value = "购买总金额")
+    private BigDecimal totalPrice;
+
+    @ApiModelProperty(value = "拼团商品id")
+    private Integer cid;
+
+    @ApiModelProperty(value = "商品id")
+    private Integer pid;
+
+    @ApiModelProperty(value = "拼图总人数")
+    private Integer people;
+
+    @ApiModelProperty(value = "拼团商品单价")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "开始时间")
+    private Long addTime;
+
+    @ApiModelProperty(value = "结束时间")
+    private Long stopTime;
+
+    @ApiModelProperty(value = "团长id 0为团长")
+    private Integer kId;
+
+    @ApiModelProperty(value = "是否发送模板消息0未发送1已发送")
+    private Boolean isTpl;
+
+    @ApiModelProperty(value = "是否退款 0未退款 1已退款")
+    private Boolean isRefund;
+
+    @ApiModelProperty(value = "状态1进行中2已完成3未完成")
+    private Integer status;
+
+    @ApiModelProperty(value = "用户昵称")
+    private String nickname;
+
+    @ApiModelProperty(value = "用户头像")
+    private String avatar;
+
+    @ApiModelProperty(value = "是否虚拟拼团")
+    private Boolean is_virtual;
+
+    @ApiModelProperty(value = "几人参团")
+    private Integer countPeople;
+
+    @ApiModelProperty(value = "还剩几人成团")
+    private Integer count;
+}

+ 96 - 0
mall-service/src/main/java/vo/StoreProductAttrValueVO.java

@@ -0,0 +1,96 @@
+package vo;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.Min;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("eb_store_product_attr_value")
+@ApiModel(value = "StoreProductAttrValue对象", description = "商品属性值表")
+public class StoreProductAttrValueVO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(value = "ID")
+    private Integer id;
+
+    @ApiModelProperty(value = "商品ID", example = "0")
+    @Min(value = 0, message = "请选择商品")
+    private Integer productId;
+
+    @ApiModelProperty(value = "商品属性索引值 (attr_value|attr_value[|....])")
+    private String suk;
+
+    @ApiModelProperty(value = "属性对应的库存")
+    private Integer stock;
+
+    @ApiModelProperty(value = "销量")
+    private Integer sales;
+
+    @ApiModelProperty(value = "属性金额")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "图片")
+    private String image;
+
+    @ApiModelProperty(value = "唯一值")
+    private String unique;
+
+    @ApiModelProperty(value = "成本价")
+    private BigDecimal cost;
+
+    @ApiModelProperty(value = "商品条码")
+    private String barCode;
+
+    @ApiModelProperty(value = "原价")
+    private BigDecimal otPrice;
+
+    @ApiModelProperty(value = "重量")
+    private BigDecimal weight;
+
+    @ApiModelProperty(value = "体积")
+    private BigDecimal volume;
+
+    @ApiModelProperty(value = "一级返佣")
+    private BigDecimal brokerage;
+
+    @ApiModelProperty(value = "二级返佣")
+    private BigDecimal brokerageTwo;
+
+    @ApiModelProperty(value = "活动类型 0=商品,1=秒杀,2=砍价,3=拼团")
+    private Integer type;
+
+    @ApiModelProperty(value = "活动限购数量")
+    private Integer quota;
+
+    @ApiModelProperty(value = "活动限购数量显示")
+    private Integer quotaShow;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "attrValue字段,取表中suk字段")
+    private Object attrValue;
+
+    @ApiModelProperty(value = "砍价商品最低价")
+    private BigDecimal minPrice;
+
+    @ApiModelProperty(value = "是否选中")
+    private Boolean checked;
+
+    @ApiModelProperty(value = "会员价")
+    private BigDecimal vipPrice;
+}

+ 1 - 0
mall-service/src/main/resources/mapper/StoreCombinationMapper.xml

@@ -45,5 +45,6 @@
         <result column="create_user_id" jdbcType="BIGINT" property="createUserId"/>
         <result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
         <result column="is_delete" jdbcType="INTEGER" property="isDelete"/>
+        <result column="activity_id" jdbcType="BIGINT" property="activityId"/>
     </resultMap>
 </mapper>

+ 2 - 1
mall-service/src/main/resources/mapper/StoreFlashActivityMapper.xml

@@ -18,7 +18,8 @@
         <result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
         <result column="is_delete" jdbcType="TINYINT" property="isDelete"/>
         <result column="img" jdbcType="VARCHAR" property="img"/>
-        <result column="silder_imgs" jdbcType="VARCHAR" property="silderImgs"/>
+        <result column="slider_img" jdbcType="VARCHAR" property="sliderImg"/>
         <result column="content" jdbcType="VARCHAR" property="content"/>
+        <result column="active_state" jdbcType="INTEGER" property="activeState"/>
     </resultMap>
 </mapper>