This commit is contained in:
zhangchenbiao
2024-04-17 10:21:02 +08:00
parent 23ac46866b
commit 9256fcc977
8 changed files with 113 additions and 12 deletions

View File

@@ -1,6 +1,8 @@
package com.cool.store.controller.webb;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.request.AddShopRequest;
import com.cool.store.request.DeleteShopRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.ShopService;
import com.cool.store.vo.shop.MiniShopPageVO;
@@ -8,10 +10,8 @@ import com.cool.store.vo.shop.ShopStageInfoVO;
import com.cool.store.vo.shop.StageShopCountVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@@ -45,8 +45,19 @@ public class PCShopController {
@ApiOperation("获取店铺的阶段信息")
@GetMapping("/getShopStageInfo")
public ResponseResult<List<ShopStageInfoVO>> getShopStageInfo(@RequestParam("shopId")Long shopId, @RequestParam(value = "shopStage", required = false)Integer shopStage) {
Long lineId = PartnerUserHolder.getUser().getLineId();
return ResponseResult.success(shopService.getShopStageInfo(lineId, shopId, shopStage));
return ResponseResult.success(shopService.getShopStageInfo(shopId, shopStage));
}
@ApiOperation("删除店铺")
@PostMapping("/deleteShop")
public ResponseResult<Integer> deleteShop(@RequestBody @Validated DeleteShopRequest request) {
return ResponseResult.success(shopService.deleteShop(request));
}
@ApiOperation("新增店铺")
@PostMapping("/addShop")
public ResponseResult<Long> addShop(@RequestBody @Validated AddShopRequest request) {
return ResponseResult.success(shopService.addShop(request));
}
}

View File

@@ -47,7 +47,7 @@ public class MiniShopController {
@GetMapping("/getShopStageInfo")
public ResponseResult<List<ShopStageInfoVO>> getShopStageInfo(@RequestParam("shopId")Long shopId, @RequestParam(value = "shopStage", required = false)Integer shopStage) {
Long lineId = PartnerUserHolder.getUser().getLineId();
return ResponseResult.success(shopService.getShopStageInfo(lineId, shopId, shopStage));
return ResponseResult.success(shopService.getShopStageInfo(shopId, shopStage));
}
@ApiOperation("获取阶段/子阶段/子阶段状态枚举")