diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxTemplateMsg.java b/mallinkService/src/main/java/com/iformall/domain/po/WxTemplateMsg.java index ef24bc4b7..15fb70f7c 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxTemplateMsg.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxTemplateMsg.java @@ -1,7 +1,9 @@ package com.iformall.domain.po; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.iformall.domain.po.base.TenantEntity; +import com.iformall.enums.EnumTemplateType; import lombok.Data; import lombok.EqualsAndHashCode; @@ -27,4 +29,16 @@ public class WxTemplateMsg extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value="消息开关(0/1)",name="onOff") private Integer onOff; + @io.swagger.annotations.ApiModelProperty(value="模板类型1:核销成功消息,2:核销失败消息, 101:公众号审核结果消息, 102:公众号卡券核销消息",name="type") + @TableField(exist = false) + private String typeName; + + + public String getTypeName(){ + if(this.getType() != null) { + this.typeName = EnumTemplateType.getEnum(this.getType()).name(); + } + return typeName; + } + } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java index 725e128b5..a9395b935 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java @@ -247,10 +247,10 @@ public class WxMsgServiceImpl implements WxMsgService { //2、通过标签 String phones = wxMsg.getPhones(); List filter = wxMsg.getFilterList(); - if(StringUtils.isNotBlank(phones) && filter != null && filter.size() > 0){ + if(StringUtils.isNotBlank(phones) && (filter != null || !filter.isEmpty())){ return new ResultData(ErrorCode.MSG_SEND_WAY_CHOOSE_ERROR); } - if (StringUtils.isBlank(phones) && (filter==null || filter.size() == 0)) {//两种方式必须选其一 + if (StringUtils.isBlank(phones) && (filter==null || filter.isEmpty())) {//两种方式必须选其一 if(wxMsg.getWay() == EnumSendWay.APPINFOR.getCode()){ saveOrUpdate(wxMsg,null); return new ResultData();