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
b2e90766
Commit
b2e90766
authored
Mar 05, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
卡券展架接口调整:查询小程序下面的
parent
3d73b361
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
CustomPageController.java
...m/gic/enterprise/web/controller/CustomPageController.java
+22
-6
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/CustomPageController.java
View file @
b2e90766
...
...
@@ -10,6 +10,9 @@ import com.gic.download.utils.OperationResultUtils;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.web.vo.ShelfCouponVO
;
import
com.gic.marketing.api.service.coupon.CouponShelfApiService
;
import
com.gic.member.config.api.dto.AppletsConfigSimpleOutputDTO
;
import
com.gic.member.config.api.service.AppletsConfigApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -42,6 +45,8 @@ public class CustomPageController {
private
AppletCustomPageApiService
appletCustomPageApiService
;
@Autowired
private
CouponShelfApiService
couponShelfApiService
;
@Autowired
private
AppletsConfigApiService
appletsConfigApiService
;
@RequestMapping
(
"/save-page"
)
public
RestResponse
savePage
(
String
param
,
Integer
pageId
,
Integer
saveType
,
Integer
appType
,
String
appId
)
{
...
...
@@ -88,15 +93,26 @@ public class CustomPageController {
}
@RequestMapping
(
"/list-shelf-coupon"
)
public
RestResponse
listShelfCoupon
(
String
memberCardId
)
{
if
(
StringUtils
.
isBlank
(
memberCard
Id
))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"
会员卡ID
不能为空"
);
public
RestResponse
listShelfCoupon
(
String
memberCardId
,
String
appId
)
{
if
(
StringUtils
.
isBlank
(
app
Id
))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"
参数
不能为空"
);
}
if
(!
StringUtils
.
isNumeric
(
memberCardId
))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"会员卡ID值非法"
);
ServiceResponse
<
List
<
AppletsConfigSimpleOutputDTO
>>
result
=
appletsConfigApiService
.
listAppletConfigAppIdContainDel
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
Long
appletAreaId
=
0L
;
if
(
result
.
isSuccess
())
{
List
<
AppletsConfigSimpleOutputDTO
>
list
=
result
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
AppletsConfigSimpleOutputDTO
dto
:
list
)
{
if
(
appId
.
equals
(
dto
.
getAppId
()))
{
appletAreaId
=
dto
.
getAppletConfigId
();
break
;
}
}
}
}
return
ResultControllerUtils
.
commonResult
(
couponShelfApiService
.
listShelf
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
Long
.
parseLong
(
memberCardId
)
),
ShelfCouponVO
.
class
);
.
listShelf
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
appletAreaId
),
ShelfCouponVO
.
class
);
}
/**
...
...
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