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
afe300bc
Commit
afe300bc
authored
May 09, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装修页面添加页面背景颜色字段
parent
47b22720
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
3 deletions
+75
-3
AppletPageTypeEnum.java
...om/gic/enterprise/constant/applet/AppletPageTypeEnum.java
+18
-0
AppletCustomPageDTO.java
...main/java/com/gic/enterprise/dto/AppletCustomPageDTO.java
+14
-0
TabAppletCustomPage.java
...n/java/com/gic/enterprise/entity/TabAppletCustomPage.java
+15
-0
AppletCustomPageApiServiceImpl.java
...se/service/outer/impl/AppletCustomPageApiServiceImpl.java
+13
-0
TabAppletCustomPageMapper.xml
...e/src/main/resources/mapper/TabAppletCustomPageMapper.xml
+15
-3
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/applet/AppletPageTypeEnum.java
View file @
afe300bc
...
...
@@ -79,6 +79,24 @@ public enum AppletPageTypeEnum {
return
false
;
}
/**
* 是否需要设置页面背景字段的页面
* @param code
* @return
*/
public
static
boolean
hasBackgroundColor
(
Integer
code
)
{
if
(
code
==
null
)
{
return
false
;
}
if
(
MEMBER_CENTER
.
getCode
()
==
code
.
intValue
()
||
CUSTOM
.
getCode
()
==
code
.
intValue
()
||
INTEGRAL_SERVICE
.
getCode
()
==
code
.
intValue
()
||
MALL_HOME_PAGE
.
getCode
()
==
code
.
intValue
())
{
return
true
;
}
return
false
;
}
private
AppletPageTypeEnum
(
int
code
,
String
message
,
int
type
,
int
hasDefault
)
{
this
.
code
=
code
;
this
.
message
=
message
;
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/AppletCustomPageDTO.java
View file @
afe300bc
...
...
@@ -34,6 +34,11 @@ public class AppletCustomPageDTO implements Serializable{
private
Integer
entryCondition
;
/**
* 背景颜色 1:灰色 2:白色 ,默认灰色(会员中心页面、积分服务页面、自定义页面、商城装首页 有该设置)
*/
private
Integer
backgroundColor
;
/**
* 1:自定义 2:会员中心,3:客服页面
*/
private
Integer
pageType
;
...
...
@@ -167,4 +172,13 @@ public class AppletCustomPageDTO implements Serializable{
public
void
setComponentStr
(
String
componentStr
)
{
this
.
componentStr
=
componentStr
;
}
public
Integer
getBackgroundColor
()
{
return
backgroundColor
;
}
public
AppletCustomPageDTO
setBackgroundColor
(
Integer
backgroundColor
)
{
this
.
backgroundColor
=
backgroundColor
;
return
this
;
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/entity/TabAppletCustomPage.java
View file @
afe300bc
...
...
@@ -27,6 +27,11 @@ public class TabAppletCustomPage {
private
Integer
entryCondition
;
/**
* 背景颜色 1:灰色 2:白色 ,默认灰色(会员中心页面、积分服务页面、自定义页面、商城装首页 有该设置)
*/
private
Integer
backgroundColor
;
/**
* 1:自定义 2:会员卡 3:积分 4:特权 5:集团 6:会员中心,7:客服页面,8:积分服务页
*/
private
Integer
pageType
;
...
...
@@ -148,4 +153,13 @@ public class TabAppletCustomPage {
public
void
setSetting
(
String
setting
)
{
this
.
setting
=
setting
;
}
public
Integer
getBackgroundColor
()
{
return
backgroundColor
;
}
public
TabAppletCustomPage
setBackgroundColor
(
Integer
backgroundColor
)
{
this
.
backgroundColor
=
backgroundColor
;
return
this
;
}
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AppletCustomPageApiServiceImpl.java
View file @
afe300bc
...
...
@@ -91,6 +91,19 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面类型错误"
);
}
Integer
backgroundColor
=
jsonObject
.
getInteger
(
"backgroundColor"
);
if
(
AppletPageTypeEnum
.
hasBackgroundColor
(
pageType
))
{
if
(
backgroundColor
==
null
)
{
backgroundColor
=
1
;
}
if
(
backgroundColor
.
intValue
()
!=
1
&&
backgroundColor
.
intValue
()
!=
2
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面背景值非法"
);
}
}
else
{
//其他页面默认设置null
backgroundColor
=
null
;
}
//填充实体类
TabAppletCustomPage
record
=
new
TabAppletCustomPage
();
record
.
setEnterpriseId
(
enterpriseId
);
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabAppletCustomPageMapper.xml
View file @
afe300bc
...
...
@@ -6,6 +6,7 @@
<result
column=
"enterprise_id"
jdbcType=
"INTEGER"
property=
"enterpriseId"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"entry_condition"
jdbcType=
"INTEGER"
property=
"entryCondition"
/>
<result
column=
"background_color"
jdbcType=
"INTEGER"
property=
"backgroundColor"
/>
<result
column=
"page_type"
jdbcType=
"INTEGER"
property=
"pageType"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"app_type"
jdbcType=
"INTEGER"
property=
"appType"
/>
...
...
@@ -17,7 +18,7 @@
<result
column=
"setting"
jdbcType=
"LONGVARCHAR"
property=
"setting"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
page_id, enterprise_id, title, entry_condition, page_type, status,
page_id, enterprise_id, title, entry_condition,
background_color,
page_type, status,
app_type, app_id, create_time, update_time
</sql>
<sql
id=
"Blob_Column_List"
>
...
...
@@ -37,11 +38,11 @@
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.enterprise.entity.TabAppletCustomPage"
useGeneratedKeys=
"true"
keyProperty=
"pageId"
>
insert into tab_applet_custom_page (page_id, enterprise_id, title,
entry_condition, page_type, status, app_type,
entry_condition,
background_color,
page_type, status, app_type,
app_id, create_time, update_time,
setting)
values (#{pageId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
#{entryCondition,jdbcType=INTEGER}, #{pageType,jdbcType=INTEGER},
#{entryCondition,jdbcType=INTEGER}, #{
backgroundColor,jdbcType=INTEGER}, #{
pageType,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{appType,jdbcType=INTEGER},
#{appId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{setting,jdbcType=LONGVARCHAR})
...
...
@@ -61,6 +62,9 @@
<if
test=
"entryCondition != null"
>
entry_condition,
</if>
<if
test=
"backgroundColor != null"
>
background_color,
</if>
<if
test=
"pageType != null"
>
page_type,
</if>
...
...
@@ -96,6 +100,9 @@
<if
test=
"entryCondition != null"
>
#{entryCondition,jdbcType=INTEGER},
</if>
<if
test=
"backgroundColor != null"
>
#{backgroundColor,jdbcType=INTEGER},
</if>
<if
test=
"pageType != null"
>
#{pageType,jdbcType=INTEGER},
</if>
...
...
@@ -131,6 +138,9 @@
<if
test=
"entryCondition != null"
>
entry_condition = #{entryCondition,jdbcType=INTEGER},
</if>
<if
test=
"backgroundColor != null"
>
background_color = #{backgroundColor,jdbcType=INTEGER},
</if>
<if
test=
"pageType != null"
>
page_type = #{pageType,jdbcType=INTEGER},
</if>
...
...
@@ -160,6 +170,7 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
entry_condition = #{entryCondition,jdbcType=INTEGER},
background_color = #{backgroundColor,jdbcType=INTEGER},
page_type = #{pageType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
app_type = #{appType,jdbcType=INTEGER},
...
...
@@ -174,6 +185,7 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
entry_condition = #{entryCondition,jdbcType=INTEGER},
background_color = #{backgroundColor,jdbcType=INTEGER},
page_type = #{pageType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
app_type = #{appType,jdbcType=INTEGER},
...
...
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