From 0d9ac58dc11f54351e5e18dba8e950717d78019f Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 09 九月 2019 14:55:24 +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