admin
2024-01-23 81da61b828e29b7745e1382dfbbaeb685dc083ef
fanli/src/main/java/com/yeshi/fanli/service/inter/redpack/RedPackGiveRecordService.java
@@ -1,52 +1,62 @@
package com.yeshi.fanli.service.inter.redpack;
import java.math.BigDecimal;
import java.util.List;
import com.yeshi.fanli.entity.redpack.RedPackGiveRecord;
import com.yeshi.fanli.exception.redpack.RedPackGiveRecordException;
public interface RedPackGiveRecordService {
   /**
    * 赠送红包
    * @param uid
    * @param amount
    * @return
    * @throws RedPackGiveRecordException
    */
   public String giving(Long uid, BigDecimal amount) throws RedPackGiveRecordException;
   /**
    * 查询记录
    * @param id
    * @return
    */
   public RedPackGiveRecord selectByPrimaryKey(Long id);
   /**
    * 更新记录
    * @param record
    */
   public void updateByPrimaryKeySelective(RedPackGiveRecord record);
   /**
    * 口令红包领取
    * @param uid
    * @param id
    * @throws RedPackGiveRecordException
    */
   public RedPackGiveRecord receiveFriendsGive(Long uid, Long id) throws RedPackGiveRecordException;
   /**
    * 查询需要退回的
    * @param count
    * @return
    */
   public List<RedPackGiveRecord> overdueList(int count);
   // 退回红包
   public void overdue(List<RedPackGiveRecord> list) throws Exception;
}
package com.yeshi.fanli.service.inter.redpack;
import java.math.BigDecimal;
import java.util.List;
import com.yeshi.fanli.entity.redpack.RedPackGiveRecord;
import com.yeshi.fanli.exception.redpack.RedPackGiveRecordException;
import com.yeshi.fanli.vo.redpack.RedPackGiveVO;
public interface RedPackGiveRecordService {
   /**
    * 赠送红包
    * @param uid
    * @param amount
    * @return
    * @throws RedPackGiveRecordException
    */
   public String giving(Long uid, BigDecimal amount) throws RedPackGiveRecordException;
   /**
    * 查询记录
    * @param id
    * @return
    */
   public RedPackGiveRecord selectByPrimaryKey(Long id);
   /**
    * 更新记录
    * @param record
    */
   public void updateByPrimaryKeySelective(RedPackGiveRecord record);
   /**
    * 口令红包领取
    * @param uid
    * @param id
    * @throws RedPackGiveRecordException
    */
   public RedPackGiveRecord receiveFriendsGive(Long uid, Long id) throws RedPackGiveRecordException;
   /**
    * 赠送退回
    * @param id
    * @throws Exception
    */
   public void overdueByPrimaryKey(Long id) throws Exception;
   /**
    * 查询赠送记录
    * @param page
    * @param pageSzie
    * @param uid
    * @return
    */
   public List<RedPackGiveVO> getGiveList(int page, int pageSzie, Long uid);
   public long countGiveList(Long uid);
}