From dcd5d07d5d648b48f6f04cd79b6e8c5b780dcff7 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 27 二月 2019 16:59:40 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java | 42 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 39 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java index dad7a63..8adeccd 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java @@ -1011,10 +1011,46 @@ } } } - - } + @Override + public void updateStateByDrawback(String orderNo) throws Exception { + + if (orderNo == null || orderNo.trim().length() == 0) { + return; + } + + UserSystemCouponRecord record = userSystemCouponRecordService.getRecordByOrderNo(orderNo, null); + if (record == null) { + return; + } + + record.setOrderNo(orderNo); + record.setUpdateTime(new Date()); + record.setState(UserSystemCouponRecord.STATE_FAIL_DRAWBACK); + userSystemCouponRecordService.updateByPrimaryKeySelective(record); + + // 鍒搁��鍥� + sendBackCoupon(record.getUserSystemCoupon()); + } + + @Override + public void updateStateByArrivalAccount(String orderNo) throws Exception { + + if (orderNo == null || orderNo.trim().length() == 0) { + return; + } + + UserSystemCouponRecord record = userSystemCouponRecordService.getRecordByOrderNo(orderNo, 2); + if (record == null) { + return; + } + + record.setOrderNo(orderNo); + record.setUpdateTime(new Date()); + record.setState(UserSystemCouponRecord.STATE_SUCCESS); + userSystemCouponRecordService.updateByPrimaryKeySelective(record); + } @Override public void updateCounponInvalid(Long uid) { @@ -1061,7 +1097,7 @@ @Override public void sendBackTimeOutCoupon(Long uid) { // 瓒呰繃120绉� 鏈鍖归厤鐨勫埜 - List<UserSystemCouponRecord> list = userSystemCouponRecordService.getCouponByUsingTimeOut(uid, 120); + List<UserSystemCouponRecord> list = userSystemCouponRecordService.getCouponByUsingTimeOut(uid, 120L); if (list == null || list.size() == 0) { return; } -- Gitblit v1.8.0