feat: 增加清空所有绑定

dev
huangfeng 1 year ago
parent 220608341a
commit 76291ecf07

@ -75,4 +75,11 @@ public class ParamBindController extends BasicController {
return Response.success("OK"); return Response.success("OK");
} }
@PostMapping("clearAll")
@ApiOperation("清空所有绑定")
public Response<String> clearAll() throws Exception {
bindService.clearAll();
return Response.success("OK");
}
} }

@ -14,4 +14,6 @@ public interface DataService {
List<ColumnModel> getDataTableColumns(String tableName) throws Exception; List<ColumnModel> getDataTableColumns(String tableName) throws Exception;
OnePage<Map<String, Object>> getDate(NiecSensor sensor, List<NiecPoint> points, ConditionModel model); OnePage<Map<String, Object>> getDate(NiecSensor sensor, List<NiecPoint> points, ConditionModel model);
void clearAllBind();
} }

@ -23,4 +23,6 @@ public interface ParamBindService {
BindDetail getBind(Integer eqmid) throws Exception; BindDetail getBind(Integer eqmid) throws Exception;
void generateParamindex() throws Exception; void generateParamindex() throws Exception;
void clearAll();
} }

@ -121,4 +121,10 @@ public class DataServiceImpl implements DataService {
result.setContent(content); result.setContent(content);
return result; return result;
} }
@Override
public void clearAllBind() {
String sql = "UPDATE modev SET icdid=null";
jdbcTemplate.execute(sql);
}
} }

@ -276,4 +276,10 @@ public class ParamBindServiceImpl implements ParamBindService {
} }
} }
} }
@Override
public void clearAll() {
dataService.clearAllBind();
}
} }

Loading…
Cancel
Save