Commit bb126eeb by zhangkb

修改指标删除接口为批量删除

parent 3727d0ea
......@@ -62,8 +62,8 @@ public class IndicatorsDefCtrl {
@ApiOperation(value = "删除基础指标", notes = "删除基础指标")
@PostMapping(value = "/deleteBaseInd")
public void deleteBaseInd(@RequestParam String indId) throws Exception{
baseIndDefService.delete(indId);
public void deleteBaseInd(@RequestParam List<String> indIds) throws Exception{
baseIndDefService.delete(indIds);
}
@ApiOperation(value = "根据id查询基础指标详情", notes = "根据id查询基础指标详情")
......@@ -106,8 +106,8 @@ public class IndicatorsDefCtrl {
@ApiOperation(value = "删除考核指标", notes = "删除考核指标")
@PostMapping(value = "/deleteDriveInd")
public void deleteDriveInd(@RequestParam String indId) throws Exception{
driveIndDefService.delete(indId);
public void deleteDriveInd(@RequestParam List<String> indIds) throws Exception{
driveIndDefService.delete(indIds);
}
@ApiOperation(value = "根据考核指标id获取指标详情", notes = "根据考核指标id获取指标详情")
......
......@@ -73,10 +73,12 @@ public class BaseIndDefService {
return baseIndDefMapper.selectOne(baseIndDef);
}
public void delete(String indId) throws Exception{
public void delete(List<String> indIds) throws Exception{
for(String indId : indIds) {
baseIndDefMapper.deleteByPrimaryKey(indId);
baseIndDefVersionService.updateIsDeleteStatus(indId, "1");//标识已删除
}
}
public Map<String,Object> getByPageAndKeyword(Integer catalogId,String keyword,
int page,int rows)throws Exception{
......
......@@ -135,10 +135,12 @@ public class DriveIndDefService {
return result;
}
public void delete(String indId) throws Exception{
public void delete(List<String> indIds) throws Exception{
for(String indId : indIds) {
driveIndDefMapper.deleteByPrimaryKey(indId);
driveIndDefVersionService.updateIsDeleteStatus(indId, "1");//标识已删除
}
}
public Map<String,Object> getByPageAndKeyword(Integer catalogId,String keyword,
int page,int rows)throws Exception{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment