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
adbccc8d
Commit
adbccc8d
authored
Feb 10, 2022
by
yaosai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix-删除导购逻辑调整
parent
bee8a5f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
6 deletions
+44
-6
StaffMapper.java
...com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
+11
-0
StaffService.java
...a/com/gic/haoban/manage/service/service/StaffService.java
+8
-0
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+5
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+5
-1
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+15
-5
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
View file @
adbccc8d
...
...
@@ -132,4 +132,14 @@ public interface StaffMapper {
*/
TabHaobanStaff
selectByPhoneNumberAndEnterpriseId
(
@Param
(
"phoneNumber"
)
String
phoneNumber
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
* 删除除了当前staffId以外其他的staff
*
* @param staffId staffId
* @param wxEnterpriseId wx企业标识
* @param wxUserId wx用户id
*/
void
delOtherStaff
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxUserId"
)
String
wxUserId
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffService.java
View file @
adbccc8d
...
...
@@ -98,4 +98,12 @@ public interface StaffService {
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
);
/**
* 删除除了当前staffId以外其他的staff
*
* @param staffId staffId
* @param wxEnterpriseId wx企业标识
* @param wxUserId wx用户id
*/
void
delOtherStaff
(
String
staffId
,
String
wxEnterpriseId
,
String
wxUserId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
adbccc8d
...
...
@@ -120,4 +120,9 @@ public class StaffServiceImpl implements StaffService {
return
mapper
.
updateOpenUserIdsByUserId
(
wxEnterpriseId
,
wxUserId
,
wxOpenUseId
);
}
@Override
public
void
delOtherStaff
(
String
staffId
,
String
wxEnterpriseId
,
String
wxUserId
)
{
mapper
.
delOtherStaff
(
staffId
,
wxEnterpriseId
,
wxUserId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
adbccc8d
...
...
@@ -390,6 +390,10 @@ public class StaffApiServiceImpl implements StaffApiService {
String
nationCode
=
arr
[
0
];
String
phoneNumber
=
arr
[
1
];
TabHaobanStaff
staff
=
staffService
.
selectByPhoneNumberAndEnterpriseId
(
phoneNumber
.
trim
(),
wxEnterpriseId
);
if
(
staff
!=
null
)
{
//兼容导购调整手机号逻辑
staffService
.
delOtherStaff
(
staff
.
getStaffId
(),
staff
.
getWxEnterpriseId
(),
staff
.
getWxUserId
());
}
staff
=
(
staff
==
null
?
new
TabHaobanStaff
()
:
staff
);
staff
.
setWxUserId
(
userId
);
staff
.
setUpdateTime
(
new
Date
());
...
...
@@ -1519,7 +1523,7 @@ public class StaffApiServiceImpl implements StaffApiService {
return
staffQrCodeDTO
;
}
String
qr_code
=
user
.
getQr_code
();
staffMapper
.
updateQrCodeByStaffId
(
staffId
,
qr_code
);
staffMapper
.
updateQrCodeByStaffId
(
staffId
,
qr_code
);
staffQrCodeDTO
.
setQrCode
(
qr_code
);
return
staffQrCodeDTO
;
}
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
adbccc8d
...
...
@@ -26,7 +26,8 @@
</resultMap>
<sql
id=
"Base_Column_List"
>
staff_id, wx_user_id, phone_number, staff_name, nation_code, nick_name, sex, postion,
staff_id
, wx_user_id, phone_number, staff_name, nation_code, nick_name, sex, postion,
active_flag, extend_postion, status_flag, create_time, update_time,wx_enterprise_id,head_img,
sort,sync_postion_flag,super_manager_flag,wx_open_user_id,wx_open_id,qr_code
</sql>
...
...
@@ -42,6 +43,15 @@
where staff_id = #{staffId,jdbcType=VARCHAR}
</delete>
<update
id=
"delOtherStaff"
>
update tab_haoban_staff
set status_flag = 0
where wx_enterprise_id = #{wxEnterpriseId}
and wx_user_id = #{wxUserId}
and status_flag = 1
and staff_id != #{staffId}
</update>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanStaff"
>
insert into tab_haoban_staff
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -438,15 +448,15 @@
<update
id=
"updateOpenIdByStaffId"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanStaff"
>
update tab_haoban_staff
set wx_open_id = #{openId},
update_time
= now()
set wx_open_id
= #{openId},
update_time = now()
where staff_id = #{staffId}
</update>
<update
id=
"updateQrCodeByStaffId"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanStaff"
>
update tab_haoban_staff
set qr_code = #{qrCode},
update_time
= now()
set qr_code
= #{qrCode},
update_time = now()
where staff_id = #{staffId}
</update>
...
...
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