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
3d152d6d
Commit
3d152d6d
authored
May 16, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券配置增加过期天数
parent
b639d475
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletions
+21
-1
SCoupon.java
share-system/src/main/java/share/system/domain/SCoupon.java
+6
-0
SConsumerCouponServiceImpl.java
...share/system/service/impl/SConsumerCouponServiceImpl.java
+9
-1
SCouponMapper.xml
...system/src/main/resources/mapper/system/SCouponMapper.xml
+6
-0
No files found.
share-system/src/main/java/share/system/domain/SCoupon.java
View file @
3d152d6d
...
...
@@ -134,6 +134,12 @@ public class SCoupon extends BaseEntity
private
String
weeks
;
/**
* 过期天数
*/
@Excel
(
name
=
"过期天数"
)
private
Integer
expirationNumber
;
/**
* 第三方平台类型(1:自营,2:美团)
*/
@Excel
(
name
=
"第三方平台类型(1:自营,2:美团,3: 抖音)"
)
...
...
share-system/src/main/java/share/system/service/impl/SConsumerCouponServiceImpl.java
View file @
3d152d6d
...
...
@@ -473,7 +473,15 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
newSConsumerCoupon
.
setSourceType
(
SourceTypeEnum
.
GIVE
.
getCode
());
newSConsumerCoupon
.
setPlatformType
(
sCoupon
.
getPlatformType
());
newSConsumerCoupon
.
setStartDate
(
sCoupon
.
getStartDate
());
newSConsumerCoupon
.
setEndDate
(
sCoupon
.
getEndDate
());
if
(
ObjectUtils
.
isEmpty
(
sCoupon
.
getExpirationNumber
()))
{
newSConsumerCoupon
.
setEndDate
(
sCoupon
.
getEndDate
());
}
else
{
if
(
DateUtils
.
addDays
(
new
Date
(),
sCoupon
.
getExpirationNumber
()).
getTime
()
<
sCoupon
.
getEndDate
().
getTime
())
{
newSConsumerCoupon
.
setEndDate
(
DateUtils
.
addDays
(
new
Date
(),
sCoupon
.
getExpirationNumber
()));
}
else
{
newSConsumerCoupon
.
setEndDate
(
sCoupon
.
getEndDate
());
}
}
newSConsumerCoupon
.
setRemark
(
sCoupon
.
getRemark
());
newSConsumerCoupon
.
setCreateTime
(
new
Date
());
int
insert
=
baseMapper
.
insert
(
newSConsumerCoupon
);
...
...
share-system/src/main/resources/mapper/system/SCouponMapper.xml
View file @
3d152d6d
...
...
@@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"weeks"
column=
"weeks"
/>
<result
property=
"platformType"
column=
"platform_type"
/>
<result
property=
"number"
column=
"number"
/>
<result
property=
"expirationNumber"
column=
"expiration_number"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
...
...
@@ -55,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
min_price,
original_price,
is_overlay,
expiration_number,
platform_type,number,create_by,
create_time,update_by,update_time,
remark from s_coupon
...
...
@@ -87,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"platformType != null"
>
and platform_type = #{platformType}
</if>
<if
test=
"weeks != null"
>
and weeks = #{weeks}
</if>
<if
test=
"number != null"
>
and number = #{number}
</if>
<if
test=
"expirationNumber != null"
>
and expiration_number = #{expirationNumber}
</if>
<if
test=
"createBy != null"
>
and create_by = #{createBy}
</if>
<if
test=
"createTime != null"
>
and create_time = #{createTime}
</if>
<if
test=
"updateBy != null"
>
and update_by = #{updateBy}
</if>
...
...
@@ -158,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"storeIds != null"
>
store_ids,
</if>
<if
test=
"couponPayPrice != null"
>
coupon_pay_price,
</if>
<if
test=
"salePrice != null"
>
sale_price,
</if>
<if
test=
"expirationNumber != null"
>
expiration_number,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null and name != ''"
>
#{name},
</if>
...
...
@@ -187,6 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"storeIds != null"
>
#{storeIds},
</if>
<if
test=
"couponPayPrice != null"
>
#{couponPayPrice},
</if>
<if
test=
"salePrice != null"
>
#{salePrice},
</if>
<if
test=
"expirationNumber != null"
>
#{expirationNumber},
</if>
</trim>
</insert>
...
...
@@ -222,6 +227,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"couponPayPrice != null"
>
coupon_pay_price = #{couponPayPrice},
</if>
<if
test=
"salePrice != null"
>
sale_price = #{salePrice},
</if>
<if
test=
"expirationNumber != null"
>
expiration_number = #{expirationNumber},
</if>
</trim>
where id = #{id}
</update>
...
...
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