yujian
2019-08-16 e97b71caed03d1f1aa3ae21b1ea0deac4dd9ffe0
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java
@@ -1,5 +1,7 @@
package com.yeshi.fanli.service.impl.user;
import java.util.Date;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
@@ -20,4 +22,15 @@
      userSystemCouponGiveRecordMapper.insertSelective(record);
   }
   
   @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);
      }
   }
}