选址
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.request.AddMapEvaluationReportRequest;
|
||||
import com.cool.store.request.AddShopPointDetailRequest;
|
||||
import com.cool.store.request.UpdateShopPointDetailRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.ShopPointService;
|
||||
import com.cool.store.vo.point.ShopPointDetailVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@@ -27,14 +28,54 @@ public class ShopPointController {
|
||||
@Resource
|
||||
private ShopPointService shopPointService;
|
||||
|
||||
@ApiOperation("新增铺位")
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> addShopPointDetailInfo(@RequestBody AddShopPointDetailRequest shopPointDetailRequest) {
|
||||
public ResponseResult<Long> addShopPointDetailInfo(@RequestBody @Validated AddShopPointDetailRequest shopPointDetailRequest) {
|
||||
return ResponseResult.success(shopPointService.addShopPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
|
||||
@ApiOperation("铺位详情")
|
||||
@GetMapping("/detail")
|
||||
public ResponseResult<ShopPointDetailVO> getShopPointDetailInfo(@RequestParam("pointId")Long pointId) {
|
||||
return ResponseResult.success(shopPointService.getShopPointDetailInfo(pointId));
|
||||
}
|
||||
|
||||
@ApiOperation("完善铺位")
|
||||
@PostMapping("/update")
|
||||
public ResponseResult<Integer> updateShopPointDetailInfo(@RequestBody UpdateShopPointDetailRequest shopPointDetailRequest) {
|
||||
public ResponseResult<Integer> updateShopPointDetailInfo(@RequestBody @Validated UpdateShopPointDetailRequest shopPointDetailRequest) {
|
||||
return ResponseResult.success(shopPointService.updateShopPointDetailInfo(shopPointDetailRequest));
|
||||
}
|
||||
|
||||
@ApiOperation("生成评估报告")
|
||||
@GetMapping("/generateEvaluationReport")
|
||||
public ResponseResult<Integer> generateEvaluationReport(@RequestParam("pointId")Long pointId) {
|
||||
return ResponseResult.success(shopPointService.generateEvaluationReport(pointId));
|
||||
}
|
||||
|
||||
@ApiOperation("铺位失效")
|
||||
@GetMapping("/invalid")
|
||||
public ResponseResult<Integer> pointInvalid(@RequestParam("pointId")Long pointId) {
|
||||
return ResponseResult.success(shopPointService.pointInvalid(pointId));
|
||||
}
|
||||
|
||||
@ApiOperation("铺位解绑")
|
||||
@GetMapping("/unbind")
|
||||
public ResponseResult<Integer> pointUnbind(@RequestParam("pointId")Long pointId) {
|
||||
return ResponseResult.success(shopPointService.pointUnbind(pointId));
|
||||
}
|
||||
|
||||
@ApiOperation("配置评估报告")
|
||||
@PostMapping("/addMapEvaluationReport")
|
||||
public ResponseResult<Integer> addMapEvaluationReport(@RequestBody AddMapEvaluationReportRequest request) {
|
||||
return ResponseResult.success(shopPointService.addMapEvaluationReport(request));
|
||||
}
|
||||
|
||||
@ApiOperation("提交审批")
|
||||
@GetMapping("/submitAudit")
|
||||
public ResponseResult<Integer> submitAudit(@RequestParam("pointId")Long pointId) {
|
||||
return ResponseResult.success(shopPointService.submitAudit(pointId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user