当天首次打卡奖励积分

master
382696293@qq.com 2 years ago
parent b703a9c6b5
commit 7198277d9e

@ -43,6 +43,19 @@ public class WxClockLogServiceImpl implements IWxClockLogService {
@Transactional @Transactional
public void insertWxClockLog(WxClockLogReq wxClockLogReq) { public void insertWxClockLog(WxClockLogReq wxClockLogReq) {
WxUserMember wxUserMember = SecurityUtils.getLoginUser().getWxUserMember(); WxUserMember wxUserMember = SecurityUtils.getLoginUser().getWxUserMember();
LocalDateTime now = LocalDateTime.now();
WxClockLog queryClockLog = new WxClockLog();
queryClockLog.setUserId(SecurityUtils.getLoginUser().getWxUserMember().getId());
queryClockLog.getParams().put("beginTime", LocalDateTime.of(now.toLocalDate(), LocalTime.MIN));
queryClockLog.getParams().put("endTime", LocalDateTime.of(now.toLocalDate(), LocalTime.MAX));
List<WxClockLog> wxClockLogList = wxClockLogMapper.selectWxClockLogList(queryClockLog);
if (wxClockLogList == null || wxClockLogList.size() == 0) {
/**
* TODO
*/
}
// 打卡记录 // 打卡记录
WxClockLog wxClockLog = new WxClockLog(); WxClockLog wxClockLog = new WxClockLog();
BeanUtils.copyProperties(wxClockLogReq, wxClockLog); BeanUtils.copyProperties(wxClockLogReq, wxClockLog);
@ -52,7 +65,6 @@ public class WxClockLogServiceImpl implements IWxClockLogService {
// 当天使用过的仪器 // 当天使用过的仪器
WxClockInstrumentLog queryInstrumentLog = new WxClockInstrumentLog(); WxClockInstrumentLog queryInstrumentLog = new WxClockInstrumentLog();
queryInstrumentLog.setUserId(wxUserMember.getId()); queryInstrumentLog.setUserId(wxUserMember.getId());
LocalDateTime now = LocalDateTime.now();
wxClockLog.getParams().put("beginTime", LocalDateTime.of(now.toLocalDate(), LocalTime.MIN)); wxClockLog.getParams().put("beginTime", LocalDateTime.of(now.toLocalDate(), LocalTime.MIN));
wxClockLog.getParams().put("endTime", LocalDateTime.of(now.toLocalDate(), LocalTime.MAX)); wxClockLog.getParams().put("endTime", LocalDateTime.of(now.toLocalDate(), LocalTime.MAX));
queryInstrumentLog.setStatus(Status.OK.getCode().longValue()); queryInstrumentLog.setStatus(Status.OK.getCode().longValue());
@ -84,12 +96,6 @@ public class WxClockLogServiceImpl implements IWxClockLogService {
wxClockImgMapper.insertWxClockImg(wxClockImg); wxClockImgMapper.insertWxClockImg(wxClockImg);
} }
} }
/**
* TODO
*/
} }
@Override @Override

Loading…
Cancel
Save