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
1
Merge Requests
1
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
a26a2167
Commit
a26a2167
authored
May 25, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自建类型字段处理
parent
7edc35dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
21 deletions
+18
-21
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+10
-6
WxEnterpriseMapper.xml
...-service/src/main/resources/mapper/WxEnterpriseMapper.xml
+8
-15
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
a26a2167
...
...
@@ -522,15 +522,19 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
return
ServiceResponse
.
failure
(
"-9999"
,
"参数不能为空!"
);
}
//wxAppid是唯一的,不能重复
List
<
String
>
wxAppidList
=
new
ArrayList
<>();
wxAppidList
.
add
(
enterpriseDTO
.
getWxaAppid
());
List
<
String
>
list
=
wxEnterpriseService
.
getWxAppidListByList
(
wxAppidList
);
if
(
CollUtil
.
isNotEmpty
(
list
)){
return
ServiceResponse
.
failure
(
"-9999"
,
"自建小程序的appid存在重复!"
);
}
String
wxaAppid
=
enterpriseDTO
.
getWxaAppid
();
WxEnterpriseDTO
wxEnterpriseDTO
=
this
.
selectByWxaAppid
(
wxaAppid
);
if
(
StrUtil
.
isBlank
(
enterpriseDTO
.
getWxEnterpriseId
())){
if
(
null
!=
wxEnterpriseDTO
){
return
ServiceResponse
.
failure
(
"-9999"
,
"自建小程序的appid存在重复!"
);
}
//默认是自建应用
enterpriseDTO
.
setWxSecurityType
(
5
);
wxEnterpriseService
.
add
(
enterpriseDTO
);
}
else
{
if
(
null
!=
wxEnterpriseDTO
&&
(!
enterpriseDTO
.
getWxEnterpriseId
().
equals
(
wxEnterpriseDTO
.
getWxEnterpriseId
()))){
return
ServiceResponse
.
failure
(
"-9999"
,
"自建小程序的appid存在重复!"
);
}
wxEnterpriseService
.
update
(
enterpriseDTO
);
}
return
ServiceResponse
.
success
(
true
);
...
...
haoban-manage3-service/src/main/resources/mapper/WxEnterpriseMapper.xml
View file @
a26a2167
...
...
@@ -45,7 +45,6 @@
<result
column=
"open_corpid"
property=
"openCorpid"
/>
<result
column=
"wxa_appid"
property=
"wxaAppid"
/>
<result
column=
"url_host"
property=
"urlHost"
/>
<result
column=
"app_type"
property=
"appType"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -53,7 +52,7 @@
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,
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 ,wx_security_type , wx_corpid , open_corpid , auto_active_flag , wxa_appid , url_host
,app_type
,member_secret,contact_secret,agree_external_userid_flag,agree_external_userid_time,external_flag,userid_flag ,wx_security_type , wx_corpid , open_corpid , auto_active_flag , wxa_appid , url_host
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
...
...
@@ -183,9 +182,6 @@
<if
test=
"null != urlHost"
>
url_host ,
</if>
<if
test=
"null != appType"
>
app_type ,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"wxEnterpriseId != null"
>
...
...
@@ -299,9 +295,6 @@
<if
test=
"null != urlHost"
>
#{urlHost} ,
</if>
<if
test=
"null != appType"
>
#{appType} ,
</if>
</trim>
</insert>
...
...
@@ -426,10 +419,7 @@
wxa_appid = #{wxaAppid},
</if>
<if
test=
"null != urlHost"
>
url_host = #{urlHost},
</if>
<if
test=
"null != appType"
>
app_type = #{appType}
url_host = #{urlHost}
</if>
</set>
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
...
...
@@ -443,8 +433,11 @@
<if
test=
"gicContactFlag != null"
>
and contact_flag = #{gicContactFlag,jdbcType=INTEGER}
</if>
<if
test=
" appType != null"
>
and app_type = #{appType}
<if
test=
" appType != null and appType == 1"
>
and wx_security_type = 5
</if>
<if
test=
" appType != null and appType == 0"
>
and wx_security_type != 5
</if>
<if
test=
"version != null and version == 2"
>
<if
test=
"keyword != null and keyword != '' and enterpriseIds != null and enterpriseIds.size() > 0"
>
...
...
@@ -560,7 +553,7 @@
from tab_haoban_wx_enterprise
where
status_flag = 1
and
app_type = 1
and
wx_security_type = 5
<if
test=
"wxAppidList != null and wxAppidList.size() > 0"
>
and wxa_appid IN
<foreach
collection=
"wxAppidList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
...
...
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