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
7414d82c
Commit
7414d82c
authored
Aug 02, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序页面装修默认数据调整
parent
0d17c7b3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
133 additions
and
39 deletions
+133
-39
AppletPageTypeEnum.java
...om/gic/enterprise/constant/applet/AppletPageTypeEnum.java
+1
-1
AppletCustomPageApiService.java
...om/gic/enterprise/service/AppletCustomPageApiService.java
+7
-0
AppletCustomPageServiceImpl.java
.../enterprise/service/impl/AppletCustomPageServiceImpl.java
+3
-0
AppletCustomPageApiServiceImpl.java
...se/service/outer/impl/AppletCustomPageApiServiceImpl.java
+44
-36
TabAppletCustomPageMapper.xml
...e/src/main/resources/mapper/TabAppletCustomPageMapper.xml
+1
-1
CustomPageController.java
...m/gic/enterprise/web/controller/CustomPageController.java
+16
-1
AppletPageVO.java
...src/main/java/com/gic/enterprise/web/vo/AppletPageVO.java
+32
-0
AppletCustomPageController.java
.../operation/web/controller/AppletCustomPageController.java
+25
-0
dubbo-gic-platform-operation-web.xml
...b/src/main/resources/dubbo-gic-platform-operation-web.xml
+4
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/applet/AppletPageTypeEnum.java
View file @
7414d82c
...
@@ -22,7 +22,7 @@ public enum AppletPageTypeEnum {
...
@@ -22,7 +22,7 @@ public enum AppletPageTypeEnum {
/**
/**
* 积分服务
* 积分服务
*/
*/
INTEGRAL_SERVICE
(
4
,
"积分服务"
,
1
,
0
),
INTEGRAL_SERVICE
(
4
,
"积分服务"
,
1
,
1
),
/**
/**
* 积分成就
* 积分成就
*/
*/
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/AppletCustomPageApiService.java
View file @
7414d82c
...
@@ -43,6 +43,13 @@ public interface AppletCustomPageApiService {
...
@@ -43,6 +43,13 @@ public interface AppletCustomPageApiService {
ServiceResponse
<
Page
<
AppletCustomPageDTO
>>
page
(
AppletPageQO
params
);
ServiceResponse
<
Page
<
AppletCustomPageDTO
>>
page
(
AppletPageQO
params
);
/**
/**
* 查询默认数据
* @param pageType
* @return
*/
ServiceResponse
<
AppletCustomPageDTO
>
getDefault
(
Integer
pageType
);
/**
* 页面详情
* 页面详情
* @Title: getDetailByPageId
* @Title: getDetailByPageId
* @Description:
* @Description:
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/AppletCustomPageServiceImpl.java
View file @
7414d82c
...
@@ -94,6 +94,9 @@ public class AppletCustomPageServiceImpl implements AppletCustomPageService{
...
@@ -94,6 +94,9 @@ public class AppletCustomPageServiceImpl implements AppletCustomPageService{
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
@Override
public
int
disableFetch
(
Integer
enterpriseId
,
Integer
appType
,
String
appId
,
Integer
pageType
)
{
public
int
disableFetch
(
Integer
enterpriseId
,
Integer
appType
,
String
appId
,
Integer
pageType
)
{
if
(
enterpriseId
==
-
1
)
{
return
0
;
}
return
tabAppletCustomPageMapper
.
disableFetch
(
enterpriseId
,
appType
,
appId
,
pageType
);
return
tabAppletCustomPageMapper
.
disableFetch
(
enterpriseId
,
appType
,
appId
,
pageType
);
}
}
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AppletCustomPageApiServiceImpl.java
View file @
7414d82c
...
@@ -123,8 +123,8 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -123,8 +123,8 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
int
count
=
appletCustomPageService
.
count
(
enterpriseId
,
appType
,
appId
,
pageType
);
int
count
=
appletCustomPageService
.
count
(
enterpriseId
,
appType
,
appId
,
pageType
);
validPageNumberLimit
(
pageType
,
count
,
isAddOperation
);
validPageNumberLimit
(
pageType
,
count
,
isAddOperation
);
//发布一条的页面类型逻辑
validPageStatus
(
page
Id
,
pageType
,
count
,
saveType
,
record
,
enterpriseId
,
appType
,
appId
);
validPageStatus
(
page
Type
,
saveType
,
enterpriseId
,
appType
,
appId
);
//新增或者编辑
//新增或者编辑
if
(
pageId
==
null
)
{
if
(
pageId
==
null
)
{
record
.
setDeleteFlag
(
0
);
record
.
setDeleteFlag
(
0
);
...
@@ -200,22 +200,8 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -200,22 +200,8 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
}
}
}
}
private
void
validPageStatus
(
Integer
pageId
,
Integer
pageType
,
Integer
pageCount
,
Integer
saveType
,
private
void
validPageStatus
(
Integer
pageType
,
Integer
saveType
,
TabAppletCustomPage
record
,
Integer
enterpriseId
,
Integer
appType
,
String
appId
)
{
Integer
enterpriseId
,
Integer
appType
,
String
appId
)
{
//如果是有默认数据的类型(会员中心),第一条记录,即使saveType = 2,也自动变成1
if
(
AppletPageTypeEnum
.
hasDefault
(
pageType
))
{
//查询记录
boolean
isNeedSet
=
false
;
if
(
pageId
==
null
&&
pageCount
<
1
)
{
isNeedSet
=
true
;
}
else
if
(
pageId
!=
null
&&
pageCount
==
1
)
{
isNeedSet
=
true
;
}
if
(
isNeedSet
)
{
record
.
setStatus
(
1
);
}
}
//判断,如果是会员中心/客服页面,只能发布一条记录,自定义页面可以多条
//判断,如果是会员中心/客服页面,只能发布一条记录,自定义页面可以多条
if
(
saveType
.
intValue
()
==
1
)
{
if
(
saveType
.
intValue
()
==
1
)
{
//保存并发布
//保存并发布
...
@@ -320,10 +306,9 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -320,10 +306,9 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
List
<
AppletCustomPageDTO
>
list
=
resultPage
.
getResult
();
List
<
AppletCustomPageDTO
>
list
=
resultPage
.
getResult
();
//如果查不到数据,使用默认的数据
//如果查不到数据,使用默认的数据
boolean
isDefault
=
CollectionUtils
.
isEmpty
(
list
)
&&
params
.
getCurrentPage
().
intValue
()
==
1
boolean
isDefault
=
CollectionUtils
.
isEmpty
(
list
)
&&
params
.
getCurrentPage
().
intValue
()
==
1
&&
params
.
getPageType
()
!=
null
&&
AppletPageTypeEnum
.
hasDefault
(
params
.
getPageType
());
&&
AppletPageTypeEnum
.
MEMBER_CENTER
.
getCode
()
==
params
.
getPageType
().
intValue
();
if
(
isDefault
)
{
if
(
isDefault
)
{
TabAppletCustomPage
record
=
appletCustomPageService
.
getDefault
(
AppletPageTypeEnum
.
MEMBER_CENTER
.
getCod
e
());
TabAppletCustomPage
record
=
getDefaultPage
(
params
.
getPageTyp
e
());
list
=
new
ArrayList
<>();
list
=
new
ArrayList
<>();
list
.
add
(
EntityUtil
.
changeEntityNew
(
AppletCustomPageDTO
.
class
,
record
));
list
.
add
(
EntityUtil
.
changeEntityNew
(
AppletCustomPageDTO
.
class
,
record
));
resultPage
.
setResult
(
list
);
resultPage
.
setResult
(
list
);
...
@@ -334,6 +319,12 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -334,6 +319,12 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
}
}
@Override
@Override
public
ServiceResponse
<
AppletCustomPageDTO
>
getDefault
(
Integer
pageType
)
{
TabAppletCustomPage
record
=
getDefaultPage
(
pageType
);
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityNew
(
AppletCustomPageDTO
.
class
,
record
));
}
@Override
public
ServiceResponse
<
AppletCustomPageDTO
>
getDetailByPageId
(
Integer
pageId
)
{
public
ServiceResponse
<
AppletCustomPageDTO
>
getDetailByPageId
(
Integer
pageId
)
{
TabAppletCustomPage
record
=
exist
(
pageId
);
TabAppletCustomPage
record
=
exist
(
pageId
);
AppletCustomPageDTO
dto
=
EntityUtil
.
changeEntityNew
(
AppletCustomPageDTO
.
class
,
record
);
AppletCustomPageDTO
dto
=
EntityUtil
.
changeEntityNew
(
AppletCustomPageDTO
.
class
,
record
);
...
@@ -368,8 +359,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -368,8 +359,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
Integer
pageId
;
Integer
pageId
;
if
(
CollectionUtils
.
isEmpty
(
record
)
&&
AppletPageTypeEnum
.
hasDefault
(
pageType
))
{
if
(
CollectionUtils
.
isEmpty
(
record
)
&&
AppletPageTypeEnum
.
hasDefault
(
pageType
))
{
//如果为空,则查询默认数据
//如果为空,则查询默认数据
TabAppletCustomPage
defaultData
=
appletCustomPageService
TabAppletCustomPage
defaultData
=
getDefaultPage
(
pageType
);
.
getDefault
(
pageType
);
dto
=
EntityUtil
.
changeEntityNew
(
AppletCustomPageDTO
.
class
,
defaultData
);
dto
=
EntityUtil
.
changeEntityNew
(
AppletCustomPageDTO
.
class
,
defaultData
);
//查询组件数据
//查询组件数据
pageId
=
defaultData
.
getPageId
();
pageId
=
defaultData
.
getPageId
();
...
@@ -391,13 +381,16 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -391,13 +381,16 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
public
ServiceResponse
<
List
<
AppletCustomPageDTO
>>
listIntegralServiceByAppId
(
Integer
enterpriseId
,
Integer
appType
,
public
ServiceResponse
<
List
<
AppletCustomPageDTO
>>
listIntegralServiceByAppId
(
Integer
enterpriseId
,
Integer
appType
,
String
appId
)
{
String
appId
)
{
List
<
TabAppletCustomPage
>
record
=
getPageListByAppId
(
enterpriseId
,
appType
,
appId
,
AppletPageTypeEnum
.
INTEGRAL_SERVICE
.
getCode
());
List
<
TabAppletCustomPage
>
record
=
getPageListByAppId
(
enterpriseId
,
appType
,
appId
,
AppletPageTypeEnum
.
INTEGRAL_SERVICE
.
getCode
());
if
(
CollectionUtils
.
isEmpty
(
record
))
{
TabAppletCustomPage
defaultPage
=
getDefaultPage
(
AppletPageTypeEnum
.
INTEGRAL_SERVICE
.
getCode
());
record
=
new
ArrayList
<>();
record
.
add
(
defaultPage
);
}
List
<
AppletCustomPageDTO
>
list
=
EntityUtil
.
changeEntityListNew
(
AppletCustomPageDTO
.
class
,
record
);
List
<
AppletCustomPageDTO
>
list
=
EntityUtil
.
changeEntityListNew
(
AppletCustomPageDTO
.
class
,
record
);
if
(
CollectionUtils
.
isNotEmpty
(
record
))
{
//填充组件信息
//填充组件信息
for
(
AppletCustomPageDTO
temp
:
list
)
{
for
(
AppletCustomPageDTO
temp
:
list
)
{
//最多15条数据,循环可以接受
//最多15条数据,循环可以接受
temp
.
setComponentStr
(
getComponentByPageId
(
temp
.
getPageId
()));
temp
.
setComponentStr
(
getComponentByPageId
(
temp
.
getPageId
()));
}
}
}
return
ServiceResponse
.
success
(
list
);
return
ServiceResponse
.
success
(
list
);
}
}
...
@@ -408,6 +401,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -408,6 +401,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
if
(!
AppletPageTypeEnum
.
needCrowdWidget
(
record
.
getPageType
()))
{
if
(!
AppletPageTypeEnum
.
needCrowdWidget
(
record
.
getPageType
()))
{
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面种类错误,该页面没有序号"
);
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面种类错误,该页面没有序号"
);
}
}
validDefaultPage
(
record
.
getEnterpriseId
());
boolean
serialNumberLimit
=
serialNumber
>
999
;
boolean
serialNumberLimit
=
serialNumber
>
999
;
if
(
serialNumberLimit
)
{
if
(
serialNumberLimit
)
{
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"序号不能超过999"
);
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"序号不能超过999"
);
...
@@ -447,6 +441,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -447,6 +441,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"已是发布状态"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"已是发布状态"
);
}
}
validDefaultPage
(
record
.
getEnterpriseId
());
if
(
AppletPageTypeEnum
.
isOnlyOneCode
(
record
.
getPageType
()))
{
if
(
AppletPageTypeEnum
.
isOnlyOneCode
(
record
.
getPageType
()))
{
//把其他的数据状态改为关闭
//把其他的数据状态改为关闭
appletCustomPageService
.
disableFetch
(
record
.
getEnterpriseId
(),
record
.
getAppType
(),
record
.
getAppId
(),
appletCustomPageService
.
disableFetch
(
record
.
getEnterpriseId
(),
record
.
getAppType
(),
record
.
getAppId
(),
...
@@ -462,10 +457,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -462,10 +457,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
if
(
record
.
getStatus
().
intValue
()
!=
1
)
{
if
(
record
.
getStatus
().
intValue
()
!=
1
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"已是关闭状态"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"已是关闭状态"
);
}
}
if
(
AppletPageTypeEnum
.
isOnlyOneCode
(
record
.
getPageType
()))
{
validDefaultPage
(
record
.
getEnterpriseId
());
//如果只有一条,则不能关闭
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"不能关闭,必须有一条是发布状态"
);
}
appletCustomPageService
.
updateStatus
(
pageId
,
2
);
appletCustomPageService
.
updateStatus
(
pageId
,
2
);
return
ServiceResponse
.
success
(
record
.
getTitle
());
return
ServiceResponse
.
success
(
record
.
getTitle
());
}
}
...
@@ -473,6 +465,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -473,6 +465,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
@Override
@Override
public
ServiceResponse
<
String
>
delete
(
Integer
pageId
)
{
public
ServiceResponse
<
String
>
delete
(
Integer
pageId
)
{
TabAppletCustomPage
record
=
exist
(
pageId
);
TabAppletCustomPage
record
=
exist
(
pageId
);
validDefaultPage
(
record
.
getEnterpriseId
());
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发布状态不能删除"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发布状态不能删除"
);
}
}
...
@@ -492,10 +485,8 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -492,10 +485,8 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
if
(!
StringUtils
.
isNumeric
(
pageId
))
{
if
(!
StringUtils
.
isNumeric
(
pageId
))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面id错误,数据格式非法"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面id错误,数据格式非法"
);
}
}
TabAppletCustomPage
record
=
appletCustomPageService
.
getByPageId
(
Integer
.
parseInt
(
pageId
));
TabAppletCustomPage
record
=
exist
(
Integer
.
parseInt
(
pageId
));
if
(
record
==
null
)
{
validDefaultPage
(
record
.
getEnterpriseId
());
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面ID错误,查无数据"
);
}
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发布状态不能删除"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发布状态不能删除"
);
}
}
...
@@ -606,4 +597,21 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -606,4 +597,21 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
}
}
}
}
public
TabAppletCustomPage
getDefaultPage
(
Integer
pageType
)
{
if
(!
AppletPageTypeEnum
.
hasDefault
(
pageType
))
{
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"该页面类型没有默认数据"
);
}
TabAppletCustomPage
record
=
appletCustomPageService
.
getDefault
(
pageType
);
if
(
pageType
==
null
)
{
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"还未配置默认数据"
);
}
return
record
;
}
public
void
validDefaultPage
(
Integer
enterpriseId
)
{
if
(
enterpriseId
==
-
1
)
{
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"默认数据不能操作"
);
}
}
}
}
gic-platform-enterprise-service/src/main/resources/mapper/TabAppletCustomPageMapper.xml
View file @
7414d82c
...
@@ -366,7 +366,7 @@
...
@@ -366,7 +366,7 @@
<include
refid=
"Blob_Column_List"
/>
<include
refid=
"Blob_Column_List"
/>
from tab_applet_custom_page
from tab_applet_custom_page
where status = 1
where status = 1
and delete_flag
and delete_flag
= 0
and enterprise_id = -1
and enterprise_id = -1
and page_type = #{pageType}
and page_type = #{pageType}
</select>
</select>
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/CustomPageController.java
View file @
7414d82c
...
@@ -5,8 +5,10 @@ import java.util.HashMap;
...
@@ -5,8 +5,10 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.download.utils.OperationResultUtils
;
import
com.gic.download.utils.OperationResultUtils
;
import
com.gic.enterprise.dto.AppletCustomPageDTO
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.web.vo.ShelfCouponVO
;
import
com.gic.enterprise.web.vo.ShelfCouponVO
;
import
com.gic.marketing.api.service.coupon.CouponShelfApiService
;
import
com.gic.marketing.api.service.coupon.CouponShelfApiService
;
...
@@ -59,7 +61,20 @@ public class CustomPageController {
...
@@ -59,7 +61,20 @@ public class CustomPageController {
public
RestResponse
listPage
(
AppletPageQO
params
)
{
public
RestResponse
listPage
(
AppletPageQO
params
)
{
params
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
params
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
params
.
setOrderByStr
(
AppletPageOrderByEnum
.
getOrderBySqlByCode
(
params
.
getOrderByCode
()));
params
.
setOrderByStr
(
AppletPageOrderByEnum
.
getOrderBySqlByCode
(
params
.
getOrderByCode
()));
return
ResultControllerUtils
.
commonPageResult
(
appletCustomPageApiService
.
page
(
params
),
AppletPageVO
.
class
);
ServiceResponse
<
Page
<
AppletCustomPageDTO
>>
response
=
appletCustomPageApiService
.
page
(
params
);
if
(
AppletPageTypeEnum
.
hasDefault
(
params
.
getPageType
()))
{
Page
<
AppletCustomPageDTO
>
page
=
response
.
getResult
();
if
(
page
!=
null
)
{
List
<
AppletCustomPageDTO
>
list
=
page
.
getResult
();
ServiceResponse
<
AppletCustomPageDTO
>
defaultPage
=
appletCustomPageApiService
.
getDefault
(
params
.
getPageType
());
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
list
.
add
(
defaultPage
.
getResult
());
}
}
}
return
ResultControllerUtils
.
commonPageResult
(
response
,
AppletPageVO
.
class
);
}
}
@RequestMapping
(
"/get-detail"
)
@RequestMapping
(
"/get-detail"
)
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/vo/AppletPageVO.java
View file @
7414d82c
...
@@ -14,6 +14,16 @@ public class AppletPageVO implements Serializable{
...
@@ -14,6 +14,16 @@ public class AppletPageVO implements Serializable{
private
static
final
long
serialVersionUID
=
-
4803325917597244314L
;
private
static
final
long
serialVersionUID
=
-
4803325917597244314L
;
/**
/**
* 1:是 0:否
*/
private
Integer
defaultPage
;
/**
*
*/
private
Integer
enterpriseId
;
/**
*
*
*/
*/
private
Integer
pageId
;
private
Integer
pageId
;
...
@@ -120,6 +130,27 @@ public class AppletPageVO implements Serializable{
...
@@ -120,6 +130,27 @@ public class AppletPageVO implements Serializable{
return
this
;
return
this
;
}
}
public
Integer
getDefaultPage
()
{
if
(
enterpriseId
==
-
1
)
{
return
1
;
}
return
0
;
}
public
AppletPageVO
setDefaultPage
(
Integer
defaultPage
)
{
this
.
defaultPage
=
defaultPage
;
return
this
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
AppletPageVO
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
return
this
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"AppletPageVO{"
+
return
"AppletPageVO{"
+
...
@@ -131,6 +162,7 @@ public class AppletPageVO implements Serializable{
...
@@ -131,6 +162,7 @@ public class AppletPageVO implements Serializable{
", crowdWidgetId="
+
crowdWidgetId
+
", crowdWidgetId="
+
crowdWidgetId
+
", serialNumber="
+
serialNumber
+
", serialNumber="
+
serialNumber
+
", crowdWidgetType="
+
crowdWidgetType
+
", crowdWidgetType="
+
crowdWidgetType
+
", defaultPage="
+
defaultPage
+
'}'
;
'}'
;
}
}
}
}
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/AppletCustomPageController.java
0 → 100644
View file @
7414d82c
package
com
.
gic
.
operation
.
web
.
controller
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.service.AppletCustomPageApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/custom-page"
)
public
class
AppletCustomPageController
{
@Autowired
private
AppletCustomPageApiService
appletCustomPageApiService
;
@RequestMapping
(
"/save-default-page"
)
public
RestResponse
saveDefaultPage
(
String
param
,
Integer
pageId
,
Integer
saveType
,
Integer
appType
,
String
appId
)
{
Integer
enterpriseId
=
-
1
;
return
ResultControllerUtils
.
commonResult
(
appletCustomPageApiService
.
saveOrUpdate
(
param
,
pageId
,
enterpriseId
,
saveType
,
appType
,
appId
));
}
}
gic-platform-operation-web/src/main/resources/dubbo-gic-platform-operation-web.xml
View file @
7414d82c
...
@@ -99,4 +99,7 @@
...
@@ -99,4 +99,7 @@
<dubbo:reference
interface=
"com.gic.enterprise.service.TableSettingApiService"
id=
"tableSettingApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.TableSettingApiService"
id=
"tableSettingApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.CustomSettingApiService"
id=
"customSettingApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.CustomSettingApiService"
id=
"customSettingApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.SmsTemplateInitApiService"
id=
"smsTemplateInitApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.SmsTemplateInitApiService"
id=
"smsTemplateInitApiService"
timeout=
"6000"
/>
<!--自定义页面装修-->
<dubbo:reference
interface=
"com.gic.enterprise.service.AppletCustomPageApiService"
id=
"appletCustomPageApiService"
timeout=
"6000"
/>
</beans>
</beans>
\ 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