From e1777590c1275df01e93702279b8d2e431e29530 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Fri, 19 Aug 2022 09:22:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=BE=AE=E4=BF=A1=E7=BE=A4?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/entity/CountyCodeWeiXinEntity.java | 65 ++++++++++++++++++- .../service/impl/FirePointServiceImpl.java | 8 ++- 2 files changed, 69 insertions(+), 4 deletions(-) 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();