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
1a744cac
Commit
1a744cac
authored
Sep 21, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-调整队列' into 'master'
Master 调整队列 See merge request
!1456
parents
544fa2bc
bf44e19e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
9 deletions
+39
-9
DealSyncOperationApiService.java
...aoban/manage/api/service/DealSyncOperationApiService.java
+0
-1
StoreRangeService.java
.../gic/haoban/manage/service/service/StoreRangeService.java
+2
-0
StoreRangeServiceImpl.java
...an/manage/service/service/impl/StoreRangeServiceImpl.java
+24
-0
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+3
-0
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+8
-6
SelfFriendSyncNewOperation.java
...anage/service/task/friend/SelfFriendSyncNewOperation.java
+1
-1
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DealSyncOperationApiService.java
View file @
1a744cac
...
...
@@ -28,7 +28,6 @@ public interface DealSyncOperationApiService {
/**
* mq拆分
* 部门同步处理
* "routerName": "departmentSyncDealMq2"
*
* @param params
*/
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StoreRangeService.java
View file @
1a744cac
...
...
@@ -113,4 +113,6 @@ public interface StoreRangeService {
List
<
String
>
listStoreIdByName
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeName
)
;
public
boolean
hasStore
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeId
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StoreRangeServiceImpl.java
View file @
1a744cac
...
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.ToolUtil
;
import
com.gic.enterprise.api.dto.StoreGroupDTO
;
import
com.gic.enterprise.api.service.StoreGroupService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
...
...
@@ -45,6 +47,8 @@ public class StoreRangeServiceImpl implements StoreRangeService {
@Autowired
private
StaffClerkRelationService
staffClerkRelationService
;
@Autowired
private
StoreGroupService
storeGroupService
;
@Override
...
...
@@ -267,4 +271,24 @@ public class StoreRangeServiceImpl implements StoreRangeService {
public
List
<
String
>
listStoreIdByName
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeName
)
{
return
tabHaobanStoreRelationMapper
.
listStoreIdByName
(
wxEnterpriseId
,
enterpriseId
,
storeName
);
}
@Override
public
boolean
hasStore
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeId
)
{
List
<
String
>
storeGroupIds
=
this
.
listStoreGroupIdByWxEnterpriseId
(
wxEnterpriseId
,
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
storeGroupIds
))
{
logger
.
info
(
"好办门店分组id为空"
);
return
false
;
}
String
[]
array
=
storeGroupIds
.
toArray
(
new
String
[
0
]);
List
<
StoreGroupDTO
>
storeGroupDTOS
=
storeGroupService
.
listStoreGroup
(
array
,
enterpriseId
);
List
<
String
>
parentGroupIds
=
storeGroupDTOS
.
stream
().
map
(
StoreGroupDTO:
:
getParentGroupId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
parentGroupIds
)
&&
parentGroupIds
.
contains
(
"0"
))
{
logger
.
info
(
"企微包含所有门店"
,
wxEnterpriseId
);
return
true
;
}
if
(
isFlagByStoreId
(
storeId
,
wxEnterpriseId
,
enterpriseId
))
{
return
true
;
}
return
false
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
1a744cac
...
...
@@ -934,6 +934,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
TabHaobanSyncTask
syncTask
=
syncTaskService
.
getSyncTask
(
taskId
);
String
wxEnterpriseId
=
syncTask
.
getWxEnterpriseId
();
this
.
unlockTask
(
wxEnterpriseId
)
;
this
.
cleanDiffrence
(
wxEnterpriseId
,
taskId
);
logger
.
info
(
"同步通讯录完成"
);
RedisUtil
.
unlock
(
key
);
}
...
...
@@ -970,6 +971,8 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
List
<
String
>
dataIds
=
preDealService
.
listReDataIdByPDataId
(
taskId
,
stffId
,
PreDealTypeEnum
.
friend
.
getVal
());
if
(
CollectionUtils
.
isEmpty
(
dataIds
))
{
logger
.
info
(
"无第三方的数据/自建"
);
String
staffLockKey
=
DealSyncOperationApiServiceImpl
.
FRIEND_LOCK
+
stffId
;
RedisUtil
.
delCache
(
staffLockKey
);
preDealService
.
updateStatusByDataId
(
taskId
,
stffId
,
PreDealTypeEnum
.
friend_clerk
.
getVal
(),
PreDealStatusEnum
.
computed
.
getVal
(),
"成功"
);
}
else
{
sendToMq
(
taskId
,
new
HashSet
<>(
dataIds
),
SyncTaskStatusEnum
.
friend_sync
,
null
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
1a744cac
...
...
@@ -75,7 +75,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Autowired
private
HmQrcodeService
hmQrcodeService
;
@Autowired
private
Config
config
;
private
StoreRangeService
storeRangeService
;
@Override
public
void
bindLogMq
(
String
params
)
{
...
...
@@ -513,11 +513,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
logger
.
info
(
"导购未关联成员,oldClerkId={}"
,
oldClerkId
);
return
;
}
/* StaffClerkRelationDTO oldRelationDTO = staffClerkRelationService.getByClerkId(oldClerkId);
if (null == oldRelationDTO) {
logger.info("导购未关联成员,clerkCode={}", clerkCode);
return;
}*/
// 如果新门店未关联好办,进行解绑
boolean
hasFlag
=
this
.
storeRangeService
.
hasStore
(
oldRelationDTO
.
getWxEnterpriseId
(),
enterpriseId
,
clerkDTO
.
getStoreId
())
;
if
(!
hasFlag
)
{
logger
.
info
(
"新门店未关联好办,storeId={}"
,
clerkDTO
.
getStoreId
());
staffClerkRelationService
.
delBind
(
oldClerkId
,
"-1"
,
ChannelCodeEnum
.
GIC_CLERK_DEL_UNBIND
.
getCode
(),
null
,
null
);
return
;
}
logger
.
info
(
"导购门店转移,老的绑定导购id={}"
,
oldRelationDTO
.
getClerkId
());
this
.
moveOrAddClerk
(
clerkSyncQDTO
,
oldRelationDTO
);
}
else
if
(
type
==
3
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/friend/SelfFriendSyncNewOperation.java
View file @
1a744cac
...
...
@@ -169,7 +169,7 @@ public class SelfFriendSyncNewOperation implements BaseSyncOperation {
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
try
{
Log
.
info
(
"发送队列SelfFriendSyncNewOperation={}"
,
JSON
.
toJSONString
(
ret
));
clientInstance
.
sendBatchMessages
(
"departmentSyncDealMq
2
"
,
ret
);
clientInstance
.
sendBatchMessages
(
"departmentSyncDealMq"
,
ret
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"发送失败:{},{}"
,
taskId
);
e
.
printStackTrace
();
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
1a744cac
...
...
@@ -336,7 +336,7 @@ public class DepartmentContoller extends WebBaseController {
Object
cache
=
RedisUtil
.
getLocalCache
(
"department-list-cache-"
+
wxEnterpriseId
);
if
(
null
==
cache
)
{
List
<
DepartmentShortDTO
>
list
=
departmentApiService
.
listAllDepartment
(
wxEnterpriseId
);
RedisUtil
.
setLocalCache
(
"department-list-cache-"
+
wxEnterpriseId
,
list
,
-
1
L
);
RedisUtil
.
setLocalCache
(
"department-list-cache-"
+
wxEnterpriseId
,
list
,
60
*
60
*
24
L
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
}
else
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
cache
);
...
...
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