| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | }
|
| | |
|
| | | @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) {
|
| | |
| | | @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;
|
| | | }
|