Commit e7666575 by fudahua

根据userId 伪登录

parent c27b5b51
......@@ -115,13 +115,28 @@ public class InfoController extends WebBaseController{
return resultResponse(HaoBanErrCode.ERR_600001);
}
if (StringUtils.isNotBlank(loginStaff.getPhoneNumber())) {
DictDTO loginPhoneNum = managerDictService.getSMSDict("app_login_phone_num", loginStaff.getPhoneNumber());
logger.info("伪登录:{}",loginStaff.getPhoneNumber(), JSONObject.toJSONString(loginPhoneNum));
if (null != loginPhoneNum) {
String midPhone = loginPhoneNum.getDictValue();
List<StaffDTO> staffDTOS = staffApiService.listByPhoneNumber(midPhone);
DictDTO loginUserId = managerDictService.getSMSDict("app_login_phone_num", loginStaff.getPhoneNumber());
logger.info("伪登录:{},userId:{}",loginStaff.getPhoneNumber(), JSONObject.toJSONString(loginUserId));
if (null != loginUserId) {
String wxUserId = loginUserId.getDictValue();
List<StaffDTO> staffDTOS = staffApiService.listByWxUserId(wxUserId);
if (CollectionUtils.isNotEmpty(staffDTOS)) {
loginStaff=staffDTOS.get(0);
if (staffDTOS.size() > 1) {
String dictName = loginUserId.getDictName();
String[] split = dictName.split("-");
if (split.length > 1) {
Integer pos = Integer.valueOf(split[1]);
if (pos != null && staffDTOS.size() > pos) {
loginStaff = staffDTOS.get(pos);
} else {
loginStaff = staffDTOS.get(0);
}
} else {
loginStaff = staffDTOS.get(0);
}
} else {
loginStaff = staffDTOS.get(0);
}
}
// StaffDTO staffDTO = staffApiService.selectByNationcodeAndPhoneNumber(enterprise.getWxEnterpriseId(), "86", midPhone);
// if (null !=staffDTO) {
......
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