|
|
@@ -14,6 +14,7 @@ import com.lc.ibps.api.form.sql.util.BeanUtils;
|
|
|
import com.lc.ibps.base.core.util.Collections;
|
|
|
import com.lc.ibps.base.framework.id.UniqueIdUtil;
|
|
|
import com.lc.ibps.cloud.entity.APIResult;
|
|
|
+import com.lc.ibps.cloud.util.AESUtil;
|
|
|
import com.lc.ibps.components.querybuilder.utils.StringUtils;
|
|
|
import com.lc.ibps.config.JcjdConfig;
|
|
|
import com.lc.ibps.sysdata.entity.Smsconfig;
|
|
|
@@ -87,8 +88,10 @@ public class UpdateDataTableController {
|
|
|
String tableName = "";
|
|
|
String paramWhere = "";
|
|
|
try{
|
|
|
- String decrypt = updateDataTableService.checkParameters(data);
|
|
|
- JSONObject sqlMap = JSONObject.parseObject(decrypt);
|
|
|
+ Map dataMap = JSONObject.parseObject(data);
|
|
|
+ String decrypt = AESUtil.xorDecrypt(dataMap.get("ciphertext").toString());
|
|
|
+ String text = AESUtil.decrypt(decrypt);
|
|
|
+ JSONObject sqlMap = JSONObject.parseObject(text);
|
|
|
tableName = sqlMap.getString("tableName");
|
|
|
paramWhere = sqlMap.getString("paramWhere");
|
|
|
} catch (Exception e) {
|
|
|
@@ -163,8 +166,10 @@ public class UpdateDataTableController {
|
|
|
Map paramCond = null;
|
|
|
List<Map<String, String>> paramWhere = null;
|
|
|
try {
|
|
|
- String decrypt = updateDataTableService.checkParameters(data);
|
|
|
- Map jsonMap = JSONObject.parseObject(decrypt);
|
|
|
+ Map dataMap = JSONObject.parseObject(data);
|
|
|
+ String decrypt = AESUtil.xorDecrypt(dataMap.get("ciphertext").toString());
|
|
|
+ String text = AESUtil.decrypt(decrypt);
|
|
|
+ Map jsonMap = JSONObject.parseObject(text);
|
|
|
tableName = (String) jsonMap.get("tableName");
|
|
|
paramCond = (Map) jsonMap.get("paramCond");
|
|
|
paramWhere = (List<Map<String, String>>) jsonMap.get("paramWhere");
|
|
|
@@ -194,8 +199,10 @@ public class UpdateDataTableController {
|
|
|
String tableName = null;
|
|
|
List<Map<String,String>> updList;
|
|
|
try {
|
|
|
- String decrypt = updateDataTableService.checkParameters(data);
|
|
|
- Map jsonMap = JSONObject.parseObject(decrypt);
|
|
|
+ Map dataMap = JSONObject.parseObject(data);
|
|
|
+ String decrypt = AESUtil.xorDecrypt(dataMap.get("ciphertext").toString());
|
|
|
+ String text = AESUtil.decrypt(decrypt);
|
|
|
+ Map jsonMap = JSONObject.parseObject(text);
|
|
|
tableName = (String) jsonMap.get("tableName");
|
|
|
updList = (List<Map<String, String>>) jsonMap.get("updList");
|
|
|
} catch (Exception e) {
|
|
|
@@ -377,8 +384,10 @@ public class UpdateDataTableController {
|
|
|
String type = null;
|
|
|
List<LinkedHashMap> paramWhere = null;
|
|
|
try {
|
|
|
- String decrypt = updateDataTableService.checkParameters(data);
|
|
|
- JSONObject map = JSONObject.parseObject(decrypt);
|
|
|
+ Map dataMap = JSONObject.parseObject(data);
|
|
|
+ String decrypt = AESUtil.xorDecrypt(dataMap.get("ciphertext").toString());
|
|
|
+ String text = AESUtil.decrypt(decrypt);
|
|
|
+ JSONObject map = JSONObject.parseObject(text);
|
|
|
tableName = map.getString("tableName");
|
|
|
type = StringUtils.isEmpty(map.getString("type")) ? null : map.getString("type");
|
|
|
String paramWhere1 = map.getString("paramWhere");
|
|
|
@@ -386,6 +395,7 @@ public class UpdateDataTableController {
|
|
|
defKey = map.getString("defKey");
|
|
|
formKey = map.getString("formKey");
|
|
|
} catch (Exception e) {
|
|
|
+ log.warn("操作失败", e);
|
|
|
apiResult.setState(StateEnum.ERROR.getCode());
|
|
|
apiResult.setMessage("参数类型错误");
|
|
|
return apiResult;
|