抽奖次数

This commit is contained in:
2024-12-24 09:29:33 +08:00
parent a1f1e9a2de
commit 6ffa4d5bf8
4 changed files with 32 additions and 10 deletions

View File

@@ -4,12 +4,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sqx.modules.userSign.entity.UserSignRecord;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper
public interface UserSignRecordDao extends BaseMapper<UserSignRecord> {
//周 抽奖次数
Map<Integer,Integer> getTaskWCount(long userId, int wCount,String time);
Map<Integer,Integer> getTaskWCount(long userId, int wCount,String time,List<Integer> ids);
List getNoRecordTask(long userId, String time);
//周 签到 次数 连续签到
Integer getWSignCount(long userId,String time);

View File

@@ -134,7 +134,8 @@ public class UserSignRecordServiceImpl extends ServiceImpl<UserSignRecordDao, Us
@Override
public Map<Integer,Integer> getTaskWCount(long userId,int wCount) {
Date thirtyDaysAgo = DateUtil.offsetDay(new Date(), -30);
return baseMapper.getTaskWCount(userId,wCount,DateUtil.format(thirtyDaysAgo, "yyyy-MM-dd")+" 00:00:00");
List<Integer> noRecordTasks = baseMapper.getNoRecordTask(userId, DateUtil.format(thirtyDaysAgo, "yyyy-MM-dd") + " 00:00:00");
return baseMapper.getTaskWCount(userId, wCount, DateUtil.format(thirtyDaysAgo, "yyyy-MM-dd") + " 00:00:00", noRecordTasks);
}
@Override