Răsfoiți Sursa

门店装修 门店营业时间

qxy 3 luni în urmă
părinte
comite
ae4e966651

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

@@ -10,6 +10,7 @@ import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartRequest;
 import shop.alien.entity.result.R;
+import shop.alien.entity.store.StoreBusinessInfo;
 import shop.alien.entity.store.StoreImg;
 import shop.alien.entity.store.StoreInfo;
 import shop.alien.entity.store.StoreInfoDraft;
@@ -599,6 +600,14 @@ public class StoreInfoController {
         return R.data(storeInfoService.getDecorationDetail(id));
     }
 
+    @ApiOperation(value = "门店装修-门店营业时间")
+    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "门店id", dataType = "Long", paramType = "query", required = true)})
+    @GetMapping("/getStoreInfoBusinessHours")
+    public R<List<StoreBusinessInfo>> getStoreInfoBusinessHours(Integer id) {
+        log.info("StoreInfoController.getStoreInfoBusinessHours?id={}", id);
+        return R.data(storeInfoService.getStoreInfoBusinessHours(id));
+    }
+
     @ApiOperation(value = "门店装修-续签合同")
     @PostMapping("/uploadRenewalContract")
     public R<String> uploadRenewalContract(@RequestBody List<StoreImg> storeImgList) {

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

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.multipart.MultipartRequest;
 import shop.alien.entity.result.R;
+import shop.alien.entity.store.StoreBusinessInfo;
 import shop.alien.entity.store.StoreImg;
 import shop.alien.entity.store.StoreInfo;
 import shop.alien.entity.store.StoreInfoDraft;
@@ -39,6 +40,11 @@ public interface StoreInfoService extends IService<StoreInfo> {
     StoreMainInfoVo getDecorationDetail(Integer id);
 
     /**
+     *
+     */
+    List<StoreBusinessInfo>  getStoreInfoBusinessHours(Integer id);
+
+    /**
      * 门店信息-修改后展示
      *
      * @param id 门店id

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

@@ -235,7 +235,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         //营业时间
         List<StoreBusinessInfo> storeBusinessInfoList = storeBusinessInfoMapper.selectList(new LambdaQueryWrapper<StoreBusinessInfo>().eq(StoreBusinessInfo::getStoreId, id));
         storeMainInfoVo.setStoreBusinessInfo(storeBusinessInfoList);
-        storeMainInfoVo.setStoreBusinessInfo(storeBusinessInfoMapper.selectList(new LambdaQueryWrapper<StoreBusinessInfo>().eq(StoreBusinessInfo::getStoreId, id)));
         //营业执照
         storeMainInfoVo.setBusinessLicenseList(storeImgMapper.selectList(new LambdaQueryWrapper<StoreImg>().eq(StoreImg::getImgType, 14).eq(StoreImg::getStoreId, id)));
         //合同照片
@@ -249,6 +248,13 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         return storeMainInfoVo;
     }
 
+    @Override
+    public List<StoreBusinessInfo> getStoreInfoBusinessHours(Integer id) {
+        //营业时间
+        List<StoreBusinessInfo> storeBusinessInfoList = storeBusinessInfoMapper.selectList(new LambdaQueryWrapper<StoreBusinessInfo>().eq(StoreBusinessInfo::getStoreId, id));
+        return storeBusinessInfoList;
+    }
+
     /**
      * 门店信息-修改后展示
      *