package com.yeshi.fanli.dao.mybatis.integral;
|
|
import java.util.Date;
|
import java.util.List;
|
import java.util.Set;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import com.yeshi.fanli.dao.BaseMapper;
|
import com.yeshi.fanli.entity.integral.IntegralTaskRecord;
|
|
public interface IntegralTaskRecordMapper extends BaseMapper<IntegralTaskRecord> {
|
|
/**
|
* 未领取金币
|
*
|
* @param count
|
* @param uid
|
* @return
|
*/
|
List<IntegralTaskRecord> listNotReceived(@Param("count") int count, @Param("uid") Long uid);
|
|
/**
|
* 未领取金币- 排除id
|
*
|
* @param count
|
* @param uid
|
* @return
|
*/
|
List<IntegralTaskRecord> listNotReceivedExcludeId(@Param("count") int count, @Param("uid") Long uid,
|
@Param("list") Set<Long> idList);
|
|
/**
|
* 总完成
|
*
|
* @param uid
|
* @param dateType
|
* @return
|
*/
|
Integer getTotalGoldCoin(@Param("uid") Long uid, @Param("cid") Long cid, @Param("dateType") Integer dateType);
|
|
/**
|
* 统计完成数量
|
*
|
* @param uid
|
* @param cid
|
* @param dateType
|
* @return
|
*/
|
Integer countFinished(@Param("uid") Long uid, @Param("cid") Long cid, @Param("dateType") Integer dateType);
|
|
/**
|
* 近7天签到情况
|
*
|
* @param uid
|
* @param cid
|
* @param sortState
|
* 1倒序-创建时间
|
* @return
|
*/
|
List<IntegralTaskRecord> listDaySignRecord(@Param("uid") Long uid, @Param("cid") Long cid);
|
|
|
/**
|
* 连续签到情况
|
*
|
* @param uid
|
* @param cid
|
* @param sortState
|
* 1倒序-创建时间
|
* @return
|
*/
|
List<IntegralTaskRecord> listDateSignRecord(@Param("uid") Long uid, @Param("cid") Long cid);
|
|
/**
|
* 近7天签到情况
|
*
|
* @param uid
|
* @param cid
|
* @param sortState
|
* 1倒序-创建时间
|
* @return
|
*/
|
List<IntegralTaskRecord> listSignRecordByDateTime(@Param("uid") Long uid, @Param("cid") Long cid,
|
@Param("dateTime") String dateTime);
|
|
/**
|
* 未领取金币
|
*
|
* @param count
|
* @param uid
|
* @return
|
*/
|
int countTotalGoldCoin(@Param("uid") Long uid);
|
|
/**
|
* 更新领取状态
|
*
|
* @param uid
|
*/
|
void updateReceived(@Param("uid") Long uid);
|
|
/**
|
* 根据任务ID与时间段查询任务完成数量
|
*
|
* @param taskId
|
* @param uid
|
* @param minTime
|
* @param maxTime
|
*/
|
int countGetCountByTaskIdAndDay(@Param("taskId") Long taskId, @Param("uid") Long uid,
|
@Param("minTime") Date minTime, @Param("maxTime") Date maxTime);
|
|
/**
|
* 统计今日第几次完成的任务
|
*
|
* @param count
|
* @param uid
|
* @return
|
*/
|
int countByTaskIdTodayNum(@Param("uid") Long uid, @Param("tid") Long tid, @Param("date") String date,
|
@Param("recordId") Long recordId);
|
|
/**
|
* 根据类型与创建时间检索
|
*
|
* @param cid
|
* @param minTime
|
* @param maxTime
|
* @param start
|
* @param count
|
* @return
|
*/
|
List<IntegralTaskRecord> listByCidAndUidAndCreateTime(@Param("cid") Long cid, @Param("uid") Long uid,
|
@Param("minTime") Date minTime, @Param("maxTime") Date maxTime, @Param("start") long start,
|
@Param("count") int count);
|
|
long countByCidAndUidAndCreateTime(@Param("cid") Long cid, @Param("uid") Long uid, @Param("minTime") Date minTime,
|
@Param("maxTime") Date maxTime);
|
|
/**
|
* 根据用户ID与任务ID查询
|
*
|
* @param uid
|
* @param taskId
|
* @param start
|
* @param count
|
* @return
|
*/
|
List<IntegralTaskRecord> listByUidAndTaskId(@Param("uid") Long uid, @Param("taskId") Long taskId,
|
@Param("start") long start, @Param("count") int count);
|
}
|