瀏覽代碼

web-店铺明细详情

qxy 4 月之前
父節點
當前提交
62bf270767

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreInfoVo.java

@@ -143,7 +143,7 @@ public class StoreInfoVo extends StoreInfo {
     private List<LifeCouponVo> couponList;
 
     @ApiModelProperty(value = "优惠券列表")
-    private List<LifeCouponVo> tuangouList;
+    private List<LifeGroupBuyMainVo> tuangouList;
 
     @ApiModelProperty(value = "员工列表")
     private List<StoreStaffConfig> employeeList;

+ 11 - 11
alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java

@@ -939,22 +939,22 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         result.setCouponList(quanVoList);
 
         // 获取店铺团购
-        LambdaUpdateWrapper<LifeCoupon> tuangouWrapper = new LambdaUpdateWrapper<>();
-        tuangouWrapper.eq(LifeCoupon::getStoreId, storeId).eq(LifeCoupon::getStatus, 1).eq(LifeCoupon::getType, 2).orderByDesc(LifeCoupon::getCreatedTime);
-        List<LifeCoupon> tuangouList = lifeCouponMapper.selectList(tuangouWrapper);
-        List<LifeCouponVo> tuangouVOList = new ArrayList<>();
-        for (LifeCoupon lifeCoupon : tuangouList) {
-            LifeCouponVo lifeCouponVo = new LifeCouponVo();
-            BeanUtils.copyProperties(lifeCoupon, lifeCouponVo);
-            if (StringUtils.isNotEmpty(lifeCoupon.getImagePath())) {
-                List<String> ids = Arrays.stream(lifeCoupon.getImagePath().split(",")).map(String::trim).collect(Collectors.toList());
+        LambdaUpdateWrapper<LifeGroupBuyMain> tuangouWrapper = new LambdaUpdateWrapper<>();
+        tuangouWrapper.eq(LifeGroupBuyMain::getStoreId, storeId).eq(LifeGroupBuyMain::getStatus, 5).orderByDesc(LifeGroupBuyMain::getCreatedTime);
+        List<LifeGroupBuyMain> tuangouList = lifeGroupBuyMainMapper.selectList(tuangouWrapper);
+        List<LifeGroupBuyMainVo> tuangouVOList = new ArrayList<>();
+        for (LifeGroupBuyMain lifeGroupBuyMain : tuangouList) {
+            LifeGroupBuyMainVo lifeGroupBuyMainVo = new LifeGroupBuyMainVo();
+            BeanUtils.copyProperties(lifeGroupBuyMain, lifeGroupBuyMainVo);
+            if (StringUtils.isNotEmpty(lifeGroupBuyMain.getImageId())) {
+                List<String> ids = Arrays.stream(lifeGroupBuyMain.getImageId().split(",")).map(String::trim).collect(Collectors.toList());
                 List<StoreImg> imgList = storeImgMapper.selectList(new LambdaQueryWrapper<StoreImg>().in(StoreImg::getId, ids));
                 if (imgList != null) {
                     String imgs = imgList.stream().map(StoreImg::getImgUrl).collect(Collectors.joining(","));
-                    lifeCouponVo.setImgs(imgs);
+                    lifeGroupBuyMainVo.setImageId(imgs);
                 }
             }
-            tuangouVOList.add(lifeCouponVo);
+            tuangouVOList.add(lifeGroupBuyMainVo);
         }
         result.setTuangouList(tuangouVOList);