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
d55975bc
Commit
d55975bc
authored
Jan 27, 2021
by
黄芝文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!96
parents
3fa46034
13720922
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
12 deletions
+81
-12
pom.xml
haoban-manage3-service/pom.xml
+21
-9
BindApiServiceImpl.java
...n/manage/service/service/out/impl/BindApiServiceImpl.java
+12
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+2
-1
StaffDepartmentRelatedApiServiceImpl.java
...ervice/out/impl/StaffDepartmentRelatedApiServiceImpl.java
+4
-0
KafkaMessageServiceImpl.java
...c/haoban/manage/service/task/KafkaMessageServiceImpl.java
+35
-2
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+3
-0
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+4
-0
No files found.
haoban-manage3-service/pom.xml
View file @
d55975bc
...
...
@@ -45,15 +45,15 @@
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
haoban-common
</artifactId>
<version>
${haoban-common}
</version>
<!-- <exclusions> --
>
<!-- <exclusion> --
>
<!-- <artifactId>jsqlparser</artifactId> --
>
<!-- <groupId>com.github.jsqlparser</groupId> --
>
<!-- </exclusion> --
>
<!-- </exclusions> --
>
<groupId>
com.gic
</groupId>
<artifactId>
haoban-common
</artifactId>
<version>
${haoban-common}
</version>
<exclusions
>
<exclusion
>
<artifactId>
log4j
</artifactId
>
<groupId>
log4j
</groupId
>
</exclusion
>
</exclusions
>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
...
...
@@ -72,6 +72,12 @@
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
haoban-task-api
</artifactId>
<version>
${haoban-task-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
haoban-contacts-api
</artifactId>
<version>
${haoban-contacts-api}
</version>
</dependency>
...
...
@@ -89,6 +95,12 @@
<groupId>
com.gic
</groupId>
<artifactId>
gic-enterprise-api
</artifactId>
<version>
${gic-enterprise-api}
</version>
<exclusions>
<exclusion>
<artifactId>
log4j
</artifactId>
<groupId>
log4j
</groupId>
</exclusion>
</exclusions>
<!-- <exclusions> -->
<!-- <exclusion> -->
<!-- <artifactId>jsqlparser</artifactId> -->
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/BindApiServiceImpl.java
View file @
d55975bc
...
...
@@ -159,6 +159,9 @@ public class BindApiServiceImpl implements BindApiService {
if
(
StringUtils
.
isNotBlank
(
fromClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
if
(
leader
==
null
){
leader
=
new
ClerkDTO
();
}
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
clerkName
;
...
...
@@ -223,6 +226,9 @@ public class BindApiServiceImpl implements BindApiService {
if
(
StringUtils
.
isNotBlank
(
sendClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
if
(
leader
==
null
){
leader
=
new
ClerkDTO
();
}
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
staffDTO
.
getStaffName
();
...
...
@@ -268,6 +274,9 @@ public class BindApiServiceImpl implements BindApiService {
if
(
StringUtils
.
isNotBlank
(
fromClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
if
(
leader
==
null
){
leader
=
new
ClerkDTO
();
}
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
clerkName
;
...
...
@@ -330,6 +339,9 @@ public class BindApiServiceImpl implements BindApiService {
if
(
StringUtils
.
isNotBlank
(
fromClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
if
(
leader
==
null
){
leader
=
new
ClerkDTO
();
}
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
clerkName
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
d55975bc
...
...
@@ -342,6 +342,7 @@ public class StaffApiServiceImpl implements StaffApiService {
res
.
setCode
(
3
);
return
res
;
}
String
imageUrl
=
changeHeaderImageUrl
(
user
.
getAvatar
());
TabHaobanStaff
staff
=
staffService
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
staff
=
(
staff
==
null
?
new
TabHaobanStaff
():
staff
);
staff
.
setWxUserId
(
userId
);
...
...
@@ -349,7 +350,7 @@ public class StaffApiServiceImpl implements StaffApiService {
staff
.
setStatusFlag
(
1
);
staff
.
setWxEnterpriseId
(
wxEnterpriseId
);
if
(
StringUtils
.
isNotBlank
(
user
.
getAvatar
())){
staff
.
setHeadImg
(
changeHeaderImageUrl
(
user
.
getAvatar
())
);
staff
.
setHeadImg
(
imageUrl
);
}
if
(
StringUtils
.
isNotBlank
(
user
.
getName
()))
{
user
.
setName
(
EmojiFilterUtil
.
removeAllEmoji
(
user
.
getName
()));
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffDepartmentRelatedApiServiceImpl.java
View file @
d55975bc
...
...
@@ -305,6 +305,10 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
@Override
public
boolean
sendSingleMessage
(
String
clerkId
,
String
title
,
String
content
,
String
pageUrl
)
{
if
(
StringUtils
.
isEmpty
(
clerkId
)){
logger
.
info
(
"clerkId不存在============>"
);
return
false
;
}
Map
<
String
,
String
>
map
=
getWxUserIdByClerkId
(
clerkId
);
String
wxUserId
=
map
.
get
(
"wxUserId"
);
String
corpId
=
map
.
get
(
"corpId"
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/KafkaMessageServiceImpl.java
View file @
d55975bc
...
...
@@ -4,7 +4,10 @@ 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.contacts.manage.api.enums.StatusEnum
;
...
...
@@ -16,6 +19,11 @@ import com.gic.haoban.manage.service.pojo.BinlogBasePojo;
import
com.gic.haoban.manage.service.pojo.ClerkSyncPojo
;
import
com.gic.haoban.manage.service.service.StaffClerkBindLogService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.task.api.dto.MqMessageQo
;
import
com.gic.mq.sdk.exception.RouterException
;
import
com.gic.qcloud.cmq.CMQClientException
;
import
com.gic.qcloud.cmq.CMQServerException
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.apache.kafka.clients.consumer.ConsumerRecord
;
...
...
@@ -47,8 +55,10 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
@Autowired
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
@Autowired
private
ClerkService
clerkService
;
@Override
public
void
onMessage
(
ConsumerRecord
<
String
,
GicRecord
>
record
)
{
...
...
@@ -65,6 +75,29 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
if
(
record
.
value
().
getTableName
().
equals
(
CLERK
))
{
dealClerk
((
ClerkSyncPojo
)
pojo
);
//TODO 发消息处理新增店长,任务重新分配问题
ClerkSyncPojo
syncPojo
=
(
ClerkSyncPojo
)
pojo
;
GicRecordType
gicRecordType
=
GicRecordType
.
valueOf
(
syncPojo
.
getRecordType
());
if
(
gicRecordType
.
equals
(
GicRecordType
.
INSERT
)
||
gicRecordType
.
equals
(
GicRecordType
.
UPDATE
)){
//新增,更新某个人为店长
String
clerkId
=
syncPojo
.
getClerkId
();
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
Integer
clerkType
=
clerkDTO
.
getClerkType
();
if
(
clerkType
!=
null
&&
clerkType
.
intValue
()
==
1
){
//TODO 发消息处理新增店长,任务重新分配问题
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
)
{
e
.
printStackTrace
();
}
}
}
}
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
d55975bc
...
...
@@ -130,6 +130,9 @@ public class ClerkController extends WebBaseController{
if
(
StringUtils
.
isNotBlank
(
oldClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
if
(
leader
==
null
){
leader
=
new
ClerkDTO
();
}
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
staffDTO
.
getStaffName
();
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
d55975bc
...
...
@@ -598,6 +598,10 @@ public class ClerkController extends WebBaseController{
jsonObject
.
put
(
"storeId"
,
clerk
.
getStoreId
());
String
data
=
jsonObject
.
toJSONString
();
ClerkDTO
gicClerk
=
clerkService
.
getClerkLeaderByStoreId
(
clerk
.
getStoreId
());
if
(
gicClerk
==
null
){
//店长不存在,直接返回
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
String
pageUrl
=
staffDepartmentRelatedApiService
.
getPageUrl
(
AppPageType
.
STORE_RELATED_RECORD
.
getCode
(),
data
);
staffDepartmentRelatedApiService
.
sendSingleMessage
(
gicClerk
.
getClerkId
(),
messageTitle
,
messageContent
,
pageUrl
);
...
...
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