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
7f8e2384
Commit
7f8e2384
authored
Dec 04, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-canvas' into 'developer'
Feature canvas See merge request
!2330
parents
1c6b7952
9726ac44
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
23 deletions
+65
-23
ChatOwnerTotalDTO.java
...com/gic/haoban/manage/api/dto/chat/ChatOwnerTotalDTO.java
+9
-0
GroupChatPlanOwnerLogDTO.java
.../haoban/manage/api/dto/chat/GroupChatPlanOwnerLogDTO.java
+11
-1
GroupChatPlanOwnerLogService.java
...ge/service/service/chat/GroupChatPlanOwnerLogService.java
+1
-1
GroupChatPlanOwnerLogServiceImpl.java
...e/service/chat/impl/GroupChatPlanOwnerLogServiceImpl.java
+6
-1
GroupChatPlanServiceImpl.java
...e/service/service/chat/impl/GroupChatPlanServiceImpl.java
+35
-19
GroupChatPlanOwnerLogMapper.xml
...ain/resources/mapper/chat/GroupChatPlanOwnerLogMapper.xml
+3
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/chat/ChatOwnerTotalDTO.java
View file @
7f8e2384
...
...
@@ -22,6 +22,15 @@ public class ChatOwnerTotalDTO implements Serializable {
private
int
notSendCount
;
// 计划状态 1进行中 2已结束
private
int
planStatus
;
private
int
execType
;
public
int
getExecType
()
{
return
execType
;
}
public
void
setExecType
(
int
execType
)
{
this
.
execType
=
execType
;
}
public
int
getPlanStatus
()
{
return
planStatus
;
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/chat/GroupChatPlanOwnerLogDTO.java
View file @
7f8e2384
...
...
@@ -38,7 +38,17 @@ public class GroupChatPlanOwnerLogDTO implements Serializable{
private
String
remark
;
private
String
msgid
;
private
Date
expireDate
;
private
Date
sendTime
;
private
Date
sendTime
;
private
int
execType
;
public
int
getExecType
()
{
return
execType
;
}
public
void
setExecType
(
int
execType
)
{
this
.
execType
=
execType
;
}
public
Date
getStartTime
()
{
return
startTime
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/GroupChatPlanOwnerLogService.java
View file @
7f8e2384
...
...
@@ -15,7 +15,7 @@ public interface GroupChatPlanOwnerLogService {
public
void
batchAdd
(
String
staffIdList
,
TabGroupChatPlan
entity
);
public
void
update
(
TabGroupChatPlanOwnerLog
entity
);
public
boolean
update
(
TabGroupChatPlanOwnerLog
entity
);
public
void
deleteByStaffIds
(
Long
planId
,
String
delStaffIds
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatPlanOwnerLogServiceImpl.java
View file @
7f8e2384
...
...
@@ -135,28 +135,33 @@ public class GroupChatPlanOwnerLogServiceImpl implements GroupChatPlanOwnerLogSe
}
@Override
public
void
update
(
TabGroupChatPlanOwnerLog
entity
)
{
public
boolean
update
(
TabGroupChatPlanOwnerLog
entity
)
{
String
staffId
=
entity
.
getStaffId
();
TabHaobanClerkMainStoreRelated
mainStore
=
this
.
clerkMainStoreRelatedService
.
getMainStoreByStaffId
(
staffId
,
entity
.
getWxEnterpriseId
());
boolean
flag
=
true
;
if
(
null
==
mainStore
)
{
entity
.
setRemark
(
"区经/未配置主门店"
);
flag
=
false
;
}
else
{
String
storeId
=
mainStore
.
getStoreId
();
StaffClerkRelationDTO
clerk
=
this
.
staffClerkRelationService
.
getOneBindByStoreId
(
staffId
,
storeId
);
if
(
null
!=
clerk
)
{
if
(!
clerk
.
getEnterpriseId
().
equals
(
entity
.
getEnterpriseId
()))
{
entity
.
setRemark
(
"主门店不在任务商户下"
);
flag
=
false
;
}
else
{
entity
.
setClerkId
(
clerk
.
getClerkId
());
entity
.
setStoreId
(
mainStore
.
getStoreId
());
}
}
else
{
entity
.
setRemark
(
"无关联导购"
);
flag
=
false
;
logger
.
info
(
"导购关联数据不存在,staffid={},storeid={}"
,
staffId
,
mainStore
.
getStoreId
());
}
}
this
.
groupChatPlanOwnerLogMapper
.
update
(
entity
);
return
flag
;
}
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatPlanServiceImpl.java
View file @
7f8e2384
...
...
@@ -393,7 +393,6 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
int
pageNum
=
0
;
if
(
plan
.
getExecType
()
==
1
)
{
logger
.
info
(
"好办小程序执行={}"
,
planId
);
// 发送消息
while
(
true
)
{
ownerList
=
this
.
groupChatPlanOwnerLogMapper
.
listForDoPlan
(
planId
,
pageNum
*
pageSize
,
pageSize
);
if
(
CollectionUtils
.
isEmpty
(
ownerList
))
{
...
...
@@ -401,7 +400,11 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
}
pageNum
++;
for
(
TabGroupChatPlanOwnerLog
ownerLog
:
ownerList
)
{
boolean
flag
=
this
.
groupChatPlanOwnerLogService
.
update
(
ownerLog
);
if
(
flag
)
{
// 发送消息
}
}
}
return
;
...
...
@@ -696,18 +699,27 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
List
<
GroupChatPlanOwnerLogDTO
>
list
=
this
.
groupChatPlanOwnerLogMapper
.
listForCancelSend
();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
GroupChatPlanOwnerLogDTO
dto
:
list
)
{
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
()
;
String
msgid
=
dto
.
getMsgid
()
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
String
secret
=
config
.
getWxSuiteid
()
;
if
(
qwDTO
.
isSelf
())
{
secret
=
qwDTO
.
getSelfSecret
()
;
}
ServiceResponse
<
Void
>
resp
=
this
.
qywxSuiteApiService
.
cancelGroupmsgSend
(
qwDTO
.
getThirdCorpid
(),
secret
,
msgid
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
())
;
if
(
resp
.
isSuccess
())
{
this
.
groupChatPlanOwnerLogMapper
.
giveUp
(
dto
.
getOwnerLogId
())
;
}
this
.
cancelSend
(
dto
);
}
}
}
private
void
cancelSend
(
GroupChatPlanOwnerLogDTO
dto
)
{
try
{
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
();
String
msgid
=
dto
.
getMsgid
();
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
String
secret
=
config
.
getWxSuiteid
();
if
(
qwDTO
.
isSelf
())
{
secret
=
qwDTO
.
getSelfSecret
();
}
ServiceResponse
<
Void
>
resp
=
this
.
qywxSuiteApiService
.
cancelGroupmsgSend
(
qwDTO
.
getThirdCorpid
(),
secret
,
msgid
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(
resp
.
isSuccess
())
{
this
.
groupChatPlanOwnerLogMapper
.
giveUp
(
dto
.
getOwnerLogId
());
}
}
catch
(
Exception
e
)
{
logger
.
info
(
"异常"
,
e
);
}
}
...
...
@@ -723,13 +735,17 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
}
private
void
updateMsgid
(
GroupChatPlanOwnerLogDTO
dto
)
{
Long
ownerLogId
=
dto
.
getOwnerLogId
()
;
String
staffId
=
dto
.
getStaffId
()
;
Date
sendTime
=
dto
.
getSendTime
()
;
String
msgid
=
this
.
getQwMsgId
(
staffId
,
sendTime
,
GroupMessageServiceImpl
.
GroupMsgChatType
.
group
)
;
if
(
null
!=
msgid
)
{
logger
.
info
(
"获取msgid={},{}"
,
ownerLogId
,
msgid
);
this
.
groupChatPlanOwnerLogMapper
.
updateMsgid
(
ownerLogId
,
msgid
);
try
{
Long
ownerLogId
=
dto
.
getOwnerLogId
()
;
String
staffId
=
dto
.
getStaffId
()
;
Date
sendTime
=
dto
.
getSendTime
()
;
String
msgid
=
this
.
getQwMsgId
(
staffId
,
sendTime
,
GroupMessageServiceImpl
.
GroupMsgChatType
.
group
)
;
if
(
null
!=
msgid
)
{
logger
.
info
(
"获取msgid={},{}"
,
ownerLogId
,
msgid
);
this
.
groupChatPlanOwnerLogMapper
.
updateMsgid
(
ownerLogId
,
msgid
);
}
}
catch
(
Exception
e
)
{
logger
.
info
(
"异常"
,
e
);
}
}
...
...
haoban-manage3-service/src/main/resources/mapper/chat/GroupChatPlanOwnerLogMapper.xml
View file @
7f8e2384
...
...
@@ -105,7 +105,7 @@
</update>
<update
id=
"giveUp"
parameterType=
"java.lang.Long"
>
update tab_haoban_group_chat_plan_owner_log set s
tatus_flag
= 3 where owner_log_id = #{id}
update tab_haoban_group_chat_plan_owner_log set s
end_status
= 3 where owner_log_id = #{id}
</update>
<!-- ============ 查询=============-->
...
...
@@ -161,6 +161,7 @@
b.name planName ,
b.start_time startTime ,
b.end_time endTime ,
b.exec_type execType ,
<!-- 已发送 -->
SUM(CASE a.send_status WHEN 2 THEN 1 ELSE 0 END ) sendCount,
<!-- 待发送 -->
...
...
@@ -228,6 +229,7 @@
a.owner_log_id ownerLogId ,
b.plan_id planId ,
b.name planName ,
b.exec_type execType ,
a.staff_id staffId ,
a.clerk_id clerkId ,
a.store_id storeId ,
...
...
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