| | |
| | | import com.yeshi.fanli.entity.bus.user.UserRank;
|
| | | import com.yeshi.fanli.entity.integral.CodePublishRecord;
|
| | | import com.yeshi.fanli.entity.integral.IntegralExchange;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTask;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskClass;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRank;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskClass.UniqueKeyEnum;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRecord;
|
| | | import com.yeshi.fanli.exception.integral.IntegralExchangeException;
|
| | |
| | | import com.yeshi.fanli.service.inter.integral.IntegralExchangeRecordService;
|
| | | import com.yeshi.fanli.service.inter.integral.IntegralExchangeService;
|
| | | import com.yeshi.fanli.service.inter.integral.IntegralTaskClassService;
|
| | | import com.yeshi.fanli.service.inter.integral.IntegralTaskRankService;
|
| | | import com.yeshi.fanli.service.inter.integral.IntegralTaskRecordService;
|
| | | import com.yeshi.fanli.service.inter.integral.IntegralTaskService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | |
|
| | | @Resource
|
| | | private IntegralDetailService integralDetailService;
|
| | | |
| | | @Resource
|
| | | private IntegralTaskRankService integralTaskRankService;
|
| | |
|
| | | @Resource
|
| | | private CodePublishRecordService codePublishRecordService;
|
| | | |
| | | @Resource
|
| | | private IntegralTaskService integralTaskService;
|
| | |
|
| | | /**
|
| | | * 获取任务列表
|
| | |
| | |
|
| | | // 用户签到
|
| | | Integer signState = 0;
|
| | | int signDays = 1;
|
| | | if (page == 1) {
|
| | |
|
| | | // 签到
|
| | |
| | |
|
| | | // 签到日期信息
|
| | | DailySignVO dailySignVO = integralTaskClassService.getDailySignList(uid, userRank.getId());
|
| | |
|
| | | if (dailySignVO != null) {
|
| | | signDays = dailySignVO.getDays();
|
| | | }
|
| | | |
| | | boolean ejectSign = false;
|
| | | if (signState == 1)
|
| | | ejectSign = true;
|
| | |
| | | } else if (signState == 2) {
|
| | | taskClassVO.setLightUp(false);
|
| | | }
|
| | |
|
| | | // 根据天数变化更改签到金额
|
| | | Integer num = integralTaskRecordService.getNowdaySignNum(uid, taskClassVO.getId());
|
| | | |
| | | String uniqueKeyTask = UniqueKeyEnum.dailySign.name() + num;
|
| | | IntegralTask integralTask = integralTaskService.getByCidAndUniqueKey(taskClassVO.getId(), uniqueKeyTask);
|
| | | Integer goldCoin = 0;
|
| | | if (integralTask != null) {
|
| | | goldCoin = integralTask.getGoldCoin();
|
| | | Integer baseDoubleNum = integralTask.getDoubleNum();
|
| | | if (baseDoubleNum != null && baseDoubleNum > 0)
|
| | | goldCoin = goldCoin * baseDoubleNum;
|
| | | }
|
| | | taskClassVO.setTotalCoin(goldCoin);
|
| | | } else {
|
| | | taskClassVO.setLightUp(true);
|
| | | }
|