| | |
| | | import cc.mrbird.febs.common.enumerates.ScoreFlowTypeEnum; |
| | | import cc.mrbird.febs.common.exception.FebsException; |
| | | import cc.mrbird.febs.common.utils.LoginUserUtil; |
| | | import cc.mrbird.febs.common.utils.MallUtils; |
| | | import cc.mrbird.febs.mall.dto.ScoreSettingDto; |
| | | import cc.mrbird.febs.mall.dto.signActivity.ApiSignDataDto; |
| | | import cc.mrbird.febs.mall.dto.signActivity.ApiSignListDto; |
| | |
| | | long between = DateUtil.between(startTime, endTime, DateUnit.DAY); |
| | | List<ApiGetRunDateVo> apiGetRunDateVos = generateDateList(startTime, between); |
| | | |
| | | List<Integer> typeList = Arrays.asList(ScoreFlowTypeEnum.SIGN_SCORE.getValue(), ScoreFlowTypeEnum.SIGN_EXPERIENCE.getValue()); |
| | | List<MallMoneyFlow> mallMoneyFlows = mallMoneyFlowService.getBaseMapper().selectList( |
| | | new LambdaQueryWrapper<MallMoneyFlow>() |
| | | .eq(MallMoneyFlow::getMemberId, memberId) |
| | | .eq(MallMoneyFlow::getFlowType, FlowTypeEnum.PRIZE_SCORE.getValue()) |
| | | .eq(MallMoneyFlow::getType, MoneyFlowTypeEnum.SCORE_SIGN.getValue()) |
| | | .in(MallMoneyFlow::getType, typeList) |
| | | .ge(MallMoneyFlow::getCreatedTime, startTime) |
| | | .le(MallMoneyFlow::getCreatedTime, endTime) |
| | | ); |
| | |
| | | } |
| | | |
| | | // 若最新签到日期,与当天相差大于一天,则更新数据库(避免定时器更新失败) |
| | | if (DateUtil.betweenDay(mallScoreSignRecord.getSignTime(), new Date(), true) > 1 || mallScoreSignRecord.getTotalCnt() == 7) { |
| | | if (DateUtil.betweenDay(mallScoreSignRecord.getSignTime(), new Date(), true) > 1) { |
| | | mallScoreSignRecord.setTotalCnt(0); |
| | | mallScoreSignRecordMapper.updateById(mallScoreSignRecord); |
| | | } |
| | |
| | | member.getId(), |
| | | amount, |
| | | ScoreFlowTypeEnum.SIGN_EXPERIENCE.getValue(), |
| | | mallScoreSignRecord.getId().toString(), |
| | | MallUtils.getOrderNum("s"), |
| | | FlowTypeEnum.SCORE.getValue(), |
| | | StrUtil.format(ScoreFlowTypeEnum.SIGN_EXPERIENCE.getDesc(),amount), |
| | | 2); |
| | |
| | | member.getId(), |
| | | amount, |
| | | ScoreFlowTypeEnum.SIGN_SCORE.getValue(), |
| | | mallScoreSignRecord.getId().toString(), |
| | | MallUtils.getOrderNum("s"), |
| | | FlowTypeEnum.PRIZE_SCORE.getValue(), |
| | | StrUtil.format(ScoreFlowTypeEnum.SIGN_SCORE.getDesc(),amount), |
| | | 2); |