package com.yeshi.fanli.dao.mybatis.redpack;
|
|
import java.math.BigDecimal;
|
import java.util.List;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import com.yeshi.fanli.dao.BaseMapper;
|
import com.yeshi.fanli.entity.redpack.RedPackBalance;
|
import com.yeshi.fanli.vo.redpack.RedPackBalanceVO;
|
|
public interface RedPackBalanceMapper extends BaseMapper<RedPackBalance> {
|
|
/**
|
* 减掉用户红包金额
|
* @param id
|
* @param money
|
*/
|
void subRedPack(@Param("id") long id, @Param("money") BigDecimal money);
|
|
|
/**
|
* 增加用户红包金额
|
* @param id
|
* @param money
|
*/
|
void addRedPack(@Param("id") long id, @Param("money") BigDecimal money);
|
|
|
/**
|
* 查询用于更新余额-锁定
|
* @param id
|
* @return
|
*/
|
RedPackBalance selectForUpdate(long id);
|
|
/**
|
* 商品列表查询
|
*
|
* @param key
|
* @param state
|
* @param start
|
* @param count
|
* @return
|
*/
|
List<RedPackBalanceVO> query(@Param("start") long start,@Param("count") int count, @Param("key") String key,
|
@Param("state") Integer state, @Param("order") Integer order);
|
|
/**
|
* 商品计数
|
*
|
* @param key
|
* @param state
|
* @return
|
*/
|
long count(@Param("key") String key, @Param("state") Integer state);
|
|
|
/**
|
* 重置红包
|
* @param id
|
* @return
|
*/
|
void resetRedPack(long id);
|
}
|