Ver Fonte

app拼团列表1

yangyb há 2 semanas atrás
pai
commit
a1d58d0d4f

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

@@ -104,6 +104,10 @@ public class StoreCombination {
     @ApiModelProperty(value = "库存")
     private Integer stock;
 
+    @Column(name = "is_new")
+    @ApiModelProperty(value = "是否新品")
+    private Integer isNew;
+
     /**
      * 推荐
      */

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

@@ -428,10 +428,10 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
 //                orderInfoVo.setBargainId(detailRequest.getBargainId());
 //                orderInfoVo.setBargainUserId(detailRequest.getBargainUserId());
 //            } else
-            if (detailRequest.getCombinationId() > 0) {
+            if (detailRequest.getCId() > 0) {
                 // 拼团
                 detailVoList.add(validatePreOrderCombination(detailRequest, userId));
-                orderInfoVo.setCombinationId(detailRequest.getCombinationId());
+                orderInfoVo.setCombinationId(detailRequest.getCId());
                 orderInfoVo.setPinkId(detailRequest.getPinkId());
             } else {
                 // 普通商品
@@ -507,7 +507,7 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
      */
     private OrderInfoDetailVO validatePreOrderCombination(PreOrderDetailRequest detailRequest, Long userId) {
         // 拼团部分判断
-        Long combinationId = detailRequest.getCombinationId();
+        Long combinationId = detailRequest.getCId();
         StoreCombination storeCombination = storeCombinationService.getByIdException(combinationId);
         if (storeCombination.getStock().equals(0) || detailRequest.getProductNum() > storeCombination.getStock()) {
             throw new ServiceException("拼团商品库存不足");

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

@@ -46,7 +46,7 @@ public class PreOrderDetailRequest {
 //    private Integer bargainUserId = 0;
 
     @ApiModelProperty(value = "拼团商品id")
-    private Long combinationId = 0L;
+    private Long cId;
 
     @ApiModelProperty(value = "拼团团长id")
     private Long pinkId = 0L;

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

@@ -46,5 +46,6 @@
         <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"/>
+        <result column="is_new" jdbcType="INTEGER" property="isNew"/>
     </resultMap>
 </mapper>