Commit 0b8048af by 徐高华

Merge branch 'master_xgh_待开发调整711' into 'developer'

无手机号伪登录

See merge request !180
parents 51fa397b f86f3edb
...@@ -5,7 +5,9 @@ package com.gic.haoban.manage.api.enums; ...@@ -5,7 +5,9 @@ package com.gic.haoban.manage.api.enums;
*/ */
public enum SecretTypeEnum { public enum SecretTypeEnum {
CONTACT_CUSTOMER(1, "顾客联系"), CONTACT_CUSTOMER(1, "顾客联系"),
// 2和3废弃
CONTACT_SECRET(2, "通讯录"), CONTACT_SECRET(2, "通讯录"),
// 3和5公用
HAOBAN_HELP(3, "好办助手"), HAOBAN_HELP(3, "好办助手"),
MEMBER_WAPP(4, "会员小程序"), MEMBER_WAPP(4, "会员小程序"),
CUSTOMIZED_APP(5, "自建代开发"), CUSTOMIZED_APP(5, "自建代开发"),
......
...@@ -135,11 +135,14 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -135,11 +135,14 @@ public class WxEnterpriseInfoController extends WebBaseController {
return resultResponse(HaoBanErrCode.ERR_1, wellDoneLoginInfoVo); return resultResponse(HaoBanErrCode.ERR_1, wellDoneLoginInfoVo);
} }
if (StringUtils.isNotBlank(loginStaff.getPhoneNumber())) { if (StringUtils.isNotBlank(loginStaff.getPhoneNumber()) || StringUtils.isNotBlank(loginStaff.getWxOpenUseId())) {
DictDTO loginUserId = managerDictService.getSMSDict("app_login_phone_num", loginStaff.getPhoneNumber()); DictDTO loginUserDict = managerDictService.getSMSDict("app_login_phone_num", loginStaff.getPhoneNumber());
logger.info("伪登录:{},userId:{}", loginStaff.getPhoneNumber(), JSONObject.toJSONString(loginUserId)); if(null == loginUserDict) {
if (null != loginUserId) { loginUserDict = managerDictService.getSMSDict("app_login_phone_num", loginStaff.getWxOpenUseId());
String dictValue = loginUserId.getDictValue(); }
logger.info("伪登录:{}userId:{},loginUser={}", loginStaff.getPhoneNumber(),loginStaff.getWxOpenUseId(), JSONObject.toJSONString(loginUserDict));
if (null != loginUserDict) {
String dictValue = loginUserDict.getDictValue();
List<StaffDTO> staffDTOS = new ArrayList<>(); List<StaffDTO> staffDTOS = new ArrayList<>();
List<StaffDTO> phoneDtos = staffApiService.listByPhoneNumber(dictValue); List<StaffDTO> phoneDtos = staffApiService.listByPhoneNumber(dictValue);
List<StaffDTO> userDtos = staffApiService.listByWxUserId(dictValue,loginStaff.getWxEnterpriseId()); List<StaffDTO> userDtos = staffApiService.listByWxUserId(dictValue,loginStaff.getWxEnterpriseId());
...@@ -151,7 +154,7 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -151,7 +154,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
} }
if (CollectionUtils.isNotEmpty(staffDTOS)) { if (CollectionUtils.isNotEmpty(staffDTOS)) {
if (staffDTOS.size() > 1) { if (staffDTOS.size() > 1) {
String dictName = loginUserId.getDictName(); String dictName = loginUserDict.getDictName();
loginStaff = staffDTOS.stream().filter(staffDTO -> dictName.indexOf(staffDTO.getWxEnterpriseId()) > 0).findFirst().orElse(loginStaff); loginStaff = staffDTOS.stream().filter(staffDTO -> dictName.indexOf(staffDTO.getWxEnterpriseId()) > 0).findFirst().orElse(loginStaff);
} else { } else {
loginStaff = staffDTOS.get(0); loginStaff = staffDTOS.get(0);
...@@ -228,13 +231,6 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -228,13 +231,6 @@ public class WxEnterpriseInfoController extends WebBaseController {
} }
private RestResponse<String> getRefreshTokenResult(String refreshToken) {
if (StringUtils.isBlank(refreshToken)) {
return RestResponse.failure(String.valueOf(HaoBanErrCode.ERR_30010.getCode()), HaoBanErrCode.ERR_30010.getMsg());
}
return RestResponse.successResult(refreshToken);
}
/** /**
* 刷新token * 刷新token
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment