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
fce8f2f4
Commit
fce8f2f4
authored
Oct 12, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:查询绑定导购修改
parent
bfa986b9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
40 deletions
+54
-40
StaffClerkRelationApiService.java
...oban/manage/api/service/StaffClerkRelationApiService.java
+1
-1
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+3
-1
StaffClerkRelationService.java
...ban/manage/service/service/StaffClerkRelationService.java
+1
-1
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+2
-2
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+2
-2
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+36
-28
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+9
-5
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffClerkRelationApiService.java
View file @
fce8f2f4
...
...
@@ -18,7 +18,7 @@ public interface StaffClerkRelationApiService {
*/
void
bindLogMq
(
String
params
);
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
enterpriseId
,
Set
<
String
>
clerkCodeList
);
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 @
fce8f2f4
...
...
@@ -14,7 +14,9 @@ public interface TabHaobanStaffClerkRelationMapper {
TabHaobanStaffClerkRelation
selectByPrimaryKey
(
String
staffClerkRelationId
);
List
<
TabHaobanStaffClerkRelation
>
listBindCode
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkCodeList"
)
Set
<
String
>
clerkCodeList
);
List
<
TabHaobanStaffClerkRelation
>
listBindCode
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkCodeList"
)
Set
<
String
>
clerkCodeList
);
List
<
TabHaobanStaffClerkRelation
>
listBindCodeByStaffId
(
@Param
(
"enterpriseIdList"
)
List
<
String
>
enterpriseIdList
,
@Param
(
"staffId"
)
String
staffId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffClerkRelationService.java
View file @
fce8f2f4
...
...
@@ -10,7 +10,7 @@ import java.util.Set;
public
interface
StaffClerkRelationService
{
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
enterpriseId
,
Set
<
String
>
clerkCodeList
);
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/service/impl/StaffClerkRelationServiceImpl.java
View file @
fce8f2f4
...
...
@@ -68,8 +68,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
private
ClerkService
clerkService
;
@Override
public
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
enterpriseId
,
Set
<
String
>
clerkCodeList
)
{
return
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
listBindCode
(
enterpriseId
,
clerkCodeList
));
public
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
wxEnterpriseId
,
String
enterpriseId
,
Set
<
String
>
clerkCodeList
)
{
return
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
listBindCode
(
wxEnterpriseId
,
enterpriseId
,
clerkCodeList
));
}
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
fce8f2f4
...
...
@@ -122,8 +122,8 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
@Override
public
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
enterpriseId
,
Set
<
String
>
clerkCodeList
)
{
return
staffClerkRelationService
.
listBindCode
(
enterpriseId
,
clerkCodeList
);
public
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
wxEnterpriseId
,
String
enterpriseId
,
Set
<
String
>
clerkCodeList
)
{
return
staffClerkRelationService
.
listBindCode
(
wxEnterpriseId
,
enterpriseId
,
clerkCodeList
);
}
@Override
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
fce8f2f4
...
...
@@ -17,7 +17,8 @@
<result
column=
"clerk_type"
property=
"clerkType"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
staff_clerk_relation_id, staff_id, wx_enterprise_id, enterprise_id, store_id,
staff_clerk_relation_id
, staff_id, wx_enterprise_id, enterprise_id, store_id,
clerk_id, clerk_code, status_flag, create_time, update_time,open_concat_flag,manage_flag,clerk_type
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
...
...
@@ -31,12 +32,14 @@
insert into tab_haoban_staff_clerk_relation (staff_clerk_relation_id, staff_id, wx_enterprise_id,
enterprise_id, store_id,
clerk_id, clerk_code, status_flag,
create_time, update_time,open_concat_flag,manage_flag,clerk_type)
create_time, update_time, open_concat_flag, manage_flag,
clerk_type)
values (#{staffClerkRelationId,jdbcType=VARCHAR}, #{staffId,jdbcType=VARCHAR},
#{wxEnterpriseId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
#{clerkId,jdbcType=VARCHAR}, #{clerkCode,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{openConcatFlag},#{manageFlag},#{clerkType})
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{openConcatFlag}, #{manageFlag},
#{clerkType})
</insert>
...
...
@@ -45,7 +48,7 @@
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and status_flag = 1
and
wx_enterprise_id = #{wxEnterpriseId} and
status_flag = 1
and clerk_code in
<foreach
collection=
"clerkCodeList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
...
...
@@ -118,7 +121,8 @@
and status_flag = 1
</update>
<select
id=
"listByClerkIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
parameterType=
"java.lang.String"
>
<select
id=
"listByClerkIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
parameterType=
"java.lang.String"
>
select
a.staff_clerk_relation_id staffClerkRelationId,
a.staff_id staffId,
...
...
@@ -231,7 +235,7 @@
select staff_id
from tab_haoban_staff_clerk_relation
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag =
1
and status_flag =
1
</select>
<select
id=
"lisByStaffId"
resultMap=
"BaseResultMap"
>
...
...
@@ -260,22 +264,21 @@
</select>
<select
id=
"listBindByStoreId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
a.staff_clerk_relation_id staffClerkRelationId,
a.staff_id staffId,
a.wx_enterprise_id wxEnterpriseId,
a.enterprise_id enterpriseId,
a.store_id storeId,
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
b.wx_user_id qwUserId ,
b.wx_open_user_id openUserId
select a.staff_clerk_relation_id staffClerkRelationId,
a.staff_id staffId,
a.wx_enterprise_id wxEnterpriseId,
a.enterprise_id enterpriseId,
a.store_id storeId,
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
b.wx_user_id qwUserId,
b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on b.staff_id = a.staff_id
left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and a.store_id=
#{storeId}
and a.status_flag =
1
and a.store_id =
#{storeId}
and a.status_flag =
1
</select>
<select
id=
"listBindByStoreIds"
resultMap=
"BaseResultMap"
>
...
...
@@ -508,27 +511,32 @@
</select>
<update
id=
"deleteByEnterpriseId"
>
update tab_haoban_staff_clerk_relation set status_flag = 0 , update_time=now() where enterprise_id = #{enterpriseId}
update tab_haoban_staff_clerk_relation
set status_flag = 0,
update_time=now()
where enterprise_id = #{enterpriseId}
</update>
<select
id=
"getBindByManage"
resultType=
"java.lang.Integer"
>
select
count(*)
select count(*)
from tab_haoban_staff_clerk_relation
where status_flag=1 and enterprise_id = #{enterpriseId} and manage_flag = 1
where status_flag = 1
and enterprise_id = #{enterpriseId}
and manage_flag = 1
</select>
<select
id=
"getBindByStaffIdAndEnterpriseId"
resultType=
"java.lang.Integer"
>
select
count(*)
select count(*)
from tab_haoban_staff_clerk_relation
where status_flag=1 and enterprise_id = #{enterpriseId} and staff_id = #{staffId}
where status_flag = 1
and enterprise_id = #{enterpriseId}
and staff_id = #{staffId}
</select>
<select
id=
"listManageBindByStaffId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
<include
refid=
"Base_Column_List"
></include>
from tab_haoban_staff_clerk_relation
where status_flag=1 and manage_flag = 1 and staff_id = #{staffId}
</select>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
fce8f2f4
...
...
@@ -177,7 +177,7 @@ public class ClerkController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_10016
);
}
Set
<
String
>
clerkCodeList
=
clerkDTOS
.
stream
().
map
(
ClerkDTO:
:
getClerkCode
).
collect
(
Collectors
.
toSet
());
List
<
StaffClerkRelationDTO
>
bindRelationList
=
staffClerkRelationApiService
.
listBindCode
(
enterpriseId
,
clerkCodeList
);
List
<
StaffClerkRelationDTO
>
bindRelationList
=
staffClerkRelationApiService
.
listBindCode
(
wxEnterpriseId
,
enterpriseId
,
clerkCodeList
);
Map
<
String
,
StaffClerkRelationDTO
>
bindCodeMap
=
bindRelationList
.
stream
().
collect
(
Collectors
.
toMap
(
StaffClerkRelationDTO:
:
getClerkCode
,
s
->
s
));
List
<
StoreClerkVO
>
resultList
=
new
ArrayList
<>();
for
(
ClerkDTO
dto
:
clerkDTOS
)
{
...
...
@@ -897,7 +897,7 @@ public class ClerkController extends WebBaseController {
ServiceResponse
serviceResponse
=
staffClerkRelationApiService
.
wxBindStaffClerk
(
staffClerkRelation
,
staffId
,
ChannelCodeEnum
.
SELF_BIND
.
getCode
());
if
(!
serviceResponse
.
isSuccess
())
{
return
resultResponse
(
HaoBanErrCode
.
ERR_DEFINE
,
serviceResponse
.
getMessage
(),
null
,
serviceResponse
.
getMessage
());
return
resultResponse
(
HaoBanErrCode
.
ERR_DEFINE
,
serviceResponse
.
getMessage
(),
null
,
serviceResponse
.
getMessage
());
}
//无需审核
...
...
@@ -979,7 +979,7 @@ public class ClerkController extends WebBaseController {
//解绑
@RequestMapping
(
"unbind-staff"
)
public
HaobanResponse
unBindStaff
(
String
clerkId
,
String
clerkCode
,
String
staffId
,
String
storeId
,
String
enterpriseId
,
Integer
manageFlag
)
{
public
HaobanResponse
unBindStaff
(
String
clerkId
,
String
clerkCode
,
String
staffId
,
String
storeId
,
String
enterpriseId
,
Integer
manageFlag
)
{
logger
.
info
(
"解绑 操作人:{},备操作人:{},操作门店:{}"
,
staffId
,
clerkId
,
storeId
);
if
(
StringUtils
.
isAnyBlank
(
clerkId
,
clerkCode
,
staffId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
...
...
@@ -1009,12 +1009,14 @@ public class ClerkController extends WebBaseController {
*/
@RequestMapping
(
"store-clerk-list"
)
public
HaobanResponse
storeClerkList
(
String
storeId
,
String
enterpriseId
)
{
WellDoneLoginDTO
loginUser
=
this
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
List
<
ClerkDTO
>
list
=
clerkService
.
listClerkByNameOrCode
(
enterpriseId
,
null
,
Collections
.
singletonList
(
storeId
));
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10016
);
}
Set
<
String
>
clerkCodeList
=
list
.
stream
().
map
(
ClerkDTO:
:
getClerkCode
).
collect
(
Collectors
.
toSet
());
List
<
StaffClerkRelationDTO
>
bindRelationList
=
staffClerkRelationApiService
.
listBindCode
(
enterpriseId
,
clerkCodeList
);
List
<
StaffClerkRelationDTO
>
bindRelationList
=
staffClerkRelationApiService
.
listBindCode
(
wxEnterpriseId
,
enterpriseId
,
clerkCodeList
);
Map
<
String
,
StaffClerkRelationDTO
>
bindCodeMap
=
bindRelationList
.
stream
().
collect
(
Collectors
.
toMap
(
StaffClerkRelationDTO:
:
getClerkCode
,
s
->
s
));
List
<
BindClerkVO
>
bindList
=
new
ArrayList
<>();
List
<
BindClerkVO
>
unBindList
=
new
ArrayList
<>();
...
...
@@ -1046,12 +1048,14 @@ public class ClerkController extends WebBaseController {
*/
@RequestMapping
(
"clerk-manage-list"
)
public
RestResponse
clerkManageList
(
String
enterpriseId
)
{
WellDoneLoginDTO
loginUser
=
this
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
List
<
ClerkDTO
>
list
=
clerkService
.
listClerkEnableHaoban
(
Collections
.
singletonList
(
enterpriseId
),
null
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_10016
.
getCode
()),
HaoBanErrCode
.
ERR_10016
.
getMsg
());
}
Set
<
String
>
clerkCodeList
=
list
.
stream
().
map
(
ClerkDTO:
:
getClerkCode
).
collect
(
Collectors
.
toSet
());
List
<
StaffClerkRelationDTO
>
bindRelationList
=
staffClerkRelationApiService
.
listBindCode
(
enterpriseId
,
clerkCodeList
);
List
<
StaffClerkRelationDTO
>
bindRelationList
=
staffClerkRelationApiService
.
listBindCode
(
wxEnterpriseId
,
enterpriseId
,
clerkCodeList
);
Map
<
String
,
StaffClerkRelationDTO
>
bindCodeMap
=
bindRelationList
.
stream
().
collect
(
Collectors
.
toMap
(
StaffClerkRelationDTO:
:
getClerkCode
,
s
->
s
));
List
<
BindClerkVO
>
bindList
=
new
ArrayList
<>();
List
<
BindClerkVO
>
unBindList
=
new
ArrayList
<>();
...
...
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