fix updateShopCode接口增加修改门店name功能

This commit is contained in:
shuo.wang
2024-10-30 17:05:19 +08:00
parent b388e80ef1
commit 88381ccb8f
3 changed files with 7 additions and 2 deletions

View File

@@ -18,7 +18,11 @@ public class UpdateShopCodeRequest {
@NotNull
private Long shopId;
@NotBlank
@ApiModelProperty("门店代码")
private String shopCode;
@ApiModelProperty("门店名称")
private String shopName;
}

View File

@@ -183,6 +183,7 @@ public class ShopServiceImpl implements ShopService {
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
}
shopInfo.setShopCode(request.getShopCode());
shopInfo.setShopName(request.getShopName());
shopInfo.setUpdateTime(new Date());
return shopInfoDAO.updateShopInfo(shopInfo);
}

View File

@@ -60,7 +60,7 @@ public class PCShopController {
return ResponseResult.success(shopService.addShop(request));
}
@ApiOperation("修改门店编号")
@ApiOperation("修改门店编号和门店名称")
@PostMapping("/updateShopCode")
public ResponseResult<Integer> updateShopCode(@RequestBody @Validated UpdateShopCodeRequest request) {
return ResponseResult.success(shopService.updateShopCode(request));