新增两个APP端接口

1.获取用户个人签到信息
2.用户签到接接口
This commit is contained in:
xiaqing 2023-09-15 23:21:11 +08:00
parent 0907ca2081
commit d4a891e6c4
4 changed files with 7 additions and 4 deletions

View File

@ -39,6 +39,7 @@ public interface ErrorCodeConstants {
ErrorCode SIGN_IN_CONFIG_EXISTS = new ErrorCode(1004009001, "签到天数规则已存在");
//========== 签到配置 1004010000 ==========
ErrorCode SIGN_IN_RECORD_EXISTS = new ErrorCode(1004010000,"用户重复签到");
//========== 用户等级 1004011000 ==========

View File

@ -5,7 +5,6 @@ import cn.iocoder.yudao.framework.common.util.collection.MapUtils;
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
import cn.iocoder.yudao.module.member.controller.admin.signin.vo.record.MemberSignInRecordRespVO;
import cn.iocoder.yudao.module.member.controller.app.signin.vo.record.AppMemberSignInRecordRespVO;
import cn.iocoder.yudao.module.member.controller.app.signin.vo.AppMemberSignInRecordRespVO;
import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

View File

@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInConfigDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 签到规则 Mapper
*

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.member.service.signin;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
@ -37,7 +38,7 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService
@Resource
private MemberSignInRecordMapper memberSignInRecordMapper;
@Resource
private MemberSignInRecordMapper signInRecordMapper;
@Resource
private MemberSignInConfigMapper signInConfigMapper;
@ -134,7 +135,7 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService
/**2.获取签到对应的分数**/
//获取所有的签到规则按照天数排序只获取启用的
List <MemberSignInConfigDO> configDOList = signInConfigMapper.selectList(new LambdaQueryWrapperX <MemberSignInConfigDO>()
.eq(MemberSignInConfigDO::getEnable, 1)
.eq(MemberSignInConfigDO::getStatus, CommonStatusEnum.ENABLE.getStatus())
.orderByAsc(MemberSignInConfigDO::getDay));
//如果签到的天数大于最大启用的规则天数直接给最大签到的分数
MemberSignInConfigDO lastConfig = configDOList.get(configDOList.size() - 1);