Commit 2bbf0dd4 by 谢海旭

策略中心:推送box消息逻辑调整、推送任务中心title调整

1 parent e8c0ee44
......@@ -384,11 +384,17 @@ public class StrategyCreatedConsumer extends KafkaConsumer {
private CreateTaskRequest buildCreateTaskRequest(StrategyInfo strategyInfo, List<TaskAssigneeInputDTO> assignees) {
String bizTypeName = convertStrategyTypeToBizCode(strategyInfo.getStrategyType());
// 构建标题:「执行人员姓名」+ 的 +「任务类型名称」+ 任务
String assigneeName = CollectionUtils.isNotEmpty(assignees)
? assignees.get(0).getAssigneeName() : "";
String typeDisplayName = StrategyTypeEnum.getStrategyByValue(strategyInfo.getStrategyType()).getDisplayName();
String title = assigneeName + "的" + typeDisplayName + "任务";
// 构建任务信息
TaskDTO task = new TaskDTO();
task.setBizType(bizTypeName);
task.setBizInstanceId(String.valueOf(strategyInfo.getId()));
task.setTitle(strategyInfo.getTitle());
task.setTitle(title);
task.setDescription(strategyInfo.getDescription());
task.setStatus("UNFINISHED");
task.setCreatedBy(strategyInfo.getCreatedBy());
......
......@@ -1089,10 +1089,18 @@ public class StrategyInfoService {
}
private Integer convertToMessageBoxBusinessType(Integer strategyBiz) {
if (strategyBiz.compareTo(1) == 0) {
return BusinessTypeEnums.EXTENDED_WARRANTY.getCode();
} else {
throw new RpcServiceException(StrategyErrorEnum.BUSINESS_EXCEPTION, "不支持的业务类型");
if (strategyBiz == null) {
throw new RpcServiceException(StrategyErrorEnum.BUSINESS_EXCEPTION, "业务类型不能为空");
}
switch (strategyBiz) {
case 1:
return BusinessTypeEnums.EXTENDED_WARRANTY.getCode(); // 延保
case 2:
return BusinessTypeEnums.PREMIUM_PRODUCTS.getCode(); // 轻改(精品)
case 3:
return BusinessTypeEnums.RIGHTS_PRODUCTS.getCode(); // 权益
default:
throw new RpcServiceException(StrategyErrorEnum.BUSINESS_EXCEPTION, "不支持的业务类型: " + strategyBiz);
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!