Commit 4ed11507 authored by 盖献康's avatar 盖献康

检验内容 - 标准和用例关系

parent 4af815ba
package com.ruoyi.service.impl; package com.ruoyi.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...@@ -169,9 +170,18 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper, ...@@ -169,9 +170,18 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
*/ */
@Override @Override
public void saveStandardUsecase(ReviewStandardSaveStandardUsecaseRequest request) { public void saveStandardUsecase(ReviewStandardSaveStandardUsecaseRequest request) {
// 删除之前绑定关系
testUseCaseMapper.update( testUseCaseMapper.update(
TestUseCase.builder().reviewStandardId(request.getStandardId()).build(), null,
new UpdateWrapper<TestUseCase>().in("id", request.getUsecaseIdList())); new UpdateWrapper<TestUseCase>()
.set("review_standard_id", null)
.in("review_standard_id", request.getStandardId()));
if (CollUtil.isNotEmpty(request.getUsecaseIdList())) {
// 绑定现在的
testUseCaseMapper.update(
TestUseCase.builder().reviewStandardId(request.getStandardId()).build(),
new UpdateWrapper<TestUseCase>().in("id", request.getUsecaseIdList()));
}
} }
/** /**
......
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