Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
80f1b4ee
Commit
80f1b4ee
authored
Apr 29, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:时间更改
parent
162ca75b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
19 deletions
+16
-19
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+10
-5
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+6
-14
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
80f1b4ee
...
...
@@ -357,15 +357,20 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
BeanUtils
.
copyProperties
(
staffPrivacyUseLogDTO
,
staffPrivacyUseLogBO
);
String
staffId
=
staffPrivacyUseLogDTO
.
getStaffId
();
if
(
StringUtils
.
isBlank
(
staffId
)
||
"-1"
.
equals
(
staffId
))
{
StaffPrivacyUseLogBO
privacyUseLogBO
=
staffPrivacyUseLogService
.
getByUserId
(
staffPrivacyUseLogDTO
.
getWxOpenUseId
());
if
(
privacyUseLogBO
==
null
)
{
staffPrivacyUseLogService
.
insert
(
staffPrivacyUseLogBO
);
String
wxOpenUseId
=
staffPrivacyUseLogDTO
.
getWxOpenUseId
();
StaffPrivacyUseLogBO
privacyUseLogBO
=
staffPrivacyUseLogService
.
getByUserId
(
wxOpenUseId
);
if
(
privacyUseLogBO
!=
null
)
{
log
.
info
(
"用户已经同意过隐私协议,wxOpenUseId:{}"
,
wxOpenUseId
);
return
;
}
staffPrivacyUseLogService
.
insert
(
staffPrivacyUseLogBO
);
}
else
{
StaffPrivacyUseLogBO
privacyUseLog
=
staffPrivacyUseLogService
.
getByStaffId
(
staffId
);
if
(
privacyUseLog
==
null
)
{
staffPrivacyUseLogService
.
insert
(
staffPrivacyUseLogBO
);
if
(
privacyUseLog
!=
null
)
{
log
.
info
(
"用户已经同意过隐私协议,staffId:{}"
,
staffId
);
return
;
}
staffPrivacyUseLogService
.
insert
(
staffPrivacyUseLogBO
);
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
80f1b4ee
...
...
@@ -130,8 +130,8 @@ public class WxEnterpriseInfoController extends WebBaseController {
if
(
loginStaff
==
null
)
{
WellDoneLoginInfoVO
wellDoneLoginInfoVo
=
new
WellDoneLoginInfoVO
();
wellDoneLoginInfoVo
.
setWxOpenUseId
(
userId
);
//
StaffPrivacyUseLogDTO staffPrivacyUseLogDTO = staffApiService.getStaffPrivacyByUserId(userId);
wellDoneLoginInfoVo
.
setPrivacyUseFlag
(
1
);
StaffPrivacyUseLogDTO
staffPrivacyUseLogDTO
=
staffApiService
.
getStaffPrivacyByUserId
(
userId
);
wellDoneLoginInfoVo
.
setPrivacyUseFlag
(
staffPrivacyUseLogDTO
==
null
?
0
:
1
);
wellDoneLoginInfoVo
.
setStaffId
(
"-1"
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
wellDoneLoginInfoVo
);
}
...
...
@@ -177,8 +177,8 @@ public class WxEnterpriseInfoController extends WebBaseController {
wellDoneLoginInfoVo
.
setPhoneNumber
(
loginStaff
.
getPhoneNumber
());
wellDoneLoginInfoVo
.
setNationcode
(
loginStaff
.
getNationCode
());
wellDoneLoginInfoVo
.
setWxUserId
(
loginStaff
.
getWxUserId
());
//
StaffPrivacyUseLogDTO staffPrivacyUseLogDTO = staffApiService.getStaffPrivacyByStaffId(staffId);
wellDoneLoginInfoVo
.
setPrivacyUseFlag
(
1
);
StaffPrivacyUseLogDTO
staffPrivacyUseLogDTO
=
staffApiService
.
getStaffPrivacyByStaffId
(
staffId
);
wellDoneLoginInfoVo
.
setPrivacyUseFlag
(
staffPrivacyUseLogDTO
==
null
?
0
:
1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
wellDoneLoginInfoVo
);
}
...
...
@@ -215,11 +215,6 @@ public class WxEnterpriseInfoController extends WebBaseController {
*/
private
RestResponse
<
String
>
wellDoneTouristsLogin
(
StaffLoginQO
staffLoginQO
,
HttpServletRequest
request
,
String
staffId
,
String
wxOpenUseId
)
{
logger
.
info
(
"游客登录,wxOpenUseId:{}"
,
wxOpenUseId
);
//登录和刷新token兼容
String
headerToken
=
AuthRequestWellDoneUtil
.
getHeaderToken
();
if
(
StringUtils
.
isNotBlank
(
headerToken
))
{
return
getRefreshTokenResult
(
getRefreshToken
());
}
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"staffId"
,
"-1"
);
map
.
put
(
"wxOpenUseId"
,
wxOpenUseId
);
...
...
@@ -274,11 +269,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
return
RestResponse
.
failure
(
String
.
valueOf
(
HaoBanErrCode
.
ERR_600002
.
getCode
()),
HaoBanErrCode
.
ERR_600002
.
getMsg
());
}
//登录和刷新token兼容
String
headerToken
=
AuthRequestWellDoneUtil
.
getHeaderToken
();
if
(
StringUtils
.
isNotBlank
(
headerToken
))
{
return
getRefreshTokenResult
(
getRefreshToken
());
}
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"staffId"
,
staffId
);
map
.
put
(
"wxEnterpriseId"
,
staffDTO
.
getWxEnterpriseId
());
...
...
@@ -291,6 +282,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
privacyUseLogDTO
.
setWxEnterpriseId
(
staffDTO
.
getWxEnterpriseId
());
privacyUseLogDTO
.
setPhoneNumber
(
phoneNumber
);
privacyUseLogDTO
.
setWxUserId
(
staffDTO
.
getWxUserId
());
privacyUseLogDTO
.
setWxOpenUseId
(
staffDTO
.
getWxOpenUseId
());
wxEnterpriseApiService
.
wellDoneLoginAddPrivacy
(
privacyUseLogDTO
);
return
RestResponse
.
successResult
(
token
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment