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
03c21832
Commit
03c21832
authored
Apr 20, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
415bd64d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
29 deletions
+69
-29
WxEnterpriseDTO.java
...n/java/com/gic/haoban/manage/api/dto/WxEnterpriseDTO.java
+32
-0
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+36
-29
WxEnterpriseController.java
.../haoban/manage/web/controller/WxEnterpriseController.java
+1
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/WxEnterpriseDTO.java
View file @
03c21832
...
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.api.dto;
import
java.io.Serializable
;
import
java.util.Date
;
import
org.springframework.util.StringUtils
;
public
class
WxEnterpriseDTO
implements
Serializable
{
private
String
wxEnterpriseId
;
...
...
@@ -63,6 +65,12 @@ public class WxEnterpriseDTO implements Serializable {
private
String
contactSecret
;
private
Boolean
wxSecretKeyFlag
;
private
Boolean
memberSecretFlag
;
private
Boolean
contactSecretFlag
;
private
Date
wxSecretKeyLastTime
;
private
Date
contactSecretLastTime
;
...
...
@@ -357,6 +365,30 @@ public class WxEnterpriseDTO implements Serializable {
this
.
memberSecretLastTime
=
memberSecretLastTime
;
}
public
Boolean
getWxSecretKeyFlag
()
{
return
!
StringUtils
.
isEmpty
(
this
.
wxSecretKey
);
}
public
void
setWxSecretKeyFlag
(
Boolean
wxSecretKeyFlag
)
{
this
.
wxSecretKeyFlag
=
wxSecretKeyFlag
;
}
public
Boolean
getMemberSecretFlag
()
{
return
!
StringUtils
.
isEmpty
(
this
.
memberSecret
);
}
public
void
setMemberSecretFlag
(
Boolean
memberSecretFlag
)
{
this
.
memberSecretFlag
=
memberSecretFlag
;
}
public
Boolean
getContactSecretFlag
()
{
return
!
StringUtils
.
isEmpty
(
this
.
contactSecret
);
}
public
void
setContactSecretFlag
(
Boolean
contactSecretFlag
)
{
this
.
contactSecretFlag
=
contactSecretFlag
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
03c21832
...
...
@@ -399,35 +399,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
List
<
TabHaobanWxEnterpriseRelated
>
list
=
wxEnterpriseRelatedService
.
getByWxEnterpriseId
(
wxEnterprise
.
getWxEnterpriseId
());
String
unionIdJson
=
qywxUserApiService
.
getCorpSelfExternalUseridInfo
(
wxEnterprise
.
getCorpid
(),
wxEnterprise
.
getWxSecretKey
(),
selfExternalUserId
);
String
wxRes
=
qywxUserApiService
.
listExternalUserid
(
wxEnterprise
.
getCorpid
(),
config
.
getSuiteId
(),
userId1
);
JSONObject
wxJson
=
JSON
.
parseObject
(
wxRes
);
String
externalUserId
=
selfExternalUserId
;
if
(
"0"
.
equals
(
wxJson
.
getString
(
"errcode"
))){
String
external_userid
=
wxJson
.
getString
(
"external_userid"
);
JSONArray
jsonArr
=
wxJson
.
getJSONArray
(
external_userid
);
for
(
Object
externalUserid
:
jsonArr
)
{
String
uJ
=
qywxUserApiService
.
getExternalUseridInfo
(
wxEnterprise
.
getCorpid
(),
config
.
getSuiteId
(),
externalUserid
.
toString
());
if
(
StringUtils
.
isNotBlank
(
uJ
)){
JSONObject
jo
=
JSON
.
parseObject
(
unionIdJson
);
String
external_contact
=
jo
.
getString
(
"external_contact"
);
String
uj_follow_user
=
jo
.
getString
(
"follow_user"
);
if
(
StringUtils
.
isNotBlank
(
uj_follow_user
)){
JSONArray
j
=
JSON
.
parseArray
(
uj_follow_user
);
String
uj_userId
=
""
;
for
(
Object
object
:
j
)
{
String
followJson
=
JSON
.
toJSONString
(
object
);
JSONObject
follow
=
JSON
.
parseObject
(
followJson
);
uj_userId
=
follow
.
getString
(
"userid"
);
if
(
uj_userId
.
equals
(
userId1
)){
}
}
}
}
}
}
MemberUnionidRelatedDTO
dto
=
new
MemberUnionidRelatedDTO
();
log
.
info
(
"【新增外部联系人回调】unionIdJson={}"
,
JSON
.
toJSONString
(
unionIdJson
));
String
unionId
=
""
;
String
name
=
""
;
...
...
@@ -461,6 +432,42 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
}
String
wxRes
=
qywxUserApiService
.
listExternalUserid
(
wxEnterprise
.
getCorpid
(),
config
.
getSuiteId
(),
userId1
);
JSONObject
wxJson
=
JSON
.
parseObject
(
wxRes
);
String
externalUserId
=
""
;
MemberUnionidRelatedDTO
dto
=
new
MemberUnionidRelatedDTO
();
if
(
"0"
.
equals
(
wxJson
.
getString
(
"errcode"
))){
String
external_userid
=
wxJson
.
getString
(
"external_userid"
);
JSONArray
jsonArr
=
wxJson
.
getJSONArray
(
external_userid
);
String
wxName
=
""
;
for
(
Object
externalUserid
:
jsonArr
)
{
String
uJ
=
qywxUserApiService
.
getExternalUseridInfo
(
wxEnterprise
.
getCorpid
(),
config
.
getSuiteId
(),
externalUserid
.
toString
());
if
(
StringUtils
.
isNotBlank
(
uJ
)){
JSONObject
jo
=
JSON
.
parseObject
(
unionIdJson
);
String
external_contact
=
jo
.
getString
(
"external_contact"
);
String
uj_follow_user
=
jo
.
getString
(
"follow_user"
);
if
(
StringUtils
.
isNotBlank
(
external_contact
)){
JSONObject
jt
=
JSON
.
parseObject
(
external_contact
);
externalUserId
=
jt
.
getString
(
"external_userid"
);
wxName
=
EmojiFilterUtil
.
filterEmojiLast
(
jt
.
getString
(
"name"
),
true
);
}
if
(
StringUtils
.
isNotBlank
(
uj_follow_user
)){
JSONArray
j
=
JSON
.
parseArray
(
uj_follow_user
);
String
uj_userId
=
""
;
for
(
Object
object
:
j
)
{
String
followJson
=
JSON
.
toJSONString
(
object
);
JSONObject
follow
=
JSON
.
parseObject
(
followJson
);
uj_userId
=
follow
.
getString
(
"userid"
);
if
(
uj_userId
.
equals
(
userId1
)
&&
createTime
.
equals
(
follow
.
getString
(
"createtime"
))
&&
name
.
equals
(
wxName
)){
dto
.
setExternalUserid
(
externalUserId
);
}
}
}
}
}
}
for
(
TabHaobanWxEnterpriseRelated
tabHaobanWxEnterpriseRelated
:
list
)
{
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseController.java
View file @
03c21832
...
...
@@ -100,6 +100,7 @@ public class WxEnterpriseController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
wxEnterpriseDTO
.
setSmallVersion
(
"免费版"
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
wxEnterpriseDTO
);
}
...
...
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