Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
pseer
gxpt_ht
Commits
87fdcdb2
Commit
87fdcdb2
authored
Oct 24, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠卷领取记录类增加优惠卷有效时间
parent
5caa0de0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
10 deletions
+28
-10
SConsumerCoupon.java
...em/src/main/java/share/system/domain/SConsumerCoupon.java
+14
-6
CouponRequest.java
...tem/src/main/java/share/system/request/CouponRequest.java
+2
-2
SConsumerCouponServiceImpl.java
...share/system/service/impl/SConsumerCouponServiceImpl.java
+1
-1
SConsumerCouponMapper.xml
...rc/main/resources/mapper/system/SConsumerCouponMapper.xml
+11
-1
No files found.
share-system/src/main/java/share/system/domain/SConsumerCoupon.java
View file @
87fdcdb2
...
...
@@ -40,17 +40,25 @@ public class SConsumerCoupon extends BaseEntity
@Excel
(
name
=
"优惠券名称"
)
private
String
name
;
/
** 优惠券类型(1:折扣券,2,满减券,3:时长券) */
@Excel
(
name
=
"
优惠券类型(1:折扣券,2,满减券,3:时长券
)"
)
private
String
coupon
Type
;
/
/房间类型
@Excel
(
name
=
"
房间类型(1:标间,2:豪华间,3:总统套房,4:商务套房,5:行政套房,6:其他
)"
)
private
String
room
Type
;
//门店类型
@Excel
(
name
=
"门店类型(1:标准店,2:外卖店,3:酒店,4:其他)"
)
private
String
storeType
;
//房间类型
@Excel
(
name
=
"房间类型(1:标间,2:豪华间,3:总统套房,4:商务套房,5:行政套房,6:其他)"
)
private
String
roomType
;
//优惠开始(有效)时段
@Excel
(
name
=
"优惠开始(有效)时段"
)
private
String
couponTimeStart
;
//优惠结束(有效)时段
@Excel
(
name
=
"优惠结束(有效)时段"
)
private
String
couponTimeEnd
;
/** 优惠券类型(1:折扣券,2,满减券,3:时长券) */
@Excel
(
name
=
"优惠券类型(1:折扣券,2,满减券,3:时长券)"
)
private
String
couponType
;
/** 门槛时长 */
@Excel
(
name
=
"门槛时长"
)
...
...
share-system/src/main/java/share/system/request/CouponRequest.java
View file @
87fdcdb2
...
...
@@ -18,11 +18,11 @@ import java.util.Date;
@ApiModel
(
value
=
"CouponRequest对象"
,
description
=
"优惠卷请求对象"
)
public
class
CouponRequest
{
@ApiModelProperty
(
value
=
"门店ID"
,
required
=
true
)
@Not
Blank
(
message
=
"门店ID不能为空"
)
@Not
Null
(
message
=
"门店ID不能为空"
)
private
Long
storeId
;
@ApiModelProperty
(
value
=
"房间ID"
,
required
=
true
)
@Not
Blank
(
message
=
"房间ID不能为空"
)
@Not
Null
(
message
=
"房间ID不能为空"
)
private
Long
roomId
;
/**
...
...
share-system/src/main/java/share/system/service/impl/SConsumerCouponServiceImpl.java
View file @
87fdcdb2
...
...
@@ -137,7 +137,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
}
//迭代
sConsumerCoupons
.
forEach
(
item
->
{
if
(
item
.
getStartDate
().
compareTo
(
couponRequest
.
getPreStartDate
())
>
0
)
{
if
(
item
.
getStartDate
().
compareTo
(
couponRequest
.
getPreStartDate
())
<
0
)
{
SStore
sStore
=
sStoreService
.
getById
(
couponRequest
.
getStoreId
());
SRoom
byId
=
sRoomService
.
getById
(
couponRequest
.
getRoomId
());
BigDecimal
subtract
=
new
BigDecimal
(
item
.
getMinDuration
());
...
...
share-system/src/main/resources/mapper/system/SConsumerCouponMapper.xml
View file @
87fdcdb2
...
...
@@ -11,6 +11,8 @@
<result
property=
"couponCode"
column=
"coupon_code"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"couponType"
column=
"coupon_type"
/>
<result
property=
"couponTimeStart"
column=
"coupon_time_start"
/>
<result
property=
"couponTimeEnd"
column=
"coupon_time_end"
/>
<result
property=
"minDuration"
column=
"min_duration"
/>
<result
property=
"maxDuration"
column=
"max_duration"
/>
<result
property=
"duration"
column=
"duration"
/>
...
...
@@ -35,7 +37,7 @@
</resultMap>
<sql
id=
"selectSConsumerCouponVo"
>
select id, consumer_id, coupon_id, coupon_code, name, coupon_type, max_duration,min_duration, duration, min_price, sub_price, source_type, platform_type, start_date, end_date, use_date, use_status, is_delete, create_by, create_time, update_by, update_time, delete_by, delete_time, remark,room_type,store_type from s_consumer_coupon
select id, consumer_id, coupon_id, coupon_code, name, coupon_type,
coupon_time_start,coupon_time_end,
max_duration,min_duration, duration, min_price, sub_price, source_type, platform_type, start_date, end_date, use_date, use_status, is_delete, create_by, create_time, update_by, update_time, delete_by, delete_time, remark,room_type,store_type from s_consumer_coupon
</sql>
<select
id=
"selectSConsumerCouponList"
parameterType=
"SConsumerCoupon"
resultMap=
"SConsumerCouponResult"
>
...
...
@@ -46,6 +48,8 @@
<if
test=
"couponCode != null and couponCode != ''"
>
and coupon_code = #{couponCode}
</if>
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
<if
test=
"couponType != null and couponType != ''"
>
and coupon_type = #{couponType}
</if>
<if
test=
"couponTimeStart != null "
>
and coupon_time_start = #{couponTimeStart}
</if>
<if
test=
"couponTimeEnd != null "
>
and coupon_time_end = #{couponTimeEnd}
</if>
<if
test=
"maxDuration != null and maxDuration != ''"
>
and max_duration = #{maxDuration}
</if>
<if
test=
"minDuration != null and minDuration != ''"
>
and min_duration = #{minDuration}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
...
...
@@ -79,6 +83,8 @@
<if
test=
"couponCode != null and couponCode != ''"
>
coupon_code,
</if>
<if
test=
"name != null and name != ''"
>
name,
</if>
<if
test=
"couponType != null"
>
coupon_type,
</if>
<if
test=
"couponTimeStart != null"
>
coupon_time_start,
</if>
<if
test=
"couponTimeEnd != null"
>
coupon_time_end,
</if>
<if
test=
"maxDuration != null"
>
max_duration,
</if>
<if
test=
"minDuration != null"
>
min_duration,
</if>
<if
test=
"duration != null and duration != ''"
>
duration,
</if>
...
...
@@ -107,6 +113,8 @@
<if
test=
"couponCode != null and couponCode != ''"
>
#{couponCode},
</if>
<if
test=
"name != null and name != ''"
>
#{name},
</if>
<if
test=
"couponType != null"
>
#{couponType},
</if>
<if
test=
"couponTimeStart != null"
>
#{couponTimeStart},
</if>
<if
test=
"couponTimeEnd != null"
>
#{couponTimeEnd},
</if>
<if
test=
"maxDuration != null"
>
#{maxDuration},
</if>
<if
test=
"minDuration != null"
>
#{minDuration},
</if>
<if
test=
"duration != null and duration != ''"
>
#{duration},
</if>
...
...
@@ -139,6 +147,8 @@
<if
test=
"couponCode != null and couponCode != ''"
>
coupon_code = #{couponCode},
</if>
<if
test=
"name != null and name != ''"
>
name = #{name},
</if>
<if
test=
"couponType != null"
>
coupon_type = #{couponType},
</if>
<if
test=
"couponTimeStart != null"
>
coupon_time_start = #{couponTimeStart},
</if>
<if
test=
"couponTimeEnd != null"
>
coupon_time_end = #{couponTimeEnd},
</if>
<if
test=
"maxDuration != null"
>
max_duration = #{maxDuration},
</if>
<if
test=
"minDuration != null"
>
min_duration = #{minDuration},
</if>
<if
test=
"duration != null and duration != ''"
>
duration = #{duration},
</if>
...
...
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