fix:sonar
This commit is contained in:
@@ -105,7 +105,6 @@ public class DateUtils extends PropertyEditorSupport {
|
|||||||
*/
|
*/
|
||||||
public static Calendar getCalendar(long millis) {
|
public static Calendar getCalendar(long millis) {
|
||||||
Calendar cal = Calendar.getInstance();
|
Calendar cal = Calendar.getInstance();
|
||||||
// --------------------cal.setTimeInMillis(millis);
|
|
||||||
cal.setTime(new Date(millis));
|
cal.setTime(new Date(millis));
|
||||||
return cal;
|
return cal;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,9 +118,4 @@ public class DySmsHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// public static void main(String[] args) throws ClientException, InterruptedException {
|
|
||||||
// JSONObject obj = new JSONObject();
|
|
||||||
// obj.put("code", "1234");
|
|
||||||
// sendSms("13800138000", obj, DySmsEnum.FORGET_PASSWORD_TEMPLATE_CODE);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,18 +79,4 @@ public class DySmsLimit {
|
|||||||
ipLastRequestTime.put(ip, currentTime);
|
ipLastRequestTime.put(ip, currentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static void main(String[] args) {
|
|
||||||
// String ip = "192.168.1.1";
|
|
||||||
// for (int i = 1; i < 50; i++) {
|
|
||||||
// if (canSendSms(ip)) {
|
|
||||||
// System.out.println("Send SMS successfully");
|
|
||||||
// } else {
|
|
||||||
// //System.out.println("Exceed SMS limit for IP " + ip);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// System.out.println(ipLastRequestTime);
|
|
||||||
// System.out.println(ipRequestCount);
|
|
||||||
// System.out.println(ipBlacklist);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ public class AESUtil {
|
|||||||
*/
|
*/
|
||||||
private static final String AES_GCM_NOPADDING = "AES/GCM/NoPadding";
|
private static final String AES_GCM_NOPADDING = "AES/GCM/NoPadding";
|
||||||
|
|
||||||
// private static final int GCM_IV_LENGTH = 12;
|
|
||||||
// private static final int GCM_TAG_LENGTH = 16;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加密字符串
|
* 加密字符串
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ public class ApprovePostProcessor implements Callable<String> {
|
|||||||
default -> {
|
default -> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (status == 3 || status == 4) {
|
|
||||||
if (status == 3) {
|
if (status == 3) {
|
||||||
//清理该评审相关的通知
|
//清理该评审相关的通知
|
||||||
// 1:项目指派通知 2:学科指派通知 3:loadcase指派通知 4:评审指派通知 5:评审完成通知 6:评审撤销通知 7:评审发布通知
|
// 1:项目指派通知 2:学科指派通知 3:loadcase指派通知 4:评审指派通知 5:评审完成通知 6:评审撤销通知 7:评审发布通知
|
||||||
@@ -155,7 +154,6 @@ public class ApprovePostProcessor implements Callable<String> {
|
|||||||
systemMapper.delSystemNoticeByTargetId(6, approveId);
|
systemMapper.delSystemNoticeByTargetId(6, approveId);
|
||||||
systemMapper.delSystemNoticeByTargetId(7, approveId);
|
systemMapper.delSystemNoticeByTargetId(7, approveId);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,12 +116,6 @@ public class HttpUtil {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
//返回连接
|
//返回连接
|
||||||
// return HttpClients.custom()
|
|
||||||
// .setConnectionManager(connManager)
|
|
||||||
// .setConnectionManagerShared(true)
|
|
||||||
// .setDefaultRequestConfig(defaultRequestConfig)
|
|
||||||
// .setSSLSocketFactory(sslsf)
|
|
||||||
// .build();
|
|
||||||
return HttpClients.custom()
|
return HttpClients.custom()
|
||||||
.setConnectionManager(connManager)
|
.setConnectionManager(connManager)
|
||||||
.setConnectionManagerShared(true)
|
.setConnectionManagerShared(true)
|
||||||
@@ -146,7 +140,6 @@ public class HttpUtil {
|
|||||||
try {
|
try {
|
||||||
HttpGet httpGet = new HttpGet(url);
|
HttpGet httpGet = new HttpGet(url);
|
||||||
//设置header
|
//设置header
|
||||||
// httpGet.setHeader("Content-Type", "application/json");
|
|
||||||
if (headers.size() > 0) {
|
if (headers.size() > 0) {
|
||||||
for (String key : headers.keySet()) {
|
for (String key : headers.keySet()) {
|
||||||
httpGet.addHeader(key, headers.get(key));
|
httpGet.addHeader(key, headers.get(key));
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public class LockService {
|
|||||||
while (redisTemplate.hasKey(lock.getKey()));
|
while (redisTemplate.hasKey(lock.getKey()));
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
return false;
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user