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
b5750abc
Commit
b5750abc
authored
Jul 20, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://git.gicdev.com/haoban3.0/haoban-manage3.0.git
into developer
parents
1caf0334
57ec403a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
38 deletions
+12
-38
KafkaMessageServiceImpl.java
...c/haoban/manage/service/task/KafkaMessageServiceImpl.java
+1
-36
WxUserAddLogMapper.xml
...rvice/src/main/resources/mapper/hm/WxUserAddLogMapper.xml
+11
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/KafkaMessageServiceImpl.java
View file @
b5750abc
...
...
@@ -4,10 +4,8 @@ import com.alibaba.fastjson.JSONObject;
import
com.gic.binlog.base.entity.GicField
;
import
com.gic.binlog.base.entity.GicRecord
;
import
com.gic.binlog.base.entity.enums.GicRecordType
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.dubbo.entity.ProviderLocalTag
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.FlushStoreMqDTO
;
...
...
@@ -22,7 +20,6 @@ import com.gic.haoban.manage.service.pojo.GroupSyncPojo;
import
com.gic.haoban.manage.service.pojo.StoreSyncPojo
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StoreRangeService
;
import
com.gic.haoban.task.api.dto.MqMessageQo
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.apache.kafka.clients.consumer.ConsumerRecord
;
import
org.slf4j.Logger
;
...
...
@@ -79,39 +76,7 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
logger
.
error
(
"binlog数据为空"
);
return
;
}
if
(
record
.
value
().
getTableName
().
equals
(
CLERK
))
{
ClerkSyncPojo
syncPojo
=
(
ClerkSyncPojo
)
pojo
;
dealClerk
(
syncPojo
);
//发消息处理新增店长,任务重新分配问题
GicRecordType
gicRecordType
=
GicRecordType
.
valueOf
(
syncPojo
.
getRecordType
());
if
(
gicRecordType
.
equals
(
GicRecordType
.
INSERT
)
||
gicRecordType
.
equals
(
GicRecordType
.
UPDATE
))
{
//新增,更新某个人为店长
String
clerkId
=
syncPojo
.
getClerkId
();
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerkDTO
==
null
)
{
logger
.
error
(
"导购为空,clerkId:{}"
,
clerkId
);
return
;
}
Integer
clerkType
=
clerkDTO
.
getClerkType
();
if
(
clerkType
!=
null
&&
clerkType
==
1
)
{
//发消息处理新增店长,任务重新分配问题
try
{
logger
.
info
(
"待分配任务重分配======>{}"
,
clerkId
);
MqMessageQo
mqMessageQo
=
new
MqMessageQo
();
//任务分配给店长
mqMessageQo
.
setType
(
MqMessageQo
.
DISTRIBUTE_TASK
);
mqMessageQo
.
setData
(
clerkId
);
String
s
=
JSONObject
.
toJSONString
(
mqMessageQo
);
GICMQClientUtil
.
getClientInstance
().
sendCommonMessage
(
RouterConstant
.
ROUTERTYPE
,
s
,
"com.gic.haoban.task.api.service.MqAsynApiService"
,
"run"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"任务重新分配问题发送消息队列出错"
,
e
);
}
}
}
}
else
if
(
record
.
value
().
getTableName
().
equals
(
GROUP
))
{
if
(
record
.
value
().
getTableName
().
equals
(
GROUP
))
{
//分组
dealStoreGroup
((
GroupSyncPojo
)
pojo
);
}
...
...
haoban-manage3-service/src/main/resources/mapper/hm/WxUserAddLogMapper.xml
View file @
b5750abc
...
...
@@ -186,7 +186,7 @@
<select
id=
"listForPage"
parameterType=
"com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO"
resultMap=
"result-map-tabHaobanWxUserAddLog"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_wx_user_add_log where wx_enterprise_id = #{
e
nterpriseId}
from tab_haoban_wx_user_add_log where wx_enterprise_id = #{
wxE
nterpriseId}
<if
test=
"null != enterpriseId"
>
and enterprise_id = #{enterpriseId}
</if>
...
...
@@ -199,7 +199,15 @@
<if
test=
"null != clerkId"
>
and clerk_id = #{clerkId}
</if>
and create_time >= #{startTime} and create_time
<![CDATA[<=]]>
#{endTime}
<if
test=
"null != startTime"
>
and create_time
<![CDATA[>=]]>
#{startTime}
</if>
<if
test=
"null != endTime"
>
and create_time
<![CDATA[<=]]>
#{endTime}
</if>
<if
test=
"null != addChannel"
>
and add_channel = #{addChannel}
</if>
and status_flag != 0 order by #{createTimeOrder}
</select>
</mapper>
\ No newline at end of file
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