server/system_gateway/src/main/java/com/doumee/api/gateway/JwtAuthController.java
@@ -151,7 +151,6 @@ return ApiResponse.failed(ResponseStatus.SERVER_ERROR); } } @PreventRepeat(limit = 10, lockTime = 10000) @ApiOperation("司机验证码登录") @PostMapping("/loginDriverWithCode") @LoginNoRequired server/system_service/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java
@@ -35,6 +35,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -58,8 +59,10 @@ private MemberMapper memberMapper; @Autowired private SystemDictDataBiz systemDictDataBiz; @Lazy @Autowired private SystemUserMapper systemUserMapper; @Lazy @Autowired private SmsEmailMapper smsEmailMapper; @@ -74,9 +77,10 @@ @Lazy @Autowired private SystemPermissionService systemPermissionService; @Lazy @Autowired private CaptchaService captchaService; @Lazy @Autowired private SystemLoginLogService systemLoginLogService; @@ -411,6 +415,7 @@ } @Override @Transactional public LoginUserInfo loginDriverWithCode(LoginPhoneDTO param, ServerHttpRequest request) { isCaptcheValide(param.getPhone(),param.getCode());//检查验证码 @@ -458,6 +463,10 @@ systemUser.setSource(Constants.TWO); systemUser.setOpenid(param.getOpenid()); systemUserMapper.insert(systemUser); }else{ if(!Constants.equalsInteger(systemUser.getType(),Constants.memberType.driver)){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,请使用正确的司机账号登陆!"); } } dealOpenIdBiz(systemUser,param.getOpenid()); @@ -465,7 +474,7 @@ if(Objects.nonNull(systemUser.getCompanyId())){ company = companyMapper.selectById(systemUser.getCompanyId()); } LoginUserInfo userInfo = LoginUserInfo.from(systemUser, null, null,null,null); LoginUserInfo userInfo = LoginUserInfo.from(systemUser, null, null,company,null); return userInfo; } server/system_service/src/main/resources/mappers/SystemUserMapper.xml
@@ -69,14 +69,8 @@ <if test="dto.memberType != null "> AND usr.`type` = #{dto.memberType} </if> <if test="dto.memberType != null "> AND usr.`type` = #{dto.memberType} </if> <if test="dto.workStatus != null "> AND m.WORK_STATUS = #{dto.workStatus} </if> <if test="dto.memberType != null "> AND m.`type` = #{dto.memberType} </if> <if test="dto.companyId != null "> AND usr.COMPANY_ID = #{dto.companyId} server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/TmsServiceImpl.java
@@ -264,7 +264,7 @@ url = "http://10.163.4.56:8088"+TMSContants.InterfacePath.driverStart[0]; TmsBaseResponse<TmsDriveTaskInfoResponse > response = sendHttpRequest(url,TMSContants.InterfacePath.driverStart[1],JSONObject.toJSONString(param) ,new TypeReference< TmsBaseResponse<TmsDriveTaskInfoResponse>>(){}); if(response ==null || response.getData() == null || !StringUtils.equals(response.getCode(),"0")){ if(response ==null || !StringUtils.equals(response.getCode(),"0")){ throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,任务到货提交失败,请稍后重试!"); } return true; @@ -286,7 +286,7 @@ url = "http://10.163.4.56:8088"+TMSContants.InterfacePath.driverArrival[0]; TmsBaseResponse<TmsDriveTaskInfoResponse > response = sendHttpRequest(url,TMSContants.InterfacePath.driverArrival[1],JSONObject.toJSONString(param) ,new TypeReference< TmsBaseResponse<TmsDriveTaskInfoResponse>>(){}); if(response ==null || response.getData() == null ||!StringUtils.equals(response.getCode(),"0")){ if(response ==null ||!StringUtils.equals(response.getCode(),"0")){ throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,任务到货提交失败,请稍后重试!"); } return true;