Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
service_mall
Project
Project
Details
Activity
Releases
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
冯秋丽
service_mall
Commits
480ddf1a
Commit
480ddf1a
authored
Dec 09, 2020
by
冯秋丽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计划列表
parent
500cc3aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
8 deletions
+84
-8
Plan.java
src/main/java/com/servicemall/loyalty/data/Plan.java
+5
-0
PlanMicro.java
src/main/java/com/servicemall/loyalty/micro/PlanMicro.java
+44
-5
PlanService.java
...ain/java/com/servicemall/loyalty/service/PlanService.java
+35
-3
No files found.
src/main/java/com/servicemall/loyalty/data/Plan.java
View file @
480ddf1a
...
...
@@ -2,6 +2,8 @@ package com.servicemall.loyalty.data;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
team.bangbang.common.CommonMPI
;
/**
...
...
@@ -76,6 +78,7 @@ public class Plan {
private
Long
updatorId
=
null
;
/* 购买起始时间 */
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
buyStartTime
=
null
;
/* 购买起始时间 (查询上线) */
private
Date
buyStartTimeTop
=
null
;
...
...
@@ -83,6 +86,8 @@ public class Plan {
private
Date
buyStartTimeBottom
=
null
;
/* 购买结束时间 */
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
buyEndTime
=
null
;
/* 购买结束时间 (查询上线) */
private
Date
buyEndTimeTop
=
null
;
...
...
src/main/java/com/servicemall/loyalty/micro/PlanMicro.java
View file @
480ddf1a
...
...
@@ -6,10 +6,9 @@ import java.util.HashMap;
import
javax.servlet.http.HttpServletRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
com.servicemall.right.data.Coupon
;
import
com.servicemall.right.service.CouponService
;
import
io.swagger.annotations.*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -19,7 +18,6 @@ import team.bangbang.common.data.Pagination;
import
team.bangbang.common.data.response.ResponseBase
;
import
team.bangbang.common.data.response.DataResponse
;
import
team.bangbang.common.log.OperationLog
;
import
team.bangbang.spring.parameter.EntityParam
;
import
com.servicemall.loyalty.data.Plan
;
import
com.servicemall.loyalty.service.PlanService
;
...
...
@@ -333,4 +331,45 @@ public final class PlanMicro {
return
(
PlanService
.
getObject
(
form
,
str
)
!=
null
);
}
/**
* 查询优惠券列表
*
*
* @return
*/
@PostMapping
(
"/queryloyaltyplanlist"
)
@ApiOperation
(
value
=
"获取计划列表"
,
notes
=
"车龄不是必填其他都是必填"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"dms_code"
,
value
=
"经销商code"
,
dataType
=
"string"
,
required
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"baumuster"
,
value
=
"车辆baumuster"
,
dataType
=
"string"
,
required
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"carAge"
,
value
=
"车龄"
,
dataType
=
"string"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"pageNo"
,
value
=
"分页参数 - 页号,默认为1"
,
dataType
=
"int"
,
required
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"pageSize"
,
value
=
"分页参数 - 每页最大记录数量,默认为10"
,
dataType
=
"int"
,
required
=
true
)
})
@ResponseBody
public
ResponseBase
list
(
String
baumuster
,
String
dms_code
,
String
carAge
,
Integer
pageNo
,
Integer
pageSize
)
{
// 分页数据
Pagination
pagination
=
new
Pagination
();
pagination
.
setRecordCount
(
Integer
.
MAX_VALUE
);
pagination
.
setMaxResults
(
pageSize
);
pagination
.
setPageNo
(
pageNo
);
// 统计符合条件的结果记录数量
int
recordCount
=
0
;
pagination
.
setRecordCount
(
recordCount
);
List
<
Plan
>
playList
=
PlanService
.
queryPlanList
(
dms_code
,
pagination
);
DataResponse
<
Map
<
String
,
Object
>>
result
=
new
DataResponse
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
datas
=
new
HashMap
<
String
,
Object
>();
datas
.
put
(
"list"
,
playList
);
datas
.
put
(
"pagination"
,
pagination
);
result
.
setData
(
datas
);
result
.
setMessage
(
"成功"
);
return
result
;
}
}
src/main/java/com/servicemall/loyalty/service/PlanService.java
View file @
480ddf1a
package
com
.
servicemall
.
loyalty
.
service
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.*
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.Resource
;
import
com.servicemall.right.data.Coupon
;
import
com.servicemall.systemcommon.util.DateUtil
;
import
team.bangbang.common.CommonMPI
;
import
team.bangbang.common.data.KeyValue
;
import
team.bangbang.common.data.Pagination
;
...
...
@@ -195,4 +195,36 @@ public final class PlanService {
return
CommonMPI
.
getDictionaryList
(
Plan
.
payTypeFlags
);
}
public
static
List
<
Plan
>
queryPlanList
(
String
dms_code
,
Pagination
pagination
){
List
<
Plan
>
planList
=
new
ArrayList
<>();
Plan
plan
=
new
Plan
();
plan
.
setBuyStartTime
(
new
Date
());
// coupon.setActiveStartTime(DateUtil.getTime());
// coupon.setRightName("代金券");
// coupon.setUsedTypeFlag(1);
// coupon.setTotalUseNum(-1);
// coupon.setId(1l);
// coupon.setSortValue(1);
// coupon.setStatus(1);
// Map<String,Integer> map = new HashMap<String,Integer>();
// map.put("price",10);
// coupon.setRightContent(map.toString());
// couponList.add(coupon);
//
// Coupon coupon1 = new Coupon();
// coupon1.setActiveEndTime(DateUtil.getTime());
// coupon1.setActiveStartTime(DateUtil.getTime());
// coupon1.setRightName("折扣券");
// coupon1.setUsedTypeFlag(2);
// coupon1.setTotalUseNum(-1);
// coupon1.setId(2l);
// coupon1.setSortValue(1);
// coupon1.setStatus(2);
// Map<String,Integer> map1= new HashMap<String,Integer>();
// map1.put("price",10);
// coupon1.setRightContent(map1.toString());
planList
.
add
(
plan
);
return
planList
;
}
}
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