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
3fe97247
Commit
3fe97247
authored
May 04, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断成员是否开启联系我
parent
94dc3ebc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+19
-0
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+6
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
3fe97247
...
@@ -255,6 +255,10 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -255,6 +255,10 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
StringUtils
.
isNotBlank
(
qr_code
))
{
if
(
StringUtils
.
isNotBlank
(
qr_code
))
{
staff
.
setQrCode
(
qr_code
);
staff
.
setQrCode
(
qr_code
);
}
}
//判断成员是否开启联系我
if
(
this
.
openConcatFlag
(
wxEnterpriseId
,
wxUserId
))
{
staff
.
setOpenConcatFlag
(
1
);
}
//成员更改或更新
//成员更改或更新
if
(
StringUtils
.
isBlank
(
staff
.
getStaffId
()))
{
if
(
StringUtils
.
isBlank
(
staff
.
getStaffId
()))
{
logger
.
info
(
"新增成员"
);
logger
.
info
(
"新增成员"
);
...
@@ -270,6 +274,21 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -270,6 +274,21 @@ public class StaffApiServiceImpl implements StaffApiService {
res
.
setResult
(
staff
.
getStaffName
());
res
.
setResult
(
staff
.
getStaffName
());
return
res
;
return
res
;
}
}
private
Boolean
openConcatFlag
(
String
wxEnterpriseId
,
String
userId
){
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
//企微已经开启联系我
List
<
String
>
wxUserIdsList
=
null
;
Boolean
flag
=
false
;
if
(
qwDTO
.
isSelf
())
{
wxUserIdsList
=
qywxUserApiService
.
listCorpExternalUserSelf
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
(),
qwDTO
.
getUrlHost
());
}
else
{
wxUserIdsList
=
qywxUserApiService
.
listCorpExternalUser
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
());
}
if
(
CollUtil
.
isNotEmpty
(
wxUserIdsList
)
&&
wxUserIdsList
.
contains
(
userId
))
{
flag
=
true
;
}
return
flag
;
}
/**
/**
* 获取wxopenuserid
* 获取wxopenuserid
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
3fe97247
...
@@ -123,6 +123,9 @@
...
@@ -123,6 +123,9 @@
<if
test=
"addNum != null"
>
<if
test=
"addNum != null"
>
add_num,
add_num,
</if>
</if>
<if
test=
"openConcatFlag != null"
>
open_concat_flag,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"staffId != null"
>
<if
test=
"staffId != null"
>
...
@@ -188,6 +191,9 @@
...
@@ -188,6 +191,9 @@
<if
test=
"qrCode != null"
>
<if
test=
"qrCode != null"
>
#{qrCode},
#{qrCode},
</if>
</if>
<if
test=
"openConcatFlag != null"
>
open_concat_flag,
</if>
<if
test=
"addNum != null"
>
<if
test=
"addNum != null"
>
#{addNum}
#{addNum}
</if>
</if>
...
...
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