diff --git a/src/main/java/com/xkrs/model/entity/CountyCodeWeiXinEntity.java b/src/main/java/com/xkrs/model/entity/CountyCodeWeiXinEntity.java index 4108d4b..a8a8064 100644 --- a/src/main/java/com/xkrs/model/entity/CountyCodeWeiXinEntity.java +++ b/src/main/java/com/xkrs/model/entity/CountyCodeWeiXinEntity.java @@ -30,6 +30,29 @@ public class CountyCodeWeiXinEntity implements Serializable { @Column(length = 128, columnDefinition = "varchar(128)") private String weixinId; + /** + * 区县名称 + */ + @Column(length = 128, columnDefinition = "varchar(128)") + private String countyName; + + /** + * 微信名 + */ + @Column(length = 128, columnDefinition = "varchar(128)") + private String weixinName; + + /** + * 备注 + */ + @Column(length = 128, columnDefinition = "varchar(128)") + private String remark; + + /** + * 发送状态 + */ + private Long sendState; + public CountyCodeWeiXinEntity() { } @@ -57,8 +80,48 @@ public class CountyCodeWeiXinEntity implements Serializable { this.weixinId = weixinId; } + public String getCountyName() { + return countyName; + } + + public void setCountyName(String countyName) { + this.countyName = countyName; + } + + public String getWeixinName() { + return weixinName; + } + + public void setWeixinName(String weixinName) { + this.weixinName = weixinName; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Long getSendState() { + return sendState; + } + + public void setSendState(Long sendState) { + this.sendState = sendState; + } + @Override public String toString() { - return "CountyCodeWeiXinEntity{" + "id=" + id + ", countyCode='" + countyCode + '\'' + ", weixinId='" + weixinId + '\'' + '}'; + return "CountyCodeWeiXinEntity{" + + "id=" + id + + ", countyCode='" + countyCode + '\'' + + ", weixinId='" + weixinId + '\'' + + ", countyName='" + countyName + '\'' + + ", weixinName='" + weixinName + '\'' + + ", remark='" + remark + '\'' + + ", sendState=" + sendState + + '}'; } } diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index eab0c7c..278e6da 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -364,9 +364,11 @@ public class FirePointServiceImpl implements FirePointService { List weixinIdList = new ArrayList<>(); for (CountyCodeWeiXinEntity countyCodeWeiXin : countyCodeWeiXinList) { try { - String codeNotZeroEnd = FirePointCodeUtils.getCodeNotZeroEnd(countyCodeWeiXin.getCountyCode()); - if (firePointEntity.getStreetCode().startsWith(codeNotZeroEnd)) { - weixinIdList.add(countyCodeWeiXin.getWeixinId()); + if ((countyCodeWeiXin.getSendState() != null) && (countyCodeWeiXin.getSendState() != 0)) { + String codeNotZeroEnd = FirePointCodeUtils.getCodeNotZeroEnd(countyCodeWeiXin.getCountyCode()); + if (firePointEntity.getStreetCode().startsWith(codeNotZeroEnd)) { + weixinIdList.add(countyCodeWeiXin.getWeixinId()); + } } } catch (Exception e) { e.printStackTrace();