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
320894b6
Commit
320894b6
authored
Dec 22, 2021
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:新增转换外部联系人id转换完成接口
parent
5c2b696a
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
63 additions
and
10 deletions
+63
-10
WxApplicationApiService.java
...ic/haoban/manage/api/service/WxApplicationApiService.java
+10
-1
TabHaobanExternalClerkRelatedMapper.java
...rvice/dao/mapper/TabHaobanExternalClerkRelatedMapper.java
+3
-2
WxApplicationService.java
...c/haoban/manage/service/service/WxApplicationService.java
+2
-0
WxApplicationServiceImpl.java
...manage/service/service/impl/WxApplicationServiceImpl.java
+5
-0
ExternalClerkRelatedApiServiceImpl.java
.../service/out/impl/ExternalClerkRelatedApiServiceImpl.java
+1
-1
QywxTagApiServiceImpl.java
...anage/service/service/out/impl/QywxTagApiServiceImpl.java
+3
-0
WxApplicationApiServiceImpl.java
...service/service/out/impl/WxApplicationApiServiceImpl.java
+5
-0
TabHaobanExternalClerkRelatedMapper.xml
.../resources/mapper/TabHaobanExternalClerkRelatedMapper.xml
+1
-1
TestController.java
.../com/gic/haoban/manage/web/controller/TestController.java
+13
-0
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+13
-3
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+7
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxApplicationApiService.java
View file @
320894b6
...
...
@@ -20,10 +20,19 @@ public interface WxApplicationApiService {
void
cancelSuite
(
String
corpId
,
String
suiteId
);
/**
*
* @param wxEnterpriseId
* @param type
* @return
*/
WxApplicationDTO
selectByWxEnterpriseIdAndApplicationType
(
String
wxEnterpriseId
,
int
type
);
/**
* 根据corpid进行查询
*
* @param corpId 公司标识
* @return {@link WxApplicationDTO }
* @author mozhu
* @date 2021-12-22 19:39:32
*/
WxApplicationDTO
selectByCorpid
(
String
corpId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanExternalClerkRelatedMapper.java
View file @
320894b6
...
...
@@ -242,14 +242,14 @@ public interface TabHaobanExternalClerkRelatedMapper {
/**
* 更新外部用户id的老外部用户id
*
* @param
externalUserId
外部用户id
* @param
newExternalUserId
外部用户id
* @param oldExternalUserId 旧的外部用户id
* @param wxEnterpriseId wx企业标识
* @return int
* @author mozhu
* @date 2021-12-13 15:33:41
*/
int
updateExternalUserIdByOldExternalUserId
(
@Param
(
"
externalUserId"
)
String
e
xternalUserId
,
int
updateExternalUserIdByOldExternalUserId
(
@Param
(
"
newExternalUserId"
)
String
newE
xternalUserId
,
@Param
(
"oldExternalUserId"
)
String
oldExternalUserId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WxApplicationService.java
View file @
320894b6
...
...
@@ -13,4 +13,6 @@ public interface WxApplicationService {
TabHaobanWxApplication
selectByWxEnterpriseIdAndApplicationType
(
String
wxEnterpriseId
,
int
applicationType
);
int
cancalWxApplication
(
String
wxEnterpriseId
,
String
suiteId
);
TabHaobanWxApplication
selectByCorpId
(
String
corpid
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxApplicationServiceImpl.java
View file @
320894b6
...
...
@@ -49,5 +49,10 @@ public class WxApplicationServiceImpl implements WxApplicationService {
return
this
.
mapper
.
cancelWxApplication
(
wxEnterpriseId
,
suiteId
);
}
@Override
public
TabHaobanWxApplication
selectByCorpId
(
String
corpid
)
{
return
mapper
.
selectByCorpId
(
corpid
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/ExternalClerkRelatedApiServiceImpl.java
View file @
320894b6
...
...
@@ -368,7 +368,7 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
break
;
}
for
(
QywxNewExternalUseridDTO
qywxNewExternalUseridDTO
:
newExternalUseridList
)
{
tabHaobanExternalClerkRelatedMapper
.
updateExternalUserIdByOldExternalUserId
(
qywxNewExternalUseridDTO
.
getNew
ExternalUserid
(),
qywxNewExternalUseridDTO
.
getExternalU
serid
(),
wxEnterpriseId
);
tabHaobanExternalClerkRelatedMapper
.
updateExternalUserIdByOldExternalUserId
(
qywxNewExternalUseridDTO
.
getNew
_external_userid
(),
qywxNewExternalUseridDTO
.
getExternal_u
serid
(),
wxEnterpriseId
);
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/QywxTagApiServiceImpl.java
View file @
320894b6
...
...
@@ -723,6 +723,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
* @return
*/
private
Map
<
String
,
Set
<
String
>>
getExternalTagMap
(
String
externalUseridInfo
,
String
wxEnterpriseId
)
{
logger
.
info
(
"externalUseridInfo:{}"
,
externalUseridInfo
);
Map
<
String
,
Set
<
String
>>
ret
=
new
HashMap
<>();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
externalUseridInfo
);
...
...
@@ -738,7 +739,9 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
//做兼容
TabHaobanStaff
staff
=
staffService
.
selectByUserIdAndEnterpriseId
(
wxUserId
,
wxEnterpriseId
);
if
(
staff
!=
null
)
{
logger
.
info
(
"旧wxUserId:{}"
,
wxUserId
);
wxUserId
=
staff
.
getWxUserId
();
logger
.
info
(
"新wxUserId:{}"
,
wxUserId
);
}
Set
<
String
>
midTagIds
=
new
HashSet
<>();
if
(!
midUser
.
containsKey
(
"tags"
))
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxApplicationApiServiceImpl.java
View file @
320894b6
...
...
@@ -51,4 +51,9 @@ public class WxApplicationApiServiceImpl implements WxApplicationApiService{
public
WxApplicationDTO
selectByWxEnterpriseIdAndApplicationType
(
String
wxEnterpriseId
,
int
type
)
{
return
EntityUtil
.
changeEntityByJSON
(
WxApplicationDTO
.
class
,
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
type
));
}
@Override
public
WxApplicationDTO
selectByCorpid
(
String
corpId
)
{
return
EntityUtil
.
changeEntityByJSON
(
WxApplicationDTO
.
class
,
wxApplicationService
.
selectByCorpId
(
corpId
));
}
}
haoban-manage3-service/src/main/resources/mapper/TabHaobanExternalClerkRelatedMapper.xml
View file @
320894b6
...
...
@@ -585,7 +585,7 @@
<update
id=
"updateExternalUserIdByOldExternalUserId"
>
UPDATE
tab_haoban_external_clerk_related
SET external_user_id = #{
e
xternalUserId},
SET external_user_id = #{
newE
xternalUserId},
update_time = now()
where external_user_id = #{oldExternalUserId}
and wx_enterprise_id = #{wxEnterpriseId}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/TestController.java
View file @
320894b6
...
...
@@ -227,6 +227,19 @@ public class TestController extends WebBaseController {
}
/**
* 设置迁移完成
*
* @param corpid
* @param serviceCorpid
* @return
*/
@RequestMapping
(
"/finishExternalUseridMigration"
)
public
HaobanResponse
finishExternalUseridMigration
(
String
corpid
,
String
serviceCorpid
)
{
qywxUserApiService
.
finishExternalUseridMigration
(
corpid
,
serviceCorpid
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 测试授权回调
*
* @param param
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
320894b6
...
...
@@ -88,6 +88,8 @@ public class WxEnterpriseInfoController extends WebBaseController {
private
EnterpriseService
enterpriseService
;
@Autowired
private
Config
config
;
@Autowired
private
WxApplicationApiService
wxApplicationApiService
;
/**
...
...
@@ -256,10 +258,9 @@ public class WxEnterpriseInfoController extends WebBaseController {
}
enterpriseDetailDTO
=
wxEnterpriseDTOS
.
get
(
0
);
}
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseApiService
.
getOne
(
enterpriseDetailDTO
.
getWxEnterpriseId
());
if
(
enterpriseDTO
==
null
)
{
logger
.
info
(
"
改
企业不存在:{}"
,
qo
.
getGicEnterpriseId
());
logger
.
info
(
"
该
企业不存在:{}"
,
qo
.
getGicEnterpriseId
());
return
resultResponse
(
HaoBanErrCode
.
ERR_400002
);
}
MemberLoginQo
user
=
new
MemberLoginQo
();
...
...
@@ -268,10 +269,19 @@ public class WxEnterpriseInfoController extends WebBaseController {
if
(
user
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_6
);
}
if
(!
user
.
getCorpId
().
equals
(
enterpriseDTO
.
getCorpid
()))
{
WxApplicationDTO
wxApplicationDTO
=
wxApplicationApiService
.
selectByCorpid
(
user
.
getCorpId
());
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseApiService
.
getOne
(
wxApplicationDTO
.
getWxEnterpriseId
());
if
(
wxEnterpriseDTO
==
null
)
{
logger
.
info
(
"该企业不存在:{}"
,
qo
.
getGicEnterpriseId
());
return
resultResponse
(
HaoBanErrCode
.
ERR_400002
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_500003
,
wxEnterpriseDTO
.
getCorpid
());
}
}
else
{
user
.
setUserId
(
qo
.
getUserId
());
}
user
.
setCorpId
(
enterpriseDTO
.
getCorpid
());
StaffDTO
staffDTO
=
staffApiService
.
selectByUserIdAndEnterpriseId
(
user
.
getUserId
(),
enterpriseDTO
.
getWxEnterpriseId
());
if
(
staffDTO
==
null
)
{
logger
.
info
(
"成员不存在"
);
...
...
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
320894b6
...
...
@@ -67,11 +67,16 @@
<dubbo:reference
interface=
"com.gic.clerk.api.service.ClerkNewService"
id=
"clerkNewService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.DealSyncOperationApiService"
id=
"dealSyncOperationApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.DealSyncOperationApiService"
id=
"dealSyncOperationApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService"
id=
"externalClerkRelatedApiService"
/>
<dubbo:reference
id=
"operationSettingApiServiceImpl"
interface=
"com.gic.haoban.manage.api.service.OperationSettingApiService"
timeout=
"10000"
<dubbo:reference
id=
"operationSettingApiServiceImpl"
interface=
"com.gic.haoban.manage.api.service.OperationSettingApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.WxApplicationApiService"
id=
"wxApplicationApiService"
/>
</beans>
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