fix(用例管理): 用例批量编辑日志操作类型记录错误&批量编辑调整
--bug=1035519 --user=王旭 【项目管理】日志-操作类型-批量编辑显示的是删除 https://www.tapd.cn/55049933/s/1464139
This commit is contained in:
parent
32a4ed9448
commit
01da2bf54e
|
@ -17,4 +17,6 @@ public interface ExtFunctionalCaseCustomFieldMapper {
|
|||
void batchUpdate(@Param("functionalCaseCustomField") FunctionalCaseCustomField functionalCaseCustomField, @Param("ids") List<String> ids);
|
||||
|
||||
List<FunctionalCaseCustomFieldDTO> getCustomFieldsByCaseIds(@Param("ids") List<String> ids);
|
||||
|
||||
void batchDelete(@Param("functionalCaseCustomField") FunctionalCaseCustomField functionalCaseCustomField, @Param("ids") List<String> ids);
|
||||
}
|
||||
|
|
|
@ -36,4 +36,13 @@
|
|||
</foreach>
|
||||
</select>
|
||||
|
||||
<delete id="batchDelete">
|
||||
delete from functional_case_custom_field
|
||||
where field_id = #{functionalCaseCustomField.fieldId}
|
||||
and case_id in
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
|
@ -133,7 +133,16 @@ public class FunctionalCaseCustomFieldService {
|
|||
FunctionalCaseCustomField functionalCaseCustomField = new FunctionalCaseCustomField();
|
||||
functionalCaseCustomField.setFieldId(customField.getFieldId());
|
||||
functionalCaseCustomField.setValue(customField.getValue());
|
||||
extFunctionalCaseCustomFieldMapper.batchUpdate(functionalCaseCustomField, ids);
|
||||
extFunctionalCaseCustomFieldMapper.batchDelete(functionalCaseCustomField, ids);
|
||||
List<FunctionalCaseCustomField> list = new ArrayList<>();
|
||||
ids.forEach(id -> {
|
||||
FunctionalCaseCustomField field = new FunctionalCaseCustomField();
|
||||
field.setCaseId(id);
|
||||
field.setFieldId(customField.getFieldId());
|
||||
field.setValue(customField.getValue());
|
||||
list.add(field);
|
||||
});
|
||||
functionalCaseCustomFieldMapper.batchInsert(list);
|
||||
}
|
||||
|
||||
public List<FunctionalCaseCustomFieldDTO> getCustomFieldsByCaseIds(List<String> ids) {
|
||||
|
|
|
@ -304,7 +304,7 @@ public class FunctionalCaseLogService {
|
|||
null,
|
||||
functionalCase.getId(),
|
||||
null,
|
||||
OperationLogType.DELETE.name(),
|
||||
OperationLogType.UPDATE.name(),
|
||||
OperationLogModule.FUNCTIONAL_CASE,
|
||||
functionalCase.getName());
|
||||
dto.setHistory(true);
|
||||
|
|
Loading…
Reference in New Issue