Commit 5b76aa85 by 墨竹

fix:登录bug修改

parent 2301b10a
...@@ -356,14 +356,14 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { ...@@ -356,14 +356,14 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
StaffPrivacyUseLogBO staffPrivacyUseLogBO = new StaffPrivacyUseLogBO(); StaffPrivacyUseLogBO staffPrivacyUseLogBO = new StaffPrivacyUseLogBO();
BeanUtils.copyProperties(staffPrivacyUseLogDTO, staffPrivacyUseLogBO); BeanUtils.copyProperties(staffPrivacyUseLogDTO, staffPrivacyUseLogBO);
String staffId = staffPrivacyUseLogDTO.getStaffId(); String staffId = staffPrivacyUseLogDTO.getStaffId();
if (!"-1".equals(staffId) || StringUtils.isNotBlank(staffId)) { if (StringUtils.isBlank(staffId) || "-1".equals(staffId)) {
StaffPrivacyUseLogBO privacyUseLog = staffPrivacyUseLogService.getByStaffId(staffId); StaffPrivacyUseLogBO privacyUseLogBO = staffPrivacyUseLogService.getByUserId(staffPrivacyUseLogDTO.getWxOpenUseId());
if (privacyUseLog == null) { if (privacyUseLogBO == null) {
staffPrivacyUseLogService.insert(staffPrivacyUseLogBO); staffPrivacyUseLogService.insert(staffPrivacyUseLogBO);
} }
} else { } else {
StaffPrivacyUseLogBO privacyUseLogBO = staffPrivacyUseLogService.getByUserId(staffPrivacyUseLogDTO.getWxOpenUseId()); StaffPrivacyUseLogBO privacyUseLog = staffPrivacyUseLogService.getByStaffId(staffId);
if (privacyUseLogBO == null) { if (privacyUseLog == null) {
staffPrivacyUseLogService.insert(staffPrivacyUseLogBO); staffPrivacyUseLogService.insert(staffPrivacyUseLogBO);
} }
} }
......
...@@ -133,7 +133,7 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -133,7 +133,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
StaffPrivacyUseLogDTO staffPrivacyUseLogDTO = staffApiService.getStaffPrivacyByUserId(userId); StaffPrivacyUseLogDTO staffPrivacyUseLogDTO = staffApiService.getStaffPrivacyByUserId(userId);
wellDoneLoginInfoVo.setPrivacyUseFlag(staffPrivacyUseLogDTO == null ? 0 : 1); wellDoneLoginInfoVo.setPrivacyUseFlag(staffPrivacyUseLogDTO == null ? 0 : 1);
wellDoneLoginInfoVo.setStaffId("-1"); wellDoneLoginInfoVo.setStaffId("-1");
return resultResponse(HaoBanErrCode.ERR_1,wellDoneLoginInfoVo); return resultResponse(HaoBanErrCode.ERR_1, wellDoneLoginInfoVo);
} }
if (StringUtils.isNotBlank(loginStaff.getPhoneNumber())) { if (StringUtils.isNotBlank(loginStaff.getPhoneNumber())) {
...@@ -197,7 +197,7 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -197,7 +197,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
String staffId = staffLoginQO.getStaffId(); String staffId = staffLoginQO.getStaffId();
String wxOpenUseId = staffLoginQO.getWxOpenUseId(); String wxOpenUseId = staffLoginQO.getWxOpenUseId();
//-1 代表游客登录 //-1 代表游客登录
if ("-1".equals(staffId) || StringUtils.isBlank(staffId)) { if (StringUtils.isBlank(staffId) || "-1".equals(staffId)) {
return wellDoneLoginPrivacy(staffLoginQO, request, staffId, wxOpenUseId); return wellDoneLoginPrivacy(staffLoginQO, request, staffId, wxOpenUseId);
} }
//用户登录 //用户登录
...@@ -206,6 +206,7 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -206,6 +206,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
/** /**
* 游客登录 * 游客登录
*
* @param staffLoginQO * @param staffLoginQO
* @param request * @param request
* @param staffId * @param staffId
...@@ -233,6 +234,7 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -233,6 +234,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
/** /**
* 刷新token * 刷新token
*
* @return * @return
*/ */
private RestResponse<String> getRefreshToken() { private RestResponse<String> getRefreshToken() {
...@@ -245,6 +247,7 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -245,6 +247,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
/** /**
* 用户登录 * 用户登录
*
* @param staffLoginQO * @param staffLoginQO
* @param request * @param request
* @param staffId * @param staffId
......
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