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
daa6e844
Commit
daa6e844
authored
Sep 12, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取GIC商户企微类型
parent
162ade91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
WxEnterpriseRelatedService.java
...an/manage/service/service/WxEnterpriseRelatedService.java
+8
-0
WxEnterpriseRelatedServiceImpl.java
.../service/service/impl/WxEnterpriseRelatedServiceImpl.java
+30
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WxEnterpriseRelatedService.java
View file @
daa6e844
...
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service;
import
java.util.List
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated
;
import
com.gic.haoban.manage.service.pojo.bo.WxEnterpriseRelationBO
;
...
...
@@ -42,4 +43,11 @@ public interface WxEnterpriseRelatedService {
public
WxEnterpriseRelationBO
getHeadEnterprise
(
String
enterpriseId
)
;
public
boolean
getAddByWelcomeFlag
(
TabHaobanWxEnterpriseRelated
wxEnterpriseRelated
,
String
unionid
,
boolean
isHmUnionid
)
;
/**
* 获取GIC商户企微类型 0无好办 1独立应用 2第三方 3(独立应用+第三方)
* @param enterpriseId
* @return
*/
public
ServiceResponse
<
Integer
>
getEnterprieseQwType
(
String
enterpriseId
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseRelatedServiceImpl.java
View file @
daa6e844
...
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.api.dto.EnterpriseSettingDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
...
...
@@ -122,4 +123,33 @@ public class WxEnterpriseRelatedServiceImpl implements WxEnterpriseRelatedServic
}
return
true
;
}
@Override
public
ServiceResponse
<
Integer
>
getEnterprieseQwType
(
String
enterpriseId
)
{
List
<
TabHaobanWxEnterpriseRelated
>
list
=
this
.
mapper
.
listByEnterpriseId
(
enterpriseId
)
;
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
ServiceResponse
.
success
(
0
)
;
}
logger
.
info
(
"gic商户={}关联={}"
,
enterpriseId
,
list
.
size
());
Set
<
String
>
wxEidList
=
list
.
stream
().
map
(
o
->
o
.
getWxEnterpriseId
()).
collect
(
Collectors
.
toSet
())
;
List
<
TabHaobanWxEnterprise
>
wxList
=
this
.
wxEnterpriseMapper
.
listByIds
(
wxEidList
)
;
if
(
CollectionUtils
.
isEmpty
(
wxList
))
{
return
ServiceResponse
.
success
(
0
)
;
}
boolean
selfFlag
=
false
,
thirdFlag
=
false
;
for
(
TabHaobanWxEnterprise
o
:
wxList
)
{
if
(
o
.
getWxSecurityType
()==
5
)
{
selfFlag
=
true
;
}
else
{
thirdFlag
=
true
;
}
}
if
(
selfFlag
&&
thirdFlag
)
{
return
ServiceResponse
.
success
(
3
)
;
}
else
if
(
selfFlag
)
{
return
ServiceResponse
.
success
(
1
)
;
}
else
{
return
ServiceResponse
.
success
(
2
)
;
}
}
}
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