Merge remote-tracking branch 'xfsg/cc_partner_init' into cc_partner_init

This commit is contained in:
苏竹红
2024-04-25 14:09:07 +08:00
2 changed files with 10 additions and 0 deletions

View File

@@ -416,6 +416,12 @@ public class PointServiceImpl implements PointService {
if(Objects.isNull(pointInfo)){ if(Objects.isNull(pointInfo)){
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
} }
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus()) || PointStatusEnum.POINT_STATUS_6.getCode().equals(pointInfo.getPointStatus())){
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
}
if(PointStatusEnum.POINT_STATUS_7.getCode().equals(pointInfo.getPointStatus())){
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
}
pointInfo.setDevelopmentManager(request.getDevelopmentManager()); pointInfo.setDevelopmentManager(request.getDevelopmentManager());
return pointInfoDAO.updatePointInfo(pointInfo); return pointInfoDAO.updatePointInfo(pointInfo);
} }

View File

@@ -1,5 +1,6 @@
package com.cool.store.controller.webb; package com.cool.store.controller.webb;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.CurrentUserHolder; import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.PartnerUserHolder; import com.cool.store.context.PartnerUserHolder;
import com.cool.store.request.*; import com.cool.store.request.*;
@@ -11,6 +12,7 @@ import com.cool.store.vo.shop.ShopStageVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -23,6 +25,7 @@ import java.util.List;
* @Description: * @Description:
* @date 2024-03-29 15:36 * @date 2024-03-29 15:36
*/ */
@Slf4j
@Api(tags = "选址&铺位") @Api(tags = "选址&铺位")
@RestController @RestController
@RequestMapping("/pc/point") @RequestMapping("/pc/point")
@@ -34,6 +37,7 @@ public class PointController {
@ApiOperation("新增铺位") @ApiOperation("新增铺位")
@PostMapping("/add") @PostMapping("/add")
public ResponseResult<Long> addPointDetailInfo(@RequestBody @Validated AddPointDetailRequest shopPointDetailRequest) { public ResponseResult<Long> addPointDetailInfo(@RequestBody @Validated AddPointDetailRequest shopPointDetailRequest) {
log.info("新增铺位:{}", JSONObject.toJSONString(shopPointDetailRequest));
return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUserId())); return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUserId()));
} }