fix(缺陷管理): 修复缺陷管理回收站中删除人和删除时间不对的缺陷

https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001036409;https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001036401;
This commit is contained in:
song-tianyang 2024-02-29 15:50:11 +08:00 committed by 刘瑞斌
parent 522a2e389e
commit e098c0383d
2 changed files with 4 additions and 4 deletions

View File

@ -17,8 +17,8 @@ CREATE TABLE IF NOT EXISTS bug(
`status` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '状态' ,
`tags` VARCHAR(1000) COMMENT '标签' ,
`platform_bug_id` VARCHAR(50) COMMENT '第三方平台缺陷ID' ,
`delete_user` VARCHAR(50) NOT NULL COMMENT '删除人' ,
`delete_time` BIGINT NOT NULL COMMENT '删除时间' ,
`delete_user` VARCHAR(50) COMMENT '删除人',
`delete_time` BIGINT COMMENT '删除时间',
`deleted` BIT(1) NOT NULL COMMENT '删除状态' ,
`pos` BIGINT NOT NULL COMMENT '自定义排序间隔5000' ,
PRIMARY KEY (id)

View File

@ -320,6 +320,8 @@ public class BugService {
Bug record = new Bug();
record.setId(id);
record.setDeleted(true);
record.setDeleteUser(currentUser);
record.setDeleteTime(System.currentTimeMillis());
bugMapper.updateByPrimaryKeySelective(record);
} else {
// 需同步删除平台缺陷
@ -820,8 +822,6 @@ public class BugService {
bug.setCreateTime(System.currentTimeMillis());
bug.setUpdateUser(currentUser);
bug.setUpdateTime(System.currentTimeMillis());
bug.setDeleteUser(currentUser);
bug.setDeleteTime(System.currentTimeMillis());
bug.setDeleted(false);
bug.setPos(getNextPos(request.getProjectId()));
bugMapper.insert(bug);