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
c0737f61
Commit
c0737f61
authored
Mar 11, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature_03_11' of
http://git.gicdev.com/haoban3.0/haoban-manage3.0
parents
fc4c3601
34fa8ef6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+25
-6
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
c0737f61
...
@@ -27,15 +27,13 @@ import com.gic.haoban.manage.api.service.DepartmentApiService;
...
@@ -27,15 +27,13 @@ import com.gic.haoban.manage.api.service.DepartmentApiService;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.gic.haoban.manage.service.entity.*
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanSyncErrorLog
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.thirdparty.api.dto.PicUploadResDTO
;
import
com.gic.thirdparty.api.dto.PicUploadResDTO
;
import
com.gic.thirdparty.api.service.QQCloudPicService
;
import
com.gic.thirdparty.api.service.QQCloudPicService
;
import
com.gic.wechat.api.dto.qywx.QywxNewUseridDTO
;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
...
@@ -100,6 +98,8 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -100,6 +98,8 @@ public class StaffApiServiceImpl implements StaffApiService {
private
SecretSettingService
secretSettingService
;
private
SecretSettingService
secretSettingService
;
@Autowired
@Autowired
private
StaffPrivacyUseLogService
staffPrivacyUseLogService
;
private
StaffPrivacyUseLogService
staffPrivacyUseLogService
;
@Autowired
private
WxApplicationService
wxApplicationService
;
@Override
@Override
public
StaffDTO
selectById
(
String
staffId
)
{
public
StaffDTO
selectById
(
String
staffId
)
{
...
@@ -367,7 +367,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -367,7 +367,7 @@ public class StaffApiServiceImpl implements StaffApiService {
res
.
setCode
(
2
);
res
.
setCode
(
2
);
return
res
;
return
res
;
}
}
String
corpid
=
enterpriseDTO
.
getCorpid
();
SecretSettingDTO
secretSetting
=
secretSettingService
.
getSecretSetting
(
enterpriseDTO
.
getWxEnterpriseId
(),
SecretTypeEnum
.
HAOBAN_HELP
.
getVal
());
SecretSettingDTO
secretSetting
=
secretSettingService
.
getSecretSetting
(
enterpriseDTO
.
getWxEnterpriseId
(),
SecretTypeEnum
.
HAOBAN_HELP
.
getVal
());
if
(
null
==
secretSetting
||
secretSetting
.
getCheckFlag
()
==
0
)
{
if
(
null
==
secretSetting
||
secretSetting
.
getCheckFlag
()
==
0
)
{
logger
.
info
(
"没有配置secret:{}"
,
JSONObject
.
toJSONString
(
enterpriseDTO
));
logger
.
info
(
"没有配置secret:{}"
,
JSONObject
.
toJSONString
(
enterpriseDTO
));
...
@@ -375,7 +375,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -375,7 +375,7 @@ public class StaffApiServiceImpl implements StaffApiService {
res
.
setCode
(
4
);
res
.
setCode
(
4
);
return
res
;
return
res
;
}
}
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
enterpriseDTO
.
getCorpid
()
,
secretSetting
.
getSecretVal
(),
userId
);
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
corpid
,
secretSetting
.
getSecretVal
(),
userId
);
if
(
null
==
user
)
{
if
(
null
==
user
)
{
logger
.
info
(
"企业微信用户不存在:{}:{}"
,
wxEnterpriseId
,
userId
);
logger
.
info
(
"企业微信用户不存在:{}:{}"
,
wxEnterpriseId
,
userId
);
res
.
setMessage
(
"企业微信用户不存在"
);
res
.
setMessage
(
"企业微信用户不存在"
);
...
@@ -416,6 +416,10 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -416,6 +416,10 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
StringUtils
.
isNotBlank
(
qr_code
))
{
if
(
StringUtils
.
isNotBlank
(
qr_code
))
{
staff
.
setQrCode
(
qr_code
);
staff
.
setQrCode
(
qr_code
);
}
}
String
openUserid
=
getOpenUserid
(
userId
,
corpid
);
if
(
StringUtils
.
isNotBlank
(
openUserid
))
{
staff
.
setWxOpenUseId
(
openUserid
);
}
//成员更改或更新
//成员更改或更新
if
(
StringUtils
.
isBlank
(
staff
.
getStaffId
()))
{
if
(
StringUtils
.
isBlank
(
staff
.
getStaffId
()))
{
logger
.
info
(
"新增成员"
);
logger
.
info
(
"新增成员"
);
...
@@ -432,6 +436,21 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -432,6 +436,21 @@ public class StaffApiServiceImpl implements StaffApiService {
return
res
;
return
res
;
}
}
/**
* 获取wxopenid
* @param userId
* @param corpid
* @return
*/
private
String
getOpenUserid
(
String
userId
,
String
corpid
)
{
TabHaobanWxApplication
tabHaobanWxApplication
=
wxApplicationService
.
selectByCorpId
(
corpid
);
List
<
QywxNewUseridDTO
>
qywxNewUseridDTOS
=
qywxUserApiService
.
useridToOpenuserid
(
corpid
,
tabHaobanWxApplication
.
getSiteId
(),
Collections
.
singletonList
(
userId
));
if
(
CollectionUtils
.
isEmpty
(
qywxNewUseridDTOS
))
{
return
""
;
}
return
qywxNewUseridDTOS
.
get
(
0
).
getOpen_userid
();
}
private
String
[]
getNationCodeAndPhoneNumber
(
String
phoneNumber
)
{
private
String
[]
getNationCodeAndPhoneNumber
(
String
phoneNumber
)
{
String
[]
arr
=
new
String
[
2
];
String
[]
arr
=
new
String
[
2
];
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
...
...
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