This commit is contained in:
lvleigang 2024-07-30 10:27:29 +08:00
commit fe31fc6999
1 changed files with 17 additions and 4 deletions

View File

@ -59,6 +59,7 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
@Override
public Object queryEntityPage(JSONObject json) {
JSONObject jsonObject = json.getJSONObject("jsonStr");
JSONObject json1 = new JSONObject();
if (jsonObject == null) {
return BaseResult.getFailureMessageEntity("数据为空,请先传递数据");
}
@ -122,7 +123,10 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
}
}
PageInfo pageInfo = new PageInfo(list);
return pageInfo;
json1.put("status","200");
json1.put("pageInfo",pageInfo);
return json1;
} catch (Exception e) {
logger.info("查询通用数据错误:{}", e.getMessage());
return BaseResult.getFailureMessageEntity("查询失败");
@ -330,7 +334,10 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
list.add(jsonObjectList);
//保存操作日志
controlsLogDaoimpl.saveControlsLog(uuid,jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口新增",jsonObject.getString("optionName"),tableName+"_option_log","1");
return list;
JSONObject json1 = new JSONObject();
json1.put("status","200");
json1.put("list",list);
return json1;
} catch (Exception e) {
logger.info("保存通用数据时候错误:{}", e.getMessage());
//保存操作日志
@ -465,7 +472,10 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
jsonObjects.add(jsonObjectList);
//保存操作日志
controlsLogDaoimpl.saveControlsLog(comparisonEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口更新",jsonObject.getString("optionName"),comparisonEntity.getDbName()+"_option_log","1");
return jsonObjects;
JSONObject json1 = new JSONObject();
json1.put("status","200");
json1.put("list",jsonObjects);
return json1;
}else{
return BaseResult.getFailureMessageEntity("更新失败");
}
@ -575,7 +585,10 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
// controlsLogDaoimpl.saveControlsLog(comparisonDetailsEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口删除",jsonObject.getString("optionName"),comparisonEntity.getDbName()+"_option_log");
}
controlsLogDaoimpl.saveControlsLog(comparisonEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口删除",jsonObject.getString("optionName"),comparisonEntity.getDbName()+"_option_log","1");
return integer;
JSONObject json1 = new JSONObject();
json1.put("status","200");
json1.put("integer",integer);
return json1;
}else{
return BaseResult.getFailureMessageEntity("删除失败","请查看data_id是否在表中存在");
}