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
53deb05f
Commit
53deb05f
authored
Jan 13, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:好办助手群发bug修改
parent
ef05a59c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
49 deletions
+44
-49
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+14
-0
StaffMapper.java
...com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
+13
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+7
-49
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+10
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
53deb05f
...
...
@@ -46,6 +46,7 @@ public interface StaffApiService {
int
countByDepartmentId
(
String
departmentId
);
@Deprecated
void
syncGicClerk
(
String
fieldListString
);
void
addGicClerk
(
GicClerkDTO
clerkDTO
);
...
...
@@ -56,6 +57,7 @@ public interface StaffApiService {
List
<
String
>
listUnBindClerk
(
String
storeId
);
@Deprecated
void
cleanGicClerk
(
String
clerkCode
,
String
departmentId
);
String
insertUserLoginLog
(
UserLoginLogDTO
userLoginLogDTO
);
...
...
@@ -157,4 +159,16 @@ public interface StaffApiService {
* @date 2021-12-21 19:53:30
*/
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
);
/**
* 根据微信用户id查询员工
*
* @param wxEnterpriseId wx企业标识
* @param wxUserId wx用户id
* @return {@link StaffDTO }
* @author mozhu
* @date 2022-01-13 14:41:53
*/
StaffDTO
getStaffByWxUserId
(
String
wxEnterpriseId
,
String
wxUserId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
View file @
53deb05f
...
...
@@ -105,4 +105,16 @@ public interface StaffMapper {
*/
TabHaobanStaff
selectByPhoneNumberAndEnterpriseId
(
@Param
(
"phoneNumber"
)
String
phoneNumber
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
* 根据微信用户id查询员工
*
* @param wxEnterpriseId wx企业标识
* @param wxUserId wx用户id
* @return {@link TabHaobanStaff }
* @author mozhu
* @date 2022-01-13 14:41:40
*/
TabHaobanStaff
getStaffByWxUserId
(
@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/out/impl/StaffApiServiceImpl.java
View file @
53deb05f
...
...
@@ -100,8 +100,6 @@ public class StaffApiServiceImpl implements StaffApiService {
private
SecretSettingService
secretSettingService
;
@Autowired
private
StaffPrivacyUseLogService
staffPrivacyUseLogService
;
@Autowired
private
Config
config
;
@Override
public
StaffDTO
selectById
(
String
staffId
)
{
...
...
@@ -695,32 +693,10 @@ public class StaffApiServiceImpl implements StaffApiService {
tab
.
setActiveFlag
(
0
);
}
String
staffId
=
staffService
.
add
(
tab
);
// Integer[] departmentId = user.getDepartment();
// for (Integer integer : departmentId) {
// TabHaobanDepartment tabDepartment = departmentService.getByWxId(integer.toString(), wxEnterpriseId);
// if(tabDepartment != null){
// TabHaobanStaffDepartmentRelated tabStaff = staffDepartmentRelatedService.getDepartmentIdAndStaffId(tabDepartment.getDepartmentId(), tab.getStaffId());
// if(tabStaff == null){
// StaffDepartmentRelatedDTO dto = new StaffDepartmentRelatedDTO();
// dto.setPhoneNumber(user.getMobile());
// dto.setWxUserId(userId);
// dto.setStaffId(staffId);
// dto.setStaffName(user.getName());
// dto.setWxEnterpriseId(wxEnterpriseId);
// dto.setStatusFlag(1);
// dto.setDepartmentId(tabDepartment.getDepartmentId());
// dto.setNationCode("86");
// dto.setStaffName(user.getName());
// staffDepartmentRelatedService.add(dto);
// }
// }
// }
}
}
else
{
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
enterpriseDTO
!=
null
)
{
//UserDTO user = qywxUserApiService.getSelfWorkWxUser(enterpriseDTO.getCorpid(), enterpriseDTO.getContactSecret(), userId);
logger
.
info
(
"【修改用户】user={}"
,
JSON
.
toJSONString
(
user
));
Integer
[]
departmentId
=
user
.
getDepartment
();
String
departmentIds
=
""
;
...
...
@@ -736,7 +712,6 @@ public class StaffApiServiceImpl implements StaffApiService {
StaffDTO
staffDTO
=
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
);
staffDTO
.
setWeixinPush
(
true
);
this
.
staffEdit
(
staffDTO
,
departmentIds
);
//String staffId = staffService.add(tab);
}
}
}
...
...
@@ -782,9 +757,6 @@ public class StaffApiServiceImpl implements StaffApiService {
related
.
setStaffName
(
staffName
);
staffDepartmentRelatedMapper
.
updateByPrimaryKeySelective
(
related
);
}
// if (!syncGic) {
// updateGicClerk(oldStaff, staffDTO, addId, related);
// }
}
}
}
...
...
@@ -798,9 +770,6 @@ public class StaffApiServiceImpl implements StaffApiService {
logger
.
info
(
"【员工修改删除】tab1.getDepartmentId()={}"
,
tab1
.
getDepartmentId
());
StaffDepartmentRelatedDTO
related
=
EntityUtil
.
changeEntityByJSON
(
StaffDepartmentRelatedDTO
.
class
,
tab1
);
staffDepartmentRelatedService
.
del
(
related
);
// if(org.apache.commons.lang3.StringUtils.isNotBlank(tab1.getClerkCode())){
// cleanGicClerk(tab1.getClerkCode(), tab1.getDepartmentId());
// }
}
}
...
...
@@ -942,12 +911,10 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override
public
void
syncGicClerk
(
String
fieldListString
)
{
// logger.info("【同步店员】fieldList={}", fieldListString);
List
<
SyncJsonColumnDTO
>
fieldList
=
JSONArray
.
parseArray
(
fieldListString
,
SyncJsonColumnDTO
.
class
);
if
(
fieldList
.
isEmpty
()
||
true
)
{
if
(
true
)
{
return
;
}
}
...
...
@@ -1064,15 +1031,6 @@ public class StaffApiServiceImpl implements StaffApiService {
staffRelated
.
setClerkCode
(
code
);
staffDepartmentRelatedMapper
.
updateByPrimaryKey
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffDepartmentRelated
.
class
,
staffRelated
));
}
// ClerkDTO clerkDTO= clerkService.getClerkByCodeNoStatus(enterpriseId,code);
// if(clerkDTO != null && (!clerkDTO.getClerkName().equals(staffName) || !staff.getPhoneNumber().equals(clerkDTO.getPhoneNumber()))){
// logger.info("【员工修改】clerkDTO={}",JSON.toJSONString(clerkDTO));
// clerkDTO.setClerkName(staff.getStaffName());
// clerkDTO.setPhoneNumber(staff.getPhoneNumber());
// clerkService.updateClerk(clerkDTO);
// }
//}
this
.
staffEditDeal
(
staff
,
departmentIds
,
true
);
}
}
...
...
@@ -1409,17 +1367,11 @@ public class StaffApiServiceImpl implements StaffApiService {
}
Map
<
String
,
StaffClerkRelationDTO
>
clerkIdMap
=
staffRelationList
.
stream
().
filter
(
s
->
s
.
getClerkId
()
!=
null
).
collect
(
Collectors
.
toMap
(
StaffClerkRelationDTO:
:
getClerkId
,
s
->
s
));
Set
<
String
>
keySet
=
clerkIdMap
.
keySet
();
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
staffRelationList
.
get
(
0
).
getWxEnterpriseId
());
String
corpid
=
wxEnterpriseDTO
.
getCorpid
();
for
(
String
clerkId
:
clerkList
)
{
if
(
keySet
.
contains
(
clerkId
))
{
if
(
corpid
.
length
()
>
20
)
{
userIdList
.
add
(
clerkIdMap
.
get
(
clerkId
).
getWxOpenUserId
());
}
else
{
userIdList
.
add
(
clerkIdMap
.
get
(
clerkId
).
getWxUserId
());
}
}
}
return
userIdList
;
}
...
...
@@ -1505,4 +1457,10 @@ public class StaffApiServiceImpl implements StaffApiService {
return
staffService
.
updateOpenUserIdsByUserId
(
wxEnterpriseId
,
wxUserId
,
wxOpenUseId
);
}
@Override
public
StaffDTO
getStaffByWxUserId
(
String
wxEnterpriseId
,
String
wxUserId
)
{
TabHaobanStaff
tabHaobanStaff
=
staffMapper
.
getStaffByWxUserId
(
wxEnterpriseId
,
wxUserId
);
return
EntityUtil
.
changeEntityNew
(
StaffDTO
.
class
,
tabHaobanStaff
);
}
}
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
53deb05f
...
...
@@ -424,4 +424,13 @@
and status_flag = 1 limit 1
</select>
<select
id=
"getStaffByWxUserId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff
and wx_enterprise_id = #{wxEnterpriseId}
and wx_user_id = #{wxUserId}
and status_flag = 1 limit 1
</select>
</mapper>
\ No newline at end of file
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