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
6f1df7f3
Commit
6f1df7f3
authored
Oct 10, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_xgh_pendingid' into 'developer'
Master xgh pendingid See merge request
!308
parents
4227a154
e9e00205
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
StaffDepartmentRelatedServiceImpl.java
...rvice/service/impl/StaffDepartmentRelatedServiceImpl.java
+5
-0
QwTimesUtils.java
...java/com/gic/haoban/manage/service/util/QwTimesUtils.java
+4
-4
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffDepartmentRelatedServiceImpl.java
View file @
6f1df7f3
...
...
@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.common.utils.DingUtils
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.SecretSettingDTO
;
...
...
@@ -132,6 +133,7 @@ public class StaffDepartmentRelatedServiceImpl implements StaffDepartmentRelated
List
<
String
>
list
=
this
.
mapper
.
listNoDepartStaff
(
wxEnterpriseId
,
addDate
)
;
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
logger
.
info
(
"修复成员部门,成员数={}"
,
list
.
size
());
DingUtils
.
send
(
"修复成员部门信息,数量="
+
list
.
size
(),
false
);
for
(
String
staffId
:
list
)
{
this
.
repairStaffDepart
(
staffId
);
}
...
...
@@ -144,6 +146,9 @@ public class StaffDepartmentRelatedServiceImpl implements StaffDepartmentRelated
TabHaobanStaff
staff
=
this
.
staffMapper
.
selectByPrimaryKey
(
staffId
)
;
String
wxEnterpriseId
=
staff
.
getWxEnterpriseId
()
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
if
(
null
==
qwDTO
)
{
return
;
}
String
wxUserId
=
staff
.
getWxUserId
()
;
if
(
qwDTO
.
needOpenUserIdDk
())
{
wxUserId
=
staff
.
getWxOpenUseId
()
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/QwTimesUtils.java
View file @
6f1df7f3
...
...
@@ -62,7 +62,7 @@ public class QwTimesUtils {
public
static
boolean
isLimit
(
String
wxEnterpriseId
,
String
enterpriseId
,
QwInterfaceLimitEnum
qwInterface
)
{
QwLimitTimesBO
setTimeBO
=
getSettingTimes
(
wxEnterpriseId
,
qwInterface
);
logger
.
info
(
"获取配置次数={},wxEnterpriseId={}
"
,
JSON
.
toJSONString
(
setTimeBO
),
wxE
nterpriseId
);
logger
.
info
(
"获取配置次数={},wxEnterpriseId={}
,{}"
,
JSON
.
toJSONString
(
setTimeBO
),
wxEnterpriseId
,
e
nterpriseId
);
// 先判断月
String
interfaceName
=
qwInterface
.
getName
();
Date
now
=
new
Date
();
...
...
@@ -70,21 +70,21 @@ public class QwTimesUtils {
String
keyMonth
=
getCacheKey
(
wxEnterpriseId
,
interfaceName
,
dateStr
.
substring
(
0
,
6
));
boolean
monthResult
=
timesCheck
(
1
,
keyMonth
,
qwInterface
,
wxEnterpriseId
,
enterpriseId
,
now
,
setTimeBO
);
if
(
monthResult
)
{
logger
.
info
(
"月达到限制={}
"
,
keyMonth
);
logger
.
info
(
"月达到限制={}
,{}"
,
keyMonth
,
enterpriseId
);
return
true
;
}
// 天
String
keyDay
=
getCacheKey
(
wxEnterpriseId
,
interfaceName
,
dateStr
.
substring
(
0
,
8
));
boolean
dayResult
=
timesCheck
(
2
,
keyDay
,
qwInterface
,
wxEnterpriseId
,
enterpriseId
,
now
,
setTimeBO
);
if
(
dayResult
)
{
logger
.
info
(
"天达到限制={}
"
,
keyDay
);
logger
.
info
(
"天达到限制={}
,{}"
,
keyDay
,
enterpriseId
);
return
true
;
}
// 小时
String
keyHour
=
getCacheKey
(
wxEnterpriseId
,
interfaceName
,
dateStr
.
substring
(
0
,
10
));
boolean
hourResult
=
timesCheck
(
3
,
keyHour
,
qwInterface
,
wxEnterpriseId
,
enterpriseId
,
now
,
setTimeBO
);
if
(
hourResult
)
{
logger
.
info
(
"小时达到限制={}
"
,
keyHour
);
logger
.
info
(
"小时达到限制={}
,{}"
,
keyHour
,
enterpriseId
);
return
true
;
}
return
false
;
...
...
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