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
c2cb8914
Commit
c2cb8914
authored
Nov 20, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
52f96f2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
WxEnterpriseController.java
.../haoban/manage/web/controller/WxEnterpriseController.java
+12
-2
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseController.java
View file @
c2cb8914
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import
com.alibaba.druid.util.StringUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.enterprise.api.dto.EnterpriseAndUserDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
...
...
@@ -509,13 +510,22 @@ public class WxEnterpriseController extends WebBaseController{
/**
* 刷新企业微信好友
* @param enterpriseId
* @return
*/
@RequestMapping
(
"/fresh-wx-friend"
)
public
HaobanResponse
freshWxFriend
(
Integer
enterpriseId
){
public
HaobanResponse
freshWxFriend
(){
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
String
dayKey
=
"haoban_fresh-wx-friend-day"
+
wxEnterpriseId
+
DateUtil
.
dateToStr
(
new
Date
(),
"yyyy-MM-dd"
);
String
monthKey
=
"haoban_fresh-wx-friend-month"
+
wxEnterpriseId
+
DateUtil
.
dateToStr
(
new
Date
(),
"yyyy-MM"
);
Integer
dayCount
=
RedisUtil
.
getCache
(
dayKey
)
==
null
?
0
:
Integer
.
parseInt
(
RedisUtil
.
getCache
(
dayKey
).
toString
());
Integer
monthCount
=
RedisUtil
.
getCache
(
monthKey
)
==
null
?
0
:
Integer
.
parseInt
(
RedisUtil
.
getCache
(
monthKey
).
toString
());
if
(
dayCount
>=
1
){
return
resultResponse
(
HaoBanErrCode
.
ERR_0
,
"一天只能刷新1次"
);
}
if
(
monthCount
>=
3
){
return
resultResponse
(
HaoBanErrCode
.
ERR_0
,
"一个月只能刷新3次"
);
}
String
taskId
=
dealSyncOperationApiService
.
createWxFriendTask
(
wxEnterpriseId
,
"刷新企微好友"
,
login
.
getStaffDTO
().
getStaffId
(),
"刷新企微好友"
);
dealSyncOperationApiService
.
dealWxFriendClerk
(
taskId
,
wxEnterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
...
...
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