|
|
@ -155,15 +155,13 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl<CustomerF |
|
|
|
public Result updateShoppingStatus(UpdateShoppingStatusFormDTO formDTO) { |
|
|
|
// 用户定制功能上架,需判断,已上架的数量是否超过12
|
|
|
|
if (NumConstant.ONE_STR.equals(formDTO.getShoppingStatus())){ |
|
|
|
// 根据functionId,customerId、所属端,查询当前客户 现已上架的 功能数量。
|
|
|
|
// 根据functionId,customerId,查询当前客户所属端 现已上架的 功能数量。
|
|
|
|
CustomerFunctionDetailDTO functionDetailDTO = new CustomerFunctionDetailDTO(); |
|
|
|
functionDetailDTO.setFunctionId(formDTO.getFunctionId()); |
|
|
|
functionDetailDTO.setCustomerId(formDTO.getCustomerId()); |
|
|
|
CustomerFunctionCollectResultDTO functionNum = baseDao.sumCustomerFunctionNum(functionDetailDTO); |
|
|
|
if (null != functionNum){ |
|
|
|
if (NumConstant.TWELVE <= functionNum.getNum()){ |
|
|
|
return new Result().error(8000,"当前客户"+ functionNum.getFromAppName() +"已上架12个定制功能。不能继续上架!"); |
|
|
|
} |
|
|
|
if (NumConstant.TWELVE <= functionNum.getNum()){ |
|
|
|
return new Result().error(EpmetErrorCode.SERVER_ERROR.getCode(),"当前客户"+ functionNum.getFromAppName() +"已上架12个定制功能。不能继续上架!"); |
|
|
|
} |
|
|
|
} |
|
|
|
// 修改 客户定制功能详情表,上下架状态
|
|
|
|