From e15c96abd43c6d7ab0639cb83fc8d99bc3a27035 Mon Sep 17 00:00:00 2001 From: wanggeng888 <450292408@qq.com> Date: Sun, 2 May 2021 16:24:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/official/account/RegisterWechatController.java | 2 +- .../account/IOfficialAccountRegisterService.java | 3 ++- .../impl/OfficialAccountRegisterServiceImpl.java | 10 +++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/register-wechat/src/main/java/ink/wgink/register/wechat/controller/app/api/official/account/RegisterWechatController.java b/register-wechat/src/main/java/ink/wgink/register/wechat/controller/app/api/official/account/RegisterWechatController.java index fca100ff..3a15159e 100644 --- a/register-wechat/src/main/java/ink/wgink/register/wechat/controller/app/api/official/account/RegisterWechatController.java +++ b/register-wechat/src/main/java/ink/wgink/register/wechat/controller/app/api/official/account/RegisterWechatController.java @@ -41,7 +41,7 @@ public class RegisterWechatController extends DefaultBaseController { @Autowired private IOfficialAccountRegisterService officialAccountRegisterService; - @ApiOperation(value = "手机注册", notes = "手机注册,手机 + 短信验证码接口") + @ApiOperation(value = "手机注册", notes = "手机注册,手机 + 用户验证码注册接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("phone") @CheckRequestBodyAnnotation diff --git a/register-wechat/src/main/java/ink/wgink/register/wechat/service/official/account/IOfficialAccountRegisterService.java b/register-wechat/src/main/java/ink/wgink/register/wechat/service/official/account/IOfficialAccountRegisterService.java index 29263ee4..47e4f61d 100644 --- a/register-wechat/src/main/java/ink/wgink/register/wechat/service/official/account/IOfficialAccountRegisterService.java +++ b/register-wechat/src/main/java/ink/wgink/register/wechat/service/official/account/IOfficialAccountRegisterService.java @@ -21,6 +21,7 @@ public interface IOfficialAccountRegisterService { * * @param officialAccountRegisterPhoneVO * @param params + * @throws Exception */ - void phoneRegister(OfficialAccountRegisterPhoneVO officialAccountRegisterPhoneVO, Map params); + void phoneRegister(OfficialAccountRegisterPhoneVO officialAccountRegisterPhoneVO, Map params) throws Exception; } diff --git a/register-wechat/src/main/java/ink/wgink/register/wechat/service/official/account/impl/OfficialAccountRegisterServiceImpl.java b/register-wechat/src/main/java/ink/wgink/register/wechat/service/official/account/impl/OfficialAccountRegisterServiceImpl.java index bf356379..6c2a245f 100644 --- a/register-wechat/src/main/java/ink/wgink/register/wechat/service/official/account/impl/OfficialAccountRegisterServiceImpl.java +++ b/register-wechat/src/main/java/ink/wgink/register/wechat/service/official/account/impl/OfficialAccountRegisterServiceImpl.java @@ -3,8 +3,7 @@ package ink.wgink.register.wechat.service.official.account.impl; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.SearchException; import ink.wgink.exceptions.UpdateException; -import ink.wgink.interfaces.consts.ISystemConstant; -import ink.wgink.module.wechat.pojo.dtos.official.account.OfficialAccountUserDTO; +import ink.wgink.interfaces.expand.register.IRegisterHandlerService; import ink.wgink.module.wechat.pojo.pos.official.account.OfficialAccountUserPO; import ink.wgink.module.wechat.service.official.account.IOfficialAccountUserService; import ink.wgink.register.wechat.service.miniapp.OfficialAccountRegisterPhoneVO; @@ -29,13 +28,15 @@ import java.util.Map; @Service public class OfficialAccountRegisterServiceImpl extends DefaultBaseService implements IOfficialAccountRegisterService { + @Autowired(required = false) + private IRegisterHandlerService registerHandler; @Autowired private IUserService userService; @Autowired private IOfficialAccountUserService officialAccountUserService; @Override - public void phoneRegister(OfficialAccountRegisterPhoneVO officialAccountRegisterPhoneVO, Map params) { + public void phoneRegister(OfficialAccountRegisterPhoneVO officialAccountRegisterPhoneVO, Map params) throws Exception { OfficialAccountUserPO officialAccountUserPO = officialAccountUserService.getPOByUserCode(officialAccountRegisterPhoneVO.getUserCode()); if (officialAccountUserPO == null) { throw new SearchException("验证码错误"); @@ -50,6 +51,9 @@ public class OfficialAccountRegisterServiceImpl extends DefaultBaseService imple userService.updateUsername(officialAccountUserPO.getUserId(), updateUsernameVO); // 修改初始账号标识 officialAccountUserService.updateIsInitAccount(officialAccountUserPO.getOpenId(), 0); + if (registerHandler == null) { + registerHandler.handler(officialAccountUserPO.getUserId(), params); + } }