REQ-2481: fix imports
This commit is contained in:
parent
25b2412ae4
commit
8088940f73
@ -134,17 +134,17 @@ public class PrivateMessageController {
|
||||
BizAssertions.assertNotNull(request.getTemplateCode(), "templateCode can't be blank");
|
||||
BizAssertions.assertNotNull(request.getSendPriority(), "sendPriority can't be null");
|
||||
BizAssertions.assertTrue(request.getSendPriority() > 0, "sendPriority must be greater than 0");
|
||||
boolean templateUpdated = messageBaseTemplateDao.lambdaUpdate()
|
||||
boolean templatePriorityUpdated = messageBaseTemplateDao.lambdaUpdate()
|
||||
.eq(MessageBaseTemplate::getCode, request.getTemplateCode())
|
||||
.set(MessageBaseTemplate::getImSendPriority, request.getSendPriority())
|
||||
.update();
|
||||
BizAssertions.assertTrue(templateUpdated, "未找到对应的模版或者模版已经删除");
|
||||
BizAssertions.assertTrue(templatePriorityUpdated, "未找到对应的模版或者模版已经删除");
|
||||
UpdateTemplateSendPriorityRequest updatePriorityRequest = new UpdateTemplateSendPriorityRequest();
|
||||
updatePriorityRequest.setBizIdPrefix(TemplateMessage.getBizIdPrefix(request.getTemplateCode()));
|
||||
updatePriorityRequest.setSendPriority(request.getSendPriority());
|
||||
Boolean priorityUpdated = messageApi.updateSendPriority(updatePriorityRequest).getData();
|
||||
Boolean imMessagePriorityUpdated = messageApi.updateSendPriority(updatePriorityRequest).getData();
|
||||
Boolean sendIntercepted = null;
|
||||
if (Boolean.TRUE.equals(priorityUpdated)) {
|
||||
if (Boolean.TRUE.equals(imMessagePriorityUpdated)) {
|
||||
// 期待LB可以正常调度
|
||||
for (int i = 0; i < 4; i++) {
|
||||
sendIntercepted = messageApi.interceptSend().getData();
|
||||
@ -153,7 +153,8 @@ public class PrivateMessageController {
|
||||
}
|
||||
}
|
||||
HashMap<String, Object> result = new HashMap<>();
|
||||
result.put("templateUpdated", templateUpdated);
|
||||
result.put("templatePriorityUpdated", templatePriorityUpdated);
|
||||
result.put("imMessagePriorityUpdated", imMessagePriorityUpdated);
|
||||
result.put("sendIntercepted", sendIntercepted);
|
||||
return CommonResponse.success(result);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user