fix: 删除缺陷 (#2177)
Co-authored-by: chenjianxing <jianxing.chen@fit2cloud.com>
This commit is contained in:
parent
f393834aad
commit
6980c6aaa1
|
@ -21,6 +21,10 @@
|
|||
<sql id="queryWhereCondition">
|
||||
<where>
|
||||
|
||||
<if test="request.name != null">
|
||||
and issues.title LIKE CONCAT('%', #{request.name}, '%')
|
||||
</if>
|
||||
|
||||
<if test="request.projectId != null and request.projectId != ''">
|
||||
and issues.project_id = #{request.projectId}
|
||||
</if>
|
||||
|
|
|
@ -59,6 +59,11 @@ public class IssuesController {
|
|||
issuesService.deleteIssue(request);
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
public void delete(@PathVariable String id) {
|
||||
issuesService.delete(id);
|
||||
}
|
||||
|
||||
@GetMapping("/tapd/user/{caseId}")
|
||||
public List<PlatformUser> getTapdUsers(@PathVariable String caseId) {
|
||||
return issuesService.getTapdProjectUsers(caseId);
|
||||
|
|
|
@ -248,6 +248,14 @@ public class IssuesService {
|
|||
testCaseIssuesMapper.deleteByExample(example);
|
||||
}
|
||||
|
||||
public void delete(String id) {
|
||||
issuesMapper.deleteByPrimaryKey(id);
|
||||
TestCaseIssuesExample example = new TestCaseIssuesExample();
|
||||
example.createCriteria()
|
||||
.andIssuesIdEqualTo(id);
|
||||
testCaseIssuesMapper.deleteByExample(example);
|
||||
}
|
||||
|
||||
private static String getIssuesContext(SessionUser user, IssuesUpdateRequest issuesRequest, String type) {
|
||||
String context = "";
|
||||
if (StringUtils.equals(NoticeConstants.Event.CREATE, type)) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="getIssues" @create="handleCreate"
|
||||
:create-tip="'创建缺陷'" :title="'缺陷列表'"/>
|
||||
:create-tip="'创建缺陷'" :title="'缺陷列表'" :tip="'根据标题搜索'"/>
|
||||
</template>
|
||||
|
||||
<ms-table
|
||||
|
@ -147,7 +147,7 @@ export default {
|
|||
this.$refs.issueEdit.open(copyData);
|
||||
},
|
||||
handleDelete(data) {
|
||||
this.result = this.$get('custom/field/delete/' + data.id, () => {
|
||||
this.result = this.$get('issues/delete/' + data.id, () => {
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.getIssues();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue