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
1
Merge Requests
1
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
8c233bfe
Commit
8c233bfe
authored
Feb 14, 2022
by
yaosai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix-0214' into 'master'
修复导购删除bug和导购重复bug See merge request
!166
parents
fbedf0c7
148f6b10
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
156 additions
and
120 deletions
+156
-120
StaffMapper.java
...com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
+130
-118
StaffService.java
...a/com/gic/haoban/manage/service/service/StaffService.java
+8
-1
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+5
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+3
-0
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+9
-0
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+1
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
View file @
8c233bfe
...
@@ -14,122 +14,133 @@ public interface StaffMapper {
...
@@ -14,122 +14,133 @@ public interface StaffMapper {
TabHaobanStaff
selectByPrimaryKey
(
String
staffId
);
TabHaobanStaff
selectByPrimaryKey
(
String
staffId
);
int
updateByPrimaryKeySelective
(
TabHaobanStaff
record
);
int
updateByPrimaryKeySelective
(
TabHaobanStaff
record
);
TabHaobanStaff
selectByNationcodeAndPhoneNumber
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"nationCode"
)
String
nationcode
,
@Param
(
"phoneNumber"
)
String
phoneNumber
);
TabHaobanStaff
selectByNationcodeAndPhoneNumber
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"nationCode"
)
String
nationcode
,
@Param
(
"phoneNumber"
)
String
phoneNumber
);
List
<
TabHaobanStaff
>
listByIds
(
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
List
<
TabHaobanStaff
>
listByIds
(
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
List
<
TabHaobanStaff
>
listByWxUserId
(
@Param
(
"wxUserId"
)
String
wxUserId
);
List
<
TabHaobanStaff
>
listByWxUserId
(
@Param
(
"wxUserId"
)
String
wxUserId
);
List
<
TabHaobanStaff
>
listLikeName
(
@Param
(
"staffName"
)
String
staffName
);
List
<
TabHaobanStaff
>
listLikeName
(
@Param
(
"staffName"
)
String
staffName
);
Page
<
TabHaobanStaff
>
pageStaff
(
@Param
(
"staffIds"
)
Set
<
String
>
staffIds
,
@Param
(
"activeFlag"
)
Integer
activeFlag
,
@Param
(
"keyword"
)
String
keyword
);
Page
<
TabHaobanStaff
>
pageStaff
(
@Param
(
"staffIds"
)
Set
<
String
>
staffIds
,
@Param
(
"activeFlag"
)
Integer
activeFlag
,
@Param
(
"keyword"
)
String
keyword
);
/**
/**
* 选择用户id和企业标识
* 选择用户id和企业标识
*
*
* @param userId 用户id
* @param userId 用户id
* @param wxEnterpriseId wx企业标识
* @param wxEnterpriseId wx企业标识
* @return {@link TabHaobanStaff }
* @return {@link TabHaobanStaff }
* @author mozhu
* @author mozhu
* @date 2022-01-13 15:05:28
* @date 2022-01-13 15:05:28
*/
*/
TabHaobanStaff
selectByUserIdAndEnterpriseId
(
@Param
(
"userId"
)
String
userId
,
TabHaobanStaff
selectByUserIdAndEnterpriseId
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
TabHaobanStaff
selectSuperByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
TabHaobanStaff
selectSuperByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanStaff
>
listByPhoneNumber
(
@Param
(
"phoneNumber"
)
String
phoneNumber
);
List
<
TabHaobanStaff
>
listByPhoneNumber
(
@Param
(
"phoneNumber"
)
String
phoneNumber
);
List
<
TabHaobanStaff
>
listByUserIdsAndWxEnterpriseId
(
@Param
(
"userIds"
)
List
<
String
>
userIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanStaff
>
listByUserIdsAndWxEnterpriseId
(
@Param
(
"userIds"
)
List
<
String
>
userIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
int
cleanStaff
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
int
cleanStaff
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
TabHaobanStaff
getWxStaffByOne
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
TabHaobanStaff
getWxStaffByOne
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
String
>
listUserStaffId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
List
<
String
>
listUserStaffId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
List
<
TabHaobanStaff
>
listNoStatusStaffIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
List
<
TabHaobanStaff
>
listNoStatusStaffIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
TabHaobanStaff
getNoStatusByWxUserIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxUserId"
)
String
wxUserId
);
TabHaobanStaff
getNoStatusByWxUserIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxUserId"
)
String
wxUserId
);
/**
/**
* 通过开放用户id和wx企业id列表
* 通过开放用户id和wx企业id列表
*
*
* @param openUserIds 开放的用户id
* @param openUserIds 开放的用户id
* @param wxEnterpriseId wx企业标识
* @param wxEnterpriseId wx企业标识
* @return {@link List<TabHaobanStaff> }
* @return {@link List<TabHaobanStaff> }
* @author mozhu
* @author mozhu
* @date 2021-12-21 16:35:35
* @date 2021-12-21 16:35:35
*/
*/
List
<
TabHaobanStaff
>
listByOpenUserIdsAndWxEnterpriseId
(
@Param
(
"openUserIds"
)
List
<
String
>
openUserIds
,
List
<
TabHaobanStaff
>
listByOpenUserIdsAndWxEnterpriseId
(
@Param
(
"openUserIds"
)
List
<
String
>
openUserIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
/**
* 用户id wx企业id列表
* 用户id wx企业id列表
*
*
* @param wxEnterpriseId wx企业标识
* @param wxEnterpriseId wx企业标识
* @return {@link List<String> }
* @return {@link List<String> }
* @author mozhu
* @author mozhu
* @date 2021-12-21 17:05:58
* @date 2021-12-21 17:05:58
*/
*/
List
<
TabHaobanStaff
>
listUserIdByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanStaff
>
listUserIdByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
/**
* 更新开放用户id,用户id
* 更新开放用户id,用户id
*
*
* @param wxEnterpriseId wx企业标识
* @param wxEnterpriseId wx企业标识
* @param wxUserId wx用户id
* @param wxUserId wx用户id
* @param wxOpenUseId 开放的用户id
* @param wxOpenUseId 开放的用户id
* @return int
* @return int
* @author mozhu
* @author mozhu
* @date 2021-12-21 17:17:51
* @date 2021-12-21 17:17:51
*/
*/
int
updateOpenUserIdsByUserId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
int
updateOpenUserIdsByUserId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"wxOpenUseId"
)
String
wxOpenUseId
);
@Param
(
"wxOpenUseId"
)
String
wxOpenUseId
);
/**
/**
* 选择通过打开用户id和企业标识
* 选择通过打开用户id和企业标识
*
*
* @param wxOpenUseId wx开放使用id
* @param wxOpenUseId wx开放使用id
* @param wxEnterpriseId wx企业标识
* @param wxEnterpriseId wx企业标识
* @return {@link TabHaobanStaff }
* @return {@link TabHaobanStaff }
* @author mozhu
* @author mozhu
* @date 2021-12-21 21:13:56
* @date 2021-12-21 21:13:56
*/
*/
TabHaobanStaff
selectByOpenUserIdAndEnterpriseId
(
@Param
(
"wxOpenUseId"
)
String
wxOpenUseId
,
TabHaobanStaff
selectByOpenUserIdAndEnterpriseId
(
@Param
(
"wxOpenUseId"
)
String
wxOpenUseId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
/**
* 更新开放id员工id
* 更新开放id员工id
*
*
* @param staffId 员工id
* @param staffId 员工id
* @param openId 开放id
* @param openId 开放id
* @return int
* @return int
*/
*/
int
updateOpenIdByStaffId
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"openId"
)
String
openId
);
int
updateOpenIdByStaffId
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"openId"
)
String
openId
);
/**
/**
* 更新二维码通过员工id
* 更新二维码通过员工id
*
*
* @param staffId 员工id
* @param staffId 员工id
* @param qrCode 二维码
* @param qrCode 二维码
* @return int
* @return int
*/
*/
int
updateQrCodeByStaffId
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"qrCode"
)
String
qrCode
);
int
updateQrCodeByStaffId
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"qrCode"
)
String
qrCode
);
/**
/**
* 选择电话号码和企业标识
* 选择电话号码和企业标识
*
*
* @param phoneNumber 电话号码
* @param phoneNumber 电话号码
* @param wxEnterpriseId wx企业标识
* @param wxEnterpriseId wx企业标识
* @return {@link TabHaobanStaff }
* @return {@link TabHaobanStaff }
* @author mozhu
* @author mozhu
* @date 2022-01-12 17:20:16
* @date 2022-01-12 17:20:16
*/
*/
TabHaobanStaff
selectByPhoneNumberAndEnterpriseId
(
@Param
(
"phoneNumber"
)
String
phoneNumber
,
TabHaobanStaff
selectByPhoneNumberAndEnterpriseId
(
@Param
(
"phoneNumber"
)
String
phoneNumber
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
* 删除同wxUserId的其他staff
*
* @param wxUserId 微信用户id
* @param staffId 导购id
* @param wxEnterpriseId wx企业标识
*/
void
delOtherStaffByWxUserId
(
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffService.java
View file @
8c233bfe
...
@@ -97,5 +97,12 @@ public interface StaffService {
...
@@ -97,5 +97,12 @@ public interface StaffService {
*/
*/
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
);
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
);
/**
* 删除同wxUserId的其他staff
*
* @param wxUserId 微信用户id
* @param staffId 导购id
* @param wxEnterpriseId wx企业标识
*/
void
delOtherStaffByWxUserId
(
String
wxUserId
,
String
staffId
,
String
wxEnterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
8c233bfe
...
@@ -120,4 +120,9 @@ public class StaffServiceImpl implements StaffService {
...
@@ -120,4 +120,9 @@ public class StaffServiceImpl implements StaffService {
return
mapper
.
updateOpenUserIdsByUserId
(
wxEnterpriseId
,
wxUserId
,
wxOpenUseId
);
return
mapper
.
updateOpenUserIdsByUserId
(
wxEnterpriseId
,
wxUserId
,
wxOpenUseId
);
}
}
@Override
public
void
delOtherStaffByWxUserId
(
String
wxUserId
,
String
staffId
,
String
wxEnterpriseId
)
{
mapper
.
delOtherStaffByWxUserId
(
wxUserId
,
staffId
,
wxEnterpriseId
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
8c233bfe
...
@@ -390,6 +390,9 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -390,6 +390,9 @@ public class StaffApiServiceImpl implements StaffApiService {
String
nationCode
=
arr
[
0
];
String
nationCode
=
arr
[
0
];
String
phoneNumber
=
arr
[
1
];
String
phoneNumber
=
arr
[
1
];
TabHaobanStaff
staff
=
staffService
.
selectByPhoneNumberAndEnterpriseId
(
phoneNumber
.
trim
(),
wxEnterpriseId
);
TabHaobanStaff
staff
=
staffService
.
selectByPhoneNumberAndEnterpriseId
(
phoneNumber
.
trim
(),
wxEnterpriseId
);
if
(
staff
!=
null
){
staffService
.
delOtherStaffByWxUserId
(
staff
.
getWxUserId
(),
staff
.
getStaffId
(),
wxEnterpriseId
);
}
staff
=
(
staff
==
null
?
new
TabHaobanStaff
()
:
staff
);
staff
=
(
staff
==
null
?
new
TabHaobanStaff
()
:
staff
);
staff
.
setWxUserId
(
userId
);
staff
.
setWxUserId
(
userId
);
staff
.
setUpdateTime
(
new
Date
());
staff
.
setUpdateTime
(
new
Date
());
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
8c233bfe
...
@@ -42,6 +42,15 @@
...
@@ -42,6 +42,15 @@
where staff_id = #{staffId,jdbcType=VARCHAR}
where staff_id = #{staffId,jdbcType=VARCHAR}
</delete>
</delete>
<update
id=
"delOtherStaffByWxUserId"
>
update tab_haoban_staff
set status_flag = 0,update_time = now()
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
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanStaff"
>
insert into tab_haoban_staff
insert into tab_haoban_staff
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
8c233bfe
...
@@ -122,7 +122,7 @@ public class ClerkController extends WebBaseController {
...
@@ -122,7 +122,7 @@ public class ClerkController extends WebBaseController {
resultList
.
add
(
dto
);
resultList
.
add
(
dto
);
}
}
}
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
result
l
ist
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
result
L
ist
);
}
}
...
...
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