| | |
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.user.vip.TeamDailyRecordDao;
|
| | | import com.yeshi.fanli.dao.user.invite.TeamDailyRecordDao;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.TeamDailyRecord;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.vip.TeamDailyRecordService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKeyService;
|
| | |
|
| | | @Service
|
| | | public class TeamDailyRecordServiceImpl implements TeamDailyRecordService {
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | public void addDailyRecord(Long uid) {
|
| | | // 重新统计队员等级数量
|
| | | recountRecord(uid);
|
| | |
| | | String time = TimeUtil.getGernalTime(java.lang.System.currentTimeMillis());
|
| | | String id = StringUtil.Md5(uid + "#" + time);
|
| | | TeamDailyRecord record = TeamDailyRecordDao.getById(id);
|
| | | if (record == null) {
|
| | | record = new TeamDailyRecord();
|
| | | } else if (record.getSecondCount() != null) {
|
| | | secondBeyond = record.getSecondCount();
|
| | | }
|
| | |
|
| | | record.setId(id);
|
| | | record.setUid(uid);
|
| | | record.setFirstCount(firstCount);
|
| | | record.setSecondCount(secondCount);
|
| | | record.setSecondBeyond(secondBeyond);
|
| | | record.setStatisticDay(TimeUtil.parse(time));
|
| | | record.setUpdateTime(new Date());
|
| | | // if (record == null) {
|
| | | // record = new TeamDailyRecord();
|
| | | // } else if (record.getSecondCount() != null) {
|
| | | // secondBeyond = record.getSecondCount();
|
| | | // }
|
| | | //
|
| | | // record.setId(id);
|
| | | // record.setUid(uid);
|
| | | // record.setFirstCount(firstCount);
|
| | | // record.setSecondCount(secondCount);
|
| | | // record.setSecondBeyond(secondBeyond);
|
| | | // record.setStatisticDay(TimeUtil.parse(time));
|
| | | // record.setUpdateTime(new Date());
|
| | | TeamDailyRecordDao.save(record);
|
| | | } catch (Exception e) {
|
| | | e.getSuppressed();
|