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
e65e7e42
Commit
e65e7e42
authored
Mar 08, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
好办加好友统计
parent
0ea445fa
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
1 deletions
+57
-1
HaobanTimerApiService.java
.../gic/haoban/manage/api/service/HaobanTimerApiService.java
+2
-0
TabQywxErrorLogMapper.java
...oban/manage/service/dao/mapper/TabQywxErrorLogMapper.java
+5
-0
QywxErrorLogService.java
...ic/haoban/manage/service/service/QywxErrorLogService.java
+2
-0
TabQywxErrorLogServiceImpl.java
...nage/service/service/impl/TabQywxErrorLogServiceImpl.java
+27
-0
HaobanTimerApiServiceImpl.java
...e/service/service/out/impl/HaobanTimerApiServiceImpl.java
+8
-0
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+3
-0
TabQywxErrorLogMapper.xml
...rvice/src/main/resources/mapper/TabQywxErrorLogMapper.xml
+10
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/HaobanTimerApiService.java
View file @
e65e7e42
...
...
@@ -118,5 +118,7 @@ public interface HaobanTimerApiService {
*/
public
void
addFrientMonitorTimer
(
String
params
)
;
public
void
doErrorFriendTimer
(
String
params
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabQywxErrorLogMapper.java
View file @
e65e7e42
...
...
@@ -2,8 +2,10 @@ package com.gic.haoban.manage.service.dao.mapper;
import
com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO
;
import
com.gic.haoban.manage.service.entity.TabQywxErrorLog
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -25,4 +27,7 @@ public interface TabQywxErrorLogMapper {
*/
List
<
TabQywxErrorLog
>
queryListByPage
(
QywxErrorLogListQDTO
qywxErrorLogListQDTO
);
List
<
TabQywxErrorLog
>
listErrorFriend
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"qywxErrorType"
)
int
type
,
@Param
(
"startDate"
)
Date
startDate
,
@Param
(
"endDate"
)
Date
endDate
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/QywxErrorLogService.java
View file @
e65e7e42
...
...
@@ -44,4 +44,6 @@ public interface QywxErrorLogService {
public
void
putToMq
(
QywxErrorLogDTO
dto
)
;
public
void
doFriendTimer
(
String
params
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/TabQywxErrorLogServiceImpl.java
View file @
e65e7e42
...
...
@@ -4,11 +4,17 @@ import java.util.Date;
import
java.util.List
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.CollectionUtil
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.dubbo.entity.ProviderLocalTag
;
import
com.gic.haoban.manage.api.constants.Manage3Constants
;
import
com.gic.haoban.manage.api.dto.QwFrientNoticeDTO
;
import
com.gic.haoban.manage.api.dto.QywxErrorLogDTO
;
import
com.gic.haoban.manage.service.pojo.DealQywxExternalUserPojo
;
import
com.gic.mq.sdk.GicMQClient
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -75,4 +81,25 @@ public class TabQywxErrorLogServiceImpl implements QywxErrorLogService {
log
.
error
(
"发送消息失败:{}"
,
e
.
getMessage
(),
e
);
}
}
@Override
public
void
doFriendTimer
(
String
params
)
{
log
.
info
(
"加好友异常重试"
);
Date
start
=
DateUtil
.
getStartTimeOfDay
()
;
Date
end
=
DateUtil
.
getEndTimeOfDay
()
;
List
<
TabQywxErrorLog
>
list
=
this
.
tabQywxErrorLogMapper
.
listErrorFriend
(
null
,
4
,
start
,
end
)
;
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
String
mqName
=
"dealQywxExternalUserMq2"
;
for
(
TabQywxErrorLog
tab
:
list
)
{
DealQywxExternalUserPojo
dealQywxExternalUserPojo
=
new
DealQywxExternalUserPojo
();
dealQywxExternalUserPojo
.
setType
(
DealQywxExternalUserPojo
.
DealType
.
add
.
getType
());
dealQywxExternalUserPojo
.
setData
(
JSONObject
.
parseObject
(
tab
.
getErrorContent
(),
QwFrientNoticeDTO
.
class
));
try
{
clientInstance
.
sendMessage
(
mqName
,
JSONObject
.
toJSONString
(
dealQywxExternalUserPojo
));
}
catch
(
Exception
e
)
{
log
.
info
(
"异步处理异常:{}"
,
e
);
}
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/HaobanTimerApiServiceImpl.java
View file @
e65e7e42
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
com.gic.haoban.manage.service.service.QywxErrorLogService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatDataService
;
import
com.gic.haoban.manage.service.util.HBQwMonitorUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -28,6 +29,8 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
private
ExternalMemberService
externalMemberService
;
@Autowired
private
GroupChatDataService
groupChatDataService
;
@Autowired
private
QywxErrorLogService
qywxErrorLogService
;
@Override
...
...
@@ -94,4 +97,9 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
public
void
addFrientMonitorTimer
(
String
params
)
{
HBQwMonitorUtils
.
addByTimer
();
}
@Override
public
void
doErrorFriendTimer
(
String
params
)
{
this
.
qywxErrorLogService
.
doFriendTimer
(
params
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
e65e7e42
...
...
@@ -1392,6 +1392,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
uJ
=
this
.
qywxUserApiService
.
getCorpSelfExternalUseridInfo
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
(),
externalUserId
,
qwDTO
.
getUrlHost
())
;
}
else
{
uJ
=
this
.
qywxUserApiService
.
getExternalUseridInfo
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
externalUserId
);
if
(
StringUtils
.
isNotBlank
(
uJ
)
&&
uJ
.
contains
(
"徐高华"
))
{
this
.
qywxErrorLogService
.
addFriendErrLog
(
wxEnterpriseId
,
tabHaobanStaff
.
getStaffId
(),
5
);
}
}
if
(
StringUtils
.
isBlank
(
uJ
))
{
log
.
info
(
"好友不存在"
);
...
...
haoban-manage3-service/src/main/resources/mapper/TabQywxErrorLogMapper.xml
View file @
e65e7e42
...
...
@@ -82,8 +82,17 @@
</trim>
</insert>
<select
id=
"listErrorFriend"
resultMap=
"TabQywxErrorLogMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_qywx_error_log where qywx_error_type = #{qywxErrorType}
and create_time
<![CDATA[ >= ]]>
#{startDate}
and create_time
<![CDATA[ <= ]]>
#{endDate}
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and wx_enterprise_id = #{wxEnterpriseId}
</if>
</select>
<!--通过实体作为筛选条件查询-->
<select
id=
"queryListByPage"
parameterType=
"com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO"
resultMap=
"TabQywxErrorLogMap"
>
select
...
...
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