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
211032c8
Commit
211032c8
authored
May 23, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过滤已经存在的自建应用appid
parent
62ddcd59
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
0 deletions
+54
-0
WxEnterpriseApiService.java
...gic/haoban/manage/api/service/WxEnterpriseApiService.java
+7
-0
WxEnterpriseMapper.java
.../haoban/manage/service/dao/mapper/WxEnterpriseMapper.java
+5
-0
WxEnterpriseService.java
...ic/haoban/manage/service/service/WxEnterpriseService.java
+4
-0
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+9
-0
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+14
-0
WxEnterpriseMapper.xml
...-service/src/main/resources/mapper/WxEnterpriseMapper.xml
+15
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseApiService.java
View file @
211032c8
...
...
@@ -241,4 +241,11 @@ public interface WxEnterpriseApiService {
*/
ServiceResponse
<
Boolean
>
saveOrUpdate
(
WxEnterpriseDTO
enterpriseDTO
);
/**
* 过滤已经存在的自建应用appid
* @param wxAppidList 好办自建应用appidList
* @return 过滤的好办自建应用appidList
*/
ServiceResponse
<
List
<
String
>>
filterWxAppidList
(
List
<
String
>
wxAppidList
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/WxEnterpriseMapper.java
View file @
211032c8
...
...
@@ -78,4 +78,8 @@ public interface WxEnterpriseMapper {
* @return
*/
List
<
String
>
queryWxEnterpriseByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
/**
* 根据appidList查询appidList
*/
List
<
String
>
getWxAppidListByList
(
@Param
(
"wxAppidList"
)
List
<
String
>
wxAppidList
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WxEnterpriseService.java
View file @
211032c8
...
...
@@ -75,5 +75,9 @@ public interface WxEnterpriseService {
* @return
*/
List
<
String
>
queryWxEnterpriseWithEnterpriseId
(
String
enterpriseId
);
/**
* 根据appidList查询appidList
*/
List
<
String
>
getWxAppidListByList
(
List
<
String
>
wxAppidList
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
211032c8
...
...
@@ -7,6 +7,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
cn.hutool.core.collection.CollUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -292,4 +293,12 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
}
return
this
.
mapper
.
queryWxEnterpriseByEnterpriseId
(
enterpriseId
);
}
@Override
public
List
<
String
>
getWxAppidListByList
(
List
<
String
>
wxAppidList
)
{
if
(
CollUtil
.
isEmpty
(
wxAppidList
)){
return
Collections
.
emptyList
();
}
return
this
.
mapper
.
getWxAppidListByList
(
wxAppidList
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
211032c8
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.ServiceResponse
;
...
...
@@ -527,4 +528,17 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
}
return
ServiceResponse
.
success
(
true
);
}
@Override
public
ServiceResponse
<
List
<
String
>>
filterWxAppidList
(
List
<
String
>
wxAppidList
)
{
log
.
info
(
"查询的wxAppidList:{}"
,
JSON
.
toJSONString
(
wxAppidList
));
if
(
CollUtil
.
isEmpty
(
wxAppidList
)){
return
ServiceResponse
.
failure
(
"-9999"
,
"参数为空"
);
}
List
<
String
>
list
=
wxEnterpriseService
.
getWxAppidListByList
(
wxAppidList
);
log
.
info
(
"需要过滤的wxAppidList:{}"
,
JSON
.
toJSONString
(
list
));
//过滤
wxAppidList
.
removeAll
(
list
);
return
ServiceResponse
.
success
(
wxAppidList
);
}
}
haoban-manage3-service/src/main/resources/mapper/WxEnterpriseMapper.xml
View file @
211032c8
...
...
@@ -554,4 +554,18 @@
and a.enterprise_id = #{enterpriseId}
</select>
<select
id=
"getWxAppidListByList"
resultType=
"java.lang.String"
>
select
wxa_appid
from tab_haoban_wx_enterprise
where
status_flag = 1
and app_type = 1
<if
test=
"wxAppidList != null and wxAppidList.size() > 0"
>
and wxa_appid IN
<foreach
collection=
"wxAppidList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
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