|
|
|
@ -25,7 +25,7 @@ import java.util.ArrayList; |
|
|
|
|
*/ |
|
|
|
|
@Service |
|
|
|
|
public class AccessServiceImpl implements AccessService { |
|
|
|
|
@Value("${controller.url}") |
|
|
|
|
@Value("${controller.server}") |
|
|
|
|
private String url; |
|
|
|
|
@Value("${controller.sn}") |
|
|
|
|
private int controllerSN; |
|
|
|
@ -824,17 +824,17 @@ public class AccessServiceImpl implements AccessService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public AjaxResult updateQRCode(Long idCard, int timeLimit) { |
|
|
|
|
public AjaxResult updateQRCode(Long idCard, String endTime) { |
|
|
|
|
|
|
|
|
|
String op = "生成二维码信息"; |
|
|
|
|
long cardno = idCard; //测试的卡号开始
|
|
|
|
|
int validMinute = timeLimit; |
|
|
|
|
|
|
|
|
|
String formatStr = "yyyy-MM-dd HH:mm:ss"; |
|
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
|
now = now.plusMinutes(validMinute); //10分钟有效
|
|
|
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(formatStr); |
|
|
|
|
String endTime = now.format(dateTimeFormatter); |
|
|
|
|
// int validMinute = timeLimit;
|
|
|
|
|
//
|
|
|
|
|
// String formatStr = "yyyy-MM-dd HH:mm:ss";
|
|
|
|
|
// LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
// now = now.plusMinutes(validMinute); //10分钟有效
|
|
|
|
|
// DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(formatStr);
|
|
|
|
|
// String endTime = now.format(dateTimeFormatter);
|
|
|
|
|
// endTime= "2029-12-31 23:59:00";
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
@ -874,6 +874,9 @@ public class AccessServiceImpl implements AccessService { |
|
|
|
|
WgWebapi.logInfo(String.format("原因: %s", result.get("原因:").asText())); |
|
|
|
|
return AjaxResult.error("操作失败",result.get("原因:").asText()); |
|
|
|
|
} |
|
|
|
|
if(result.has("截止日期时间已过时")){ |
|
|
|
|
return AjaxResult.error("截止日期时间已过时"); |
|
|
|
|
} |
|
|
|
|
return AjaxResult.error("操作失败"); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|