| | |
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.integral.IntegralTaskRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | @Service
|
| | | public class IntegralTaskRecordServiceImpl implements IntegralTaskRecordService {
|
| | |
| | | return num;
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public List<Date> getSignDays(long uid, Long cid) {
|
| | | List<Date> listDate = new ArrayList<Date>();
|
| | |
| | | return integralTaskRecordMapper.listNotReceived(count, uid);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public List<IntegralTaskRecord> listNotReceivedExcludeId(int count, long uid, Set<Long> idList) {
|
| | | if (idList != null && idList.size() == 0) {
|
| | |
| | | }
|
| | | return integralTaskRecordMapper.listNotReceivedExcludeId(count, uid, idList);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | @Transactional
|
| | |
| | |
|
| | | return extra.getGoldCoin();
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | @Transactional
|
| | |
| | |
|
| | | return extra.getGoldCoin();
|
| | | }
|
| | |
|
| | | @Override
|
| | | public Integer countGetCountByTaskIdAndDay(Long taskId, Long uid, Date day) {
|
| | | if (day == null)
|
| | | return null;
|
| | | Date minTime = new Date(
|
| | | TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(day.getTime(), "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | | Date maxTime = new Date(minTime.getTime() + 1000 * 60 * 60 * 24L);
|
| | | return integralTaskRecordMapper.countGetCountByTaskIdAndDay(taskId, uid, minTime, maxTime);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public IntegralTaskRecord addRecord(IntegralTaskRecord record) throws IntegralTaskRecordException {
|
| | | if (record == null)
|
| | | throw new IntegralTaskRecordException(1, "记录为空");
|
| | |
|
| | | if (record.getCid() == null || record.getTaskId() == null || record.getGoldCoin() == null
|
| | | || record.getState() == null || record.getUid() == null)
|
| | | throw new IntegralTaskRecordException(2, "数据不完成");
|
| | |
|
| | | if (record.getCreateTime() == null)
|
| | | record.setCreateTime(new Date());
|
| | |
|
| | | if (record.getUpdateTime() == null)
|
| | | record.setUpdateTime(new Date());
|
| | | integralTaskRecordMapper.insertSelective(record);
|
| | | return record;
|
| | | }
|
| | | }
|