package com.yeshi.fanli.dao.mybatis.money;
|
|
import java.math.BigDecimal;
|
import java.util.Date;
|
import java.util.List;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import com.yeshi.fanli.dao.BaseMapper;
|
import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
|
import com.yeshi.fanli.vo.money.UserMonthMoneyVO;
|
|
public interface UserMoneyDetailMapper extends BaseMapper<UserMoneyDetail> {
|
/**
|
* 通过用户ID和返回的最大时间的详情ID来获取下一页的数据
|
*
|
* @param uid
|
* @param id
|
* @param count
|
* @return
|
*/
|
List<UserMoneyDetail> selectByUidWithIndexId(@Param("uid") Long uid, @Param("id") Long id,
|
@Param("count") int count, @Param("type") Integer type);
|
|
/**
|
* 获取用户总共有多少记录数据
|
*
|
* @param uid
|
* @return
|
*/
|
Long selectCountByUid(@Param("uid") Long uid, @Param("type") Integer type);
|
|
/**
|
* 按最大的创建时间和用户ID检索列表
|
*
|
* @param uid
|
* @param date
|
* @return
|
*/
|
List<UserMoneyDetail> selectByMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date,
|
@Param("count") int count, @Param("type") Integer type);
|
|
/**
|
* 按最大的创建时间和用户ID检索数量
|
*
|
* @param uid
|
* @param date
|
* @return
|
*/
|
Long selectCountByUidAndMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date, @Param("type") Integer type);
|
|
/**
|
* 按用户ID和最大时间检索月份的数量
|
*
|
* @param uid
|
* @param maxDate
|
* @return
|
*/
|
int selectMonthCountByUid(@Param("uid") Long uid, @Param("date") Date maxDate, @Param("type") Integer type);
|
|
/**
|
* 统计某个月份的收入与支出
|
*
|
* @param uid
|
* @param dateFormat
|
* @return
|
*/
|
List<UserMonthMoneyVO> selectMonthMoneyByUid(@Param("uid") Long uid, @Param("dateFormat") List<String> dateFormat);
|
|
/**
|
* 根据用户ID获取资金明细(老版)
|
*
|
* @param uid
|
* @param start
|
* @param count
|
* @return
|
*/
|
|
List<UserMoneyDetail> selectByUidWithState(@Param("uid") Long uid, @Param("start") long start,
|
@Param("count") int count);
|
|
Long selectCountByUidWithState(@Param("uid") Long uid);
|
|
/**
|
* 统计某个用户某段时间内产生的明细之和
|
*
|
* @param uid
|
* @param typeList
|
* @param minDate
|
* @param maxDate
|
* @return
|
*/
|
BigDecimal getTotalMoneyByTypeAndUidWithDate(@Param("uid") Long uid, @Param("typeList") List<String> typeList,
|
@Param("minDate") Date minDate, @Param("maxDate") Date maxDate);
|
|
/**
|
* 根据类型,用户ID,唯一标识查询
|
* @param type
|
* @param uid
|
* @param sourceIdentifyId
|
* @return
|
*/
|
UserMoneyDetail selectByTypeAndUidAndIdentifyCode(@Param("type") UserMoneyDetailTypeEnum type,
|
@Param("uid") Long uid, @Param("sourceIdentifyId") Long sourceIdentifyId);
|
|
|
|
/**
|
* 查询明细
|
* @param start
|
* @param count
|
* @param key
|
* @return
|
*/
|
List<UserMoneyDetail> listQuery(@Param("start") long start, @Param("count") int count,
|
@Param("key") String key,@Param("keyType") Integer keyType);
|
|
Long countQuery(@Param("key") String key, @Param("keyType")Integer keyType);
|
}
|