REQ-3045: 添加校验
This commit is contained in:
parent
9f12b3a97e
commit
70e0fb989d
@ -4,6 +4,7 @@ import cn.axzo.basics.common.util.AssertUtil;
|
||||
import cn.axzo.msg.center.common.enums.ServiceErrorCodeEnum;
|
||||
import cn.axzo.msg.center.common.enums.TableIsDeleteEnum;
|
||||
import cn.axzo.msg.center.common.redis.RedisUtil;
|
||||
import cn.axzo.msg.center.common.utils.BizAssertions;
|
||||
import cn.axzo.msg.center.common.utils.PageHelperUtil;
|
||||
import cn.axzo.msg.center.dal.MessageBaseTemplateDao;
|
||||
import cn.axzo.msg.center.dal.MessageTemplateV3Dao;
|
||||
@ -355,7 +356,7 @@ public class MessageTemplateV3ServiceImpl implements MessageTemplateV3Service {
|
||||
|
||||
private void updateMessageTemplate(MessageTemplateV3SaveOrUpdateParam param) {
|
||||
JSONObject pushData = param.getPushData();
|
||||
messageTemplateV3Dao.lambdaUpdate()
|
||||
boolean updated = messageTemplateV3Dao.lambdaUpdate()
|
||||
.eq(MessageTemplateV3::getCode, param.getTemplateCode())
|
||||
.eq(MessageTemplateV3::getIsDelete, TableIsDeleteEnum.NORMAL.value)
|
||||
.set(StringUtils.isNotBlank(param.getTemplateName()),
|
||||
@ -365,9 +366,9 @@ public class MessageTemplateV3ServiceImpl implements MessageTemplateV3Service {
|
||||
// .set(MessageBaseTemplate::getCardContent, JSONObjectUtil.toJSONString(param.getMsgCardContentItems()))
|
||||
.set(MessageTemplateV3::getContent, param.getContent())
|
||||
.set(Objects.nonNull(param.getCardJump()) && Objects.nonNull(param.getCardJump().getCardUrlOpenStrategy())
|
||||
,MessageTemplateV3::getCardUrlOpenStrategy,param.getCardJump().getCardUrlOpenStrategy())
|
||||
, MessageTemplateV3::getCardUrlOpenStrategy, param.getCardJump().getCardUrlOpenStrategy())
|
||||
.set(Objects.nonNull(param.getCardJump()) && Objects.nonNull(param.getCardJump().getCardUrlConfig())
|
||||
,MessageTemplateV3::getCardUrlConfig, JSON.toJSONString(param.getCardJump().getCardUrlConfig()))
|
||||
, MessageTemplateV3::getCardUrlConfig, JSON.toJSONString(param.getCardJump().getCardUrlConfig()))
|
||||
.set(StringUtils.isNotBlank(param.getDetailStyleCode()),
|
||||
MessageTemplateV3::getDetailStyleCode, param.getDetailStyleCode())
|
||||
.set(MessageTemplateV3::getUpdatePersonId, param.getOperatorId())
|
||||
@ -377,6 +378,7 @@ public class MessageTemplateV3ServiceImpl implements MessageTemplateV3Service {
|
||||
.set(Objects.nonNull(pushData), MessageTemplateV3::getPushData,
|
||||
pushData == null ? null : pushData.toJSONString())
|
||||
.update();
|
||||
BizAssertions.assertTrue(updated, "模版不存在:", param.getTemplateCode());
|
||||
}
|
||||
|
||||
private void updateTemplateGroupRelation(MessageTemplateV3SaveOrUpdateParam param) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user