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
4aad8761
Commit
4aad8761
authored
Aug 22, 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
96cd844a
9b8a0a30
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
72 deletions
+63
-72
MaterialApiServiceImpl.java
...nage/service/service/out/impl/MaterialApiServiceImpl.java
+5
-2
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+7
-6
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+51
-64
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MaterialApiServiceImpl.java
View file @
4aad8761
...
@@ -310,8 +310,11 @@ public class MaterialApiServiceImpl implements MaterialApiService {
...
@@ -310,8 +310,11 @@ public class MaterialApiServiceImpl implements MaterialApiService {
(
a
,
b
)
->
a
(
a
,
b
)
->
a
));
));
result
.
forEach
(
dto
->
{
result
.
forEach
(
dto
->
{
TabMiniprogramSetting
miniprogramSetting
=
settingMap
.
get
(
dto
.
getAppId
());
//小程序去判断逻辑
dto
.
setMaterialDesc
(
miniprogramSetting
==
null
?
"--"
:
miniprogramSetting
.
getMiniprogramName
());
if
(
dto
.
getMaterialType
()
!=
null
&&
dto
.
getMaterialType
()
==
6
)
{
TabMiniprogramSetting
miniprogramSetting
=
settingMap
.
get
(
dto
.
getAppId
());
dto
.
setMaterialDesc
(
miniprogramSetting
==
null
?
"--"
:
miniprogramSetting
.
getMiniprogramName
());
}
});
});
}
}
return
PageUtil
.
changePageHelperToCurrentPage
(
page
,
MaterialDTO
.
class
);
return
PageUtil
.
changePageHelperToCurrentPage
(
page
,
MaterialDTO
.
class
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
4aad8761
...
@@ -293,7 +293,7 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -293,7 +293,7 @@ public class MessageApiServiceImpl implements MessageApiService {
if
(
null
!=
user
)
{
if
(
null
!=
user
)
{
Integer
status
=
user
.
getStatus
();
Integer
status
=
user
.
getStatus
();
// 1=已激活,2=已禁用,4=未激活,5=退出企业。
// 1=已激活,2=已禁用,4=未激活,5=退出企业。
log
.
info
(
"企业微信用户状态:{}"
,
status
);
log
.
info
(
"企业微信用户状态:{}"
,
status
);
if
(
status
==
1
)
{
if
(
status
==
1
)
{
log
.
info
(
"企业微信用户存在,并且已激活无需删除:{}:{}"
,
wxEnterpriseId
,
userid
);
log
.
info
(
"企业微信用户存在,并且已激活无需删除:{}:{}"
,
wxEnterpriseId
,
userid
);
return
;
return
;
...
@@ -316,7 +316,7 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -316,7 +316,7 @@ public class MessageApiServiceImpl implements MessageApiService {
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationApiService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationApiService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
if
(
CollectionUtils
.
isNotEmpty
(
staffClerkRelationDTOS
))
{
if
(
CollectionUtils
.
isNotEmpty
(
staffClerkRelationDTOS
))
{
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
staffId
,
staffClerkRelationDTO
.
getClerkId
());
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
staffId
,
staffClerkRelationDTO
.
getClerkId
());
}
}
}
}
}
}
...
@@ -475,13 +475,13 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -475,13 +475,13 @@ public class MessageApiServiceImpl implements MessageApiService {
log
.
info
(
"clerkId未绑定:clerkId={}"
,
clerkId
);
log
.
info
(
"clerkId未绑定:clerkId={}"
,
clerkId
);
return
false
;
return
false
;
}
}
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
relation
.
getWxEnterpriseId
())
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
relation
.
getWxEnterpriseId
());
if
(
qwDTO
==
null
)
{
if
(
qwDTO
==
null
)
{
log
.
info
(
"企业为空"
);
log
.
info
(
"企业为空"
);
return
false
;
return
false
;
}
}
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
relation
.
getStaffId
());
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
relation
.
getStaffId
());
String
corpid
=
qwDTO
.
getThirdCorpid
()
;
String
corpid
=
qwDTO
.
getThirdCorpid
();
String
wxUserId
=
""
;
String
wxUserId
=
""
;
if
(
qwDTO
.
needOpenUserId3th
())
{
if
(
qwDTO
.
needOpenUserId3th
())
{
wxUserId
=
staffDTO
.
getWxOpenUseId
();
wxUserId
=
staffDTO
.
getWxOpenUseId
();
...
@@ -560,7 +560,7 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -560,7 +560,7 @@ public class MessageApiServiceImpl implements MessageApiService {
String
title
=
jsonObject
.
getString
(
"title"
);
String
title
=
jsonObject
.
getString
(
"title"
);
String
content
=
jsonObject
.
getString
(
"content"
);
String
content
=
jsonObject
.
getString
(
"content"
);
String
memberName
=
jsonObject
.
getString
(
"memberName"
);
String
memberName
=
jsonObject
.
getString
(
"memberName"
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
if
(
qwDTO
==
null
)
{
if
(
qwDTO
==
null
)
{
log
.
info
(
"企业为空"
);
log
.
info
(
"企业为空"
);
return
;
return
;
...
@@ -583,7 +583,8 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -583,7 +583,8 @@ public class MessageApiServiceImpl implements MessageApiService {
@Override
@Override
public
String
getNewWxUserIdByStaffId
(
String
wxEnterpriseId
,
String
staffId
)
{
public
String
getNewWxUserIdByStaffId
(
String
wxEnterpriseId
,
String
staffId
)
{
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
log
.
info
(
"请求wxEnterpriseId:{},staffId:{}"
,
wxEnterpriseId
,
staffId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
if
(
qwDTO
==
null
)
{
if
(
qwDTO
==
null
)
{
return
""
;
return
""
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
4aad8761
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.util.ArrayList
;
import
cn.hutool.core.collection.CollectionUtil
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
...
@@ -27,12 +14,7 @@ import com.gic.enterprise.api.service.EnterpriseService;
...
@@ -27,12 +14,7 @@ import com.gic.enterprise.api.service.EnterpriseService;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.StaffClerkBindLogDetailDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkBindLogInfoDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkInfoDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.qdto.ClerkSyncQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.ClerkSyncQDTO
;
import
com.gic.haoban.manage.api.enums.AuditType
;
import
com.gic.haoban.manage.api.enums.AuditType
;
import
com.gic.haoban.manage.api.enums.BindTypeEnum
;
import
com.gic.haoban.manage.api.enums.BindTypeEnum
;
...
@@ -46,21 +28,22 @@ import com.gic.haoban.manage.service.entity.MemberClerkChatConfig;
...
@@ -46,21 +28,22 @@ import com.gic.haoban.manage.service.entity.MemberClerkChatConfig;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffClerkBindLog
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffClerkBindLog
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation
;
import
com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.haoban.manage.service.service.ExternalClerkRelatedService
;
import
com.gic.haoban.manage.service.service.SecretSettingService
;
import
com.gic.haoban.manage.service.service.StaffClerkBindLogService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
com.gic.haoban.manage.service.task.RouterConstant
;
import
com.gic.haoban.manage.service.task.RouterConstant
;
import
com.gic.haoban.task.api.dto.MqMessageQo
;
import
com.gic.haoban.task.api.dto.MqMessageQo
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactResultDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactResultDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.collection.CollectionUtil
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
@Service
public
class
StaffClerkRelationApiServiceImpl
implements
StaffClerkRelationApiService
{
public
class
StaffClerkRelationApiServiceImpl
implements
StaffClerkRelationApiService
{
...
@@ -96,9 +79,9 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -96,9 +79,9 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Autowired
@Autowired
private
HmClerkRelationApiService
hmClerkRelationApiService
;
private
HmClerkRelationApiService
hmClerkRelationApiService
;
@Autowired
@Autowired
private
HmQrcodeService
hmQrcodeService
;
private
HmQrcodeService
hmQrcodeService
;
@Autowired
@Autowired
private
Config
config
;
private
Config
config
;
@Override
@Override
public
void
bindLogMq
(
String
params
)
{
public
void
bindLogMq
(
String
params
)
{
...
@@ -118,13 +101,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -118,13 +101,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
String
clerkName
=
null
;
String
clerkName
=
null
;
if
(
null
!=
clerkDTO
)
{
if
(
null
!=
clerkDTO
)
{
phoneNumber
=
clerkDTO
.
getPhoneNumber
();
phoneNumber
=
clerkDTO
.
getPhoneNumber
();
clerkName
=
clerkDTO
.
getClerkName
()
;
clerkName
=
clerkDTO
.
getClerkName
();
}
}
String
operClerkId
=
infoDTO
.
getOptStaffId
()
;
String
operClerkId
=
infoDTO
.
getOptStaffId
();
clerkDTO
=
clerkService
.
getClerkByClerkIdNoStatus
(
clerkRelation
.
getClerkId
());
clerkDTO
=
clerkService
.
getClerkByClerkIdNoStatus
(
clerkRelation
.
getClerkId
());
String
operName
=
null
;
String
operName
=
null
;
if
(
null
!=
clerkDTO
)
{
if
(
null
!=
clerkDTO
)
{
operName
=
clerkDTO
.
getClerkName
()
;
operName
=
clerkDTO
.
getClerkName
();
}
}
TabHaobanStaffClerkBindLog
enity
=
new
TabHaobanStaffClerkBindLog
();
TabHaobanStaffClerkBindLog
enity
=
new
TabHaobanStaffClerkBindLog
();
enity
.
setClerkId
(
clerkRelation
.
getClerkId
());
enity
.
setClerkId
(
clerkRelation
.
getClerkId
());
...
@@ -169,7 +152,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -169,7 +152,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
infoDTO
.
setBrandName
(
enterpriseDTO
.
getBrandName
());
infoDTO
.
setBrandName
(
enterpriseDTO
.
getBrandName
());
infoDTO
.
setEnterpriseName
(
enterpriseDTO
.
getEnterpriseName
());
infoDTO
.
setEnterpriseName
(
enterpriseDTO
.
getEnterpriseName
());
}
}
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
infoDTO
.
getClerkId
(),-
1
);
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
infoDTO
.
getClerkId
(),
-
1
);
if
(
null
!=
clerkDTO
)
{
if
(
null
!=
clerkDTO
)
{
infoDTO
.
setClerkPhoneNumber
(
clerkDTO
.
getPhoneNumber
());
infoDTO
.
setClerkPhoneNumber
(
clerkDTO
.
getPhoneNumber
());
infoDTO
.
setClerkName
(
clerkDTO
.
getClerkName
());
infoDTO
.
setClerkName
(
clerkDTO
.
getClerkName
());
...
@@ -233,7 +216,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -233,7 +216,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
//删除绑定关系
//删除绑定关系
tabHaobanStaffClerkRelationMapper
.
delByStoreIdAndCode
(
storeId
,
clerkCode
);
tabHaobanStaffClerkRelationMapper
.
delByStoreIdAndCode
(
storeId
,
clerkCode
);
//删除主门店
//删除主门店
delSetMainStore
(
staffClerkRelation
,
ChannelCodeEnum
.
SELF_UNBIND
.
getCode
());
delSetMainStore
(
staffClerkRelation
,
ChannelCodeEnum
.
SELF_UNBIND
.
getCode
());
}
}
@Override
@Override
...
@@ -271,7 +254,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -271,7 +254,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
StaffClerkRelationDTO
staffRelation
=
staffClerkRelationService
.
getByClerkId
(
clerkId
);
StaffClerkRelationDTO
staffRelation
=
staffClerkRelationService
.
getByClerkId
(
clerkId
);
return
staffRelation
;
return
staffRelation
;
}
}
@Override
@Override
public
StaffClerkRelationDTO
getByClerkIdForWxUserId
(
String
clerkId
)
{
public
StaffClerkRelationDTO
getByClerkIdForWxUserId
(
String
clerkId
)
{
return
staffClerkRelationService
.
getByClerkIdForWxUserId
(
clerkId
);
return
staffClerkRelationService
.
getByClerkIdForWxUserId
(
clerkId
);
...
@@ -295,14 +278,14 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -295,14 +278,14 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
staffClerkBindLogService
.
pushToMq
(
oldStaffClerkRelation
.
getStaffId
(),
optStaffId
,
BindTypeEnum
.
UNBIND
.
getVal
(),
chanelCode
,
staffClerkRelation
.
getStaffClerkRelationId
());
staffClerkBindLogService
.
pushToMq
(
oldStaffClerkRelation
.
getStaffId
(),
optStaffId
,
BindTypeEnum
.
UNBIND
.
getVal
(),
chanelCode
,
staffClerkRelation
.
getStaffClerkRelationId
());
clerkMainStoreRelatedService
.
delMainStore
(
oldStaffClerkRelation
.
getStaffId
(),
oldStaffClerkRelation
.
getStoreId
(),
oldStaffClerkRelation
.
getWxEnterpriseId
());
clerkMainStoreRelatedService
.
delMainStore
(
oldStaffClerkRelation
.
getStaffId
(),
oldStaffClerkRelation
.
getStoreId
(),
oldStaffClerkRelation
.
getWxEnterpriseId
());
}
}
staffClerkRelationService
.
bind
(
staffClerkRelation
,
optStaffId
,
chanelCode
);
staffClerkRelationService
.
bind
(
staffClerkRelation
,
optStaffId
,
chanelCode
);
}
}
@Override
@Override
public
void
delByClerkId
(
String
clerkId
)
{
public
void
delByClerkId
(
String
clerkId
)
{
TabHaobanStaffClerkRelation
staffClerkRelation
=
tabHaobanStaffClerkRelationMapper
.
getOneByClerkId
(
clerkId
);
TabHaobanStaffClerkRelation
staffClerkRelation
=
tabHaobanStaffClerkRelationMapper
.
getOneByClerkId
(
clerkId
);
tabHaobanStaffClerkRelationMapper
.
delByClerkId
(
clerkId
);
tabHaobanStaffClerkRelationMapper
.
delByClerkId
(
clerkId
);
delSetMainStore
(
staffClerkRelation
,
ChannelCodeEnum
.
AUDIT_UNBIND
.
getCode
());
delSetMainStore
(
staffClerkRelation
,
ChannelCodeEnum
.
AUDIT_UNBIND
.
getCode
());
}
}
@Override
@Override
...
@@ -325,13 +308,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -325,13 +308,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
}
if
(
"-1"
.
equals
(
item
.
getOptStaffId
()))
{
if
(
"-1"
.
equals
(
item
.
getOptStaffId
()))
{
item
.
setOptStaffName
(
"系统"
);
item
.
setOptStaffName
(
"系统"
);
}
else
{
}
else
{
item
.
setOptStaffName
(
item
.
getOperName
());
item
.
setOptStaffName
(
item
.
getOperName
());
}
}
if
(
StringUtils
.
isBlank
(
item
.
getOptStaffName
()))
{
if
(
StringUtils
.
isBlank
(
item
.
getOptStaffName
()))
{
item
.
setOptStaffName
(
"未知成员"
);
item
.
setOptStaffName
(
"未知成员"
);
}
}
if
(
StringUtils
.
isBlank
(
item
.
getClerkName
()))
{
if
(
StringUtils
.
isBlank
(
item
.
getClerkName
()))
{
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkIdNoStatus
(
item
.
getClerkId
());
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkIdNoStatus
(
item
.
getClerkId
());
if
(
null
!=
clerkDTO
)
{
if
(
null
!=
clerkDTO
)
{
item
.
setClerkName
(
clerkDTO
.
getClerkName
());
item
.
setClerkName
(
clerkDTO
.
getClerkName
());
...
@@ -361,13 +344,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -361,13 +344,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
}
if
(
"-1"
.
equals
(
item
.
getOptStaffId
()))
{
if
(
"-1"
.
equals
(
item
.
getOptStaffId
()))
{
item
.
setOptStaffName
(
"系统"
);
item
.
setOptStaffName
(
"系统"
);
}
else
{
}
else
{
item
.
setOptStaffName
(
item
.
getOperName
());
item
.
setOptStaffName
(
item
.
getOperName
());
}
}
if
(
StringUtils
.
isBlank
(
item
.
getOptStaffName
()))
{
if
(
StringUtils
.
isBlank
(
item
.
getOptStaffName
()))
{
item
.
setOptStaffName
(
"未知成员"
);
item
.
setOptStaffName
(
"未知成员"
);
}
}
if
(
StringUtils
.
isBlank
(
item
.
getClerkName
()))
{
if
(
StringUtils
.
isBlank
(
item
.
getClerkName
()))
{
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkIdNoStatus
(
item
.
getClerkId
());
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkIdNoStatus
(
item
.
getClerkId
());
if
(
null
!=
clerkDTO
)
{
if
(
null
!=
clerkDTO
)
{
item
.
setClerkName
(
clerkDTO
.
getClerkName
());
item
.
setClerkName
(
clerkDTO
.
getClerkName
());
...
@@ -384,7 +367,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -384,7 +367,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
staffClerkBindLogService
.
pushToMq
(
staffId
,
optStaffId
,
optType
,
channelCode
,
relationId
);
staffClerkBindLogService
.
pushToMq
(
staffId
,
optStaffId
,
optType
,
channelCode
,
relationId
);
}
}
private
void
delSetMainStore
(
TabHaobanStaffClerkRelation
staffClerkRelation
,
Integer
channelCode
)
{
private
void
delSetMainStore
(
TabHaobanStaffClerkRelation
staffClerkRelation
,
Integer
channelCode
)
{
if
(
staffClerkRelation
==
null
)
{
if
(
staffClerkRelation
==
null
)
{
logger
.
info
(
"staffClerkRelation为空"
);
logger
.
info
(
"staffClerkRelation为空"
);
return
;
return
;
...
@@ -396,7 +379,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -396,7 +379,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
//删除主门店
//删除主门店
clerkMainStoreRelatedService
.
delMainStore
(
staffId
,
staffClerkRelation
.
getStoreId
(),
wxEnterpriseId
);
clerkMainStoreRelatedService
.
delMainStore
(
staffId
,
staffClerkRelation
.
getStoreId
(),
wxEnterpriseId
);
//废弃活码
//废弃活码
hmClerkRelationApiService
.
delByClerkId
(
clerkId
,
staffClerkRelation
.
getEnterpriseId
(),
wxEnterpriseId
,
channelCode
);
hmClerkRelationApiService
.
delByClerkId
(
clerkId
,
staffClerkRelation
.
getEnterpriseId
(),
wxEnterpriseId
,
channelCode
);
}
}
@Override
@Override
...
@@ -423,15 +406,15 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -423,15 +406,15 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
List
<
String
>
userIds
=
new
ArrayList
<>();
List
<
String
>
userIds
=
new
ArrayList
<>();
send
.
setUser
(
userIds
);
send
.
setUser
(
userIds
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
relationDTO
.
getWxEnterpriseId
())
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
relationDTO
.
getWxEnterpriseId
());
if
(
qwDTO
.
needOpenUserId3th
())
{
if
(
qwDTO
.
needOpenUserId3th
())
{
userIds
.
add
(
relationDTO
.
getOpenUserId
())
;
userIds
.
add
(
relationDTO
.
getOpenUserId
());
}
else
{
}
else
{
userIds
.
add
(
relationDTO
.
getQwUserId
())
;
userIds
.
add
(
relationDTO
.
getQwUserId
());
}
}
QywxExternalcontactResultDTO
configResp
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getDkCorpid
()
,
config
.
getWxSuiteid
()
,
send
);
QywxExternalcontactResultDTO
configResp
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getDkCorpid
()
,
config
.
getWxSuiteid
()
,
send
);
logger
.
info
(
"configId:{}"
,
JSON
.
toJSONString
(
configResp
));
logger
.
info
(
"configId:{}"
,
JSON
.
toJSONString
(
configResp
));
String
configId
=
configResp
.
getConfig_id
()
;
String
configId
=
configResp
.
getConfig_id
();
if
(
StringUtils
.
isBlank
(
configId
))
{
if
(
StringUtils
.
isBlank
(
configId
))
{
logger
.
info
(
"staff:{}"
,
configId
,
JSONObject
.
toJSONString
(
relationDTO
));
logger
.
info
(
"staff:{}"
,
configId
,
JSONObject
.
toJSONString
(
relationDTO
));
response
.
setCode
(
4
);
response
.
setCode
(
4
);
...
@@ -455,8 +438,8 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -455,8 +438,8 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
}
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listByStaffId
(
String
wxEnterpriseId
,
String
staffId
)
{
public
List
<
StaffClerkRelationDTO
>
listByStaffId
(
String
wxEnterpriseId
,
String
staffId
)
{
return
staffClerkRelationService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
return
staffClerkRelationService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
}
}
@Override
@Override
...
@@ -466,7 +449,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -466,7 +449,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override
@Override
public
void
clerkStoreMoveDel
(
String
param
)
{
public
void
clerkStoreMoveDel
(
String
param
)
{
logger
.
info
(
"导购转移删除修改:{}"
,
param
);
logger
.
info
(
"导购转移删除修改:{}"
,
param
);
if
(
StringUtils
.
isBlank
(
param
))
{
if
(
StringUtils
.
isBlank
(
param
))
{
logger
.
error
(
"参数为空"
);
logger
.
error
(
"参数为空"
);
return
;
return
;
...
@@ -475,25 +458,29 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -475,25 +458,29 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
Integer
type
=
clerkSyncQDTO
.
getType
();
Integer
type
=
clerkSyncQDTO
.
getType
();
String
clerkId
=
clerkSyncQDTO
.
getClerkId
();
String
clerkId
=
clerkSyncQDTO
.
getClerkId
();
String
enterpriseId
=
clerkSyncQDTO
.
getEnterpriseId
();
String
enterpriseId
=
clerkSyncQDTO
.
getEnterpriseId
();
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
,-
1
);
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
,
-
1
);
if
(
clerkDTO
==
null
)
{
if
(
clerkDTO
==
null
)
{
logger
.
error
(
"导购为空"
);
logger
.
error
(
"导购为空"
);
return
;
return
;
}
}
if
(
type
==
1
)
{
if
(
type
==
1
)
{
Integer
status
=
clerkDTO
.
getStatus
();
logger
.
info
(
"导购删除解绑,clerkId:{},status:{}"
,
clerkId
,
status
);
//导购删除解绑
//导购删除解绑
if
(!
clerkDTO
.
getStatus
()
.
equals
(
1
))
{
if
(!
status
.
equals
(
1
))
{
//解绑
//解绑
staffClerkRelationService
.
delBind
(
clerkId
,
"-1"
,
ChannelCodeEnum
.
GIC_CLERK_DEL_UNBIND
.
getCode
());
staffClerkRelationService
.
delBind
(
clerkId
,
"-1"
,
ChannelCodeEnum
.
GIC_CLERK_DEL_UNBIND
.
getCode
());
}
}
}
else
if
(
type
==
2
)
{
}
else
if
(
type
==
2
)
{
logger
.
info
(
"门店转移、重新绑定,clerkId:{}"
,
clerkId
);
//门店转移、重新绑定
//门店转移、重新绑定
StaffClerkRelationDTO
relationDTO
=
staffClerkRelationService
.
getOneBindCodeNoStatus
(
clerkDTO
.
getEnterpriseId
(),
clerkDTO
.
getClerkCode
());
StaffClerkRelationDTO
relationDTO
=
staffClerkRelationService
.
getOneBindCodeNoStatus
(
clerkDTO
.
getEnterpriseId
(),
clerkDTO
.
getClerkCode
());
moveOrAddClerk
(
clerkSyncQDTO
,
relationDTO
);
moveOrAddClerk
(
clerkSyncQDTO
,
relationDTO
);
}
else
if
(
type
==
3
)
{
}
else
if
(
type
==
3
)
{
//店长任务重新分配
//店长任务重新分配
Integer
clerkType
=
clerkDTO
.
getClerkType
();
Integer
clerkType
=
clerkDTO
.
getClerkType
();
logger
.
info
(
"店长任务重新分配,clerkId:{},clerkType:{}"
,
clerkId
,
clerkType
);
if
(
clerkType
!=
null
&&
clerkType
==
1
)
{
if
(
clerkType
!=
null
&&
clerkType
==
1
)
{
//发消息处理新增店长,任务重新分配问题
//发消息处理新增店长,任务重新分配问题
try
{
try
{
...
@@ -506,10 +493,10 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -506,10 +493,10 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
GICMQClientUtil
.
getClientInstance
().
sendCommonMessage
(
RouterConstant
.
ROUTERTYPE
,
s
,
GICMQClientUtil
.
getClientInstance
().
sendCommonMessage
(
RouterConstant
.
ROUTERTYPE
,
s
,
"com.gic.haoban.task.api.service.MqAsynApiService"
,
"run"
);
"com.gic.haoban.task.api.service.MqAsynApiService"
,
"run"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"任务重新分配问题发送消息队列出错"
,
e
);
logger
.
error
(
"任务重新分配问题发送消息队列出错"
,
e
);
}
}
}
}
hmQrcodeService
.
updateClerkNameByClerkId
(
enterpriseId
,
clerkId
,
clerkDTO
.
getClerkName
(),
clerkDTO
.
getClerkCode
());
hmQrcodeService
.
updateClerkNameByClerkId
(
enterpriseId
,
clerkId
,
clerkDTO
.
getClerkName
(),
clerkDTO
.
getClerkCode
());
}
}
}
}
...
@@ -526,13 +513,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -526,13 +513,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
ServiceResponse
response
=
bindStaffClerk
(
relationDTO
,
"-1"
,
ChannelCodeEnum
.
SYNC_BIND
.
getCode
());
ServiceResponse
response
=
bindStaffClerk
(
relationDTO
,
"-1"
,
ChannelCodeEnum
.
SYNC_BIND
.
getCode
());
logger
.
info
(
"绑定结果正常:{},{}"
,
JSONObject
.
toJSONString
(
response
),
relationDTO
.
getClerkId
());
logger
.
info
(
"绑定结果正常:{},{}"
,
JSONObject
.
toJSONString
(
response
),
relationDTO
.
getClerkId
());
}
}
@Override
@Override
public
int
getCanAddHmCount
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
)
{
public
int
getCanAddHmCount
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
)
{
int
count
=
this
.
hmQrcodeService
.
getCanAddCount
(
wxEnterpriseId
,
enterpriseId
,
clerkId
);
int
count
=
this
.
hmQrcodeService
.
getCanAddCount
(
wxEnterpriseId
,
enterpriseId
,
clerkId
);
return
count
;
return
count
;
}
}
@Override
@Override
public
List
<
String
>
listStaffIdByWxEnterpriseId
(
String
wxEnterpriseId
)
{
public
List
<
String
>
listStaffIdByWxEnterpriseId
(
String
wxEnterpriseId
)
{
return
this
.
staffClerkRelationService
.
listByWxEnterpriseId
(
wxEnterpriseId
);
return
this
.
staffClerkRelationService
.
listByWxEnterpriseId
(
wxEnterpriseId
);
...
...
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