Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
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
huluobin
gogirl-miniapp-backend
Commits
9d455366
Commit
9d455366
authored
Jul 24, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步折扣券折扣率定时任务
parent
4dcf484e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
CouponCustomerRelevanceMapper.java
...e/mapper/market/coupon/CouponCustomerRelevanceMapper.java
+5
-0
Schedule.java
...ain/java/com/gogirl/infrastructure/schedule/Schedule.java
+10
-0
CouponCustomerRelevanceMapper.xml
...resources/mapper/market/CouponCustomerRelevanceMapper.xml
+7
-0
No files found.
src/main/java/com/gogirl/infrastructure/mapper/market/coupon/CouponCustomerRelevanceMapper.java
View file @
9d455366
...
@@ -50,4 +50,9 @@ public interface CouponCustomerRelevanceMapper extends BaseMapper<CouponCustomer
...
@@ -50,4 +50,9 @@ public interface CouponCustomerRelevanceMapper extends BaseMapper<CouponCustomer
* @return
* @return
*/
*/
List
<
CouponCustomerRelevance
>
getOrderCoupon
(
@Param
(
"currentCustomerId"
)
Integer
currentCustomerId
,
@Param
(
"departmentId"
)
Integer
departmentId
);
List
<
CouponCustomerRelevance
>
getOrderCoupon
(
@Param
(
"currentCustomerId"
)
Integer
currentCustomerId
,
@Param
(
"departmentId"
)
Integer
departmentId
);
/**
* 每分钟同步卡券折扣率
*/
void
syncCouponCustomerRelDiscountPercent
();
}
}
src/main/java/com/gogirl/infrastructure/schedule/Schedule.java
View file @
9d455366
...
@@ -714,4 +714,14 @@ public class Schedule {
...
@@ -714,4 +714,14 @@ public class Schedule {
storeTechnicianMapper
.
syncTechnicianJobs
();
storeTechnicianMapper
.
syncTechnicianJobs
();
log
.
info
(
"每天凌晨3点同步美甲师jobs 结束"
);
log
.
info
(
"每天凌晨3点同步美甲师jobs 结束"
);
}
}
/**
* 每分钟同步卡券折扣率
*/
@Scheduled
(
cron
=
"0 0/1 * * * *"
)
public
void
syncCouponCustomerRelDiscountPercent
()
{
log
.
info
(
"每分钟同步卡券折扣信息 开始"
);
couponCustomerRelevanceDao
.
syncCouponCustomerRelDiscountPercent
();
log
.
info
(
"每分钟同步卡券折扣信息 结束"
);
}
}
}
src/main/resources/mapper/market/CouponCustomerRelevanceMapper.xml
View file @
9d455366
...
@@ -55,4 +55,11 @@
...
@@ -55,4 +55,11 @@
where state = 1
where state = 1
and #{nowDate,jdbcType=TIMESTAMP} > valid_end_time
and #{nowDate,jdbcType=TIMESTAMP} > valid_end_time
</update>
</update>
<update
id=
"syncCouponCustomerRelDiscountPercent"
>
update coupon_customer_relevance t1
LEFT JOIN coupon t2 on t1.coupon_id = t2.id
set t1.discount_percent = t2.discount_rate
where t1.type = 5
and t1.discount_percent is null;
</update>
</mapper>
</mapper>
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