09-24-节点更新改为批量更新
This commit is contained in:
@ -89,7 +89,7 @@ public class OpsInspectionNodeController extends BaseController {
|
|||||||
@Log(title = "运维-巡检-通用节点", businessType = BusinessType.UPDATE)
|
@Log(title = "运维-巡检-通用节点", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionNodeBo bo) {
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody List<OpsInspectionNodeBo> bo) {
|
||||||
return toAjax(opsInspectionNodeService.updateByBo(bo));
|
return toAjax(opsInspectionNodeService.updateByBo(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ public interface IOpsInspectionNodeService {
|
|||||||
* @param bo 运维-巡检-通用节点
|
* @param bo 运维-巡检-通用节点
|
||||||
* @return 是否修改成功
|
* @return 是否修改成功
|
||||||
*/
|
*/
|
||||||
Boolean updateByBo(OpsInspectionNodeBo bo);
|
Boolean updateByBo(List<OpsInspectionNodeBo> bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验并批量删除运维-巡检-通用节点信息
|
* 校验并批量删除运维-巡检-通用节点信息
|
||||||
|
|||||||
@ -117,10 +117,13 @@ public class OpsInspectionNodeServiceImpl implements IOpsInspectionNodeService {
|
|||||||
* @return 是否修改成功
|
* @return 是否修改成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateByBo(OpsInspectionNodeBo bo) {
|
public Boolean updateByBo(List<OpsInspectionNodeBo> bo) {
|
||||||
OpsInspectionNode update = MapstructUtils.convert(bo, OpsInspectionNode.class);
|
for (OpsInspectionNodeBo nodeBo : bo) {
|
||||||
|
OpsInspectionNode update = MapstructUtils.convert(nodeBo, OpsInspectionNode.class);
|
||||||
validEntityBeforeSave(update);
|
validEntityBeforeSave(update);
|
||||||
return baseMapper.updateById(update) > 0;
|
baseMapper.updateById(update);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user