From 3ac1ba451e36349d3f7e20e131437c843e4c7248 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Wed, 2 Mar 2022 17:53:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=9A=E5=91=98=EF=BC=8C=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=EF=BC=8C=E5=BF=97=E6=84=BF=E8=80=85=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E6=8E=A8=E9=80=81=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/result/EpmetUserBaseInfoDTO.java | 60 ++++ .../product/result/EpmetUserResiInfoDTO.java | 56 +++ .../dto/product/result/EpmetUserRoleDTO.java | 52 +++ .../product/result/EpmetVolunteerInfoDTO.java | 56 +++ .../java/com/elink/esua/epdc/dao/UserDao.java | 94 ++++- .../elink/esua/epdc/dao/VolunteerInfoDao.java | 6 + .../epdc/service/impl/UserServiceImpl.java | 101 +++++- .../impl/VolunteerInfoServiceImpl.java | 21 ++ .../src/main/resources/mapper/UserDao.xml | 320 ++++++++++++++++++ .../resources/mapper/VolunteerInfoDao.xml | 68 ++++ 10 files changed, 832 insertions(+), 2 deletions(-) create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserBaseInfoDTO.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserResiInfoDTO.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserRoleDTO.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetVolunteerInfoDTO.java diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserBaseInfoDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserBaseInfoDTO.java new file mode 100644 index 000000000..c23a33d29 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserBaseInfoDTO.java @@ -0,0 +1,60 @@ +/** + * 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.dto.product.result; + + +import com.sun.xml.internal.bind.v2.model.core.ID; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 用户基础信息 + * + * @author wgf + * @since v1.0.0 2022-03-01 + */ +@Data +public class EpmetUserBaseInfoDTO implements Serializable { + + private static final long serialVersionUID = 915598602233599300L; + + private String id;// 主键 + private String customerId;//客户Id + private String userId;//用户id + private String mobile;//手机号(注册手机号) + private String surname;//姓氏 + private String name;//名 + private String realName;//姓+名 + private String idNum;//身份证号 + private String gender;//性别(1男2女0未知) + private String street;//街道 + private String district;//小区名称 + private String buildingAddress;//楼栋单元 + private String nickname;//昵称(目前来源于微信昵称,后续系统可支持用户有昵称) + private String headImgUrl;//头像(目前来源于微信,后续系统顾客支持上传头像) + private Integer delFlag;//删除标识 0.未删除 1.已删除 + private Integer revision;//乐观锁 + private String createdBy;//创建人 + private Date createdTime;//创建时间 + private String updatedBy;//更新人 + private Date updatedTime;//更新时间 + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserResiInfoDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserResiInfoDTO.java new file mode 100644 index 000000000..f9babeb2b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserResiInfoDTO.java @@ -0,0 +1,56 @@ +/** + * 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.dto.product.result; + + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 用户居民端注册信息表 + * + * @author wgf + * @since v1.0.0 2022-03-01 + */ +@Data +public class EpmetUserResiInfoDTO implements Serializable { + + private static final long serialVersionUID = 915598602233599300L; + + private String id;// 主键 + private String customerId;//客户Id + private String userId;//用户id + private String regMobile;//手机号(注册手机号) + private String surname;//姓氏 + private String name;//名 + private String idNum;//身份证号 + private String street;//街道 + private String district;//小区名称 + private String buildingAddress;//楼栋单元 + private String resiVisitId;//居民注册行为记录表Id resi_visit.id + private Integer delFlag;//删除标识 0.未删除 1.已删除 + private Integer revision;//乐观锁 + private String createdBy;//创建人 + private Date createdTime;//创建时间 + private String updatedBy;//更新人 + private Date updatedTime;//更新时间 + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserRoleDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserRoleDTO.java new file mode 100644 index 000000000..6bc5c8b7d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetUserRoleDTO.java @@ -0,0 +1,52 @@ +/** + * 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.dto.product.result; + + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 用户角色关系表 + * + * @author wgf + * @since v1.0.0 2022-03-01 + */ +@Data +public class EpmetUserRoleDTO implements Serializable { + + private static final long serialVersionUID = 915598602233599300L; + + private String id;// 主键 + + private String customerId;//客户Id + private String gridId;//网格表Id(CUSTOMER_GRID.id)【居民党员角色值为all,热心居民角色对应的网格Id】 + private String userId;//用户Id user.id + private String roleId;//角色Id 【角色表Id】 + + private Integer delFlag;//删除标识 0.未删除 1.已删除 + private Integer revision;//乐观锁 + private String createdBy;//创建人 + private Date createdTime;//创建时间 + private String updatedBy;//更新人 + private Date updatedTime;//更新时间 + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetVolunteerInfoDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetVolunteerInfoDTO.java new file mode 100644 index 000000000..85d7e2e54 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/product/result/EpmetVolunteerInfoDTO.java @@ -0,0 +1,56 @@ +/** + * 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.dto.product.result; + + +import com.sun.xml.internal.bind.v2.model.core.ID; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 志愿者信息 + * + * @author wgf + * @since v1.0.0 2022-03-01 + */ +@Data +public class EpmetVolunteerInfoDTO implements Serializable { + + private static final long serialVersionUID = 915598602233599300L; + + private String id;//主键(志愿者注册后插入本表) + private String userId;//用户id + private String customerId;//客户id + private String volunteerIntroduce;//志愿者自我介绍 + private String volunteerSignature;//志愿者签名 + private String delFlag;//删除标记 + private Integer revision;//乐观锁 + private String createdBy;//创建人 + private Date createdTime;//创建时间(认证志愿者时间) + private String updatedBy;//更新人 + private Date updatedTime;//更新时间 + private String gridId;//网格id + private String pid;//网格的所有上级 + private String pids;//网格的所有上级 + private String gridName;//网格名称 + + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java index 987555b59..95e4a3e2b 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserDao.java @@ -18,7 +18,6 @@ package com.elink.esua.epdc.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; -import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.CachingUserInfoDTO; import com.elink.esua.epdc.dto.UserActivePointsResultDTO; import com.elink.esua.epdc.dto.UserDTO; @@ -26,6 +25,8 @@ import com.elink.esua.epdc.dto.epdc.form.EpdcUnauthorizedAmountFromDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcWorkUserFromDTO; import com.elink.esua.epdc.dto.epdc.result.*; +import com.elink.esua.epdc.dto.product.result.EpmetUserBaseInfoDTO; +import com.elink.esua.epdc.dto.product.result.EpmetUserResiInfoDTO; import com.elink.esua.epdc.entity.UserEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -309,4 +310,95 @@ public interface UserDao extends BaseDao { * @date 2021/9/28 18:30 */ UserActivePointsResultDTO selectUserPoint(String userId); + + /** + * 根据用户ID查询产品库【user_base_info】是否存在该信息 + * @param userId + * @return + */ + List getUserBaseInfoByUserId(@Param("userId") String userId); + + /** + * 根据用户ID,清楚重复数据 + * @param userId + */ + void deleteUserBaseInfoByUserId(@Param("userId") String userId); + + /** + * 根据用户ID获取推送信息 + * @param userId + * @return + */ + EpmetUserBaseInfoDTO getUserBaseInfoFromEpdcUser(@Param("userId") String userId); + + /** + * 新增用户基础信息表信息 + * @param userBaseInfoDTO + */ + void insertUserBaseInfo(EpmetUserBaseInfoDTO userBaseInfoDTO); + + /** + * 更新用户基础信息表信息 + * @param userBaseInfoDTO + */ + void updateUserBaseInfo(EpmetUserBaseInfoDTO userBaseInfoDTO); + + /** + * 清除用户角色关系 + * @param userId + */ + void deleteUserRoleByUserId(@Param("userId") String userId); + + /** + * 新增用户角色关系 + * @param userId + * @param roleId + * @param gridId + */ + void insertUserRole(@Param("userId") String userId,@Param("roleId") String roleId, @Param("gridId") String gridId); + + /** + * 清除用户 + * @param userId + */ + void deleteUserByUserId(@Param("userId") String userId); + + /** + * 新增用户 + * @param userId + */ + void insertUser(@Param("userId") String userId); + + + /** + * 根据用户ID查询产品库【user_resi_info】是否存在该信息 + * @param userId + * @return + */ + List getUserResiInfoByUserId(@Param("userId") String userId); + + /** + * 根据用户ID获取推送信息 + * @param userId + * @return + */ + EpmetUserResiInfoDTO getUserResiInfoFromEpdcUser(@Param("userId") String userId); + + /** + * 根据用户ID,清楚重复数据 + * @param userId + */ + void deleteUserResiInfoByUserId(@Param("userId") String userId); + + /** + * 新增用户居民端注册信息表信息 + * @param userBaseInfoDTO + */ + void insertUserResiInfo(EpmetUserResiInfoDTO userBaseInfoDTO); + + /** + * 更新用户居民端注册信息表信息 + * @param userBaseInfoDTO + */ + void updateUserResiInfo(EpmetUserResiInfoDTO userBaseInfoDTO); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java index 7e3b1e03b..275070b7f 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java @@ -23,6 +23,7 @@ import com.elink.esua.epdc.dto.VolunteerInfoDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO; +import com.elink.esua.epdc.dto.product.result.EpmetVolunteerInfoDTO; import com.elink.esua.epdc.entity.VolunteerInfoEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -130,4 +131,9 @@ public interface VolunteerInfoDao extends BaseDao { void updateVolunteerKindnessTime(EpdcVolunteerKindnessTimeFormDTO formDto); List selectListOfOrganizationInfo(String deptId); + + + void deleteVolunteerByUserId(@Param("userId") String userId); + EpmetVolunteerInfoDTO getVolunteerInfoFromEpdc(@Param("userId") String userId); + void insertUserRole(EpmetVolunteerInfoDTO volunteerInfoDTO); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java index 18292df53..1431a0133 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java @@ -36,7 +36,6 @@ import com.elink.esua.epdc.commons.tools.enums.*; import com.elink.esua.epdc.commons.tools.enums.pointsenum.PointsOperationEnum; import com.elink.esua.epdc.commons.tools.exception.RenException; import com.elink.esua.epdc.commons.tools.page.PageData; -import com.elink.esua.epdc.commons.tools.redis.RedisUtils; import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; import com.elink.esua.epdc.commons.tools.utils.*; import com.elink.esua.epdc.config.StreamUtils; @@ -53,6 +52,8 @@ import com.elink.esua.epdc.dto.epdc.EpdcGridLeaderRegisterDTO; import com.elink.esua.epdc.dto.epdc.UserCarInfoDTO; import com.elink.esua.epdc.dto.epdc.form.*; import com.elink.esua.epdc.dto.epdc.result.*; +import com.elink.esua.epdc.dto.product.result.EpmetUserBaseInfoDTO; +import com.elink.esua.epdc.dto.product.result.EpmetUserResiInfoDTO; import com.elink.esua.epdc.entity.*; import com.elink.esua.epdc.enums.AppUserAuditStateEnum; import com.elink.esua.epdc.enums.AppUserStatesEnum; @@ -967,9 +968,107 @@ public class UserServiceImpl extends BaseServiceImpl implem } } + + if(!StringUtils.isBlank(userDTO.getId())){ + // 产品库推送用户基本信息【user_base_info】 + pushProductUserBaseInfo(userDTO.getId()); + // 产品库推送用户角色关系表【user_role】 + pushProductUserRole(userDTO.getId(),userDTO.getPartyFlag(),userDTO.getGridId() == null ? "" : userDTO.getGridId().toString()); + // 产品库推送用户信息【user】 + pushProductUser(userDTO.getId()); + // 产品库推送用户居民端注册信息表【user_resi_info】 + pushProductUserResiInfo(userDTO.getId()); + } + return result.ok(userDTO); } + /** + * 产品库推送用户居民端注册信息表【user_resi_info】 + * @param userId + * @author wgf + */ + private void pushProductUserResiInfo(String userId){ + // 根据用户ID查询产品库【user_resi_info】是否存在该信息 + List userResiInfoList = baseDao.getUserResiInfoByUserId(userId); + if(userResiInfoList.size() > 1){ + // 多条数据,说明存在重复数据,需要清除后,再新增用户基本信息 + // 清除用户基本信息信息 + baseDao.deleteUserResiInfoByUserId(userId); + } + // 根据用户ID获取推送信息 + EpmetUserResiInfoDTO userResiInfoDTO = baseDao.getUserResiInfoFromEpdcUser(userId); + if(userResiInfoList.size() == 1){ + // 更新用户基本信息 + String id = userResiInfoList.get(0).getId(); + userResiInfoDTO.setId(id); + baseDao.updateUserResiInfo(userResiInfoDTO); + }else{ + // 新增用户基本信息 + baseDao.insertUserResiInfo(userResiInfoDTO); + } + } + + /** + * 产品库推送用户基本信息【user_base_info】 + * @param userId + * @author wgf + */ + private void pushProductUserBaseInfo(String userId){ + // 根据用户ID查询产品库【user_base_info】是否存在该信息 + List userBaseInfoList = baseDao.getUserBaseInfoByUserId(userId); + if(userBaseInfoList.size() > 1){ + // 多条数据,说明存在重复数据,需要清除后,再新增用户基本信息 + // 清除用户基本信息信息 + baseDao.deleteUserBaseInfoByUserId(userId); + } + // 根据用户ID获取推送信息 + EpmetUserBaseInfoDTO userBaseInfoDTO = baseDao.getUserBaseInfoFromEpdcUser(userId); + if(userBaseInfoList.size() == 1){ + // 更新用户基本信息 + String id = userBaseInfoList.get(0).getId(); + userBaseInfoDTO.setId(id); + baseDao.updateUserBaseInfo(userBaseInfoDTO); + }else{ + // 新增用户基本信息 + baseDao.insertUserBaseInfo(userBaseInfoDTO); + } + } + + /** + * 产品库推送用户角色关系【user_role】 + * @param userId + * @param partyFlag + * @param gridId + * @author wgf + */ + private void pushProductUserRole(String userId,String partyFlag,String gridId){ + // 清除用户角色关系 + baseDao.deleteUserRoleByUserId(userId); + // 新增用户角色关系 + String roleId = ""; + if("0".equals(partyFlag)){ + // 居民 + roleId = "37a7d229725811eab9c900163e08c0f9"; + }else{ + // 党员 + roleId = "4e36ff0b725811eab9c900163e08c0f9"; + } + baseDao.insertUserRole(userId,roleId, gridId); + } + + /** + * 产品库推送用户信息【user】 + * @param userId + * @author wgf + */ + private void pushProductUser(String userId){ + // 清除用户 + baseDao.deleteUserByUserId(userId); + // 新增用户 + baseDao.insertUser(userId); + } + /** * 党员认证成功后,更新用户表党员相关字段 * diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java index e4021a827..02b7079ca 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java @@ -42,6 +42,7 @@ import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO; +import com.elink.esua.epdc.dto.product.result.EpmetVolunteerInfoDTO; import com.elink.esua.epdc.entity.UserTagEntity; import com.elink.esua.epdc.entity.UserTagRelationEntity; import com.elink.esua.epdc.entity.VolunteerInfoEntity; @@ -229,10 +230,30 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl + + + + update epmet_user.user_base_info + set DEL_FLAG = 1 + where USER_ID = #{userId} + + + + + + insert into epmet_user.user_base_info + ( + ID, + CUSTOMER_ID, + USER_ID, + MOBILE, + SURNAME, + NAME, + REAL_NAME, + ID_NUM, + GENDER, + STREET, + DISTRICT, + BUILDING_ADDRESS, + NICKNAME, + HEAD_IMG_URL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) + values + ( + #{id}, + #{customerId}, + #{userId}, + #{mobile}, + #{surname}, + #{name}, + #{realName}, + #{idNum}, + #{gender}, + #{street}, + #{district}, + #{buildingAddress}, + #{nickname}, + #{headImgUrl}, + #{delFlag}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime} + ) + + + + update epmet_user.user_base_info + set CUSTOMER_ID = #{customerId}, + USER_ID = #{userId}, + MOBILE = #{mobile}, + SURNAME = #{surname}, + NAME = #{name}, + REAL_NAME = #{realName}, + ID_NUM = #{idNum}, + GENDER = #{gender}, + STREET = #{street}, + DISTRICT = #{district}, + BUILDING_ADDRESS = #{buildingAddress}, + NICKNAME = #{nickname}, + HEAD_IMG_URL = #{headImgUrl}, + DEL_FLAG = #{delFlag}, + REVISION = #{revision}, + CREATED_BY = #{createdBy}, + CREATED_TIME = #{createdTime}, + UPDATED_BY = #{updatedBy}, + UPDATED_TIME = #{updatedTime} + where ID = #{id} + + + + update epmet_user.user_role + set DEL_FLAG = 1 + where USER_ID = #{userId} + + + insert into epmet_user.user_role + ( + ID, + CUSTOMER_ID, + GRID_ID, + USER_ID, + ROLE_ID, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) + values + ( + UUID(), + (select dct.dict_value from esua_epdc_admin.sys_dict dct where dct.del_flag = 0 and dct.dict_type = 'dcp' and dct.pid != 0), + #{gridId}, + #{userId}, + #{roleId}, + 0, + 0, + 'APP_USER', + NOW(), + 'APP_USER', + NOW() + ) + + + + update epmet_user.user + set DEL_FLAG = '1' + where ID = #{userId} + + + insert into epmet_user.user + ( + ID, + CUSTOMER_ID, + FROM_APP, + FROM_CLIENT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) + values + ( + #{userId}, + (select dct.dict_value from esua_epdc_admin.sys_dict dct where dct.del_flag = 0 and dct.dict_type = 'dcp' and dct.pid != 0), + 'resi', + 'wxmp', + '0', + 0, + 'APP_USER', + NOW(), + 'APP_USER', + NOW() + ) + + + + + + + + insert into epmet_user.user_resi_info + ( + ID, + CUSTOMER_ID, + USER_ID, + REG_MOBILE, + SURNAME, + NAME, + ID_NUM, + STREET, + DISTRICT, + BUILDING_ADDRESS, + RESI_VISIT_ID, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) + values + ( + #{id}, + #{customerId}, + #{userId}, + #{regMobile}, + #{surname}, + #{name}, + #{idNum}, + #{street}, + #{district}, + #{buildingAddress}, + #{resiVisitId}, + #{delFlag}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime} + ) + + + + update epmet_user.user_resi_info + set CUSTOMER_ID = #{customerId}, + USER_ID = #{userId}, + REG_MOBILE = #{regMobile}, + SURNAME = #{surname}, + NAME = #{name}, + ID_NUM = #{idNum}, + STREET = #{street}, + DISTRICT = #{district}, + BUILDING_ADDRESS = #{buildingAddress}, + RESI_VISIT_ID = #{resiVisitId}, + DEL_FLAG = #{delFlag}, + REVISION = #{revision}, + CREATED_BY = #{createdBy}, + CREATED_TIME = #{createdTime}, + UPDATED_BY = #{updatedBy}, + UPDATED_TIME = #{updatedTime} + where ID = #{id} + + + + update epmet_user.user_resi_info + set DEL_FLAG = 1 + where USER_ID = #{userId} + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml index 9f2d0c65f..ab627be18 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml @@ -218,4 +218,72 @@ WHERE FIND_IN_SET( #{deptId}, ALL_DEPT_IDS ) + + + update epmet_heart.volunteer_info + set DEL_FLAG = '1' + where USER_ID = #{userId} + + + + + + insert into epmet_heart.volunteer_info + ( + ID, + USER_ID, + CUSTOMER_ID, + VOLUNTEER_INTRODUCE, + VOLUNTEER_SIGNATURE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + GRID_ID, + PID, + PIDS, + GRID_NAME + ) + values + ( + #{id}, + #{userId}, + #{customerId}, + #{volunteerIntroduce}, + #{volunteerSignature}, + #{delFlag}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{gridId}, + #{pid}, + #{pids}, + #{gridName} + ) +