|
|
@ -36,10 +36,7 @@ import com.epmet.dto.CustomerFunctionDetailDTO; |
|
|
|
import com.epmet.dto.FunctionCustomizedDTO; |
|
|
|
import com.epmet.dto.FunctionShoppingHistoryDTO; |
|
|
|
import com.epmet.dto.form.*; |
|
|
|
import com.epmet.dto.result.CustomerFunctionCustomizedListResultDTO; |
|
|
|
import com.epmet.dto.result.CustomerResultDTO; |
|
|
|
import com.epmet.dto.result.FunctionDetailResultDTO; |
|
|
|
import com.epmet.dto.result.FunctionResultDTO; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.entity.CustomerFunctionDetailEntity; |
|
|
|
import com.epmet.entity.CustomerFunctionEntity; |
|
|
|
import com.epmet.entity.FunctionShoppingHistoryEntity; |
|
|
@ -219,7 +216,14 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl<CustomerF |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void customerFunctionCollect(CustomerFunctionCollectFormDTO formDTO) { |
|
|
|
public Result customerFunctionCollect(CustomerFunctionCollectFormDTO formDTO) { |
|
|
|
//0.查询当前采集功能所属端,统计客户在当前所属端已上架功能总数
|
|
|
|
CustomerFunctionDetailDTO customerFunctionDetailDTO = ConvertUtils.sourceToTarget(formDTO,CustomerFunctionDetailDTO.class); |
|
|
|
CustomerFunctionCollectResultDTO dto = baseDao.sumCustomerFunctionNum(customerFunctionDetailDTO); |
|
|
|
if (dto.getNum() >= NumConstant.ONE) { |
|
|
|
return new Result().error(8000, String.format("当前客户在[%s]已存在12个上线功能,不允许再次采集!", dto.getFromAppName())); |
|
|
|
} |
|
|
|
|
|
|
|
//1.查询定制功能详细信息
|
|
|
|
FunctionCustomizedDTO functionDTO = functionCustomizedDao.selectByFunctionId(formDTO.getFunctionId()); |
|
|
|
if(functionDTO == null){ |
|
|
@ -259,6 +263,7 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl<CustomerF |
|
|
|
historyEntity.setReason(formDTO.getReason()); |
|
|
|
functionShoppingHistoryDao.insert(historyEntity); |
|
|
|
|
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|