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
fdbca84e
Commit
fdbca84e
authored
Nov 18, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
集点活动表增加活动年
parent
f22103c7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
7 deletions
+27
-7
PointActivities.java
...em/src/main/java/share/system/domain/PointActivities.java
+8
-2
PointActivitiesVo.java
...c/main/java/share/system/domain/vo/PointActivitiesVo.java
+8
-2
PointActivitiesServiceImpl.java
...share/system/service/impl/PointActivitiesServiceImpl.java
+4
-3
PointActivitiesMapper.xml
...rc/main/resources/mapper/system/PointActivitiesMapper.xml
+7
-0
No files found.
share-system/src/main/java/share/system/domain/PointActivities.java
View file @
fdbca84e
...
@@ -60,9 +60,15 @@ public class PointActivities extends BaseEntity {
...
@@ -60,9 +60,15 @@ public class PointActivities extends BaseEntity {
private
Date
lastConsumptionTime
;
private
Date
lastConsumptionTime
;
/**
/**
* 当前活动
月份
* 当前活动
年
*/
*/
@Excel
(
name
=
"当前活动月份"
)
@Excel
(
name
=
"当前活动年"
)
private
Integer
currentYear
;
/**
* 当前活动月
*/
@Excel
(
name
=
"当前活动月"
)
private
Integer
currentMonth
;
private
Integer
currentMonth
;
/**
/**
...
...
share-system/src/main/java/share/system/domain/vo/PointActivitiesVo.java
View file @
fdbca84e
...
@@ -63,9 +63,15 @@ public class PointActivitiesVo extends BaseEntity {
...
@@ -63,9 +63,15 @@ public class PointActivitiesVo extends BaseEntity {
private
Date
lastConsumptionTime
;
private
Date
lastConsumptionTime
;
/**
/**
* 当前活动
月份
* 当前活动
年
*/
*/
@Excel
(
name
=
"当前活动月份"
)
@Excel
(
name
=
"当前活动年"
)
private
Integer
currentYear
;
/**
* 当前活动月
*/
@Excel
(
name
=
"当前活动月"
)
private
Integer
currentMonth
;
private
Integer
currentMonth
;
/**
/**
...
...
share-system/src/main/java/share/system/service/impl/PointActivitiesServiceImpl.java
View file @
fdbca84e
...
@@ -107,8 +107,9 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe
...
@@ -107,8 +107,9 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe
pointActivities
.
setLastConsumptionTime
(
sOrder
.
getPayTime
());
pointActivities
.
setLastConsumptionTime
(
sOrder
.
getPayTime
());
pointActivities
.
setIsReceive
(
YesNoEnum
.
no
.
getIndex
());
pointActivities
.
setIsReceive
(
YesNoEnum
.
no
.
getIndex
());
pointActivities
.
setCouponReceived
(
YesNoEnum
.
no
.
getIndex
());
pointActivities
.
setCouponReceived
(
YesNoEnum
.
no
.
getIndex
());
LocalDate
currentDate
=
LocalDate
.
now
();
//获取当前年月
pointActivities
.
setCurrentMonth
(
currentDate
.
getMonthValue
());
pointActivities
.
setCurrentYear
(
LocalDate
.
now
().
getYear
());
pointActivities
.
setCurrentMonth
(
LocalDate
.
now
().
getMonthValue
());
save
(
pointActivities
);
save
(
pointActivities
);
}
}
}
}
...
@@ -121,7 +122,7 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe
...
@@ -121,7 +122,7 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe
//领取的时间小于领取期限(最后的时间加领取的期限)
//领取的时间小于领取期限(最后的时间加领取的期限)
if
(
DateUtils
.
addDays
(
pointActivities
.
getLastConsumptionTime
(),
activitiesConf
.
getCollectionDeadline
()).
compareTo
(
new
Date
())
<
0
if
(
DateUtils
.
addDays
(
pointActivities
.
getLastConsumptionTime
(),
activitiesConf
.
getCollectionDeadline
()).
compareTo
(
new
Date
())
<
0
&&
pointActivities
.
getPoints
().
equals
(
activitiesConf
.
getPointsRequired
()))
{
&&
pointActivities
.
getPoints
().
equals
(
activitiesConf
.
getPointsRequired
()))
{
if
(
pointActivities
.
getCurrentMonth
().
compareTo
(
LocalDate
.
now
().
getMonthValue
())
==
0
)
{
if
(
pointActivities
.
getCurrentMonth
().
compareTo
(
LocalDate
.
now
().
getMonthValue
())
==
0
&&
pointActivities
.
getCurrentYear
().
compareTo
(
LocalDate
.
now
().
getYear
())
==
0
)
{
pointActivities
.
setCouponReceived
(
YesNoEnum
.
yes
.
getIndex
());
pointActivities
.
setCouponReceived
(
YesNoEnum
.
yes
.
getIndex
());
pointActivities
.
setReceivedDate
(
new
Date
());
pointActivities
.
setReceivedDate
(
new
Date
());
sConsumerCouponService
.
give
(
pointActivities
.
getConsumerId
(),
activitiesConf
.
getCouponId
(),
activitiesConf
.
getCouponDuration
());
sConsumerCouponService
.
give
(
pointActivities
.
getConsumerId
(),
activitiesConf
.
getCouponId
(),
activitiesConf
.
getCouponDuration
());
...
...
share-system/src/main/resources/mapper/system/PointActivitiesMapper.xml
View file @
fdbca84e
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"couponName"
column=
"coupon_name"
/>
<result
property=
"couponName"
column=
"coupon_name"
/>
<result
property=
"points"
column=
"points"
/>
<result
property=
"points"
column=
"points"
/>
<result
property=
"currentYear"
column=
"current_year"
/>
<result
property=
"currentMonth"
column=
"current_month"
/>
<result
property=
"currentMonth"
column=
"current_month"
/>
<result
property=
"lastConsumptionTime"
column=
"last_consumption_time"
/>
<result
property=
"lastConsumptionTime"
column=
"last_consumption_time"
/>
<result
property=
"isReceive"
column=
"is_receive"
/>
<result
property=
"isReceive"
column=
"is_receive"
/>
...
@@ -35,6 +36,7 @@
...
@@ -35,6 +36,7 @@
conf_id,
conf_id,
coupon_id,
coupon_id,
points,
points,
current_year,
current_month,
current_month,
last_consumption_time,
last_consumption_time,
is_receive,
is_receive,
...
@@ -62,6 +64,7 @@
...
@@ -62,6 +64,7 @@
p.coupon_id,
p.coupon_id,
c1.name as 'coupon_name',
c1.name as 'coupon_name',
p.points,
p.points,
p.current_year,
p.current_month,
p.current_month,
p.last_consumption_time,
p.last_consumption_time,
p.is_receive,
p.is_receive,
...
@@ -85,6 +88,7 @@
...
@@ -85,6 +88,7 @@
<if
test=
"confId != null "
>
and p.conf_id = #{confId}
</if>
<if
test=
"confId != null "
>
and p.conf_id = #{confId}
</if>
<if
test=
"couponId != null "
>
and p.coupon_id = #{couponId}
</if>
<if
test=
"couponId != null "
>
and p.coupon_id = #{couponId}
</if>
<if
test=
"points != null "
>
and p.points = #{points}
</if>
<if
test=
"points != null "
>
and p.points = #{points}
</if>
<if
test=
"currentYear != null"
>
and p.current_year = #{currentYear}
</if>
<if
test=
"currentMonth != null"
>
and p.current_month = #{currentMonth}
</if>
<if
test=
"currentMonth != null"
>
and p.current_month = #{currentMonth}
</if>
<if
test=
"lastConsumptionTime != null "
>
and p.last_consumption_time = #{lastConsumptionTime}
</if>
<if
test=
"lastConsumptionTime != null "
>
and p.last_consumption_time = #{lastConsumptionTime}
</if>
<if
test=
"isReceive != null "
>
and p.is_receive = #{isReceive}
</if>
<if
test=
"isReceive != null "
>
and p.is_receive = #{isReceive}
</if>
...
@@ -108,6 +112,7 @@
...
@@ -108,6 +112,7 @@
<if
test=
"confId != null"
>
conf_id,
</if>
<if
test=
"confId != null"
>
conf_id,
</if>
<if
test=
"couponId != null"
>
coupon_id,
</if>
<if
test=
"couponId != null"
>
coupon_id,
</if>
<if
test=
"points != null"
>
points,
</if>
<if
test=
"points != null"
>
points,
</if>
<if
test=
"currentYear != null"
>
current_year,
</if>
<if
test=
"currentMonth != null"
>
current_month,
</if>
<if
test=
"currentMonth != null"
>
current_month,
</if>
<if
test=
"lastConsumptionTime != null"
>
last_consumption_time,
</if>
<if
test=
"lastConsumptionTime != null"
>
last_consumption_time,
</if>
<if
test=
"isReceive != null"
>
is_receive,
</if>
<if
test=
"isReceive != null"
>
is_receive,
</if>
...
@@ -126,6 +131,7 @@
...
@@ -126,6 +131,7 @@
<if
test=
"confId != null"
>
#{confId},
</if>
<if
test=
"confId != null"
>
#{confId},
</if>
<if
test=
"couponId != null"
>
#{couponId},
</if>
<if
test=
"couponId != null"
>
#{couponId},
</if>
<if
test=
"points != null"
>
#{points},
</if>
<if
test=
"points != null"
>
#{points},
</if>
<if
test=
"currentYear != null"
>
#{currentYear},
</if>
<if
test=
"currentMonth != null"
>
#{currentMonth},
</if>
<if
test=
"currentMonth != null"
>
#{currentMonth},
</if>
<if
test=
"lastConsumptionTime != null"
>
#{lastConsumptionTime},
</if>
<if
test=
"lastConsumptionTime != null"
>
#{lastConsumptionTime},
</if>
<if
test=
"isReceive != null"
>
#{isReceive},
</if>
<if
test=
"isReceive != null"
>
#{isReceive},
</if>
...
@@ -148,6 +154,7 @@
...
@@ -148,6 +154,7 @@
<if
test=
"confId != null"
>
conf_id = #{confId},
</if>
<if
test=
"confId != null"
>
conf_id = #{confId},
</if>
<if
test=
"couponId != null"
>
coupon_id = #{couponId},
</if>
<if
test=
"couponId != null"
>
coupon_id = #{couponId},
</if>
<if
test=
"points != null"
>
points = #{points},
</if>
<if
test=
"points != null"
>
points = #{points},
</if>
<if
test=
"currentYear != null"
>
current_year = #{currentYear},
</if>
<if
test=
"currentMonth != null"
>
current_month = #{currentMonth},
</if>
<if
test=
"currentMonth != null"
>
current_month = #{currentMonth},
</if>
<if
test=
"lastConsumptionTime != null"
>
last_consumption_time = #{lastConsumptionTime},
</if>
<if
test=
"lastConsumptionTime != null"
>
last_consumption_time = #{lastConsumptionTime},
</if>
<if
test=
"isReceive != null"
>
is_receive = #{isReceive},
</if>
<if
test=
"isReceive != null"
>
is_receive = #{isReceive},
</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