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
3c1f63a0
Commit
3c1f63a0
authored
Jul 26, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
5345e043
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
11 deletions
+77
-11
WxEnterpriseQwDTO.java
...java/com/gic/haoban/manage/api/dto/WxEnterpriseQwDTO.java
+10
-1
QywxDeptSyncOperation.java
...gic/haoban/manage/service/task/QywxDeptSyncOperation.java
+4
-4
WxEnterpriseMapper.xml
...-service/src/main/resources/mapper/WxEnterpriseMapper.xml
+2
-1
TestController.java
.../com/gic/haoban/manage/web/controller/TestController.java
+61
-5
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/WxEnterpriseQwDTO.java
View file @
3c1f63a0
...
@@ -5,7 +5,8 @@ import java.io.Serializable;
...
@@ -5,7 +5,8 @@ import java.io.Serializable;
public
class
WxEnterpriseQwDTO
implements
Serializable
{
public
class
WxEnterpriseQwDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
int
wxSecurityType
;
private
String
wxEnterpriseId
;
private
String
wxEnterpriseId
;
// 企业表中的id(正常同第三方)
// 企业表中的id(正常同第三方)
private
String
corpid
;
private
String
corpid
;
...
@@ -18,6 +19,14 @@ public class WxEnterpriseQwDTO implements Serializable {
...
@@ -18,6 +19,14 @@ public class WxEnterpriseQwDTO implements Serializable {
// 自建
// 自建
private
String
selfCorpid
;
private
String
selfCorpid
;
public
int
getWxSecurityType
()
{
return
wxSecurityType
;
}
public
void
setWxSecurityType
(
int
wxSecurityType
)
{
this
.
wxSecurityType
=
wxSecurityType
;
}
public
String
getSelfCorpid
()
{
public
String
getSelfCorpid
()
{
return
selfCorpid
;
return
selfCorpid
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/QywxDeptSyncOperation.java
View file @
3c1f63a0
...
@@ -175,11 +175,11 @@ public class QywxDeptSyncOperation implements BaseSyncOperation {
...
@@ -175,11 +175,11 @@ public class QywxDeptSyncOperation implements BaseSyncOperation {
WxEnterpriseQwDTO
wxInfo
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
WxEnterpriseQwDTO
wxInfo
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
logger
.
info
(
"第三方的通讯录={}"
,
JSON
.
toJSONString
(
wxInfo
));
logger
.
info
(
"第三方的通讯录={}"
,
JSON
.
toJSONString
(
wxInfo
));
logger
.
info
(
"第三方的通讯录={}"
,
this
.
qywxUserApiService
.
listDepartmentUser
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
dataId
,
1
))
;
logger
.
info
(
"第三方的通讯录={}"
,
JSON
.
toJSONString
(
this
.
qywxUserApiService
.
listDepartmentUser
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
dataId
,
1
)
))
;
logger
.
info
(
"第三方的通讯录={}"
,
this
.
qywxUserApiService
.
listDepartmentUser
(
wxInfo
.
getCorpid
(),
config
.
getWxSuiteid
(),
dataId
,
1
))
;
logger
.
info
(
"第三方的通讯录={}"
,
JSON
.
toJSONString
(
this
.
qywxUserApiService
.
listDepartmentUser
(
wxInfo
.
getCorpid
(),
config
.
getWxSuiteid
(),
dataId
,
1
)
))
;
logger
.
info
(
"第三方的通讯录={}"
,
this
.
qywxUserApiService
.
listDepartmentUser
(
wxInfo
.
getDkCorpid
(),
config
.
getWxSuiteid
(),
dataId
,
1
))
;
logger
.
info
(
"第三方的通讯录={}"
,
JSON
.
toJSONString
(
this
.
qywxUserApiService
.
listDepartmentUser
(
wxInfo
.
getDkCorpid
(),
config
.
getWxSuiteid
(),
dataId
,
1
)
))
;
logger
.
info
(
"第三方的通讯录={}"
,
this
.
qywxUserApiService
.
listDepartmentUser
(
wxInfo
.
getMemberCorpid
(),
config
.
getWxSuiteid
(),
dataId
,
1
))
;
logger
.
info
(
"第三方的通讯录={}"
,
JSON
.
toJSONString
(
this
.
qywxUserApiService
.
listDepartmentUser
(
wxInfo
.
getMemberCorpid
(),
config
.
getWxSuiteid
(),
dataId
,
1
)
))
;
if
(
null
==
list
)
{
if
(
null
==
list
)
{
logger
.
info
(
"微信获取部门成员异常:{},{}"
,
taskId
,
dataId
);
logger
.
info
(
"微信获取部门成员异常:{},{}"
,
taskId
,
dataId
);
...
...
haoban-manage3-service/src/main/resources/mapper/WxEnterpriseMapper.xml
View file @
3c1f63a0
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
<result
column=
"agree_external_userid_time"
property=
"agreeExternalUseridTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"agree_external_userid_time"
property=
"agreeExternalUseridTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"external_flag"
property=
"externalFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"external_flag"
property=
"externalFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"userid_flag"
property=
"useridFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"userid_flag"
property=
"useridFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"wx_security_type"
property=
"wxSecurityType"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -47,7 +48,7 @@
...
@@ -47,7 +48,7 @@
corp_user_max, corp_full_name, subject_type, verified_end_time, corp_wxqrcode, corp_scale,
corp_user_max, corp_full_name, subject_type, verified_end_time, corp_wxqrcode, corp_scale,
corp_industry, corp_sub_industry, location, auth_info, agent, agentid, appid, name,
corp_industry, corp_sub_industry, location, auth_info, agent, agentid, appid, name,
square_logo_url, round_logo_url, level, bind_flag, status_flag, create_time, update_time,contact_flag,wx_secret_key,wx_secret_key_last_time,member_secret_last_time,contact_secret_last_time
square_logo_url, round_logo_url, level, bind_flag, status_flag, create_time, update_time,contact_flag,wx_secret_key,wx_secret_key_last_time,member_secret_last_time,contact_secret_last_time
,member_secret,contact_secret,agree_external_userid_flag,agree_external_userid_time,external_flag,userid_flag
,member_secret,contact_secret,agree_external_userid_flag,agree_external_userid_time,external_flag,userid_flag
,wx_security_type
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
select
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/TestController.java
View file @
3c1f63a0
...
@@ -2,6 +2,8 @@ package com.gic.haoban.manage.web.controller;
...
@@ -2,6 +2,8 @@ package com.gic.haoban.manage.web.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.HttpClient
;
import
com.gic.commons.util.StringUtil
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.HaobanResponse
;
...
@@ -15,6 +17,7 @@ import com.gic.redis.data.util.GicRateLimiter;
...
@@ -15,6 +17,7 @@ import com.gic.redis.data.util.GicRateLimiter;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.dto.qywx.QywxNewUseridDTO
;
import
com.gic.wechat.api.dto.qywx.QywxNewUseridDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxCorpApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -27,12 +30,14 @@ import org.slf4j.LoggerFactory;
...
@@ -27,12 +30,14 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -54,19 +59,14 @@ public class TestController extends WebBaseController {
...
@@ -54,19 +59,14 @@ public class TestController extends WebBaseController {
@Autowired
@Autowired
private
QywxSuiteApiService
qywxSuiteApiService
;
private
QywxSuiteApiService
qywxSuiteApiService
;
@Autowired
@Autowired
private
MemberUnionidRelatedApiService
memberUnionidRelatedApiService
;
private
MemberUnionidRelatedApiService
memberUnionidRelatedApiService
;
@Autowired
@Autowired
private
TestApiService
testApiService
;
private
TestApiService
testApiService
;
@Autowired
@Autowired
private
MaidianLogApiService
maidianLogApiService
;
private
MaidianLogApiService
maidianLogApiService
;
@Autowired
@Autowired
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
@Autowired
@Autowired
private
WxEnterpriseApiService
wxEnterpriseApiService
;
private
WxEnterpriseApiService
wxEnterpriseApiService
;
@Autowired
@Autowired
...
@@ -79,6 +79,10 @@ public class TestController extends WebBaseController {
...
@@ -79,6 +79,10 @@ public class TestController extends WebBaseController {
private
Config
config
;
private
Config
config
;
@Autowired
@Autowired
private
HmQrcodeApiService
hmQrcodeApiService
;
private
HmQrcodeApiService
hmQrcodeApiService
;
@Autowired
private
QywxCorpApiService
qywxCorpApiService
;
@RequestMapping
(
"/send-message-test"
)
@RequestMapping
(
"/send-message-test"
)
public
HaobanResponse
testSendMessage
(
QywxXcxSendMessageQo
qo
)
{
public
HaobanResponse
testSendMessage
(
QywxXcxSendMessageQo
qo
)
{
...
@@ -326,4 +330,56 @@ public class TestController extends WebBaseController {
...
@@ -326,4 +330,56 @@ public class TestController extends WebBaseController {
hmQrcodeApiService
.
checkStaffOpenContactByWxEnterpriseId
(
wxEnterpriseId
);
hmQrcodeApiService
.
checkStaffOpenContactByWxEnterpriseId
(
wxEnterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
@RequestMapping
(
"test-qw-post-fws"
)
public
HaobanResponse
testQwPost
(
String
url
,
String
corpid
,
String
json
)
{
String
token
=
qywxCorpApiService
.
getProviderAccessToken
(
corpid
)
;
logger
.
info
(
"toekn={},corpId={} , url={} , json={}"
,
token
,
corpid
,(
url
+
token
)
,
json
);
Map
<
String
,
Object
>
map
=
HttpClient
.
getWinxinResByJson
(
url
+
token
,
json
);
return
resultResponse
(
HaoBanErrCode
.
ERR_0
,
map
)
;
}
@RequestMapping
(
"test-qw-get-fws"
)
public
String
testQwGet
(
String
url
,
String
corpId
)
{
String
token
=
qywxCorpApiService
.
getProviderAccessToken
(
corpId
)
;
logger
.
info
(
"toekn={},appid={} , url={} , json={}"
,
token
,
corpId
,(
url
+
token
));
Map
<
String
,
Object
>
map
=
HttpClient
.
getHttpByGet
(
url
+
token
);
return
JSON
.
toJSONString
(
map
);
}
@RequestMapping
(
"test-qw-post-3"
)
public
HaobanResponse
testQwPost3
(
String
url
,
String
corpid
,
String
json
)
{
String
token
=
qywxCorpApiService
.
getCorpAccessToken
(
corpid
,
config
.
getWxSuiteid
())
;
logger
.
info
(
"toekn={},corpId={} , url={} , json={}"
,
token
,
corpid
,(
url
+
token
)
,
json
);
Map
<
String
,
Object
>
map
=
HttpClient
.
getWinxinResByJson
(
url
+
token
,
json
);
return
resultResponse
(
HaoBanErrCode
.
ERR_0
,
map
)
;
}
@RequestMapping
(
"test-qw-get-3"
)
public
String
testQwGet3
(
String
url
,
String
corpid
)
{
String
token
=
qywxCorpApiService
.
getCorpAccessToken
(
corpid
,
config
.
getWxSuiteid
())
;
logger
.
info
(
"toekn={},appid={} , url={} , json={}"
,
token
,
corpid
,(
url
+
token
));
Map
<
String
,
Object
>
map
=
HttpClient
.
getHttpByGet
(
url
+
token
);
return
JSON
.
toJSONString
(
map
);
}
/* @RequestMapping("test-qw-post-dk")
public HaobanResponse testQwPostdk(String url , String corpid , String secret, String json) {
String token = qywxCorpApiService.getToken(corpid, corpid) ;
logger.info("toekn={},corpId={} , url={} , json={}",token, corpid ,(url + token) , json);
Map<String, Object> map = HttpClient.getWinxinResByJson(url + token ,json);
return resultResponse(HaoBanErrCode.ERR_0, map) ;
}
@RequestMapping("test-qw-get-dk")
public String testQwGetdk(String url , String corpid , String secret) {
String token = qywxCorpApiService.getToken(corpid, corpid) ;
logger.info("toekn={},appid={} , url={} , json={}",token,corpid ,(url + token));
Map<String, Object> map = HttpClient.getHttpByGet(url + token);
return JSON.toJSONString(map);
}*/
}
}
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