From 7a29e50e7e2eefe6c0e6e1deb53690147184e078 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期四, 29 八月 2019 18:00:12 +0800 Subject: [PATCH] 队员首单 奖励上级金币 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java | 38 ++++++++++++++++++++++++++++---------- 1 files changed, 28 insertions(+), 10 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java index 6f314cc..2f0867e 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java @@ -1,6 +1,6 @@ package com.yeshi.fanli.service.impl.user; -import java.util.Date; +import java.util.List; import javax.annotation.Resource; @@ -23,14 +23,32 @@ } @Override - public void updateRecord(Long receiveUid, Long giveUid, Long couponId) { - UserSystemCouponGiveRecord record = userSystemCouponGiveRecordMapper.getRecordByUidAndCouponId(giveUid, couponId); - if (record != null) { - UserSystemCouponGiveRecord giveRecord = new UserSystemCouponGiveRecord(); - giveRecord.setId(record.getId()); - giveRecord.setReceiveUid(receiveUid); - giveRecord.setReceiveTime(new Date()); - userSystemCouponGiveRecordMapper.updateByPrimaryKeySelective(giveRecord); - } + public UserSystemCouponGiveRecord selectByPrimaryKey(Long id) { + return userSystemCouponGiveRecordMapper.selectByPrimaryKey(id); + } + + @Override + public UserSystemCouponGiveRecord getRecordByUidAndCouponId(Long giveUid, Long couponId) { + return userSystemCouponGiveRecordMapper.getRecordByUidAndCouponId(giveUid, couponId); + } + + @Override + public void updateByPrimaryKeySelective(UserSystemCouponGiveRecord giveRecord) { + userSystemCouponGiveRecordMapper.updateByPrimaryKeySelective(giveRecord); + } + + @Override + public List<UserSystemCouponGiveRecord> overdueList(int count) { + return userSystemCouponGiveRecordMapper.overdueList(count); + } + + @Override + public List<UserSystemCouponGiveRecord> overdueListByUser(Long uid) { + return userSystemCouponGiveRecordMapper.overdueListByUser(uid); + } + + @Override + public UserSystemCouponGiveRecord getByReceiveId(Long receiveId) { + return userSystemCouponGiveRecordMapper.getByReceiveId(receiveId); } } -- Gitblit v1.8.0