|
@@ -86,26 +86,25 @@ public class MonitorSystemServiceImpl extends ServiceImpl<MonitorSystemMapper, M
|
|
|
list.forEach(l -> {
|
|
|
if (l.getEnv().equals(1)) {//测试环境
|
|
|
monitor.setTestSecret(SM4Utils.decryptData_ECB(l.getClientSecret(), KEY));
|
|
|
- } else if (l.getEnv().equals(2)) {//正式环境
|
|
|
- monitor.setClientSecret(SM4Utils.decryptData_ECB(l.getClientSecret(), KEY));
|
|
|
+// } else if (l.getEnv().equals(2)) {//正式环境
|
|
|
+// monitor.setClientSecret(SM4Utils.decryptData_ECB(l.getClientSecret(), KEY));
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
Integer grantType = 1;
|
|
|
int row1 = 0;
|
|
|
int row2 = 0;
|
|
|
- if (!monitorSystem.getClientId().equals(monitor.getClientId()) || !monitorSystem.getClientSecret().equals(monitor.getClientSecret())
|
|
|
- || !monitorSystem.getTestSecret().equals(monitor.getTestSecret())) {//客户端编号或者正式环境密钥或者测试环境密钥改变
|
|
|
+ if (!monitorSystem.getClientId().equals(monitor.getClientId()) || !monitorSystem.getTestSecret().equals(monitor.getTestSecret())) {//客户端编号或者正式环境密钥或者测试环境密钥改变
|
|
|
LambdaQueryWrapper<SvcAddress> wrapper = new LambdaQueryWrapper<SvcAddress>();
|
|
|
wrapper.eq(SvcAddress::getClientId, monitor.getClientId());
|
|
|
svcAddressMapper.delete(wrapper);
|
|
|
|
|
|
- SvcAddress svc = new SvcAddress();
|
|
|
- svc.setClientId(monitorSystem.getClientId());
|
|
|
- svc.setClientSecret(SM4Utils.encryptData_ECB(monitorSystem.getClientSecret(), KEY));//正式环境
|
|
|
- svc.setGrantType(grantType);
|
|
|
- svc.setEnv(2);
|
|
|
- row1 = svcAddressMapper.insert(svc);
|
|
|
+// SvcAddress svc = new SvcAddress();
|
|
|
+// svc.setClientId(monitorSystem.getClientId());
|
|
|
+// svc.setClientSecret(SM4Utils.encryptData_ECB(monitorSystem.getClientSecret(), KEY));//正式环境
|
|
|
+// svc.setGrantType(grantType);
|
|
|
+// svc.setEnv(2);
|
|
|
+// row1 = svcAddressMapper.insert(svc);
|
|
|
SvcAddress svc1 = new SvcAddress();
|
|
|
svc1.setClientId(monitorSystem.getClientId());
|
|
|
svc1.setClientSecret(SM4Utils.encryptData_ECB(monitorSystem.getTestSecret(), KEY));//测试环境
|