Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
bc302b2f
Commit
bc302b2f
authored
Oct 14, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-chw' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev-chw
parents
9bf36139
ae9c84d9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
19 deletions
+43
-19
CouponDTO.java
...c/main/java/com/xxfc/platform/activity/dto/CouponDTO.java
+11
-3
Coupon.java
...c/main/java/com/xxfc/platform/activity/entity/Coupon.java
+11
-4
CouponPagVo.java
.../main/java/com/xxfc/platform/activity/vo/CouponPagVo.java
+1
-1
CouponVo.java
...src/main/java/com/xxfc/platform/activity/vo/CouponVo.java
+2
-2
UserCouponVo.java
...main/java/com/xxfc/platform/activity/vo/UserCouponVo.java
+2
-2
CouponBiz.java
...c/main/java/com/xxfc/platform/activity/biz/CouponBiz.java
+3
-0
CouponAdminController.java
...c/platform/activity/rest/admin/CouponAdminController.java
+13
-7
No files found.
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/dto/CouponDTO.java
View file @
bc302b2f
package
com
.
xxfc
.
platform
.
activity
.
dto
;
package
com
.
xxfc
.
platform
.
activity
.
dto
;
import
com.xxfc.platform.activity.entity.Coupon
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -13,7 +14,7 @@ import java.math.BigDecimal;
...
@@ -13,7 +14,7 @@ import java.math.BigDecimal;
* @data 2019/7/23 15:00
* @data 2019/7/23 15:00
*/
*/
@Data
@Data
public
class
CouponDTO
{
public
class
CouponDTO
extends
Coupon
{
@ApiModelProperty
(
"主键id"
)
@ApiModelProperty
(
"主键id"
)
private
Integer
id
;
private
Integer
id
;
...
@@ -34,7 +35,7 @@ public class CouponDTO {
...
@@ -34,7 +35,7 @@ public class CouponDTO {
private
Integer
used
;
private
Integer
used
;
@ApiModelProperty
(
value
=
"0-全平台;1-租车;2-旅游;3-营地"
)
@ApiModelProperty
(
value
=
"0-全平台;1-租车;2-旅游;3-营地
;4--会员; 5-机车;6-游艇
"
)
private
Integer
channel
;
private
Integer
channel
;
...
@@ -86,7 +87,7 @@ public class CouponDTO {
...
@@ -86,7 +87,7 @@ public class CouponDTO {
private
Long
endTime
;
private
Long
endTime
;
@ApiModelProperty
(
value
=
"时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)"
)
@ApiModelProperty
(
value
=
"时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)
3永久有效
"
)
private
Integer
validType
;
private
Integer
validType
;
...
@@ -111,4 +112,11 @@ public class CouponDTO {
...
@@ -111,4 +112,11 @@ public class CouponDTO {
@Column
(
name
=
"company_ids"
)
@Column
(
name
=
"company_ids"
)
@ApiModelProperty
(
value
=
"可使用门店ids"
)
@ApiModelProperty
(
value
=
"可使用门店ids"
)
private
String
companyIds
;
private
String
companyIds
;
/**
* 是否可领取;0-否;1-是
*/
@Column
(
name
=
"is_led"
)
@ApiModelProperty
(
value
=
"是否可领取;0-否;1-是"
)
private
Integer
isLed
;
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/Coupon.java
View file @
bc302b2f
...
@@ -63,10 +63,10 @@ public class Coupon implements Serializable {
...
@@ -63,10 +63,10 @@ public class Coupon implements Serializable {
private
Integer
used
;
private
Integer
used
;
/**
/**
* 0-全平台;1-租车;2-旅游;3-营地
* 0-全平台;1-租车;2-旅游;3-营地
;4--会员; 5-机车;6-游艇
*/
*/
@Column
(
name
=
"channel"
)
@Column
(
name
=
"channel"
)
@ApiModelProperty
(
value
=
"0-全平台;1-租车;2-旅游;3-营地"
)
@ApiModelProperty
(
value
=
"0-全平台;1-租车;2-旅游;3-营地
;4--会员; 5-机车;6-游艇
"
)
private
Integer
channel
;
private
Integer
channel
;
/**
/**
...
@@ -154,10 +154,10 @@ public class Coupon implements Serializable {
...
@@ -154,10 +154,10 @@ public class Coupon implements Serializable {
private
Long
endTime
;
private
Long
endTime
;
/**
/**
* 时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)
* 时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)
3永久有效
*/
*/
@Column
(
name
=
"valid_type"
)
@Column
(
name
=
"valid_type"
)
@ApiModelProperty
(
value
=
"时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)"
)
@ApiModelProperty
(
value
=
"时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)
3永久有效
"
)
private
Integer
validType
;
private
Integer
validType
;
/**
/**
...
@@ -257,4 +257,11 @@ public class Coupon implements Serializable {
...
@@ -257,4 +257,11 @@ public class Coupon implements Serializable {
@Column
(
name
=
"is_led"
)
@Column
(
name
=
"is_led"
)
@ApiModelProperty
(
value
=
"是否可领取;0-否;1-是"
)
@ApiModelProperty
(
value
=
"是否可领取;0-否;1-是"
)
private
Integer
isLed
;
private
Integer
isLed
;
/**
* 平台类型 1--运营平台;2--商家平台
*/
@Column
(
name
=
"biz_type"
)
@ApiModelProperty
(
value
=
"平台类型 1--运营平台;2--商家平台"
)
private
Integer
bizType
;
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/CouponPagVo.java
View file @
bc302b2f
...
@@ -27,7 +27,7 @@ public class CouponPagVo extends Coupon {
...
@@ -27,7 +27,7 @@ public class CouponPagVo extends Coupon {
@ApiModelProperty
(
value
=
"图片"
)
@ApiModelProperty
(
value
=
"图片"
)
private
String
icon
;
private
String
icon
;
@ApiModelProperty
(
value
=
"0-全平台;1-租车;2-旅游;3-营地"
)
@ApiModelProperty
(
value
=
"0-全平台;1-租车;2-旅游;3-营地
;4--会员; 5-机车;6-游艇
"
)
private
Integer
channel
;
private
Integer
channel
;
@ApiModelProperty
(
value
=
"1满减券 2叠加满减券 3无门槛券(需要限制大小)"
)
@ApiModelProperty
(
value
=
"1满减券 2叠加满减券 3无门槛券(需要限制大小)"
)
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/CouponVo.java
View file @
bc302b2f
...
@@ -33,7 +33,7 @@ public class CouponVo {
...
@@ -33,7 +33,7 @@ public class CouponVo {
private
Integer
used
;
private
Integer
used
;
@ApiModelProperty
(
value
=
"0-全平台;1-租车;2-旅游;3-营地"
)
@ApiModelProperty
(
value
=
"0-全平台;1-租车;2-旅游;3-营地
;4--会员; 5-机车;6-游艇
"
)
private
Integer
channel
;
private
Integer
channel
;
...
@@ -85,7 +85,7 @@ public class CouponVo {
...
@@ -85,7 +85,7 @@ public class CouponVo {
private
Long
endTime
;
private
Long
endTime
;
@ApiModelProperty
(
value
=
"时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)"
)
@ApiModelProperty
(
value
=
"时效:1绝对时效(领取后XXX-XXX时间段有效) 2相对时效(领取后N天有效)
3永久有效
"
)
private
Integer
validType
;
private
Integer
validType
;
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/UserCouponVo.java
View file @
bc302b2f
...
@@ -102,9 +102,9 @@ public class UserCouponVo {
...
@@ -102,9 +102,9 @@ public class UserCouponVo {
private
Integer
used
;
private
Integer
used
;
/**
/**
* 0-全平台;1-租车;2-旅游;3-营地
* 0-全平台;1-租车;2-旅游;3-营地
;4--会员; 5-机车;6-游艇
*/
*/
@ApiModelProperty
(
value
=
"0-全平台;1-租车;2-旅游;3-营地"
)
@ApiModelProperty
(
value
=
"0-全平台;1-租车;2-旅游;3-营地
;4--会员; 5-机车;6-游艇
"
)
private
Integer
channel
;
private
Integer
channel
;
/**
/**
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/CouponBiz.java
View file @
bc302b2f
...
@@ -67,6 +67,9 @@ public class CouponBiz extends BaseBiz<CouponMapper, Coupon> {
...
@@ -67,6 +67,9 @@ public class CouponBiz extends BaseBiz<CouponMapper, Coupon> {
if
(
Objects
.
nonNull
(
couponFindDTO
.
getStatus
())){
if
(
Objects
.
nonNull
(
couponFindDTO
.
getStatus
())){
criteria
.
andEqualTo
(
"status"
,
couponFindDTO
.
getStatus
());
criteria
.
andEqualTo
(
"status"
,
couponFindDTO
.
getStatus
());
}
}
if
(
Objects
.
nonNull
(
couponFindDTO
.
getBizType
())){
criteria
.
andEqualTo
(
"bizType"
,
couponFindDTO
.
getBizType
());
}
if
(
CollUtil
.
isNotEmpty
(
couponFindDTO
.
getCompanyIds
()))
{
if
(
CollUtil
.
isNotEmpty
(
couponFindDTO
.
getCompanyIds
()))
{
criteria
.
andIn
(
"companyIds"
,
couponFindDTO
.
getCompanyIds
());
criteria
.
andIn
(
"companyIds"
,
couponFindDTO
.
getCompanyIds
());
}
}
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/admin/CouponAdminController.java
View file @
bc302b2f
...
@@ -20,6 +20,8 @@ import org.springframework.web.bind.annotation.*;
...
@@ -20,6 +20,8 @@ import org.springframework.web.bind.annotation.*;
import
java.util.List
;
import
java.util.List
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_FALSE
;
/**
/**
* @author libin
* @author libin
* @version 1.0
* @version 1.0
...
@@ -64,10 +66,14 @@ public class CouponAdminController implements UserRestInterface {
...
@@ -64,10 +66,14 @@ public class CouponAdminController implements UserRestInterface {
}
}
@ApiOperation
(
"查询优惠券详情"
)
@ApiOperation
(
"查询优惠券详情"
)
@GetMapping
(
"/{id}"
)
@GetMapping
(
"/operate/{id}"
)
public
ObjectRestResponse
<
CouponVo
>
findCouponById
(
@PathVariable
(
value
=
"id"
)
Integer
id
){
public
ObjectRestResponse
<
Coupon
>
findCouponById
(
@PathVariable
(
value
=
"id"
)
Integer
id
){
CouponVo
couponVo
=
couponBiz
.
findCouponById
(
id
);
Coupon
coupon
=
couponBiz
.
selectByWeekend
(
w
->
{
return
ObjectRestResponse
.
succ
(
couponVo
);
w
.
andEqualTo
(
Coupon:
:
getId
,
id
);
w
.
andEqualTo
(
Coupon:
:
getIsDel
,
SYS_FALSE
);
return
w
;
}).
get
(
0
);
return
ObjectRestResponse
.
succ
(
coupon
);
}
}
@ApiOperation
(
"获取优惠劵标题列表"
)
@ApiOperation
(
"获取优惠劵标题列表"
)
...
@@ -84,10 +90,10 @@ public class CouponAdminController implements UserRestInterface {
...
@@ -84,10 +90,10 @@ public class CouponAdminController implements UserRestInterface {
}
}
@ApiOperation
(
"优惠劵逻辑删除"
)
@ApiOperation
(
"优惠劵逻辑删除"
)
@DeleteMapping
(
"/{id}"
)
@DeleteMapping
(
"/
operate/
{id}"
)
public
ObjectRestResponse
<
Void
>
deleteCouponById
(
@PathVariable
(
value
=
"id"
)
Integer
id
,
UserDTO
userDTO
){
public
ObjectRestResponse
<
Void
>
deleteCouponById
(
@PathVariable
(
value
=
"id"
)
Integer
id
,
UserDTO
userDTO
){
couponBiz
.
updateCouponDelStateById
(
id
,
userDTO
);
couponBiz
.
updateCouponDelStateById
(
id
,
userDTO
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
@ApiOperation
(
"检查优惠劵是否已经在使用阶段"
)
@ApiOperation
(
"检查优惠劵是否已经在使用阶段"
)
...
...
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