|
|
|
|
@ -43,6 +43,19 @@ public class WxClockLogServiceImpl implements IWxClockLogService {
|
|
|
|
|
@Transactional
|
|
|
|
|
public void insertWxClockLog(WxClockLogReq wxClockLogReq) {
|
|
|
|
|
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();
|
|
|
|
|
BeanUtils.copyProperties(wxClockLogReq, wxClockLog);
|
|
|
|
|
@ -52,7 +65,6 @@ public class WxClockLogServiceImpl implements IWxClockLogService {
|
|
|
|
|
// 当天使用过的仪器
|
|
|
|
|
WxClockInstrumentLog queryInstrumentLog = new WxClockInstrumentLog();
|
|
|
|
|
queryInstrumentLog.setUserId(wxUserMember.getId());
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
wxClockLog.getParams().put("beginTime", LocalDateTime.of(now.toLocalDate(), LocalTime.MIN));
|
|
|
|
|
wxClockLog.getParams().put("endTime", LocalDateTime.of(now.toLocalDate(), LocalTime.MAX));
|
|
|
|
|
queryInstrumentLog.setStatus(Status.OK.getCode().longValue());
|
|
|
|
|
@ -84,12 +96,6 @@ public class WxClockLogServiceImpl implements IWxClockLogService {
|
|
|
|
|
wxClockImgMapper.insertWxClockImg(wxClockImg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* TODO:奖励积分
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|