diff --git a/epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java b/epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java index 886fb67bd0..fbc883c70f 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/GovLoginController.java @@ -38,7 +38,7 @@ public class GovLoginController { * @Date 2020/4/20 11:22 **/ @PostMapping(value = "/loginwxmp/loginbywxcode") - public Result loginByWxCode(GovWxmpFormDTO formDTO) { + public Result loginByWxCode(@RequestBody GovWxmpFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); return govLoginService.loginByWxCode(formDTO); } @@ -64,7 +64,7 @@ public class GovLoginController { * @Date 2020/4/18 21:14 **/ @PostMapping(value = "/loginwxmp/getmyorg") - public Result> getmyorg(StaffOrgsFormDTO formDTO) { + public Result> getmyorg(@RequestBody StaffOrgsFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); return govLoginService.getMyOrg(formDTO); } @@ -77,7 +77,7 @@ public class GovLoginController { * @Date 2020/4/20 13:07 **/ @PostMapping(value = "/loginwxmp/enterorg") - public Result enterOrg(GovWxmpEnteOrgFormDTO formDTO) { + public Result enterOrg(@RequestBody GovWxmpEnteOrgFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); return govLoginService.enterOrg(formDTO); } diff --git a/epmet-auth/src/main/java/com/epmet/dto/form/GovWxmpFormDTO.java b/epmet-auth/src/main/java/com/epmet/dto/form/GovWxmpFormDTO.java index 72c43cbfa7..4eb52a4bf7 100644 --- a/epmet-auth/src/main/java/com/epmet/dto/form/GovWxmpFormDTO.java +++ b/epmet-auth/src/main/java/com/epmet/dto/form/GovWxmpFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.form; import lombok.Data; import javax.validation.constraints.NotBlank; +import java.io.Serializable; /** * @Description 政府端小程序根据wxCode获取上一次登录信息,返回token @@ -10,7 +11,7 @@ import javax.validation.constraints.NotBlank; * @Date 2020/4/20 11:20 */ @Data -public class GovWxmpFormDTO extends LoginCommonFormDTO{ +public class GovWxmpFormDTO extends LoginCommonFormDTO implements Serializable { private static final long serialVersionUID = -207861963128774742L; /** * wxCode diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java index 2c0300a947..1d06b689fa 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java @@ -109,6 +109,7 @@ public class GovLoginServiceImpl implements GovLoginService { //2、验证码是否正确 String rightSmsCode = captchaRedis.getSmsCode(formDTO.getMobile()); if (!formDTO.getSmsCode().equals(rightSmsCode)) { + logger.error(String.format("验证码错误code[%s],msg[%s]",EpmetErrorCode.MOBILE_CODE_ERROR.getCode(),EpmetErrorCode.MOBILE_CODE_ERROR.getMsg())); return new Result>().error(EpmetErrorCode.MOBILE_CODE_ERROR.getCode()); } //3、查询用户所有的组织信息 diff --git a/epmet-commons/epmet-commons-tools-wx-ma/src/main/java/com/epmet/utils/WxMaServiceUtils.java b/epmet-commons/epmet-commons-tools-wx-ma/src/main/java/com/epmet/utils/WxMaServiceUtils.java index 8d7aaa463d..5122fa505f 100644 --- a/epmet-commons/epmet-commons-tools-wx-ma/src/main/java/com/epmet/utils/WxMaServiceUtils.java +++ b/epmet-commons/epmet-commons-tools-wx-ma/src/main/java/com/epmet/utils/WxMaServiceUtils.java @@ -17,10 +17,10 @@ public class WxMaServiceUtils { @Value("${wx.ma.appId.resi}") private String APPID_RESI; - /*@Value("${wx.ma.appId.gov}") + @Value("${wx.ma.appId.gov}") private String APPID_GOV; - @Value("${wx.ma.appId.oper}") + /*@Value("${wx.ma.appId.oper}") private String APPID_OPER;*/ /** @@ -43,8 +43,7 @@ public class WxMaServiceUtils { * @date 2020/03/13 10:44 */ public final WxMaService govWxMaService() { -// final WxMaService wxMaService = WxMaConfig.getMaService(APPID_GOV); - final WxMaService wxMaService = WxMaConfig.getMaService(APPID_RESI); + final WxMaService wxMaService = WxMaConfig.getMaService(APPID_GOV); return wxMaService; } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/RenExceptionHandler.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/RenExceptionHandler.java index b2936413d2..5a035ffa80 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/RenExceptionHandler.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/RenExceptionHandler.java @@ -53,7 +53,10 @@ public class RenExceptionHandler { @ExceptionHandler(RenException.class) public Result handleRRException(RenException ex){ logger.error(ExceptionUtils.getErrorStackTrace(ex)); - return new Result().error(); + Result result=new Result().error(); + result.setData(ex.getMsg()); + return result; +// return new Result().error(); } /** @@ -64,7 +67,10 @@ public class RenExceptionHandler { @ExceptionHandler(RuntimeException.class) public Result handleRuntimeException(RuntimeException ex){ logger.error(ExceptionUtils.getErrorStackTrace(ex)); - return new Result().error(); + Result result=new Result().error(); + result.setData(ex.getMessage()); + return result; +// return new Result().error(); } /** @@ -87,7 +93,10 @@ public class RenExceptionHandler { public Result handleException(Exception ex){ logger.error(ExceptionUtils.getErrorStackTrace(ex)); // saveLog(ex); - return new Result().error(); + Result result=new Result().error(); + result.setData(ex.getMessage()); + return result; +// return new Result().error(); } /** diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index d7f1d28a50..64cd74507d 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -293,8 +293,8 @@ epmet: - /resi/mine/** - /resi/group/** - /resi/partymember/** -# - /gov/mine/** -# - /gov/access/** + - /gov/mine/** + - /gov/access/** swaggerUrls: jwt: diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml index 08b3afb984..f3d3bad1da 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml @@ -7,7 +7,7 @@ @@ -16,7 +16,7 @@ select * from customer_staff cs where cs.MOBILE=#{mobile} and cs.CUSTOMER_ID=#{customerId} - and cs.DEL_FLAG='1' + and cs.DEL_FLAG='0'