This commit is contained in:
zhangchenbiao
2024-04-15 09:50:21 +08:00
parent f2c84f888f
commit 74e37a73c6
25 changed files with 572 additions and 63 deletions

View File

@@ -24,7 +24,7 @@ import java.util.List;
* @Description:
* @date 2024-03-29 15:36
*/
@Api(tags = "选址/铺位")
@Api(tags = "选址&铺位")
@RestController
@RequestMapping("/pc/point")
public class PointController {

View File

@@ -1,18 +1,23 @@
package com.cool.store.controller.webc;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.request.MiniPointPageRequest;
import com.cool.store.request.PointRecommendLineRequest;
import com.cool.store.request.SelectPointRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.PointService;
import com.cool.store.service.ShopService;
import com.cool.store.vo.point.MiniPointPageVO;
import com.cool.store.vo.point.PointDetailVO;
import com.cool.store.vo.point.PointPageVO;
import com.cool.store.vo.shop.MiniShopPageVO;
import com.cool.store.vo.shop.ShopStageInfoVO;
import com.cool.store.vo.shop.ShopStageVO;
import com.github.pagehelper.PageInfo;
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;
@@ -42,7 +47,7 @@ public class MiniShopController {
@ApiOperation("获取店铺的阶段信息")
@GetMapping("/getShopStageInfo")
public ResponseResult<List<ShopStageInfoVO>> getShopStageInfo(@RequestParam("shopId")Long shopId, @RequestParam("shopStage")Integer shopStage) {
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));
}
@@ -53,4 +58,26 @@ public class MiniShopController {
return ResponseResult.success(ShopStageVO.getShopStageList());
}
@ApiOperation("获取推荐给我的铺位")
@PostMapping("/getLineRecommendPointPage")
public ResponseResult<PageInfo<MiniPointPageVO>> getLineRecommendPointPage(@RequestBody MiniPointPageRequest request) {
Long lineId = PartnerUserHolder.getUser().getLineId();
request.setLineId(lineId);
return ResponseResult.success(pointService.getLineRecommendPointPage(request));
}
@ApiOperation("铺位详情")
@GetMapping("/detail")
public ResponseResult<PointDetailVO> getPointDetailInfo(@RequestParam("pointId")Long pointId) {
return ResponseResult.success(pointService.getPointDetailInfo(pointId));
}
@ApiOperation("选址铺位")
@PostMapping("/selectPoint")
public ResponseResult<Integer> lineSelectPoint(@RequestBody @Validated SelectPointRequest request) {
Long lineId = PartnerUserHolder.getUser().getLineId();
request.setLineId(lineId);
return ResponseResult.success(pointService.lineSelectPoint(request));
}
}