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
e3551669
Commit
e3551669
authored
May 30, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature/导购code替换' into feature/五月二期
parents
2824ae76
38749865
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
33 deletions
+34
-33
StaffClerkRelationApiService.java
...oban/manage/api/service/StaffClerkRelationApiService.java
+7
-0
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+4
-5
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+2
-1
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+3
-2
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+4
-18
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+2
-1
WxStaffController.java
...m/gic/haoban/manage/web/controller/WxStaffController.java
+12
-6
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffClerkRelationApiService.java
View file @
e3551669
...
...
@@ -18,6 +18,13 @@ public interface StaffClerkRelationApiService {
*/
void
bindLogMq
(
String
params
);
/**
*
* @param wxEnterpriseId
* @param enterpriseId
* @param clerkCodeList 改为传导购idList
* @return
*/
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
wxEnterpriseId
,
String
enterpriseId
,
Set
<
String
>
clerkCodeList
);
List
<
StaffClerkRelationDTO
>
listBindCodeByStaffId
(
List
<
String
>
enterpriseIdList
,
String
staffId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
e3551669
...
...
@@ -31,10 +31,8 @@ public interface TabHaobanStaffClerkRelationMapper {
int
changeStatusByClerkId
(
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"status"
)
Integer
status
);
/**
* 解绑
*/
void
delByStoreIdAndCode
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"clerkCode"
)
String
clerkCode
);
//无效接口删除
// void delByStoreIdAndCode(@Param("storeId") String storeId, @Param("clerkCode") String clerkCode);
/**
* 解绑
...
...
@@ -49,7 +47,8 @@ public interface TabHaobanStaffClerkRelationMapper {
List
<
StaffClerkRelationDTO
>
lisByStaffId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"storeIdList"
)
List
<
String
>
storeIdList
);
StaffClerkRelationDTO
getByCodeAndStoreId
(
@Param
(
"clerkCode"
)
String
clerkCode
,
@Param
(
"storeId"
)
String
storeId
);
//无效接口删除
// StaffClerkRelationDTO getByCodeAndStoreId(@Param("clerkCode") String clerkCode, @Param("storeId") String storeId);
List
<
String
>
listByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
View file @
e3551669
...
...
@@ -132,7 +132,8 @@ public class AuditApiServiceImpl implements AuditApiService {
//门店导购绑定
String
oldValue
=
tab
.
getOldValue
();
AuditStaffDTO
obj
=
JSONObject
.
parseObject
(
oldValue
,
AuditStaffDTO
.
class
);
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
obj
.
getClerkCode
(),
tab
.
getEnterpriseId
());
//统一替换导购code
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
obj
.
getClerkId
(),
tab
.
getEnterpriseId
());
String
staffId
=
obj
.
getStaffId
();
String
storeId
=
tab
.
getCommitStoreId
();
String
clerkId
=
obj
.
getClerkId
();
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
e3551669
...
...
@@ -500,9 +500,10 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
}
else
if
(
type
==
2
)
{
logger
.
info
(
"导购门店转移,新的导购和门店,clerkId={},storeId={}"
,
clerkId
,
clerkSyncQDTO
.
getStoreId
());
StaffClerkRelationDTO
oldRelationDTO
=
staffClerkRelationService
.
getStaffClerkRelationDTO
(
clerkCode
,
enterpriseId
);
//统一处理:导购code替换为导购id
StaffClerkRelationDTO
oldRelationDTO
=
staffClerkRelationService
.
getStaffClerkRelationDTO
(
oldClerkId
,
enterpriseId
);
if
(
null
==
oldRelationDTO
)
{
logger
.
info
(
"导购未关联成员,
clerkCode={}"
,
clerkCode
);
logger
.
info
(
"导购未关联成员,
oldClerkId={}"
,
oldClerkId
);
return
;
}
/* StaffClerkRelationDTO oldRelationDTO = staffClerkRelationService.getByClerkId(oldClerkId);
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
e3551669
...
...
@@ -57,7 +57,7 @@
<include
refid=
"leftJoinStaffSQL"
/>
where a.enterprise_id = #{enterpriseId}
and a.wx_enterprise_id = #{wxEnterpriseId} and a.status_flag = 1 and b.status_flag = 1
and a.clerk_
code
in
and a.clerk_
id
in
<foreach
collection=
"clerkCodeList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
...
...
@@ -87,7 +87,7 @@
<include
refid=
"leftJoinStaffSQL"
/>
where a.status_flag = 1 and b.status_flag = 1
and a.enterprise_id = #{enterpriseId}
and a.clerk_
code
= #{clerkCode} order by a.create_time desc limit 1
and a.clerk_
id
= #{clerkCode} order by a.create_time desc limit 1
</select>
<select
id=
"getStaffClerkRelationDTO"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
...
...
@@ -95,7 +95,7 @@
where a.status_flag = 1 and b.status_flag = 1
and a.manage_flag = 0
and a.enterprise_id = #{enterpriseId}
and a.clerk_
code
= #{clerkCode} order by a.create_time desc limit 1
and a.clerk_
id
= #{clerkCode} order by a.create_time desc limit 1
</select>
...
...
@@ -107,15 +107,7 @@
and status_flag != #{status}
</update>
<update
id=
"delByStoreIdAndCode"
>
update tab_haoban_staff_clerk_relation
set status_flag = 0,
update_time = now()
where clerk_code = #{clerkCode,jdbcType=VARCHAR}
and store_id = #{storeId,jdbcType=VARCHAR}
and status_flag = 1
</update>
<select
id=
"listByClerkIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
<include
refid=
"leftJoinStaffSQL"
/>
where a.status_flag=1 and b.status_flag = 1
...
...
@@ -173,12 +165,6 @@
and a.staff_id = #{staffId} and a.status_flag=1 and b.status_flag=1
</select>
<select
id=
"getByCodeAndStoreId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
<include
refid=
"leftJoinStaffSQL"
/>
where a.clerk_code = #{clerkCode}
and a.store_id = #{storeId}
and a.status_flag = 1 and b.status_flag=1
</select>
<select
id=
"listByWxEnterpriseId"
resultType=
"String"
>
select a.staff_id
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
e3551669
...
...
@@ -270,7 +270,8 @@ public class AuditController extends WebBaseController {
//审核同意
if
(
audit
.
getAuditType
()
==
AuditType
.
CLERK_BIND
.
getCode
())
{
//导购绑定
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
clerkCode
,
enterpriseId
);
//统一替换导购code
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
clerkId
,
enterpriseId
);
StaffClerkRelationDTO
have
=
staffClerkRelationApiService
.
getOneByStoreIdAndStaffId
(
storeId
,
auditStaffId
);
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
have
!=
null
)
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxStaffController.java
View file @
e3551669
...
...
@@ -229,7 +229,8 @@ public class WxStaffController extends WebBaseController {
if
(
CollectionUtils
.
isEmpty
(
clerkDTOS
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10016
);
}
Set
<
String
>
clerkCodeList
=
clerkDTOS
.
stream
().
map
(
ClerkDTO:
:
getClerkCode
).
collect
(
Collectors
.
toSet
());
//统一处理:导购code替换为导购id
Set
<
String
>
clerkCodeList
=
clerkDTOS
.
stream
().
map
(
ClerkDTO:
:
getClerkId
).
collect
(
Collectors
.
toSet
());
List
<
StaffClerkRelationDTO
>
bindRelationList
=
staffClerkRelationApiService
.
listBindCode
(
wxEnterpriseId
,
enterpriseId
,
clerkCodeList
);
Map
<
String
,
StaffClerkRelationDTO
>
bindCodeMap
=
bindRelationList
.
stream
()
...
...
@@ -943,7 +944,8 @@ public class WxStaffController extends WebBaseController {
String
clerkCode
=
clerk
.
getClerkCode
();
String
enterpriseId
=
clerk
.
getEnterpriseId
();
String
wxUserId
=
staff
.
getWxUserId
();
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
clerkCode
,
//统一替换导购code
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
clerkId
,
enterpriseId
);
if
(
auditType
==
2
)
{
...
...
@@ -992,7 +994,8 @@ public class WxStaffController extends WebBaseController {
audit
.
setCommitTime
(
new
Date
());
audit
.
setAuditType
(
2
);
auditApiService
.
insert
(
audit
);
StaffClerkRelationDTO
resultDTO
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
clerkCode
,
//统一替换导购code
StaffClerkRelationDTO
resultDTO
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
clerkId
,
clerk
.
getEnterpriseId
());
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
resultDTO
);
}
else
{
...
...
@@ -1058,7 +1061,8 @@ public class WxStaffController extends WebBaseController {
if
(
staff
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
clerkCode
,
//统一替换导购code
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
clerkId
,
enterpriseId
);
if
(
staffClerkRelation
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_111145
);
...
...
@@ -1082,7 +1086,8 @@ public class WxStaffController extends WebBaseController {
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10016
);
}
Set
<
String
>
clerkCodeList
=
list
.
stream
().
map
(
ClerkDTO:
:
getClerkCode
).
collect
(
Collectors
.
toSet
());
//统一处理:导购code替换为导购id
Set
<
String
>
clerkCodeList
=
list
.
stream
().
map
(
ClerkDTO:
:
getClerkId
).
collect
(
Collectors
.
toSet
());
List
<
StaffClerkRelationDTO
>
bindRelationList
=
staffClerkRelationApiService
.
listBindCode
(
wxEnterpriseId
,
enterpriseId
,
clerkCodeList
);
Map
<
String
,
StaffClerkRelationDTO
>
bindCodeMap
=
bindRelationList
.
stream
()
...
...
@@ -1130,7 +1135,8 @@ public class WxStaffController extends WebBaseController {
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_10016
.
getCode
()),
HaoBanErrCode
.
ERR_10016
.
getMsg
());
}
Set
<
String
>
clerkCodeList
=
list
.
stream
().
map
(
ClerkDTO:
:
getClerkCode
).
collect
(
Collectors
.
toSet
());
//统一处理:导购code替换为导购id
Set
<
String
>
clerkCodeList
=
list
.
stream
().
map
(
ClerkDTO:
:
getClerkId
).
collect
(
Collectors
.
toSet
());
List
<
StaffClerkRelationDTO
>
bindRelationList
=
staffClerkRelationApiService
.
listBindCode
(
wxEnterpriseId
,
enterpriseId
,
clerkCodeList
);
Map
<
String
,
StaffClerkRelationDTO
>
bindCodeMap
=
bindRelationList
.
stream
()
...
...
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