From fb5a8918a7983bbdf83586f773884d3961bb3c6d Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期五, 16 八月 2019 17:50:56 +0800 Subject: [PATCH] 口令领取+消息 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 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..9969d5e 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,7 +1,5 @@ package com.yeshi.fanli.service.impl.user; -import java.util.Date; - import javax.annotation.Resource; import org.springframework.stereotype.Service; @@ -23,14 +21,12 @@ } @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 getRecordByUidAndCouponId(Long giveUid, Long couponId) { + return userSystemCouponGiveRecordMapper.getRecordByUidAndCouponId(giveUid, couponId); + } + + @Override + public void updateByPrimaryKeySelective(UserSystemCouponGiveRecord giveRecord) { + userSystemCouponGiveRecordMapper.updateByPrimaryKeySelective(giveRecord); } } -- Gitblit v1.8.0