From 950131f2b61bdc581faaf4cb0f3017816a0a6f64 Mon Sep 17 00:00:00 2001 From: yujintao Date: Sun, 8 Mar 2020 16:35:42 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=88=86=E6=9E=90=E7=9B=B8=E5=85=B3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/elink/esua/epdc/excel/GridOpiningExcel.java | 6 +++--- .../main/java/com/elink/esua/epdc/excel/RegisterExcel.java | 6 +++--- .../modules/user/service/impl/UserAnalysisServiceImpl.java | 2 ++ .../src/main/resources/mapper/user/UserAnalysisDao.xml | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/excel/GridOpiningExcel.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/excel/GridOpiningExcel.java index 2249c5647..4ba5922cd 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/excel/GridOpiningExcel.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/excel/GridOpiningExcel.java @@ -16,16 +16,16 @@ public class GridOpiningExcel { @Excel(name = "网格党建指导员姓名") private String gridLeader; - @Excel(name = "注册用户数") + @Excel(name = "用户总数") private Integer registerCount; @Excel(name = "党员数") private Integer partyCount; - @Excel(name = "未认证用户数") + @Excel(name = "未注册居民") private Integer unAuthorizedCount; - @Excel(name = "认证居民数") + @Excel(name = "已注册居民") private int residentCount; @Excel(name = "新闻发布数") diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/excel/RegisterExcel.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/excel/RegisterExcel.java index bfa291e94..2f9ee8c11 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/excel/RegisterExcel.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/excel/RegisterExcel.java @@ -16,16 +16,16 @@ public class RegisterExcel { @Excel(name = "街道名称") private String streetName; - @Excel(name = "注册用户数") + @Excel(name = "用户总数") private Integer userCount; @Excel(name = "党员数") private Integer partyMemberCount; - @Excel(name = "认证居民数") + @Excel(name = "已注册居民") private Integer residentCount; - @Excel(name = "未认证用户数") + @Excel(name = "未注册居民") private Integer unAuthorizedCount; @Excel(name = "男") diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/UserAnalysisServiceImpl.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/UserAnalysisServiceImpl.java index 51afd0ab9..02108205f 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/UserAnalysisServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/user/service/impl/UserAnalysisServiceImpl.java @@ -147,6 +147,8 @@ public class UserAnalysisServiceImpl extends BaseServiceImpl AND ad.del_flag = 0 AND ama.ID IS NOT NULL - and (ad1.id = #{gridId} or ad2.id = #{gridId}) + and (ad.id = #{gridId} or ad1.id = #{gridId} or ad2.id = #{gridId}) GROUP BY ad.id ORDER BY ama.CREATED_TIME DESC, ad.create_date DESC From f62be94f1b520f195a6840353980ed5f4c4f138b Mon Sep 17 00:00:00 2001 From: liuchuang Date: Sun, 8 Mar 2020 16:59:23 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E9=85=8D=E7=BD=AErocketmq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- esua-epdc/epdc-admin/epdc-admin-server/pom.xml | 3 +++ esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml | 3 +++ esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml | 5 +++++ esua-epdc/epdc-module/epdc-group/epdc-group-server/pom.xml | 3 +++ esua-epdc/epdc-module/epdc-news/epdc-news-server/pom.xml | 4 ++++ esua-epdc/epdc-module/epdc-user/epdc-user-server/pom.xml | 3 +++ 6 files changed, 21 insertions(+) diff --git a/esua-epdc/epdc-admin/epdc-admin-server/pom.xml b/esua-epdc/epdc-admin/epdc-admin-server/pom.xml index e46f27bb6..103e4a080 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/pom.xml +++ b/esua-epdc/epdc-admin/epdc-admin-server/pom.xml @@ -293,6 +293,9 @@ epdc Elink@833066 + + 172.16.0.52:9876;172.16.0.54:9876 + organizationGroup diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml index d574ff518..7a2470a04 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/pom.xml @@ -306,6 +306,9 @@ wx9b6102a8ee5add65 394f47d4e08fc0fd629231d3f68a34dc + + 172.16.0.52:9876;172.16.0.54:9876 + organizationGroup diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml index fe249af11..4b6dba5c4 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml @@ -333,6 +333,11 @@ wx9b6102a8ee5add65 394f47d4e08fc0fd629231d3f68a34dc + + 172.16.0.52:9876;172.16.0.54:9876 + organizationGroup + categoryGroup + categoryGroup diff --git a/esua-epdc/epdc-module/epdc-group/epdc-group-server/pom.xml b/esua-epdc/epdc-module/epdc-group/epdc-group-server/pom.xml index a8cb86426..7dcf58db5 100644 --- a/esua-epdc/epdc-module/epdc-group/epdc-group-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-group/epdc-group-server/pom.xml @@ -243,6 +243,9 @@ true 172.16.0.52:8848 + + 172.16.0.52:9876;172.16.0.54:9876 + organizationGroup diff --git a/esua-epdc/epdc-module/epdc-news/epdc-news-server/pom.xml b/esua-epdc/epdc-module/epdc-news/epdc-news-server/pom.xml index a556cf4d0..f7938b0f5 100644 --- a/esua-epdc/epdc-module/epdc-news/epdc-news-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-news/epdc-news-server/pom.xml @@ -233,6 +233,10 @@ true 172.16.0.52:8848 + + + 172.16.0.52:9876;172.16.0.54:9876 + organizationGroup diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/pom.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/pom.xml index 2e875c817..39c323fd1 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/pom.xml @@ -264,6 +264,9 @@ true 172.16.0.52:8848 + + 172.16.0.52:9876;172.16.0.54:9876 + organizationGroup From fa538b72eb44134e92bb330a44a900c4de695e27 Mon Sep 17 00:00:00 2001 From: yujintao Date: Wed, 11 Mar 2020 19:11:45 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E8=AE=BE=E7=BD=AE=E6=96=B0=E5=A2=9E=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/consult/MajorFunctionConfDTO.java | 34 +++++++++++-------- .../consult/result/CheckStateResultDTO.java | 8 +---- .../entity/MajorFunctionConfEntity.java | 30 +++++++++------- .../impl/MajorFunctionConfServiceImpl.java | 4 +-- 4 files changed, 40 insertions(+), 36 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/MajorFunctionConfDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/MajorFunctionConfDTO.java index 660659a51..01301ad20 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/MajorFunctionConfDTO.java +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/MajorFunctionConfDTO.java @@ -19,6 +19,7 @@ package com.elink.esua.epdc.dto.consult; import java.io.Serializable; import java.util.Date; + import lombok.Data; @@ -36,68 +37,73 @@ public class MajorFunctionConfDTO implements Serializable { /** * 主键 */ - private String id; + private String id; /** * 功能编码,不可重复,与前端商定一致。目前包括consultState:咨询;cadreEvaluationState:干部评价; */ - private String code; + private String code; /** * 功能名称 */ - private String name; + private String name; /** * 是否可用 0:否,1:是 */ - private String availableFlag; + private String availableFlag; /** * 是否访问外链 0:否,1:是 */ - private String externalFlag; + private String externalFlag; + + /** + * 需要拼接token 0:否,1:是 + */ + private String tokenFlag; /** * 外链访问地址,external_flag = 1则非空 */ - private String externalUrl; + private String externalUrl; /** * 备注 */ - private String remark; + private String remark; /** * 删除标识 0:否,1:是 */ - private String delFlag; + private String delFlag; /** * 乐观锁 */ - private Integer revision; + private Integer revision; /** * 创建人 */ - private String createdBy; + private String createdBy; /** * 创建时间 */ - private Date createdTime; + private Date createdTime; /** * 更新人 */ - private String updatedBy; + private String updatedBy; /** * 更新时间 */ - private Date updatedTime; + private Date updatedTime; - private String imgUrl; + private String imgUrl; } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/result/CheckStateResultDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/result/CheckStateResultDTO.java index 1c445102b..141a0bba7 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/result/CheckStateResultDTO.java +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/result/CheckStateResultDTO.java @@ -13,15 +13,9 @@ import java.io.Serializable; public class CheckStateResultDTO implements Serializable { private static final long serialVersionUID = -8559260405823478733L; - /** - * availableFlag : 1 - * externalFlag : 0 - * externalUrl : http://pyt.kuntowcd.vztgvnx - * name : cadreEvaluationState - */ - private String availableFlag; private String externalFlag; + private String tokenFlag; private String externalUrl; private String name; private String imgUrl; diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/entity/MajorFunctionConfEntity.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/entity/MajorFunctionConfEntity.java index be9f13119..70f8c06d9 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/entity/MajorFunctionConfEntity.java +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/entity/MajorFunctionConfEntity.java @@ -23,7 +23,6 @@ import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; /** * 小程序首页主要功能按钮状态配置 @@ -32,45 +31,50 @@ import java.util.Date; * @since v1.0.0 2020-03-06 */ @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) @TableName("epdc_major_function_conf") public class MajorFunctionConfEntity extends BaseEpdcEntity { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; /** * 功能编码,不可重复,与前端商定一致。目前包括consultState:咨询;cadreEvaluationState:干部评价; */ - private String code; + private String code; /** * 功能名称 */ - private String name; + private String name; /** * 是否可用 0:否,1:是 */ - private String availableFlag; + private String availableFlag; /** * 是否访问外链 0:否,1:是 */ - private String externalFlag; + private String externalFlag; + + /** + * 需要拼接token 0:否,1:是 + */ + private String tokenFlag; /** * 外链访问地址,external_flag = 1则非空 */ - private String externalUrl; + private String externalUrl; /** * 备注 */ - private String remark; + private String remark; - /** - * 图标 - */ - private String imgUrl; + /** + * 图标 + */ + private String imgUrl; } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/MajorFunctionConfServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/MajorFunctionConfServiceImpl.java index 5e6d45023..6091d36ed 100644 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/MajorFunctionConfServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/MajorFunctionConfServiceImpl.java @@ -115,8 +115,8 @@ public class MajorFunctionConfServiceImpl extends BaseServiceImpl> getCheckState() { QueryWrapper queryWrapper = new QueryWrapper(); List list = baseDao.selectList(queryWrapper); - List checkStateResultDTOS = ConvertUtils.sourceToTarget(list, CheckStateResultDTO.class); - return new Result>().ok(checkStateResultDTOS); + List checkStateResults = ConvertUtils.sourceToTarget(list, CheckStateResultDTO.class); + return new Result>().ok(checkStateResults); } } \ No newline at end of file From 72fbdd1373b9bd076dca6cc1de9304628fa43b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B2=E6=A0=91=E9=80=9A?= <1976590620@qq.com> Date: Wed, 11 Mar 2020 20:31:19 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E8=AF=81=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/GridOperatorInfoController.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java index c23ace98d..3679e8020 100755 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java @@ -32,6 +32,7 @@ import com.elink.esua.epdc.dto.consult.form.GridOperatorListFormDTO; import com.elink.esua.epdc.dto.consult.result.GridOperatorListResultDTO; import com.elink.esua.epdc.modules.consult.excel.GridOperatorInfoExcel; import com.elink.esua.epdc.modules.consult.service.GridOperatorInfoService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -71,9 +72,11 @@ public class GridOperatorInfoController { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); //校验身份证 - String idenNoMsg = IdentityNoUtils.IdentityNoVerification(dto.getIdentityNo()); - if (idenNoMsg != null) { - return new Result().error(idenNoMsg); + if(StringUtils.isNotBlank(dto.getIdentityNo())){ + String idenNoMsg = IdentityNoUtils.IdentityNoVerification(dto.getIdentityNo()); + if (idenNoMsg != null) { + return new Result().error(idenNoMsg); + } } dto.setShowFlag("0"); gridOperatorInfoService.save(dto); @@ -85,9 +88,11 @@ public class GridOperatorInfoController { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); //校验身份证 - String idenNoMsg = IdentityNoUtils.IdentityNoVerification(dto.getIdentityNo()); - if (idenNoMsg != null) { - return new Result().error(idenNoMsg); + if(StringUtils.isNotBlank(dto.getIdentityNo())){ + String idenNoMsg = IdentityNoUtils.IdentityNoVerification(dto.getIdentityNo()); + if (idenNoMsg != null) { + return new Result().error(idenNoMsg); + } } gridOperatorInfoService.update(dto); return new Result(); From e862a22f46d74b731d1ea6cdcf146b61680ef59d Mon Sep 17 00:00:00 2001 From: yujintao Date: Wed, 11 Mar 2020 21:06:41 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../consult/controller/GridOperatorInfoController.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java index 3679e8020..7d74f57b1 100755 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/controller/GridOperatorInfoController.java @@ -18,6 +18,7 @@ package com.elink.esua.epdc.modules.consult.controller; import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter; +import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; import com.elink.esua.epdc.commons.tools.utils.IdentityNoUtils; @@ -72,13 +73,13 @@ public class GridOperatorInfoController { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); //校验身份证 - if(StringUtils.isNotBlank(dto.getIdentityNo())){ + if (StringUtils.isNotBlank(dto.getIdentityNo())) { String idenNoMsg = IdentityNoUtils.IdentityNoVerification(dto.getIdentityNo()); if (idenNoMsg != null) { return new Result().error(idenNoMsg); } } - dto.setShowFlag("0"); + dto.setShowFlag(YesOrNoEnum.NO.value()); gridOperatorInfoService.save(dto); return new Result(); } @@ -88,7 +89,7 @@ public class GridOperatorInfoController { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); //校验身份证 - if(StringUtils.isNotBlank(dto.getIdentityNo())){ + if (StringUtils.isNotBlank(dto.getIdentityNo())) { String idenNoMsg = IdentityNoUtils.IdentityNoVerification(dto.getIdentityNo()); if (idenNoMsg != null) { return new Result().error(idenNoMsg); From 97207febb6d84adc02974efa645539ae7cbd4c6f Mon Sep 17 00:00:00 2001 From: yujintao Date: Thu, 12 Mar 2020 13:44:02 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=91=98=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epdc/dto/consult/GridOperatorInfoDTO.java | 55 +++---- .../impl/GridOperatorInfoServiceImpl.java | 135 ++++++++++++------ 2 files changed, 124 insertions(+), 66 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/GridOperatorInfoDTO.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/GridOperatorInfoDTO.java index b6d6e9b01..766fc4722 100755 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/GridOperatorInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/dto/consult/GridOperatorInfoDTO.java @@ -19,6 +19,8 @@ package com.elink.esua.epdc.dto.consult; import java.io.Serializable; import java.util.Date; +import java.util.List; + import lombok.Data; @@ -36,113 +38,118 @@ public class GridOperatorInfoDTO implements Serializable { /** * 主键 */ - private String id; + private String id; /** * 用户姓名 */ - private String realName; + private String realName; /** * 性别 0女 1男 */ - private String sex; + private String sex; /** * 排序 */ - private Integer sort; + private Integer sort; /** * 联系电话 */ - private String mobile; + private String mobile; /** * 身份证号 */ - private String identityNo; + private String identityNo; /** * 头像访问地址 */ - private String faceImg; + private String faceImg; /** * 工作单位 */ - private String workUnit; + private String workUnit; /** * 职责类别id */ - private String dutyCategoryId; + private String dutyCategoryId; /** * 前端收费展示 0否 1是 */ - private String showFlag; + private String showFlag; /** * 备注 */ - private String remark; + private String remark; /** * 居住网格id */ - private Long deptId; + private Long deptId; /** * 父所有部门 */ - private String parentDeptIds; + private String parentDeptIds; /** * 父所有部门 */ - private String parentDeptNames; + private String parentDeptNames; /** * 所有部门ID */ - private String[] allDeptIds; - - private String allDeptIdsStr; + private String allDeptIds; /** * 所有部门名称 */ - private String allDeptNames; + private String allDeptNames; /** * 乐观锁 */ - private Integer revision; + private Integer revision; /** * 删除标识 0:否,1:是 */ - private String delFlag; + private String delFlag; /** * 创建人 */ - private String createdBy; + private String createdBy; /** * 创建时间 */ - private Date createdTime; + private Date createdTime; /** * 更新人 */ - private String updatedBy; + private String updatedBy; /** * 更新时间 */ - private Date updatedTime; + private Date updatedTime; + + ///////////////////下面的字段,为pc页面上送数据的绑定字段///////////////////////////////// + + /** + * 新增是,选择所属网格,多选 + */ + private List selectedDeptIds; } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/GridOperatorInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/GridOperatorInfoServiceImpl.java index 06e7bdff8..6dbacd020 100755 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/GridOperatorInfoServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/GridOperatorInfoServiceImpl.java @@ -17,6 +17,7 @@ package com.elink.esua.epdc.modules.consult.service.impl; +import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; @@ -36,6 +37,7 @@ import com.elink.esua.epdc.modules.consult.redis.GridOperatorInfoRedis; import com.elink.esua.epdc.modules.consult.service.GridOperatorInfoService; import com.elink.esua.epdc.modules.feign.AdminFeignClient; import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; +import com.google.common.collect.Lists; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -89,55 +91,105 @@ public class GridOperatorInfoServiceImpl extends BaseServiceImpl ids = Arrays.asList(depts); - String[] allDeptIds = new String[(ids.subList(1, ids.size())).size()]; - gridOperatorInfoDTO.setAllDeptIds((ids.subList(1, ids.size())).toArray(allDeptIds)); - } - return gridOperatorInfoDTO; + return ConvertUtils.sourceToTarget(entity, GridOperatorInfoDTO.class); } @Override @Transactional(rollbackFor = Exception.class) public void save(GridOperatorInfoDTO dto) { + List operatorGridIdList = getOperatorGridId(dto); + if (CollUtil.isEmpty(operatorGridIdList)) { + return; + } GridOperatorInfoEntity entity = ConvertUtils.sourceToTarget(dto, GridOperatorInfoEntity.class); - Result parentResult = null; - if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { - parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + for (Long deptId : operatorGridIdList) { + // 填充部门信息字段 + this.fillDeptInfoByGridId(entity, deptId); + if (null == entity.getDeptId() || StringUtils.isBlank(entity.getAllDeptNames())) { + continue; + } + entity.setId(null); + baseDao.insert(entity); + } + } + + /** + * 通过前端选择的部门id,组装网格id集合 + * + * @param selectedDeptIds + * @return java.util.List + * @author work@yujt.net.cn + * @date 2020/3/12 10:30 + */ + private List getOperatorGridId(List selectedDeptIds) { + if (CollUtil.isEmpty(selectedDeptIds)) { + throw new RenException("请选择网格人员所属部门"); } - if (parentResult != null) { - if (!parentResult.success() || parentResult.getData() == null) { - throw new RenException("获取部门信息失败"); - } else { - ParentAndAllDeptDTO deptDTO = parentResult.getData(); - entity.setAllDeptIds(deptDTO.getAllDeptIds()); - entity.setAllDeptNames(deptDTO.getAllDeptNames()); - entity.setParentDeptIds(deptDTO.getParentDeptIds()); - entity.setParentDeptNames(deptDTO.getParentDeptNames()); - entity.setDeptId(deptDTO.getGridId()); + List operatorGridIdList = Lists.newArrayList(); + for (Long[] selectedDeptIdArray : selectedDeptIds) { + if (selectedDeptIdArray.length == NumConstant.THREE) { + operatorGridIdList.add(selectedDeptIdArray[NumConstant.TWO]); } } - insert(entity); + return operatorGridIdList; } + /** + * 获取需要进行绑定的网格id,并移除已绑定的网格 + * + * @param operatorInfo + * @return java.util.List + * @author work@yujt.net.cn + * @date 2020/3/12 11:19 + */ + private List getOperatorGridId(GridOperatorInfoDTO operatorInfo) { + List operatorGridIdList = getOperatorGridId(operatorInfo.getSelectedDeptIds()); + if (CollUtil.isEmpty(operatorGridIdList)) { + throw new RenException("获取网格人员所属网格失败"); + } + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("real_name", operatorInfo.getRealName()) + .eq("mobile", operatorInfo.getMobile()); + List entityList = baseDao.selectList(wrapper); + if (CollUtil.isNotEmpty(entityList)) { + for (GridOperatorInfoEntity operatorInfoEntity : entityList) { + Long deptId = operatorInfoEntity.getDeptId(); + if (operatorGridIdList.contains(deptId)) { + operatorGridIdList.remove(deptId); + } + } + } + return operatorGridIdList; + } + + /** + * 组装网格人员机构信息 + * + * @param gridOperator 网格员对象 + * @param gridId 网格id + * @return void + * @author work@yujt.net.cn + * @date 2020/3/12 13:37 + */ + private void fillDeptInfoByGridId(GridOperatorInfoEntity gridOperator, Long gridId) { + Result adminResult = adminFeignClient.getParentAndAllDept(String.valueOf(gridId)); + if (!adminResult.success() || null == adminResult.getData()) { + return; + } + ParentAndAllDeptDTO deptInfo = adminResult.getData(); + gridOperator.setAllDeptIds(deptInfo.getAllDeptIds()); + gridOperator.setAllDeptNames(deptInfo.getAllDeptNames()); + gridOperator.setParentDeptIds(deptInfo.getParentDeptIds()); + gridOperator.setParentDeptNames(deptInfo.getParentDeptNames()); + gridOperator.setDeptId(gridId); + } + + @Override @Transactional(rollbackFor = Exception.class) public void update(GridOperatorInfoDTO dto) { GridOperatorInfoEntity entity = ConvertUtils.sourceToTarget(dto, GridOperatorInfoEntity.class); - String[] allDeptIds = dto.getAllDeptIds(); - Result parentResult = adminFeignClient.getParentAndAllDept(String.valueOf(allDeptIds[allDeptIds.length - 1])); - if (!parentResult.success() || parentResult.getData() == null) { - throw new RenException("获取部门信息失败"); - } else { - ParentAndAllDeptDTO deptDTO = parentResult.getData(); - entity.setAllDeptIds(deptDTO.getAllDeptIds()); - entity.setAllDeptNames(deptDTO.getAllDeptNames()); - entity.setParentDeptIds(deptDTO.getParentDeptIds()); - entity.setParentDeptNames(deptDTO.getParentDeptNames()); - entity.setDeptId(deptDTO.getGridId()); - } updateById(entity); } @@ -174,10 +226,10 @@ public class GridOperatorInfoServiceImpl extends BaseServiceImpl0){ + if (integer > 0) { return true; } return false; @@ -197,17 +249,16 @@ public class GridOperatorInfoServiceImpl extends BaseServiceImpl + * @params [dto, gridList] * @author liuchuang * @since 2020/3/7 14:12 */ private List handleOrganizationInfo(OrganizationModifyDTO dto, List gridList) { List entities = new ArrayList<>(); - for (GridOperatorInfoDTO grid: gridList) { + for (GridOperatorInfoDTO grid : gridList) { GridOperatorInfoEntity entity = new GridOperatorInfoEntity(); if (StringUtils.isNotEmpty(grid.getParentDeptIds()) && StringUtils.isNotEmpty(grid.getParentDeptNames())) { List parentDeptIds = Arrays.asList(grid.getParentDeptIds().split(",")); @@ -220,8 +271,8 @@ public class GridOperatorInfoServiceImpl extends BaseServiceImpl allDeptIds = Arrays.asList(grid.getAllDeptIdsStr().split(",")); + if (StringUtils.isNotEmpty(grid.getAllDeptIds()) && StringUtils.isNotEmpty(grid.getAllDeptNames())) { + List allDeptIds = Arrays.asList(grid.getAllDeptIds().split(",")); List allDeptNames = Arrays.asList(grid.getAllDeptNames().split("-")); int index = allDeptIds.indexOf(dto.getDeptId().toString()); if (index >= 0 && allDeptNames.size() > index) { From eb07ae974491150056f9beb9f9b1c36b0421cce5 Mon Sep 17 00:00:00 2001 From: yujintao Date: Thu, 12 Mar 2020 15:25:25 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../consult/redis/GridOperatorInfoRedis.java | 47 ------------------- .../impl/GridOperatorInfoServiceImpl.java | 4 -- 2 files changed, 51 deletions(-) delete mode 100755 esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/redis/GridOperatorInfoRedis.java diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/redis/GridOperatorInfoRedis.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/redis/GridOperatorInfoRedis.java deleted file mode 100755 index 4acf8d2cb..000000000 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/redis/GridOperatorInfoRedis.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.elink.esua.epdc.modules.consult.redis; - -import com.elink.esua.epdc.commons.tools.redis.RedisUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * 网格员信息 - * - * @author elink elink@elink-cn.com - * @since v1.0.0 2020-03-02 - */ -@Component -public class GridOperatorInfoRedis { - @Autowired - private RedisUtils redisUtils; - - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - -} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/GridOperatorInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/GridOperatorInfoServiceImpl.java index 6dbacd020..30bb4c1ff 100755 --- a/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/GridOperatorInfoServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/consult/service/impl/GridOperatorInfoServiceImpl.java @@ -33,7 +33,6 @@ import com.elink.esua.epdc.dto.consult.form.GridOperatorListFormDTO; import com.elink.esua.epdc.dto.consult.result.GridOperatorListResultDTO; import com.elink.esua.epdc.modules.consult.dao.GridOperatorInfoDao; import com.elink.esua.epdc.modules.consult.entity.GridOperatorInfoEntity; -import com.elink.esua.epdc.modules.consult.redis.GridOperatorInfoRedis; import com.elink.esua.epdc.modules.consult.service.GridOperatorInfoService; import com.elink.esua.epdc.modules.feign.AdminFeignClient; import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; @@ -57,9 +56,6 @@ import java.util.Map; @Service public class GridOperatorInfoServiceImpl extends BaseServiceImpl implements GridOperatorInfoService { - @Autowired - private GridOperatorInfoRedis gridOperatorInfoRedis; - @Autowired private AdminFeignClient adminFeignClient; From 88cf7d551ee7d83d3704f7a1b1f885e189e32223 Mon Sep 17 00:00:00 2001 From: yujintao Date: Fri, 13 Mar 2020 13:29:55 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=94=A8=E6=88=B7=E5=A4=B4=E5=83=8F=E7=9A=84?= =?UTF-8?q?bug=EF=BC=9B=E9=87=8D=E6=96=B0=E6=A2=B3=E7=90=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=A0=A1=E9=AA=8C=E4=B8=8E=E7=BB=84=E8=A3=85=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epdc/service/impl/AppUserServiceImpl.java | 154 ++++++++++++------ .../epdc/dto/epdc/EpdcCompleteAppUserDTO.java | 5 + 2 files changed, 110 insertions(+), 49 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java index 51d1b59de..0368e1578 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java @@ -40,6 +40,7 @@ import com.elink.esua.epdc.jwt.JwtTokenUtils; import com.elink.esua.epdc.redis.AppUserRedis; import com.elink.esua.epdc.service.AppUserService; import com.elink.esua.epdc.utils.WxMaServiceUtils; +import com.sun.org.apache.regexp.internal.RE; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.error.WxErrorException; import me.chanjar.weixin.mp.api.WxMpService; @@ -765,48 +766,120 @@ public class AppUserServiceImpl implements AppUserService { return userDto; } - @Override - public Result completeUserInfo(TokenDto tokenDto, EpdcCompleteUserInfoFormDTO infoDto) { - - // 验证手机号 - this.checkSmsCode(infoDto.getMobile(), infoDto.getSmsCode()); + /** + * 验证用户手机号和身份证号码 + * + * @param userId 用户id + * @param mobile 手机号 + * @param partyFlag 是否党员 + * @param identityNo 身份证号码 + * @return java.lang.String 用户认证状态 + * @author work@yujt.net.cn + * @date 2020/3/12 19:15 + */ + private String checkMobileAndIdentityNo(String userId, String mobile, String partyFlag, String identityNo) { + UserDTO userDto = new UserDTO(); + userDto.setId(userId); + userDto.setMobile(mobile); + userDto.setIdentityNo(identityNo); + userDto.setPartyFlag(partyFlag); + // 验证用户手机号和身份证号是否被注册 + Result verifyResult = userFeignClient.verifyUserCompleteData(userDto); + if (!verifyResult.success()) { + throw new RenException(verifyResult.getMsg()); + } + return verifyResult.getData(); + } - String userId = tokenDto.getUserId(); - Long gridId = getGridId(infoDto.getGridId(), tokenDto.getGridId(), userId); + /** + * 校验用身份证号码 + * + * @param identityNo 身份证号码 + * @param partyFlag 是否党员,非党员身份证号码置空 + * @return java.lang.String 身份证号码 + * @author work@yujt.net.cn + * @date 2020/3/12 19:16 + */ + private String fixAndCheckIdentityNo(String identityNo, String partyFlag) { + if (YesOrNoEnum.NO.value().equals(partyFlag)) { + return null; + } + // 党员提交,验证身份证号 + identityNo = ModuleUtils.replaceIllegalCharacter(identityNo); + if (StringUtils.isBlank(identityNo)) { + throw new RenException("身份证号不能为空"); + } + String verification = IdentityNoUtils.IdentityNoVerification(identityNo); + if (StringUtils.isNotBlank(verification)) { + throw new RenException(verification); + } + return identityNo; + } + /** + * 组装用户数据,解析用户微信unionid、头像 + * + * @param userId 用户id + * @param userState 用户认证状态 + * @param infoDto 用户提交的表单数据 + * @return EpdcCompleteAppUserDTO + * @author work@yujt.net.cn + * @date 2020/3/12 19:20 + */ + private EpdcCompleteAppUserDTO packageUserCompleteInfo(String userId, String userState, EpdcCompleteUserInfoFormDTO infoDto) { UserDTO userDto = ConvertUtils.sourceToTarget(infoDto, UserDTO.class); - userDto.setDeptId(gridId); + userDto.setDeptId(infoDto.getGridId()); userDto.setId(userId); userDto.setRealName(ModuleUtils.replaceIllegalCharacter(infoDto.getRealName())); - // 党员提交,验证身份证号 - String identityNo = ModuleUtils.replaceIllegalCharacter(infoDto.getIdentityNo()); - if (YesOrNoEnum.YES.value().equals(userDto.getPartyFlag())) { - if (StringUtils.isBlank(identityNo)) { - return new Result().error("身份证号不能为空"); + String wxCode = infoDto.getWxCode(); + String iv = infoDto.getIv(); + String encryptedData = infoDto.getEncryptedData(); + if (StringUtils.isNotBlank(wxCode) && StringUtils.isNotBlank(iv) && StringUtils.isNotBlank(encryptedData)) { + WxMaUserInfo wxMaUserInfo = null; + String decrypt = null; + try { + decrypt = WxMaCryptUtils.decrypt(this.getUserSessionKey(wxCode), encryptedData, iv); + if (StringUtils.isNotBlank(decrypt)) { + wxMaUserInfo = JSONObject.parseObject(decrypt, WxMaUserInfo.class); + } + } catch (Exception e) { + log.error("解析或组装用户微信信息失败,用户id:::::{},解密数据:::::{}", userId, decrypt); + log.error(e.getMessage()); } - String verification = IdentityNoUtils.IdentityNoVerification(identityNo); - if (StringUtils.isNotBlank(verification)) { - return new Result().error(verification); + if (null == wxMaUserInfo || StringUtils.isBlank(wxMaUserInfo.getUnionId())) { + throw new RenException("解析微信数据失败,请刷新后重试"); } - userDto.setIdentityNo(identityNo); - } - // 验证用户提交的信息 - Result verifyResult = userFeignClient.verifyUserCompleteData(userDto); - if (!verifyResult.success()) { - return new Result().error(verifyResult.getMsg()); + userDto.setWxUnionId(wxMaUserInfo.getUnionId()); + userDto.setFaceImg(wxMaUserInfo.getAvatarUrl()); } - String userState = verifyResult.getData(); - userDto.setWxUnionId(this.getWxUnionId(infoDto.getWxCode(), infoDto.getIv(), infoDto.getEncryptedData(), userId)); - UserGridRelationDTO userGrid = this.packageUserGridRelationInfo(gridId); EpdcCompleteAppUserDTO completeAppUserDto = ConvertUtils.sourceToTarget(userDto, EpdcCompleteAppUserDTO.class); - completeAppUserDto = this.packageUserCompleteInfo(completeAppUserDto, userState); - // 组装对象,准备保存用户信息 + return this.packageUserCompleteInfo(completeAppUserDto, userState); + } + + + @Override + public Result completeUserInfo(TokenDto tokenDto, EpdcCompleteUserInfoFormDTO infoDto) { + + String userId = tokenDto.getUserId(); + + // 验证手机号、验证码 + this.checkSmsCode(infoDto.getMobile(), infoDto.getSmsCode()); + // 验证身份证号格式,身份证号码字符串校正 + String identityNo = fixAndCheckIdentityNo(infoDto.getIdentityNo(), infoDto.getPartyFlag()); + // 验证手机号身份证号是否已被注册,若未被注册,返回当前用户的状态 + String userState = checkMobileAndIdentityNo(userId, infoDto.getMobile(), infoDto.getPartyFlag(), identityNo); + + Long gridId = getGridId(infoDto.getGridId(), tokenDto.getGridId(), userId); + infoDto.setGridId(gridId); + infoDto.setIdentityNo(identityNo); + + // 组装对象,准备保存用户信息与网格信息 EpdcAppUserCompleteInfoFormDTO dto = new EpdcAppUserCompleteInfoFormDTO(); - dto.setCompleteAppUser(completeAppUserDto); - dto.setUserGridRelation(userGrid); + dto.setUserGridRelation(this.packageUserGridRelationInfo(gridId)); + dto.setCompleteAppUser(this.packageUserCompleteInfo(userId, userState, infoDto)); Result completeResult = userFeignClient.completeUserInfo(dto); if (!completeResult.success()) { @@ -824,7 +897,7 @@ public class AppUserServiceImpl implements AppUserService { tokenDto.setNickname(user.getNickname()); tokenDto.setMobile(user.getMobile()); tokenDto.setPartyFlag(user.getPartyFlag()); - EpdcAppAuthorizationDTO authorizationDto = this.packageEpdcAppAuthorization(tokenDto, userGrid.getGrid(), user.getState()); + EpdcAppAuthorizationDTO authorizationDto = this.packageEpdcAppAuthorization(tokenDto, String.valueOf(gridId), user.getState()); // 更新社群用户党员标识并加入关联的所有网格党员群 if (YesOrNoEnum.YES.value().equals(user.getPartyFlag())) { @@ -875,11 +948,8 @@ public class AppUserServiceImpl implements AppUserService { * @author work@yujt.net.cn * @date 2020/2/28 14:51 */ + @Deprecated private String getWxUnionId(String wxCode, String iv, String encryptedData, String userId) { - if (StringUtils.isBlank(wxCode) || StringUtils.isBlank(iv) || StringUtils.isBlank(encryptedData)) { - return null; - } - String sessionKey = this.getUserSessionKey(wxCode); /** * 代码说明: * 本来使用{@link cn.binarywang.wx.miniapp.api.WxMaUserService#getUserInfo(String, String, String)}方法解析用户unionid @@ -887,21 +957,7 @@ public class AppUserServiceImpl implements AppUserService { * 上述方法本质上是通过{@link WxMaCryptUtils}工具类解密微信用户数据,遂直接换用{@link WxMaCryptUtils#decrypt(String, String, String)}方法。 * 将解密得到的JSON字符串,用{@link JSONObject}组装为目标对象,添加异常捕获与日志输出 */ - WxMaUserInfo wxMaUserInfo = null; - String decrypt = null; - try { - decrypt = WxMaCryptUtils.decrypt(sessionKey, encryptedData, iv); - if (StringUtils.isNotBlank(decrypt)) { - wxMaUserInfo = JSONObject.parseObject(decrypt, WxMaUserInfo.class); - } - } catch (Exception e) { - log.error("解析或组装用户{}的微信信息失败,解密数据:::::", userId, decrypt); - log.error(e.getMessage()); - } - if (null == wxMaUserInfo || StringUtils.isBlank(wxMaUserInfo.getUnionId())) { - throw new RenException("解析微信数据失败,请刷新后重试"); - } - return wxMaUserInfo.getUnionId(); + return null; } @Override diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/EpdcCompleteAppUserDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/EpdcCompleteAppUserDTO.java index fc6f1734d..c421c3094 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/EpdcCompleteAppUserDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/EpdcCompleteAppUserDTO.java @@ -103,4 +103,9 @@ public class EpdcCompleteAppUserDTO implements Serializable { * 居住网格id */ private Long deptId; + + /** + * 用户头像 + */ + private String faceImg; }