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
b642fd7a
Commit
b642fd7a
authored
Nov 25, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改抽奖赠送优惠券
parent
1b0a503b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
ISConsumerCouponService.java
...in/java/share/system/service/ISConsumerCouponService.java
+1
-1
SConsumerCouponServiceImpl.java
...share/system/service/impl/SConsumerCouponServiceImpl.java
+12
-3
WheelGameServiceImpl.java
.../java/share/system/service/impl/WheelGameServiceImpl.java
+1
-1
No files found.
share-system/src/main/java/share/system/service/ISConsumerCouponService.java
View file @
b642fd7a
...
@@ -76,7 +76,7 @@ public interface ISConsumerCouponService extends IService<SConsumerCoupon>
...
@@ -76,7 +76,7 @@ public interface ISConsumerCouponService extends IService<SConsumerCoupon>
SConsumerCoupon
give
(
SConsumerCoupon
sConsumerCoupon
);
SConsumerCoupon
give
(
SConsumerCoupon
sConsumerCoupon
);
public
Integer
give
(
Long
consumerId
,
Long
couponId
,
Integer
giveDay
);
public
SConsumerCoupon
give
(
Long
consumerId
,
Long
couponId
,
Integer
giveDay
);
SConsumerCoupon
queryById
(
Long
couponId
);
SConsumerCoupon
queryById
(
Long
couponId
);
...
...
share-system/src/main/java/share/system/service/impl/SConsumerCouponServiceImpl.java
View file @
b642fd7a
...
@@ -529,7 +529,15 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
...
@@ -529,7 +529,15 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
newSConsumerCoupon
.
setSourceType
(
SourceTypeEnum
.
GIVE
.
getCode
());
newSConsumerCoupon
.
setSourceType
(
SourceTypeEnum
.
GIVE
.
getCode
());
newSConsumerCoupon
.
setPlatformType
(
sCoupon
.
getPlatformType
());
newSConsumerCoupon
.
setPlatformType
(
sCoupon
.
getPlatformType
());
newSConsumerCoupon
.
setStartDate
(
sCoupon
.
getStartDate
());
newSConsumerCoupon
.
setStartDate
(
sCoupon
.
getStartDate
());
newSConsumerCoupon
.
setEndDate
(
DateUtils
.
addDays
(
new
Date
(),
sCoupon
.
getExpirationNumber
()));
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
.
setRemark
(
sCoupon
.
getRemark
());
newSConsumerCoupon
.
setCreateTime
(
new
Date
());
newSConsumerCoupon
.
setCreateTime
(
new
Date
());
int
insert
=
baseMapper
.
insert
(
newSConsumerCoupon
);
int
insert
=
baseMapper
.
insert
(
newSConsumerCoupon
);
...
@@ -542,7 +550,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
...
@@ -542,7 +550,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
}
}
@Override
@Override
public
Integer
give
(
Long
consumerId
,
Long
couponId
,
Integer
giveDay
)
{
public
SConsumerCoupon
give
(
Long
consumerId
,
Long
couponId
,
Integer
giveDay
)
{
SCoupon
sCoupon
=
sCouponService
.
selectSCouponById
(
couponId
);
SCoupon
sCoupon
=
sCouponService
.
selectSCouponById
(
couponId
);
//创建优惠卷领取记录
//创建优惠卷领取记录
SConsumerCoupon
newSConsumerCoupon
=
new
SConsumerCoupon
();
SConsumerCoupon
newSConsumerCoupon
=
new
SConsumerCoupon
();
...
@@ -571,7 +579,8 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
...
@@ -571,7 +579,8 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
newSConsumerCoupon
.
setEndDate
(
DateUtils
.
addDays
(
new
Date
(),
giveDay
));
newSConsumerCoupon
.
setEndDate
(
DateUtils
.
addDays
(
new
Date
(),
giveDay
));
newSConsumerCoupon
.
setRemark
(
sCoupon
.
getRemark
());
newSConsumerCoupon
.
setRemark
(
sCoupon
.
getRemark
());
newSConsumerCoupon
.
setCreateTime
(
new
Date
());
newSConsumerCoupon
.
setCreateTime
(
new
Date
());
return
baseMapper
.
insert
(
newSConsumerCoupon
);
baseMapper
.
insert
(
newSConsumerCoupon
);
return
newSConsumerCoupon
;
}
}
...
...
share-system/src/main/java/share/system/service/impl/WheelGameServiceImpl.java
View file @
b642fd7a
...
@@ -152,7 +152,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
...
@@ -152,7 +152,7 @@ public class WheelGameServiceImpl extends ServiceImpl<WheelGameMapper, WheelGame
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
sConsumerCoupon
.
setConsumerId
(
user
.
getId
());
sConsumerCoupon
.
setConsumerId
(
user
.
getId
());
sConsumerCoupon
.
setCouponId
(
prize
.
getCouponId
());
sConsumerCoupon
.
setCouponId
(
prize
.
getCouponId
());
SConsumerCoupon
give
=
sConsumerCouponService
.
give
(
sConsumerCoupon
);
SConsumerCoupon
give
=
sConsumerCouponService
.
give
(
user
.
getId
(),
prize
.
getCouponId
(),
30
);
log
.
setIsHit
(
YesNoEnum
.
yes
.
getIndex
());
log
.
setIsHit
(
YesNoEnum
.
yes
.
getIndex
());
log
.
setIsSend
(
YesNoEnum
.
yes
.
getIndex
());
log
.
setIsSend
(
YesNoEnum
.
yes
.
getIndex
());
log
.
setHitPrize
(
prize
.
getPrizeName
()
+
":"
+
give
.
getName
());
log
.
setHitPrize
(
prize
.
getPrizeName
()
+
":"
+
give
.
getName
());
...
...
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