From b59e2a1a9fd3cac489697db187de744049c5ea68 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 25 Aug 2020 16:03:22 +0800 Subject: [PATCH 1/3] =?UTF-8?q?third=E6=8E=A5=E5=8F=A3=20=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E5=AE=A2=E6=88=B7=E6=9F=A5=E8=AF=A2Token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/CommonCustomerIdAndSrcFormDTO.java | 33 +++++++++++++ .../dto/form/CommonCustomerIdFormDTO.java | 27 ++++++++++ .../AuthAccessTokenClientResultDTO.java | 26 ++++++++++ .../dto/result/CustomerTokensResultDTO.java | 41 ++++++++++++++++ .../com/epmet/constant/ModuleConstant.java | 4 ++ .../controller/PaCustomerController.java | 14 ++++++ .../com/epmet/dao/AuthorizationInfoDao.java | 9 ++++ .../epmet/dao/ComponentAccessTokenDao.java | 9 ++++ .../com/epmet/service/PaCustomerService.java | 21 ++++++++ .../service/impl/PaCustomerServiceImpl.java | 49 +++++++++++++++++++ .../resources/mapper/AuthorizationInfoDao.xml | 12 +++++ .../mapper/ComponentAccessTokenDao.xml | 11 +++++ 12 files changed, 256 insertions(+) create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdAndSrcFormDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdFormDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/AuthAccessTokenClientResultDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerTokensResultDTO.java diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdAndSrcFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdAndSrcFormDTO.java new file mode 100644 index 0000000000..080e7fcd8f --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdAndSrcFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 公众号客户删除入参DTO + * @NEI https://nei.netease.com/interface/detail/?pid=52285&id=323482 + * @ClassName CommonCustomerIdAndSrcFormDTO + * @Auth wangc + * @Date 2020-08-25 11:02 + */ +@Data +public class CommonCustomerIdAndSrcFormDTO implements Serializable { + private static final long serialVersionUID = -2945388338786885295L; + + public interface CustomerAndSrcGroup extends CustomerClientShowGroup{} + + /** + * 客户Id + * */ + @NotBlank(message = "客户Id不能为空",groups = CustomerAndSrcGroup.class) + private String customerId; + + /** + * 数据来源(dev:开发 test:体验 prod:生产) + * */ + @NotBlank(message = "数据来源不能为空",groups = CustomerAndSrcGroup.class) + private String source; +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdFormDTO.java new file mode 100644 index 0000000000..43860b8d8c --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 获取客户第三方token 入参DTO + * @NEI https://nei.netease.com/interface/detail/?pid=52285&id=323480 + * @ClassName CommonCustomerIdFormDTO + * @Auth wangc + * @Date 2020-08-25 10:57 + */ +@Data +public class CommonCustomerIdFormDTO implements Serializable { + private static final long serialVersionUID = 3160741101286756024L; + + public interface PaCustomerIdGroup extends CustomerClientShowGroup{} + + /** + * 客户Id + * */ + @NotBlank(message = "客户Id不能为空" , groups = PaCustomerIdGroup.class) + private String customerId; +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/AuthAccessTokenClientResultDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/AuthAccessTokenClientResultDTO.java new file mode 100644 index 0000000000..69b1c4abb1 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/AuthAccessTokenClientResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 授权accessToken和app端的查询返参 + * @ClassName AuthAccessTokenClientResultDTO + * @Auth wangc + * @Date 2020-08-25 13:41 + */ +@Data +public class AuthAccessTokenClientResultDTO implements Serializable { + private static final long serialVersionUID = -642465145534993509L; + + /** + * 客户端类型 + * */ + private String clientType; + + /** + * 调用令牌 + * */ + private String accessToken; +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerTokensResultDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerTokensResultDTO.java new file mode 100644 index 0000000000..212114a4cc --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerTokensResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @ClassName CustomerTokensResultDTO + * @Auth wangc + * @Date 2020-08-25 11:16 + */ +@Data +public class CustomerTokensResultDTO implements Serializable { + private static final long serialVersionUID = -6811282503588315365L; + + /** + * 客户Id + * */ + private String customerId = ""; + + /** + * 客户名称 + * */ + private String customerName = ""; + + /** + * 第三方token + * */ + private String componentAccessToken = ""; + + /** + * 授权方居民端token + * */ + private String resiAuthorizerToken = ""; + + /** + * 授权方工作端token + * */ + private String workAuthorizerToken = ""; +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java index 544e4da23e..4c1cec0015 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java @@ -116,5 +116,9 @@ public interface ModuleConstant { int EIGHTY_NINE_THOUSAND_AND_THREE = 89003; int EIGHTY_NINE_THOUSAND_AND_FOUR = 89004; + /** + * 数据来源 : 生产环境 + * */ + String SRC_PROD = "prod"; } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java index 13ad00fc9d..686985c317 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java @@ -192,5 +192,19 @@ public class PaCustomerController { return new Result().ok(pageData); } + /** + * @Description 获取客户第三方token + * @NEI https://nei.netease.com/interface/detail/req/?pid=52285&id=323480 + * @param param CommonCustomerIdFormDTO.class + * @return Result + * @author wangc + * @date 2020.08.25 15:39 + **/ + @PostMapping("tokenlist") + public Result tokenList(@RequestBody CommonCustomerIdFormDTO param){ + ValidatorUtils.validateEntity(param, CustomerUserFormDTO.CustomerIdGroup.class); + return new Result().ok(paCustomerService.tokenList(param)); + } + } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizationInfoDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizationInfoDao.java index b5c24edf2f..882a091b1b 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizationInfoDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizationInfoDao.java @@ -22,6 +22,7 @@ import com.epmet.dto.AuthorizationInfoDTO; import com.epmet.dto.form.AuthorizationInfoFormDTO; import com.epmet.dto.form.AuthorizerAccessTokenFormDTO; import com.epmet.dto.form.CustomerAccessTokenInfoFormDTO; +import com.epmet.dto.result.AuthAccessTokenClientResultDTO; import com.epmet.dto.result.AuthCodeResultDTO; import com.epmet.dto.result.CustomerAccessTokenInfoResultDTO; import com.epmet.dto.result.WillOverDueResultDTO; @@ -109,4 +110,12 @@ public interface AuthorizationInfoDao extends BaseDao { */ List getCustomerAccessTokenInfo(CustomerAccessTokenInfoFormDTO customerAccessTokenInfoFormDTO); + /** + * @Description 查询来源端对应的accessToken + * @param customerId + * @return List + * @author wangc + * @date 2020.08.25 15:24 + **/ + List selectClientToken(@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentAccessTokenDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentAccessTokenDao.java index 10a5710c6e..85a5bac687 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentAccessTokenDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentAccessTokenDao.java @@ -69,4 +69,13 @@ public interface ComponentAccessTokenDao extends BaseDao { * @return com.epmet.commons.tools.page.PageData */ PageData getCustomerList(UploadListFormDTO formDTO); + + /** + * @Description 获取客户第三方token + * @NEI https://nei.netease.com/interface/detail/res/?pid=52285&id=323480 + * @param param + * @return + * @author wangc + * @date 2020.08.25 14:51 + **/ + CustomerTokensResultDTO tokenList(CommonCustomerIdFormDTO param); + + /** + * @Description 公众号客户删除 + * @NEI https://nei.netease.com/interface/detail/?pid=52285&id=323482 + * @param token + * @param param + * @return + * @author wangc + * @date 2020.08.25 15:46 + **/ + void deletePublicCustomer(TokenDto token,CommonCustomerIdAndSrcFormDTO param); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java index c77f86e336..cf9f0666e7 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java @@ -31,6 +31,8 @@ import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.CpUserDetailRedis; +import com.epmet.constant.CodeConstant; +import com.epmet.constant.ModuleConstant; import com.epmet.constant.PaConstant; import com.epmet.dao.*; import com.epmet.dto.*; @@ -102,6 +104,8 @@ public class PaCustomerServiceImpl extends BaseServiceImpl page(Map params) { @@ -641,4 +645,49 @@ public class PaCustomerServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } + /** + * @Description 获取客户第三方token + * @NEI https://nei.netease.com/interface/detail/res/?pid=52285&id=323480 + * @param param + * @return + * @author wangc + * @date 2020.08.25 14:51 + **/ + @Override + public CustomerTokensResultDTO tokenList(CommonCustomerIdFormDTO param) { + CustomerTokensResultDTO result = new CustomerTokensResultDTO(); + String customerName = baseDao.selectCustomerName(param.getCustomerId()); + String componentAccessToken = componentAccessTokenDao.selectComponentAccessToken(); + List clientList = authorizationInfoDao.selectClientToken(param.getCustomerId()); + result.setCustomerId(param.getCustomerId()); + result.setComponentAccessToken(StringUtils.isBlank(componentAccessToken) ? "" : componentAccessToken); + result.setCustomerName(StringUtils.isBlank(customerName) ? "" : customerName); + if(null != clientList || !clientList.isEmpty()){ + clientList.forEach(client -> { + if(StringUtils.equals(CodeConstant.WORK,client.getClientType())){ + result.setWorkAuthorizerToken(client.getAccessToken()); + }else if(StringUtils.equals(CodeConstant.RESI,client.getClientType())){ + result.setResiAuthorizerToken(client.getAccessToken()); + } + }); + } + return result; + } + + /** + * @Description 公众号客户删除 + * @NEI https://nei.netease.com/interface/detail/?pid=52285&id=323482 + * @param token + * @param param + * @return + * @author wangc + * @date 2020.08.25 15:46 + **/ + @Override + public void deletePublicCustomer(TokenDto token , CommonCustomerIdAndSrcFormDTO param) { + if(StringUtils.equals(ModuleConstant.SRC_PROD,param.getSource())){ + logger.warn("有人试图删除用户生产数据,试图删除的客户Id:{},操作者Id:{}",param.getCustomerId(),token.getUserId()); + } + } + } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/AuthorizationInfoDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/AuthorizationInfoDao.xml index 61f441b6b8..c976e85ab8 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/AuthorizationInfoDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/AuthorizationInfoDao.xml @@ -121,4 +121,16 @@ + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ComponentAccessTokenDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ComponentAccessTokenDao.xml index 3642c1d768..98d52d60b8 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ComponentAccessTokenDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ComponentAccessTokenDao.xml @@ -48,4 +48,15 @@ AND (UNIX_TIMESTAMP(expires_in_time) - UNIX_TIMESTAMP(NOW())) 900 + + \ No newline at end of file From c2943a450dacbdca8bdf41162330e2bcd0a786f0 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 26 Aug 2020 10:29:24 +0800 Subject: [PATCH 2/3] clearCustomerInfo --- .../java/com/epmet/dao/PaCustomerDao.java | 2 + .../main/resources/mapper/PaCustomerDao.xml | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java index 8a5e04675c..9707535c8b 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java @@ -102,4 +102,6 @@ public interface PaCustomerDao extends BaseDao { * @Description 查询客户及管理员信息 */ CustomerAndUserResultDTO selectCustomerAndUser(@Param("customerId") String customerId); + + void clearCustomerInfo(@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml index 40d5efbc3a..70c434194a 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml @@ -146,4 +146,41 @@ AND id = #{oldCustomerId} + + + DELETE FROM auth_code WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM auth_result_record WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM authorization_info WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM binding_account WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM business_info WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM code_audit_record WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM code_audit_result WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM code_customer WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM code_operation_history WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM customer_mp WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM func_info WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM mini_category_info WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM mini_info WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM mini_network_info WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM open_platform_account WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM pa_customer_agency WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM pa_customer_user_agency WHERE CUSTOMER_ID = #{customerId}; + + \ No newline at end of file From 6cca1a5cf83a4a0bfd64d10f67dd8f93d6d9b1ff Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 26 Aug 2020 13:55:19 +0800 Subject: [PATCH 3/3] =?UTF-8?q?third=E6=8E=A5=E5=8F=A3=20=201=E3=80=81?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=AE=A2=E6=88=B7=E7=9A=84tokenList=20=20=20?= =?UTF-8?q?2=E3=80=81=E6=B8=85=E9=99=A4=E5=AE=A2=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/CommonCustomerIdAndSrcFormDTO.java | 3 +++ .../epmet/controller/PaCustomerController.java | 16 ++++++++++++++++ .../main/java/com/epmet/dao/PaCustomerDao.java | 18 +++++++++++++++++- .../com/epmet/service/PaCustomerService.java | 3 +-- .../service/impl/PaCustomerServiceImpl.java | 13 ++++++++++--- .../resources/mapper/AuthorizationInfoDao.xml | 2 +- .../main/resources/mapper/PaCustomerDao.xml | 13 +++++++++++++ 7 files changed, 61 insertions(+), 7 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdAndSrcFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdAndSrcFormDTO.java index 080e7fcd8f..56b920d911 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdAndSrcFormDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CommonCustomerIdAndSrcFormDTO.java @@ -30,4 +30,7 @@ public class CommonCustomerIdAndSrcFormDTO implements Serializable { * */ @NotBlank(message = "数据来源不能为空",groups = CustomerAndSrcGroup.class) private String source; + + @NotBlank(message = "用户Id不能为空",groups = CustomerAndSrcGroup.class) + private String userId; } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java index 686985c317..de5cc61d7a 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java @@ -206,5 +206,21 @@ public class PaCustomerController { return new Result().ok(paCustomerService.tokenList(param)); } + /** + * @Description 公众号客户删除 + * @NEI https://nei.netease.com/interface/detail/?pid=52285&id=323482 + * @param token + * @param param + * @return + * @author wangc + * @date 2020.08.25 15:46 + **/ + @PostMapping("deletepubliccustomer") + public Result deletePublicCustomer(@LoginUser TokenDto token , @RequestBody CommonCustomerIdAndSrcFormDTO param){ + param.setUserId(token.getUserId()); + ValidatorUtils.validateEntity(param, CommonCustomerIdAndSrcFormDTO.CustomerAndSrcGroup.class); + paCustomerService.clearPublicCustomer(param); + return new Result(); + } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java index 9707535c8b..573ad48cf3 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java @@ -102,6 +102,22 @@ public interface PaCustomerDao extends BaseDao { * @Description 查询客户及管理员信息 */ CustomerAndUserResultDTO selectCustomerAndUser(@Param("customerId") String customerId); - + + /** + * @Description 清除第三方库中客户的信息 + * @param customerId + * @return + * @author wangc + * @date 2020.08.26 10:44 + **/ void clearCustomerInfo(@Param("customerId") String customerId); + + /** + * @Description 根据客户Id查询当前客户的来源 + * @param customerId + * @return + * @author wangc + * @date 2020.08.26 10:59 + **/ + String selectSourceById(@Param("customerId") String customerId,@Param("source") String source); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java index 8ea82c19de..a1b30bd255 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java @@ -227,11 +227,10 @@ public interface PaCustomerService extends BaseService { /** * @Description 公众号客户删除 * @NEI https://nei.netease.com/interface/detail/?pid=52285&id=323482 - * @param token * @param param * @return * @author wangc * @date 2020.08.25 15:46 **/ - void deletePublicCustomer(TokenDto token,CommonCustomerIdAndSrcFormDTO param); + void clearPublicCustomer(CommonCustomerIdAndSrcFormDTO param); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java index cf9f0666e7..5b683027b5 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java @@ -677,17 +677,24 @@ public class PaCustomerServiceImpl extends BaseServiceImpl SELECT CLIENT_TYPE, - AUTHORIZER_ACCESS_TOKEN + AUTHORIZER_ACCESS_TOKEN AS accessToken FROM authorization_info WHERE diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml index 70c434194a..11d1b50262 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml @@ -181,6 +181,19 @@ DELETE FROM pa_customer_agency WHERE CUSTOMER_ID = #{customerId}; DELETE FROM pa_customer_user_agency WHERE CUSTOMER_ID = #{customerId}; + + DELETE FROM pa_customer WHERE ID = #{customerId}; + + \ No newline at end of file