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
d2a24d54
Commit
d2a24d54
authored
May 28, 2021
by
bilingfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : 新增一个测试使用删除缓存接口
parent
5488be04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
+30
-4
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+30
-4
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
d2a24d54
...
...
@@ -401,13 +401,40 @@ public class ClerkController extends WebBaseController{
audit
.
setCommitTime
(
new
Date
());
audit
.
setAuditType
(
AuditType
.
CLERK_DEL
.
getCode
());
auditApiService
.
insert
(
audit
);
syncHaobanToGicServiceApi
.
delGicClerk
(
clerkId
);
}
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 删除设置主门店和刷新微信好友的缓存限制
*
* @param staffId : 关联标识
* @param dateTime : 时间, 13位时间戳
* @param type : 类型, 1 : 主门店, 2 : 刷新微信好友
*/
@RequestMapping
(
"/delCache"
)
public
void
deleteCache
(
String
staffId
,
Long
dateTime
,
Integer
type
)
{
if
(
StringUtils
.
isBlank
(
staffId
)
||
dateTime
==
null
||
type
==
null
)
{
return
;
}
String
yyyyMM
=
DateUtil
.
dateToStr
(
new
Date
(
dateTime
),
"yyyyMM"
);
String
key
=
null
;
//设置主门店缓存
if
(
Objects
.
equals
(
type
,
1
))
{
key
=
"haoban_set_main_store_"
+
yyyyMM
+
staffId
;
}
if
(
Objects
.
equals
(
type
,
2
))
{
key
=
"haoban_fresh_wx_friend"
+
yyyyMM
+
staffId
;
}
if
(
StringUtils
.
isBlank
(
key
))
{
return
;
}
RedisUtil
.
delCache
(
key
);
}
//设置主导购
...
...
@@ -445,8 +472,6 @@ public class ClerkController extends WebBaseController{
logger
.
info
(
"次数超出限制:{}"
,
staffId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_10011
);
}
RedisUtil
.
setCache
(
key
,
count
+
1
,
31
*
24
*
60
*
60L
);
if
(
flushType
==
0
)
{
String
taskName
=
"刷新企业微信好友("
+
staff
.
getStaffName
()+
")"
;
String
taskId
=
dealSyncOperationApiService
.
createWxFriendTaskSingle
(
wxEnterpriseId
,
taskName
,
staffId
,
staff
.
getStaffName
(),
SyncTaskTypeEnum
.
FRIEND_SINGLE
.
getType
());
...
...
@@ -464,6 +489,7 @@ public class ClerkController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_10022
);
}
}
RedisUtil
.
setCache
(
key
,
count
+
1
,
31
*
24
*
60
*
60L
);
//刷新状态变更
clerkMainStoreRelatedApiService
.
setFreshFriend
(
wxEnterpriseId
,
staffId
);
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