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
0b8a752b
Commit
0b8a752b
authored
Apr 08, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
c5158c64
1699532f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
8 deletions
+101
-8
ThemeEnum.java
.../src/main/java/com/gic/enterprise/constant/ThemeEnum.java
+32
-0
CustomThemeApiService.java
...ava/com/gic/enterprise/service/CustomThemeApiService.java
+2
-0
CustomGuideApiServiceImpl.java
...erprise/service/outer/impl/CustomGuideApiServiceImpl.java
+12
-8
CustomThemeApiServiceImpl.java
...erprise/service/outer/impl/CustomThemeApiServiceImpl.java
+13
-0
pom.xml
gic-platform-enterprise-web/pom.xml
+12
-0
LinkController.java
...ava/com/gic/enterprise/web/controller/LinkController.java
+28
-0
dubbo-gic-platform-enterprise-web.xml
.../src/main/resources/dubbo-gic-platform-enterprise-web.xml
+2
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/ThemeEnum.java
0 → 100644
View file @
0b8a752b
package
com
.
gic
.
enterprise
.
constant
;
/**
*
* @Description:
* @author zhiwj
* @date 2019-10-24 20:46
*/
public
enum
ThemeEnum
{
BLACK_BLUE
(
1
,
"black-blue"
),
RED
(
2
,
"red"
),
BLACK_GOLDEN
(
3
,
"black-golden"
),
DARK_GREEN
(
4
,
"dark_green"
),
TINT_GREEN
(
5
,
"tint_green"
)
;
private
Integer
code
;
private
String
msg
;
ThemeEnum
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getMsg
()
{
return
msg
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/CustomThemeApiService.java
View file @
0b8a752b
...
...
@@ -6,4 +6,6 @@ public interface CustomThemeApiService {
ServiceResponse
<
Integer
>
saveTheme
(
Integer
enterpriseId
,
String
appid
,
Integer
theme
,
Integer
type
);
ServiceResponse
<
Integer
>
getTheme
(
Integer
enterpriseId
,
String
appid
);
ServiceResponse
<
String
>
getTheme
(
Integer
theme
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/CustomGuideApiServiceImpl.java
View file @
0b8a752b
...
...
@@ -99,17 +99,17 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService {
return
ServiceResponse
.
success
();
}
Integer
theme
=
this
.
customThemeService
.
getTheme
(
enterpriseId
,
appid
);
String
themeStr
=
"black-blue
-theme
"
;
String
themeStr
=
"black-blue"
;
if
(
theme
==
1
)
{
themeStr
=
"black-blue
-theme
"
;
themeStr
=
"black-blue"
;
}
else
if
(
theme
==
2
){
themeStr
=
"
black-golden-theme
"
;
themeStr
=
"
red
"
;
}
else
if
(
theme
==
3
){
themeStr
=
"
dark-green-theme
"
;
themeStr
=
"
black-golden
"
;
}
else
if
(
theme
==
4
){
themeStr
=
"
tint-green-theme
"
;
themeStr
=
"
dark_green
"
;
}
else
{
themeStr
=
"
red-theme
"
;
themeStr
=
"
tint_green
"
;
}
// networkTimeout
Map
<
String
,
Object
>
networkTimeoutMap
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -119,12 +119,16 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService {
// tabBar
List
<
Map
<
String
,
Object
>>
tabBarList
=
new
ArrayList
<>();
Set
<
String
>
pathSet
=
new
HashSet
<
String
>()
;
String
iconPath
=
"/images/footbar/"
+
themeStr
;
for
(
int
i
=
0
;
i
<
guideList
.
size
();
i
++)
{
TabCustomGuide
guide
=
guideList
.
get
(
i
);
String
title
=
guide
.
getTitle
();
Map
<
String
,
Object
>
listMap
=
new
HashMap
<
String
,
Object
>();
listMap
.
put
(
"selectedIconPath"
,
guide
.
getSelectedIconPath
());
listMap
.
put
(
"iconPath"
,
guide
.
getIconPath
());
JSONObject
jsonObject
=
JSON
.
parseObject
(
guide
.
getIcon
());
String
selectIconPath
=
iconPath
+
jsonObject
.
getString
(
"type"
)+
jsonObject
.
getString
(
"name"
)+
"-active.png"
;
String
unIconPath
=
iconPath
+
jsonObject
.
getString
(
"type"
)+
jsonObject
.
getString
(
"name"
)+
".png"
;
listMap
.
put
(
"selectedIconPath"
,
selectIconPath
);
listMap
.
put
(
"iconPath"
,
unIconPath
);
listMap
.
put
(
"pagePath"
,
guide
.
getCustomPage
());
pathSet
.
add
(
guide
.
getCustomPage
())
;
listMap
.
put
(
"text"
,
title
);
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/CustomThemeApiServiceImpl.java
View file @
0b8a752b
package
com
.
gic
.
enterprise
.
service
.
outer
.
impl
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.constant.ThemeEnum
;
import
com.gic.enterprise.service.CustomThemeApiService
;
import
com.gic.enterprise.service.CustomThemeService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -22,4 +23,16 @@ public class CustomThemeApiServiceImpl implements CustomThemeApiService {
Integer
theme
=
this
.
customThemeService
.
getTheme
(
enterpriseId
,
appid
);
return
ServiceResponse
.
success
(
theme
);
}
@Override
public
ServiceResponse
<
String
>
getTheme
(
Integer
theme
)
{
ThemeEnum
[]
values
=
ThemeEnum
.
values
();
String
themeStr
=
"black-blue"
;
for
(
ThemeEnum
themeEnum
:
values
){
if
(
themeEnum
.
getCode
().
intValue
()
==
theme
.
intValue
()){
themeStr
=
themeEnum
.
getMsg
();
}
}
return
ServiceResponse
.
success
(
themeStr
);
}
}
gic-platform-enterprise-web/pom.xml
View file @
0b8a752b
...
...
@@ -27,6 +27,8 @@
<gic-log-api>
4.0-SNAPSHOT
</gic-log-api>
<gic-marketing-api>
4.0-SNAPSHOT
</gic-marketing-api>
<gic-member-config-api>
4.0-SNAPSHOT
</gic-member-config-api>
<gic-mall-share-api>
4.0-SNAPSHOT
</gic-mall-share-api>
<gic-mall-api>
4.0-SNAPSHOT
</gic-mall-api>
</properties>
<dependencies>
...
...
@@ -187,6 +189,16 @@
<artifactId>
gic-open-platform-api
</artifactId>
<version>
${gic-open-platform-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-mall-api
</artifactId>
<version>
${gic-mall-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-mall-share-api
</artifactId>
<version>
${gic-mall-share-api}
</version>
</dependency>
</dependencies>
<build>
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/LinkController.java
View file @
0b8a752b
...
...
@@ -3,9 +3,15 @@ package com.gic.enterprise.web.controller;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.dto.LinkDTO
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.service.LinkApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.mall.api.dto.activity.ActivityDTO
;
import
com.gic.mall.api.dto.activity.MallActivityPageSerchDTO
;
import
com.gic.mall.api.service.MallActivityThemeApiService
;
import
com.gic.mall.share.api.dto.shop.ShopDTO
;
import
com.gic.mall.share.api.service.ShopApiService
;
import
com.gic.member.config.api.dto.AppletCardRelationDTO
;
import
com.gic.member.config.api.dto.AppletsConfigSimpleOutputDTO
;
import
com.gic.member.config.api.service.AppletsConfigApiService
;
...
...
@@ -32,6 +38,10 @@ public class LinkController {
private
AppletsConfigApiService
appletsConfigApiService
;
@Autowired
private
ServiceConfigApiService
serviceConfigApiService
;
@Autowired
private
ShopApiService
shopApiService
;
@Autowired
private
MallActivityThemeApiService
mallActivityThemeApiService
;
@RequestMapping
(
"/list-link-data"
)
public
RestResponse
listLinkData
(
Integer
parentId
)
{
...
...
@@ -57,4 +67,22 @@ public class LinkController {
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
@RequestMapping
(
"/list-mall-activity"
)
public
RestResponse
listMallActivity
(
String
appletId
)
{
ServiceResponse
<
AppletsConfigSimpleOutputDTO
>
appletResp
=
appletsConfigApiService
.
selectAppletsConfigIdByAppId
(
appletId
,
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
if
(!
appletResp
.
isSuccess
()
||
appletResp
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"没有对应的小程序"
);
}
ServiceResponse
<
ShopDTO
>
shopResp
=
shopApiService
.
getShopByAppletId
(
appletResp
.
getResult
().
getAppletConfigId
(),
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
1
);
if
(!
shopResp
.
isSuccess
()
||
shopResp
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"没有对应的店铺"
);
}
MallActivityPageSerchDTO
serchDTO
=
new
MallActivityPageSerchDTO
();
serchDTO
.
setShopId
(
shopResp
.
getResult
().
getId
());
serchDTO
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
serchDTO
.
setStatus
(
4
);
ServiceResponse
<
List
<
ActivityDTO
>>
serviceResponse
=
mallActivityThemeApiService
.
listActivity
(
serchDTO
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
}
gic-platform-enterprise-web/src/main/resources/dubbo-gic-platform-enterprise-web.xml
View file @
0b8a752b
...
...
@@ -116,4 +116,6 @@
<dubbo:reference
interface=
"com.gic.open.api.service.AppTokenApiService"
id=
"appTokenApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.open.api.service.ApplicationApiService"
id=
"applicationApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.mall.share.api.service.ShopApiService"
id=
"shopApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.mall.api.service.MallActivityThemeApiService"
id=
"mallActivityThemeApiService"
timeout=
"6000"
/>
</beans>
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