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
5c6bfe56
Commit
5c6bfe56
authored
Feb 14, 2022
by
yaosai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix-0214' into 'developer'
修复群发返回错误信息 See merge request
!165
parents
aee12114
d35ac170
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
20 deletions
+50
-20
StaffMapper.java
...com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
+20
-7
StaffService.java
...a/com/gic/haoban/manage/service/service/StaffService.java
+5
-5
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+3
-5
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+2
-2
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+19
-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 @
5c6bfe56
...
@@ -132,14 +132,26 @@ public interface StaffMapper {
...
@@ -132,14 +132,26 @@ public interface StaffMapper {
*/
*/
TabHaobanStaff
selectByPhoneNumberAndEnterpriseId
(
@Param
(
"phoneNumber"
)
String
phoneNumber
,
TabHaobanStaff
selectByPhoneNumberAndEnterpriseId
(
@Param
(
"phoneNumber"
)
String
phoneNumber
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
/**
* 删除除了当前staffId以外其他的staff
* 删除同微信用户id的其他导购
*
*
* @param staffId staffId
* @param wxEnterpriseId 微信企业id
* @param wxEnterpriseId wx企业标识
* @param wxUserId 微信用户id
* @param wxUserId wx用户id
* @param staffId 导购id
*/
void
delStaffByWxUserId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"staffId"
)
String
staffId
);
/**
* 删除同手机号的其他导购
*
* @param wxEnterpriseId 微信企业id
* @param phoneNumber 手机号
* @param staffId 导购id
*/
*/
void
delOtherStaff
(
@Param
(
"staffId"
)
String
staff
Id
,
void
delStaffByPhoneNumber
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterprise
Id
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"phoneNumber"
)
String
phoneNumber
,
@Param
(
"wxUserId"
)
String
wxUser
Id
);
@Param
(
"staffId"
)
String
staff
Id
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffService.java
View file @
5c6bfe56
...
@@ -97,13 +97,13 @@ public interface StaffService {
...
@@ -97,13 +97,13 @@ public interface StaffService {
*/
*/
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
);
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
);
/**
/**
* 删除
除了当前staffId以外其他的staff
* 删除
同手机号同wxUserId的其他用户
*
*
* @param staffId staffId
* @param staffId 导购id
* @param wxEnterpriseId wx企业标识
* @param wxUserId wx用户id
* @param wxUserId wx用户id
* @param phoneNumber 手机号
* @param wxEnterpriseId 微信企业id
*/
*/
void
delOtherStaff
(
String
staffId
,
String
wxEnterpriseId
,
String
wxUser
Id
);
void
delOtherStaff
ById
(
String
staffId
,
String
wxUserId
,
String
phoneNumber
,
String
wxEnterprise
Id
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
5c6bfe56
...
@@ -121,11 +121,9 @@ public class StaffServiceImpl implements StaffService {
...
@@ -121,11 +121,9 @@ public class StaffServiceImpl implements StaffService {
}
}
@Override
@Override
public
void
delOtherStaff
(
String
staffId
,
String
wxEnterpriseId
,
String
wxUserId
)
{
public
void
delOtherStaffById
(
String
staffId
,
String
wxUserId
,
String
phoneNumber
,
String
wxEnterpriseId
)
{
if
(
StringUtils
.
isEmpty
(
staffId
)){
mapper
.
delStaffByWxUserId
(
wxEnterpriseId
,
wxUserId
,
staffId
);
return
;
mapper
.
delStaffByPhoneNumber
(
wxEnterpriseId
,
phoneNumber
,
staffId
);
}
mapper
.
delOtherStaff
(
staffId
,
wxEnterpriseId
,
wxUserId
);
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
5c6bfe56
...
@@ -391,8 +391,8 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -391,8 +391,8 @@ public class StaffApiServiceImpl implements StaffApiService {
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
)
{
if
(
staff
!=
null
)
{
//
兼容导购调整手机号逻辑-该方法强行保证一个导购只存在一条有效导购数据
//
同手机号或者同wxUerId的导购只存在一个
staffService
.
delOtherStaff
(
staff
.
getStaffId
(),
staff
.
getWxEnterpriseId
(),
staff
.
getWxUserId
()
);
staffService
.
delOtherStaff
ById
(
staff
.
getStaffId
(),
staff
.
getWxUserId
(),
staff
.
getPhoneNumber
(),
wxEnterpriseId
);
}
}
staff
=
(
staff
==
null
?
new
TabHaobanStaff
()
:
staff
);
staff
=
(
staff
==
null
?
new
TabHaobanStaff
()
:
staff
);
staff
.
setWxUserId
(
userId
);
staff
.
setWxUserId
(
userId
);
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
5c6bfe56
...
@@ -469,4 +469,22 @@
...
@@ -469,4 +469,22 @@
and status_flag = 1 limit 1
and status_flag = 1 limit 1
</select>
</select>
<update
id=
"delStaffByWxUserId"
>
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>
<update
id=
"delStaffByPhoneNumber"
>
update tab_haoban_staff
set status_flag = 0,update_time = now()
where wx_enterprise_id = #{wxEnterpriseId}
and phone_number = #{phoneNumber}
and status_flag = 1
and staff_id != #{staffId}
</update>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
5c6bfe56
...
@@ -102,7 +102,7 @@ public class ClerkController extends WebBaseController {
...
@@ -102,7 +102,7 @@ public class ClerkController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
}
List
<
StaffClerkRelationDTO
>
list
=
staffClerkRelationApiService
.
listByStoreId
(
storeId
);
List
<
StaffClerkRelationDTO
>
list
=
staffClerkRelationApiService
.
listByStoreId
(
storeId
);
List
<
String
>
staffIds
=
list
.
stream
().
map
(
s
->
s
.
getStaffId
()
).
collect
(
Collectors
.
toList
());
List
<
String
>
staffIds
=
list
.
stream
().
map
(
StaffClerkRelationDTO:
:
getStaffId
).
collect
(
Collectors
.
toList
());
List
<
StaffDTO
>
resultlist
=
staffApiService
.
listByIds
(
staffIds
);
List
<
StaffDTO
>
resultlist
=
staffApiService
.
listByIds
(
staffIds
);
Map
<
String
,
StaffDTO
>
map
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
resultlist
,
"staffId"
);
Map
<
String
,
StaffDTO
>
map
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
resultlist
,
"staffId"
);
...
...
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