|
@@ -29,9 +29,14 @@ public class StageServiceImpl extends ServiceImpl<StageMapper, Stage> implements
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public HttpRespMsg changeStage(List<Stage> stages) {
|
|
public HttpRespMsg changeStage(List<Stage> stages) {
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
- stageMapper.delete(new QueryWrapper<>());
|
|
|
|
|
|
+ int i = 0;
|
|
for (Stage stage : stages) {
|
|
for (Stage stage : stages) {
|
|
- stageMapper.insert(stage);
|
|
|
|
|
|
+ stage.setSeq(i);
|
|
|
|
+ if(null != stage.getId()){
|
|
|
|
+ stageMapper.updateById(stage);
|
|
|
|
+ }else {
|
|
|
|
+ stageMapper.insert(stage);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
msg.setMsg("操作成功");
|
|
msg.setMsg("操作成功");
|
|
return msg;
|
|
return msg;
|