Browse Source

八大类活动banner图 营销活动

ldz 1 week ago
parent
commit
eb5f011761

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

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
+import shop.alien.entity.store.StoreImg;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -19,5 +20,5 @@ public class CouponAndEventVo {
     private List<LifeCouponVo> couponList;
     private List<LifeCouponVo> couponList;
 
 
     @ApiModelProperty(value = "营销活动")
     @ApiModelProperty(value = "营销活动")
-    private List<String> marketingList;
+    private List<StoreImg> marketingList;
 }
 }

+ 9 - 2
alien-store/src/main/java/shop/alien/store/controller/StoreInfoController.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import io.swagger.annotations.*;
 import io.swagger.annotations.*;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.http.ResponseEntity;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartRequest;
 import org.springframework.web.multipart.MultipartRequest;
@@ -375,10 +376,16 @@ public class StoreInfoController {
     @GetMapping("/getStoreCouponList")
     @GetMapping("/getStoreCouponList")
     @ResponseBody
     @ResponseBody
     public R getStoreCouponList(@RequestParam("storeId") String storeId) {
     public R getStoreCouponList(@RequestParam("storeId") String storeId) {
-        log.info("StoreInfoController.getStoreDetail?storeId={},userId={}", storeId);
+        log.info("StoreInfoController.getStoreCouponList?storeId={}", storeId);
         CouponAndEventVo couponAndEventVo = new CouponAndEventVo();
         CouponAndEventVo couponAndEventVo = new CouponAndEventVo();
         List<LifeCouponVo> lifeCouponVos = storeInfoService.getStoreCouponList(storeId);
         List<LifeCouponVo> lifeCouponVos = storeInfoService.getStoreCouponList(storeId);
+
+        List<StoreImg> storeImgs = storeInfoService.getBannerUrl(storeId);
         couponAndEventVo.setCouponList(lifeCouponVos);
         couponAndEventVo.setCouponList(lifeCouponVos);
+        if (CollectionUtils.isNotEmpty(storeImgs)) {
+            couponAndEventVo.setMarketingList(storeImgs);
+        }
+        couponAndEventVo.setMarketingList(storeImgs);
         return R.data(couponAndEventVo);
         return R.data(couponAndEventVo);
     }
     }
 
 
@@ -823,7 +830,7 @@ public class StoreInfoController {
             @ApiImplicitParam(name = "lat", value = "纬度", dataType = "Double", paramType = "query", required = true),
             @ApiImplicitParam(name = "lat", value = "纬度", dataType = "Double", paramType = "query", required = true),
             @ApiImplicitParam(name = "distance", value = "距离范围(单位:公里)", dataType = "Double", paramType = "query"),
             @ApiImplicitParam(name = "distance", value = "距离范围(单位:公里)", dataType = "Double", paramType = "query"),
             @ApiImplicitParam(name = "sortType", value = "排序模式(1:智能排序,2:好评优先,3:距离优先)", dataType = "int", paramType = "query"),
             @ApiImplicitParam(name = "sortType", value = "排序模式(1:智能排序,2:好评优先,3:距离优先)", dataType = "int", paramType = "query"),
-            @ApiImplicitParam(name = "businessType", value = "店铺类型(KTV=3、洗浴汗蒸=4、按摩足浴=5,酒吧=11)", dataType = "int", paramType = "query"),
+            @ApiImplicitParam(name = "businessType", value = "店铺类型(KTV=3、洗浴汗蒸=4、按摩足浴=5,丽人美发=6,运动健身=7,酒吧=11)", dataType = "int", paramType = "query"),
             @ApiImplicitParam(name = "dictId", value = "字典表id,根据此id查询经营板块、经营种类、分类并匹配店铺", dataType = "Integer", paramType = "query"),
             @ApiImplicitParam(name = "dictId", value = "字典表id,根据此id查询经营板块、经营种类、分类并匹配店铺", dataType = "Integer", paramType = "query"),
             @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "int", paramType = "query", required = true),
             @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "int", paramType = "query", required = true),
             @ApiImplicitParam(name = "pageSize", value = "页容", dataType = "int", paramType = "query", required = true)
             @ApiImplicitParam(name = "pageSize", value = "页容", dataType = "int", paramType = "query", required = true)

+ 7 - 0
alien-store/src/main/java/shop/alien/store/service/StoreInfoService.java

@@ -282,6 +282,13 @@ public interface StoreInfoService extends IService<StoreInfo> {
      */
      */
     List<LifeCouponVo> getStoreCouponList(String storeId);
     List<LifeCouponVo> getStoreCouponList(String storeId);
 
 
+
+    /**
+     * 获取活动banner图
+     */
+    List<StoreImg> getBannerUrl (String storeId);
+
+
     /**
     /**
      * web-分页查询店铺信息
      * web-分页查询店铺信息
      *
      *

+ 1 - 0
alien-store/src/main/java/shop/alien/store/service/impl/LifeCouponServiceImpl.java

@@ -16,6 +16,7 @@ import shop.alien.entity.result.R;
 import shop.alien.entity.store.*;
 import shop.alien.entity.store.*;
 import shop.alien.entity.store.dto.LifeDiscountCouponStoreFriendDto;
 import shop.alien.entity.store.dto.LifeDiscountCouponStoreFriendDto;
 import shop.alien.entity.store.vo.LifeCouponStatusVo;
 import shop.alien.entity.store.vo.LifeCouponStatusVo;
+import shop.alien.entity.store.vo.LifeCouponVo;
 import shop.alien.mapper.*;
 import shop.alien.mapper.*;
 import shop.alien.store.config.BaseRedisService;
 import shop.alien.store.config.BaseRedisService;
 import shop.alien.store.service.LifeCouponService;
 import shop.alien.store.service.LifeCouponService;

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

@@ -3011,6 +3011,13 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         return quanVoList;
         return quanVoList;
     }
     }
 
 
+    public List<StoreImg> getBannerUrl(String storeId){
+        LambdaQueryWrapper<StoreImg> queryWrapper = new LambdaQueryWrapper<StoreImg>()
+                .eq(StoreImg::getStoreId, Integer.parseInt(storeId))
+                .eq(StoreImg::getImgType, 26);
+        return storeImgMapper.selectList(queryWrapper);
+    }
+
     void verificationStoreInfoStatus(StoreInfoDto storeInfo) {
     void verificationStoreInfoStatus(StoreInfoDto storeInfo) {
         //营业状态 0:正常营业, 1:暂停营业, 2:筹建中, 99:永久关门
         //营业状态 0:正常营业, 1:暂停营业, 2:筹建中, 99:永久关门
         if (!Objects.isNull(storeInfo.getBusinessStatus()) && storeInfo.getBusinessStatus() == 99) {
         if (!Objects.isNull(storeInfo.getBusinessStatus()) && storeInfo.getBusinessStatus() == 99) {