|
@@ -36,6 +36,7 @@ import javax.annotation.Resource;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
@@ -151,11 +152,9 @@ public class QrCodeController {
|
|
|
//更新二维码扫描时间
|
|
//更新二维码扫描时间
|
|
|
insOrderQrCode.setScanCodeTime(new Date());
|
|
insOrderQrCode.setScanCodeTime(new Date());
|
|
|
insOrderQrCodeService.updateById(insOrderQrCode);
|
|
insOrderQrCodeService.updateById(insOrderQrCode);
|
|
|
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
- String qrcodeCreateTimeStr = dateFormat.format(insAreaCompany.getCreatetime());
|
|
|
|
|
- LocalDate qrcodeCreateTime = LocalDate.parse(qrcodeCreateTimeStr);
|
|
|
|
|
|
|
+ LocalDateTime createtime = insAreaCompany.getCreatetime();
|
|
|
|
|
+ LocalDate qrcodeCreateTime = createtime.toLocalDate();
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
-
|
|
|
|
|
if (Math.abs(currentDate.toEpochDay() - qrcodeCreateTime.toEpochDay()) >= 1) {
|
|
if (Math.abs(currentDate.toEpochDay() - qrcodeCreateTime.toEpochDay()) >= 1) {
|
|
|
//重定向到错误页面中
|
|
//重定向到错误页面中
|
|
|
ModelAndView modelAndView = new ModelAndView("qrcode_error");
|
|
ModelAndView modelAndView = new ModelAndView("qrcode_error");
|