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
24466341
Commit
24466341
authored
Mar 24, 2025
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
朋友圈
parent
170940fc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
6 deletions
+65
-6
QwMomentPlanAttendService.java
...age/service/service/moment/QwMomentPlanAttendService.java
+2
-0
QwMomentPlanAttendServiceImpl.java
...ce/service/moment/impl/QwMomentPlanAttendServiceImpl.java
+23
-4
HaobanCommonMQApiServiceImpl.java
...ervice/service/out/impl/HaobanCommonMQApiServiceImpl.java
+7
-0
MomentTest.java
haoban-manage3-service/src/test/java/MomentTest.java
+33
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/moment/QwMomentPlanAttendService.java
View file @
24466341
...
@@ -31,6 +31,8 @@ public interface QwMomentPlanAttendService {
...
@@ -31,6 +31,8 @@ public interface QwMomentPlanAttendService {
ServiceResponse
<
Void
>
finishTask
(
SendResultQDTO
qdto
);
ServiceResponse
<
Void
>
finishTask
(
SendResultQDTO
qdto
);
void
updateMomentId
(
Long
attendId
)
;
void
updateStatusFlag
(
TabQwMomentPlan
plan
)
;
void
updateStatusFlag
(
TabQwMomentPlan
plan
)
;
void
finishTaskUpdateData
(
Long
attendId
,
Long
planId
,
Date
sendDate
)
;
void
finishTaskUpdateData
(
Long
attendId
,
Long
planId
,
Date
sendDate
)
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/moment/impl/QwMomentPlanAttendServiceImpl.java
View file @
24466341
...
@@ -8,6 +8,7 @@ import com.gic.clerk.api.service.ClerkService;
...
@@ -8,6 +8,7 @@ import com.gic.clerk.api.service.ClerkService;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.api.dto.CommonMQDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.moment.QwMomentPlanAttendDTO
;
import
com.gic.haoban.manage.api.dto.moment.QwMomentPlanAttendDTO
;
...
@@ -16,6 +17,7 @@ import com.gic.haoban.manage.api.dto.moment.TaskListWxaDTO;
...
@@ -16,6 +17,7 @@ import com.gic.haoban.manage.api.dto.moment.TaskListWxaDTO;
import
com.gic.haoban.manage.api.qdto.moment.PlanClerkListQDTO
;
import
com.gic.haoban.manage.api.qdto.moment.PlanClerkListQDTO
;
import
com.gic.haoban.manage.api.qdto.moment.SendResultQDTO
;
import
com.gic.haoban.manage.api.qdto.moment.SendResultQDTO
;
import
com.gic.haoban.manage.api.qdto.moment.TaskListWxaQDTO
;
import
com.gic.haoban.manage.api.qdto.moment.TaskListWxaQDTO
;
import
com.gic.haoban.manage.api.service.HaobanCommonMQApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.moment.QwMomentPlanAttendMapper
;
import
com.gic.haoban.manage.service.dao.mapper.moment.QwMomentPlanAttendMapper
;
...
@@ -38,10 +40,8 @@ import org.apache.logging.log4j.LogManager;
...
@@ -38,10 +40,8 @@ import org.apache.logging.log4j.LogManager;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Service
(
"qwMomentPlanAttendService"
)
@Service
(
"qwMomentPlanAttendService"
)
...
@@ -67,6 +67,8 @@ public class QwMomentPlanAttendServiceImpl implements QwMomentPlanAttendService
...
@@ -67,6 +67,8 @@ public class QwMomentPlanAttendServiceImpl implements QwMomentPlanAttendService
private
QwMomentPlanService
qwMomentPlanService
;
private
QwMomentPlanService
qwMomentPlanService
;
@Autowired
@Autowired
private
PendingTaskService
pendingTaskService
;
private
PendingTaskService
pendingTaskService
;
@Autowired
private
HaobanCommonMQApiService
haobanCommonMQApiService
;
@Override
@Override
public
ServiceResponse
<
Page
<
QwMomentPlanAttendDTO
>>
attendList
(
PlanClerkListQDTO
qdto
)
{
public
ServiceResponse
<
Page
<
QwMomentPlanAttendDTO
>>
attendList
(
PlanClerkListQDTO
qdto
)
{
...
@@ -216,11 +218,28 @@ public class QwMomentPlanAttendServiceImpl implements QwMomentPlanAttendService
...
@@ -216,11 +218,28 @@ public class QwMomentPlanAttendServiceImpl implements QwMomentPlanAttendService
String
momentId
=
this
.
getMomentId
(
qdto
.
getStaffId
()
,
qdto
.
getSendTime
())
;
String
momentId
=
this
.
getMomentId
(
qdto
.
getStaffId
()
,
qdto
.
getSendTime
())
;
if
(
StringUtils
.
isNotBlank
(
momentId
))
{
if
(
StringUtils
.
isNotBlank
(
momentId
))
{
this
.
qwMomentPlanAttendMapper
.
updateMomentId
(
dto
.
getAttendId
(),
momentId
);
this
.
qwMomentPlanAttendMapper
.
updateMomentId
(
dto
.
getAttendId
(),
momentId
);
}
else
{
logger
.
info
(
"未获取到,延迟获取={},{}"
,
planId
,
qdto
.
getStaffId
())
;
CommonMQDTO
mq
=
new
CommonMQDTO
()
;
mq
.
setType
(
7
)
;
Map
<
String
,
String
>
map
=
new
HashMap
<>()
;
map
.
put
(
"attendId"
,
dto
.
getAttendId
()+
""
)
;
mq
.
setParams
(
map
);
this
.
haobanCommonMQApiService
.
putCommonDelayMessage
(
mq
,
60
);
}
}
return
ServiceResponse
.
success
()
;
return
ServiceResponse
.
success
()
;
}
}
@Override
@Override
public
void
updateMomentId
(
Long
attendId
)
{
TabQwMomentPlanAttend
tab
=
this
.
qwMomentPlanAttendMapper
.
getById
(
attendId
)
;
String
momentId
=
this
.
getMomentId
(
tab
.
getStaffId
()
,
tab
.
getSendTime
())
;
if
(
StringUtils
.
isNotBlank
(
momentId
))
{
this
.
qwMomentPlanAttendMapper
.
updateMomentId
(
attendId
,
momentId
);
}
}
@Override
public
void
finishTaskUpdateData
(
Long
attendId
,
Long
planId
,
Date
sendDate
)
{
public
void
finishTaskUpdateData
(
Long
attendId
,
Long
planId
,
Date
sendDate
)
{
TabQwMomentPlanAttend
attend
=
this
.
qwMomentPlanAttendMapper
.
getById
(
attendId
)
;
TabQwMomentPlanAttend
attend
=
this
.
qwMomentPlanAttendMapper
.
getById
(
attendId
)
;
if
(
attend
.
getTaskStatus
()==
2
)
{
if
(
attend
.
getTaskStatus
()==
2
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/HaobanCommonMQApiServiceImpl.java
View file @
24466341
...
@@ -12,6 +12,7 @@ import com.gic.commons.util.StringUtil;
...
@@ -12,6 +12,7 @@ import com.gic.commons.util.StringUtil;
import
com.gic.haoban.manage.api.dto.MemberUnionidWechatAccountQDTO
;
import
com.gic.haoban.manage.api.dto.MemberUnionidWechatAccountQDTO
;
import
com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService
;
import
com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatPlanService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatPlanService
;
import
com.gic.haoban.manage.service.service.moment.QwMomentPlanAttendService
;
import
com.gic.haoban.manage.service.service.moment.QwMomentPlanService
;
import
com.gic.haoban.manage.service.service.moment.QwMomentPlanService
;
import
com.gic.haoban.manage.service.service.role.HaobanMenuService
;
import
com.gic.haoban.manage.service.service.role.HaobanMenuService
;
import
com.gic.haoban.manage.service.util.EventUtils
;
import
com.gic.haoban.manage.service.util.EventUtils
;
...
@@ -62,6 +63,8 @@ public class HaobanCommonMQApiServiceImpl implements HaobanCommonMQApiService {
...
@@ -62,6 +63,8 @@ public class HaobanCommonMQApiServiceImpl implements HaobanCommonMQApiService {
private
GroupChatPlanService
groupChatPlanService
;
private
GroupChatPlanService
groupChatPlanService
;
@Autowired
@Autowired
private
QwMomentPlanService
qwMomentPlanService
;
private
QwMomentPlanService
qwMomentPlanService
;
@Autowired
private
QwMomentPlanAttendService
qwMomentPlanAttendService
;
@Override
@Override
public
void
putCommonMessage
(
CommonMQDTO
dto
)
{
public
void
putCommonMessage
(
CommonMQDTO
dto
)
{
...
@@ -158,6 +161,10 @@ public class HaobanCommonMQApiServiceImpl implements HaobanCommonMQApiService {
...
@@ -158,6 +161,10 @@ public class HaobanCommonMQApiServiceImpl implements HaobanCommonMQApiService {
Long
momentPlanId
=
Long
.
valueOf
(
map
.
get
(
"planId"
))
;
Long
momentPlanId
=
Long
.
valueOf
(
map
.
get
(
"planId"
))
;
this
.
qwMomentPlanService
.
getMomentId
(
momentPlanId
);
this
.
qwMomentPlanService
.
getMomentId
(
momentPlanId
);
break
;
break
;
case
7
:
Long
attendId
=
Long
.
valueOf
(
map
.
get
(
"attendId"
))
;
this
.
qwMomentPlanAttendService
.
updateMomentId
(
attendId
);
break
;
default
:
default
:
break
;
break
;
}
}
...
...
haoban-manage3-service/src/test/java/MomentTest.java
View file @
24466341
...
@@ -10,15 +10,21 @@ import com.gic.haoban.manage.api.qdto.moment.PlanDataListQDTO;
...
@@ -10,15 +10,21 @@ import com.gic.haoban.manage.api.qdto.moment.PlanDataListQDTO;
import
com.gic.haoban.manage.api.qdto.moment.QwMomentPlanQDTO
;
import
com.gic.haoban.manage.api.qdto.moment.QwMomentPlanQDTO
;
import
com.gic.haoban.manage.api.qdto.moment.SendResultQDTO
;
import
com.gic.haoban.manage.api.qdto.moment.SendResultQDTO
;
import
com.gic.haoban.manage.api.service.moment.QwMomentApiService
;
import
com.gic.haoban.manage.api.service.moment.QwMomentApiService
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.moment.QwMomentPlanAttendMapper
;
import
com.gic.haoban.manage.service.dao.mapper.moment.QwMomentPlanAttendMapper
;
import
com.gic.haoban.manage.service.dao.mapper.moment.QwMomentPlanMapper
;
import
com.gic.haoban.manage.service.dao.mapper.moment.QwMomentPlanMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.moment.TabQwMomentPlan
;
import
com.gic.haoban.manage.service.entity.moment.TabQwMomentPlan
;
import
com.gic.haoban.manage.service.entity.moment.TabQwMomentPlanAttend
;
import
com.gic.haoban.manage.service.entity.moment.TabQwMomentPlanAttend
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatPlanService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatPlanService
;
import
com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl
;
import
com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl
;
import
com.gic.haoban.manage.service.service.moment.QwMomentPlanService
;
import
com.gic.haoban.manage.service.service.moment.QwMomentPlanService
;
import
com.gic.wechat.api.dto.qdto.group.QywxMomentInfoQDTO
;
import
com.gic.wechat.api.dto.qywx.group.QywxMomentRespDTO
;
import
com.gic.wechat.api.service.qywx.QywxExternalUserService
;
import
com.gic.wechat.api.service.qywx.QywxExternalUserService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -135,15 +141,40 @@ public class MomentTest {
...
@@ -135,15 +141,40 @@ public class MomentTest {
}
}
@Autowired
private
StaffMapper
staffMapper
;
@Autowired
private
QywxSuiteApiService
qywxSuiteApiService
;
@Test
@Test
public
void
finish
()
{
public
void
finish
()
{
SendResultQDTO
q
=
new
SendResultQDTO
()
;
/*
SendResultQDTO q = new SendResultQDTO() ;
q.setClerkId("2dd543ad1f2e4feab2e5a5c767197858");
q.setClerkId("2dd543ad1f2e4feab2e5a5c767197858");
q.setWxEnterpriseId("ca66a01b79474c40b3e7c7f93daf1a3b");
q.setWxEnterpriseId("ca66a01b79474c40b3e7c7f93daf1a3b");
q.setStaffId("2c0d179610a04016bf8971ac0f158442");
q.setStaffId("2c0d179610a04016bf8971ac0f158442");
q.setPlanId(772845323461615680L);
q.setPlanId(772845323461615680L);
q.setSendTime(new Date(1741760727397l));
q.setSendTime(new Date(1741760727397l));
this
.
qwMomentApiService
.
finishTask
(
q
)
;
this.qwMomentApiService.finishTask(q) ;*/
String
staffId
=
"92a1edc7147e411c9b13ba9e815a6efb"
;
Date
sendTime
=
DateUtil
.
strToDate
(
"2025-03-24 13:47:29"
,
"yyyy-MM-dd HH:mm:ss"
)
;
Date
startTime
=
DateUtil
.
addNumForSecond
(
sendTime
,-
10
)
;
Date
endTime
=
DateUtil
.
addNumForMinute
(
sendTime
,
1
)
;
TabHaobanStaff
staff
=
this
.
staffMapper
.
selectByPrimaryKey
(
staffId
)
;
String
wxEnterpriseId
=
staff
.
getWxEnterpriseId
()
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
String
wxUserId
=
staff
.
getWxUserId
()
;
if
(
qwDTO
.
needOpenUserId3th
())
{
wxUserId
=
staff
.
getWxOpenUseId
()
;
}
QywxMomentInfoQDTO
qywxMomentInfoQDTO
=
new
QywxMomentInfoQDTO
();
qywxMomentInfoQDTO
.
setCorpid
(
qwDTO
.
getThirdCorpid
());
qywxMomentInfoQDTO
.
setSuiteid
(
qwDTO
.
getSelf3thSecret
());
qywxMomentInfoQDTO
.
setStartTime
(
startTime
.
getTime
()
/
1000
);
qywxMomentInfoQDTO
.
setEndTime
(
endTime
.
getTime
()
/
1000
);
qywxMomentInfoQDTO
.
setCreatorId
(
wxUserId
);
qywxMomentInfoQDTO
.
setPageSize
(
1
);
ServiceResponse
<
QywxMomentRespDTO
>
serviceResponse
=
qywxSuiteApiService
.
queryQywxMomentList
(
qywxMomentInfoQDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
System
.
out
.
println
(
JSONObject
.
toJSONString
(
serviceResponse
));
}
}
}
}
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