106 lines
2.5 KiB
Java
106 lines
2.5 KiB
Java
package com.kexue.skills.service;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.kexue.skills.entity.PointsAccount;
|
|
import com.kexue.skills.entity.dto.PointsAccountDto;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* (PointsAccount)表服务接口
|
|
*
|
|
* @author 王志维
|
|
* @since 2025-02-21 23:01:48
|
|
*/
|
|
public interface PointsAccountService extends BaseService {
|
|
/**
|
|
* 分页查询
|
|
*
|
|
* @param queryDto 筛选条件
|
|
* @return 查询结果
|
|
*/
|
|
PageInfo<PointsAccount> getPageList(PointsAccountDto queryDto);
|
|
|
|
/**
|
|
* 查询列表
|
|
*
|
|
* @param queryDto 筛选条件
|
|
* @return 查询结果
|
|
*/
|
|
List<PointsAccount> getList(PointsAccountDto queryDto);
|
|
|
|
/**
|
|
* 通过主键查询单条数据
|
|
*
|
|
* @param accountId 主键
|
|
* @return 实例对象
|
|
*/
|
|
PointsAccount queryById(Long accountId);
|
|
|
|
/**
|
|
* 通过用户ID查询积分账户
|
|
*
|
|
* @param userId 用户ID
|
|
* @return 实例对象
|
|
*/
|
|
PointsAccount queryByUserId(Long userId);
|
|
|
|
/**
|
|
* 新增数据
|
|
*
|
|
* @param pointsAccount 实例对象
|
|
* @return 实例对象
|
|
*/
|
|
PointsAccount insert(PointsAccount pointsAccount);
|
|
|
|
/**
|
|
* 更新数据
|
|
*
|
|
* @param pointsAccount 实例对象
|
|
* @return 实例对象
|
|
*/
|
|
PointsAccount update(PointsAccount pointsAccount);
|
|
|
|
/**
|
|
* 增加积分
|
|
*
|
|
* @param userId 用户ID
|
|
* @param points 增加积分
|
|
* @param transactionNo 交易单号
|
|
* @param businessId 业务ID
|
|
* @param businessType 业务类型
|
|
* @param remark 备注
|
|
* @return 影响行数
|
|
*/
|
|
int addPoints(Long userId, Integer points, String transactionNo, Long businessId, String businessType, String remark);
|
|
|
|
/**
|
|
* 减少积分
|
|
*
|
|
* @param userId 用户ID
|
|
* @param points 减少积分
|
|
* @param transactionNo 交易单号
|
|
* @param businessId 业务ID
|
|
* @param businessType 业务类型
|
|
* @param remark 备注
|
|
* @return 影响行数
|
|
*/
|
|
int reducePoints(Long userId, Integer points, String transactionNo, Long businessId, String businessType, String remark);
|
|
|
|
/**
|
|
* 通过主键逻辑删除
|
|
*
|
|
* @param accountId 主键
|
|
* @param updateBy 更新人
|
|
* @return 影响行数
|
|
*/
|
|
int logicDeleteById(Long accountId, String updateBy);
|
|
|
|
/**
|
|
* 通过主键物理删除
|
|
*
|
|
* @param accountId 主键
|
|
* @return 影响行数
|
|
*/
|
|
int deleteById(Long accountId);
|
|
} |