mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-17 20:49:17 +08:00
58 lines
1.2 KiB
Java
58 lines
1.2 KiB
Java
package com.jsowell.pile.mapper;
|
|
|
|
import com.jsowell.pile.domain.MemberPointsInfo;
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
/**
|
|
* 用户积分Mapper接口
|
|
*/
|
|
public interface MemberPointsInfoMapper {
|
|
|
|
/**
|
|
* 根据主键查询
|
|
*/
|
|
MemberPointsInfo selectByPrimaryKey(Long id);
|
|
|
|
/**
|
|
* 根据会员ID查询积分信息
|
|
*/
|
|
MemberPointsInfo selectByMemberId(@Param("memberId") String memberId);
|
|
|
|
/**
|
|
* 插入积分记录
|
|
*/
|
|
int insert(MemberPointsInfo record);
|
|
|
|
/**
|
|
* 选择性插入积分记录
|
|
*/
|
|
int insertSelective(MemberPointsInfo record);
|
|
|
|
/**
|
|
* 根据主键更新
|
|
*/
|
|
int updateByPrimaryKey(MemberPointsInfo record);
|
|
|
|
/**
|
|
* 根据主键选择性更新
|
|
*/
|
|
int updateByPrimaryKeySelective(MemberPointsInfo record);
|
|
|
|
/**
|
|
* 原子性增加积分
|
|
*/
|
|
int addPoints(@Param("memberId") String memberId, @Param("points") BigDecimal points);
|
|
|
|
/**
|
|
* 原子性扣减积分
|
|
*/
|
|
int deductPoints(@Param("memberId") String memberId, @Param("points") BigDecimal points);
|
|
|
|
/**
|
|
* 根据主键删除
|
|
*/
|
|
int deleteByPrimaryKey(Long id);
|
|
}
|