新增两个APP端接口
1.获取用户个人签到信息 2.用户签到接接口
This commit is contained in:
parent
0907ca2081
commit
d4a891e6c4
@ -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 ==========
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
*
|
||||
@ -16,7 +18,7 @@ public interface MemberSignInConfigMapper extends BaseMapperX<MemberSignInConfig
|
||||
return selectOne(MemberSignInConfigDO::getDay, day);
|
||||
}
|
||||
|
||||
default List<MemberSignInConfigDO> selectListByStatus(Integer status) {
|
||||
default List <MemberSignInConfigDO> selectListByStatus(Integer status) {
|
||||
return selectList(MemberSignInConfigDO::getStatus, status);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user