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
38832c88
Commit
38832c88
authored
Oct 08, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api
parent
68252e17
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
3 deletions
+34
-3
QwFriendApiService.java
...com/gic/haoban/manage/api/service/QwFriendApiService.java
+1
-0
QwFriendApiServiceImpl.java
...nage/service/service/out/impl/QwFriendApiServiceImpl.java
+5
-0
QwTimesUtils.java
...java/com/gic/haoban/manage/service/util/QwTimesUtils.java
+21
-0
TestController.java
.../com/gic/haoban/manage/web/controller/TestController.java
+6
-2
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/QwFriendApiService.java
View file @
38832c88
...
@@ -68,4 +68,5 @@ public interface QwFriendApiService {
...
@@ -68,4 +68,5 @@ public interface QwFriendApiService {
public
ServiceResponse
<
List
<
QwPendingIdDTO
>>
listPendingIdByExternalid
(
String
enterpriseId
,
public
ServiceResponse
<
List
<
QwPendingIdDTO
>>
listPendingIdByExternalid
(
String
enterpriseId
,
List
<
String
>
externalUserIdList
);
List
<
String
>
externalUserIdList
);
public
ServiceResponse
<
Object
>
getTestTimes
(
String
wxEnterpriseId
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/QwFriendApiServiceImpl.java
View file @
38832c88
...
@@ -193,5 +193,10 @@ public class QwFriendApiServiceImpl implements QwFriendApiService {
...
@@ -193,5 +193,10 @@ public class QwFriendApiServiceImpl implements QwFriendApiService {
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
return
ServiceResponse
.
success
(
qwDTO
);
return
ServiceResponse
.
success
(
qwDTO
);
}
}
@Override
public
ServiceResponse
<
Object
>
getTestTimes
(
String
wxEnterpriseId
)
{
return
ServiceResponse
.
success
(
QwTimesUtils
.
getTestTimes
(
wxEnterpriseId
));
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/QwTimesUtils.java
View file @
38832c88
package
com
.
gic
.
haoban
.
manage
.
service
.
util
;
package
com
.
gic
.
haoban
.
manage
.
service
.
util
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -39,6 +40,26 @@ public class QwTimesUtils {
...
@@ -39,6 +40,26 @@ public class QwTimesUtils {
QwTimesUtils
.
enterpriseService
=
enterpriseService
;
QwTimesUtils
.
enterpriseService
=
enterpriseService
;
}
}
public
static
Map
<
String
,
Object
>
getTestTimes
(
String
wxEnterpriseId
)
{
QwInterfaceLimitEnum
qwInterface
=
QwInterfaceLimitEnum
.
GET_PENDING_ID
;
Date
now
=
new
Date
();
String
dateStr
=
getDateStr
(
now
);
String
interfaceName
=
qwInterface
.
getName
();
String
keyMonth
=
getCacheKey
(
wxEnterpriseId
,
interfaceName
,
dateStr
.
substring
(
0
,
6
));
Integer
doneTimesMonth
=
RedisUtil
.
getCache
(
keyMonth
,
Integer
.
class
);
String
keyDay
=
getCacheKey
(
wxEnterpriseId
,
interfaceName
,
dateStr
.
substring
(
0
,
8
));
Integer
doneTimesDay
=
RedisUtil
.
getCache
(
keyDay
,
Integer
.
class
);
String
keyHour
=
getCacheKey
(
wxEnterpriseId
,
interfaceName
,
dateStr
.
substring
(
0
,
10
));
Integer
doneTimesHour
=
RedisUtil
.
getCache
(
keyHour
,
Integer
.
class
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>()
;
map
.
put
(
"小时调用数"
,
doneTimesHour
)
;
map
.
put
(
"每天调用数"
,
doneTimesDay
)
;
map
.
put
(
"每月调用数"
,
doneTimesMonth
)
;
QwLimitTimesBO
setTimeBO
=
getSettingTimes
(
wxEnterpriseId
,
qwInterface
);
map
.
put
(
"配置数"
,
JSON
.
toJSON
(
setTimeBO
))
;
return
map
;
}
public
static
boolean
isLimit
(
String
wxEnterpriseId
,
String
enterpriseId
,
QwInterfaceLimitEnum
qwInterface
)
{
public
static
boolean
isLimit
(
String
wxEnterpriseId
,
String
enterpriseId
,
QwInterfaceLimitEnum
qwInterface
)
{
QwLimitTimesBO
setTimeBO
=
getSettingTimes
(
wxEnterpriseId
,
qwInterface
);
QwLimitTimesBO
setTimeBO
=
getSettingTimes
(
wxEnterpriseId
,
qwInterface
);
logger
.
info
(
"获取配置次数={},wxEnterpriseId={}"
,
JSON
.
toJSONString
(
setTimeBO
),
wxEnterpriseId
);
logger
.
info
(
"获取配置次数={},wxEnterpriseId={}"
,
JSON
.
toJSONString
(
setTimeBO
),
wxEnterpriseId
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/TestController.java
View file @
38832c88
...
@@ -56,8 +56,6 @@ public class TestController extends WebBaseController {
...
@@ -56,8 +56,6 @@ public class TestController extends WebBaseController {
@Autowired
@Autowired
private
QywxSuiteApiService
qywxSuiteApiService
;
private
QywxSuiteApiService
qywxSuiteApiService
;
@Autowired
@Autowired
private
MemberUnionidRelatedApiService
memberUnionidRelatedApiService
;
@Autowired
private
TestApiService
testApiService
;
private
TestApiService
testApiService
;
@Autowired
@Autowired
private
MaidianLogApiService
maidianLogApiService
;
private
MaidianLogApiService
maidianLogApiService
;
...
@@ -77,8 +75,14 @@ public class TestController extends WebBaseController {
...
@@ -77,8 +75,14 @@ public class TestController extends WebBaseController {
private
HmQrcodeApiService
hmQrcodeApiService
;
private
HmQrcodeApiService
hmQrcodeApiService
;
@Autowired
@Autowired
private
QywxCorpApiService
qywxCorpApiService
;
private
QywxCorpApiService
qywxCorpApiService
;
@Autowired
private
QwFriendApiService
qwFriendApiService
;
@RequestMapping
(
"/get-pending-times"
)
public
HaobanResponse
getTestTimes
(
String
wxEnterpriseId
)
{
return
this
.
resultResponse
(
HaoBanErrCode
.
ERR_0
,
this
.
qwFriendApiService
.
getTestTimes
(
wxEnterpriseId
));
}
@RequestMapping
(
"/send-message-test"
)
@RequestMapping
(
"/send-message-test"
)
public
HaobanResponse
testSendMessage
(
QywxXcxSendMessageQo
qo
)
{
public
HaobanResponse
testSendMessage
(
QywxXcxSendMessageQo
qo
)
{
...
...
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
38832c88
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<dubbo:protocol
name=
"dubbo"
port=
"30009"
/>
<dubbo:protocol
name=
"dubbo"
port=
"30009"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.QwFriendApiService"
id=
"qwFriendApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.hm.WxUserAddLogApiService"
id=
"wxUserAddLogApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.hm.WxUserAddLogApiService"
id=
"wxUserAddLogApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.member.tag.api.service.MemberTagApiService"
id=
"memberTagApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.member.tag.api.service.MemberTagApiService"
id=
"memberTagApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.clerk.api.service.PowerService"
id=
"powerService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.clerk.api.service.PowerService"
id=
"powerService"
timeout=
"10000"
/>
...
...
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