|
@@ -113,6 +113,7 @@ import java.util.stream.Collectors;
|
|
|
public class GeoHazardMonitorTokenController {
|
|
|
public static final String PATTERN = "^([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+)$";
|
|
|
public static final String PATTERNS = "^[0-9]*$";
|
|
|
+ public static final String REGEX = "^\\d{13}$";
|
|
|
|
|
|
public static final String KEY = "58792429c08c43e9";
|
|
|
@Resource
|
|
@@ -1730,6 +1731,10 @@ public class GeoHazardMonitorTokenController {
|
|
|
AjaxResults1 = new AjaxResults(0, "预警时间不难为空");
|
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
}
|
|
|
+ if (!preAlarmResponse.getPreAlarmTime().toString().matches(REGEX)) {
|
|
|
+ AjaxResults1 = new AjaxResults(0, "预警时间参数不对,正确格式为:单位毫秒(13位)");
|
|
|
+ return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
+ }
|
|
|
if (ObjectUtils.isEmpty(preAlarmResponse.getPreAlarmList())) {
|
|
|
AjaxResults1 = new AjaxResults(0, "预警目标集合不难为空");
|
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|