|
|
@@ -19,10 +19,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.security.*;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@@ -78,6 +76,7 @@ public class IotWarnlogServiceImpl implements IIotWarnlogService {
|
|
|
iotWarnlogResVo.setWlLevelContent(iotWarnlevelEnum==null?null:iotWarnlevelEnum.getContent());
|
|
|
SysUser user = sysUserMapper.selectUserById(iotWarnlogResVo.getWlDealuserid());
|
|
|
iotWarnlogResVo.setDealUserName(user.getUserName());
|
|
|
+
|
|
|
return iotWarnlogResVo;
|
|
|
}
|
|
|
|
|
|
@@ -126,6 +125,9 @@ public class IotWarnlogServiceImpl implements IIotWarnlogService {
|
|
|
iotWarnlogResVo.setDevCode(iotDevice.getDevCode());
|
|
|
// 设置设备名称
|
|
|
iotWarnlogResVo.setDevName(iotDevice.getDevName());
|
|
|
+ // 设置设备经纬度
|
|
|
+ iotWarnlogResVo.setDevLngalign(iotDevice.getDevLngalign());
|
|
|
+ iotWarnlogResVo.setDevLatalign(iotDevice.getDevLatalign());
|
|
|
}
|
|
|
|
|
|
// 设置设备类型名称
|
|
|
@@ -183,4 +185,34 @@ public class IotWarnlogServiceImpl implements IIotWarnlogService {
|
|
|
public int deleteIotWarnlogByWlBids(String wlBid, String tid){
|
|
|
return iotWarnlogMapper.deleteIotWarnlogByWlBid(wlBid, tid);
|
|
|
}
|
|
|
+
|
|
|
+ public static void main(String[] args)throws Exception{
|
|
|
+ try {
|
|
|
+
|
|
|
+ KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
|
|
|
+
|
|
|
+ keyPairGenerator.initialize(2048);
|
|
|
+
|
|
|
+ KeyPair keyPair = keyPairGenerator.generateKeyPair();
|
|
|
+
|
|
|
+ PublicKey publicKey = keyPair.getPublic();
|
|
|
+ PrivateKey privateKey = keyPair.getPrivate();
|
|
|
+
|
|
|
+// 转换Base64
|
|
|
+
|
|
|
+ String publicKeyStr = Base64.getEncoder().encodeToString(publicKey.getEncoded());
|
|
|
+ System.out.println(publicKeyStr);
|
|
|
+
|
|
|
+ String privateKeyStr = Base64.getEncoder().encodeToString(privateKey.getEncoded());
|
|
|
+ System.out.println(privateKeyStr);
|
|
|
+
|
|
|
+
|
|
|
+// 输出结果
|
|
|
+
|
|
|
+ } catch (NoSuchAlgorithmException e) {
|
|
|
+
|
|
|
+ e.printStackTrace();
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|