Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
base_platform_enterprise
gic-platform-enterprise
Commits
5ec25f97
Commit
5ec25f97
authored
Apr 23, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序资源组权限
parent
7cd15f8d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
5 deletions
+64
-5
AppletServiceConfigQO.java
...ain/java/com/gic/enterprise/qo/AppletServiceConfigQO.java
+11
-0
TabAppletServiceConfig.java
...ava/com/gic/enterprise/entity/TabAppletServiceConfig.java
+13
-0
TabAppletServiceConfigMapper.xml
...rc/main/resources/mapper/TabAppletServiceConfigMapper.xml
+25
-5
AppletServiceConfigController.java
...erprise/web/controller/AppletServiceConfigController.java
+15
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/qo/AppletServiceConfigQO.java
View file @
5ec25f97
package
com
.
gic
.
enterprise
.
qo
;
import
java.util.List
;
/**
*
* @Description:
...
...
@@ -18,6 +20,7 @@ public class AppletServiceConfigQO extends PageQO {
private
Integer
type
;
private
Integer
pageNum
;
private
String
orderBy
;
private
List
<
Long
>
appIdList
;
public
Integer
getSortColumn
()
{
return
sortColumn
;
...
...
@@ -74,4 +77,12 @@ public class AppletServiceConfigQO extends PageQO {
public
String
getOrderBy
()
{
return
orderBy
;
}
public
List
<
Long
>
getAppIdList
()
{
return
appIdList
;
}
public
void
setConfigIdList
(
List
<
Long
>
appIdList
)
{
this
.
appIdList
=
appIdList
;
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/entity/TabAppletServiceConfig.java
View file @
5ec25f97
...
...
@@ -34,6 +34,11 @@ public class TabAppletServiceConfig {
/**
*
*/
private
Long
configId
;
/**
*
*/
private
Date
createTime
;
/**
...
...
@@ -86,6 +91,14 @@ public class TabAppletServiceConfig {
this
.
type
=
type
;
}
public
Long
getConfigId
()
{
return
configId
;
}
public
void
setConfigId
(
Long
configId
)
{
this
.
configId
=
configId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabAppletServiceConfigMapper.xml
View file @
5ec25f97
...
...
@@ -7,12 +7,14 @@
<result
column=
"app_id"
jdbcType=
"VARCHAR"
property=
"appId"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"config_id"
jdbcType=
"BIGINT"
property=
"configId"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
applet_service_id, enterprise_id, app_id, name, type, create_time, update_time, status
applet_service_id, enterprise_id, app_id, name, type, config_id, create_time, update_time,
status
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -26,11 +28,13 @@
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.enterprise.entity.TabAppletServiceConfig"
>
insert into tab_applet_service_config (applet_service_id, enterprise_id, app_id,
name, type, create_time,
update_time, status)
name, type, config_id,
create_time, update_time, status
)
values (#{appletServiceId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{appId,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER})
#{name,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{configId,jdbcType=BIGINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.enterprise.entity.TabAppletServiceConfig"
>
insert into tab_applet_service_config
...
...
@@ -50,6 +54,9 @@
<if
test=
"type != null"
>
type,
</if>
<if
test=
"configId != null"
>
config_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
...
...
@@ -76,6 +83,9 @@
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
</if>
<if
test=
"configId != null"
>
#{configId,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -102,6 +112,9 @@
<if
test=
"type != null"
>
type = #{type,jdbcType=INTEGER},
</if>
<if
test=
"configId != null"
>
config_id = #{configId,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -120,6 +133,7 @@
app_id = #{appId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
config_id = #{configId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
...
...
@@ -156,6 +170,12 @@
<if
test=
"search != null and search != '' "
>
and name like concat('%', #{search}, '%')
</if>
<if
test=
"null != ids and ids.size > 0"
>
and config_id in
<foreach
close=
")"
collection=
"ids"
index=
"index"
item=
"item"
open=
"("
separator=
","
>
#{item}
</foreach>
</if>
</select>
<select
id=
"getAppByAppId"
resultMap=
"BaseResultMap"
>
select
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/AppletServiceConfigController.java
View file @
5ec25f97
...
...
@@ -2,6 +2,8 @@ package com.gic.enterprise.web.controller;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.ChannelResourceDTO
;
import
com.gic.auth.service.ResourceApiService
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.constant.applet.AppletServiceConfigEnum
;
...
...
@@ -10,6 +12,7 @@ import com.gic.enterprise.qo.AppletServiceConfigQO;
import
com.gic.enterprise.service.AppletServiceConfigApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -25,15 +28,27 @@ public class AppletServiceConfigController {
@Autowired
private
AppletServiceConfigApiService
appletServiceConfigApiService
;
@Autowired
private
ResourceApiService
resourceApiService
;
@RequestMapping
(
"list-applet"
)
public
RestResponse
listApplet
(
AppletServiceConfigQO
appletServiceConfigQO
)
{
ChannelResourceDTO
channelResourceDTO
=
resourceApiService
.
getChannelResourceByUserId
(
UserDetailUtils
.
getUserDetail
().
getUserId
()).
getResult
();
if
(
channelResourceDTO
==
null
||
CollectionUtils
.
isEmpty
(
channelResourceDTO
.
getAppletConfigIdList
()))
{
return
RestResponse
.
success
(
new
Page
<>());
}
appletServiceConfigQO
.
setConfigIdList
(
channelResourceDTO
.
getAppletConfigIdList
());
ServiceResponse
<
Page
<
AppletServiceConfigDTO
>>
serviceResponse
=
appletServiceConfigApiService
.
listApplet
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
appletServiceConfigQO
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
@RequestMapping
(
"list-service"
)
public
RestResponse
listService
(
AppletServiceConfigQO
appletServiceConfigQO
)
{
ChannelResourceDTO
channelResourceDTO
=
resourceApiService
.
getChannelResourceByUserId
(
UserDetailUtils
.
getUserDetail
().
getUserId
()).
getResult
();
if
(
channelResourceDTO
==
null
||
CollectionUtils
.
isEmpty
(
channelResourceDTO
.
getServiceConfigIdList
()))
{
return
RestResponse
.
success
(
new
Page
<>());
}
appletServiceConfigQO
.
setConfigIdList
(
channelResourceDTO
.
getAppletConfigIdList
());
ServiceResponse
<
Page
<
AppletServiceConfigDTO
>>
serviceResponse
=
appletServiceConfigApiService
.
listService
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
appletServiceConfigQO
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
...
...
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