bug绑定多个

This commit is contained in:
2025-05-15 11:15:04 +08:00
parent 40c6a13cf4
commit 9ed6f173ee
10 changed files with 135 additions and 8 deletions

View File

@ -0,0 +1,20 @@
package com.sa.zentao.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author gqb
* @since 2025-05-13
*/
@RestController
@RequestMapping("/zt-bug-bound-user")
public class ZtBugBoundUserController {
}

View File

@ -0,0 +1,35 @@
package com.sa.zentao.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2025-05-13
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtBugBoundUser implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer bugId;
/**
* 责任人
*/
private String assignedTo;
}

View File

@ -81,7 +81,7 @@ public class ZtRelease implements Serializable {
@TableField("`level`")
private String level;
//真实发布时间
@TableField(exist = false)
// @TableField(exist = false)
private Date realReleaseDate;
private String danger;

View File

@ -0,0 +1,16 @@
package com.sa.zentao.mapper;
import com.sa.zentao.entity.ZtBugBoundUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author gqb
* @since 2025-05-13
*/
public interface ZtBugBoundUserMapper extends BaseMapper<ZtBugBoundUser> {
}

View File

@ -0,0 +1,19 @@
package com.sa.zentao.service;
import com.sa.zentao.entity.ZtBugBoundUser;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 服务类
* </p>
*
* @author gqb
* @since 2025-05-13
*/
public interface IZtBugBoundUserService extends IService<ZtBugBoundUser> {
List<ZtBugBoundUser> listByBugId(Integer id);
}

View File

@ -0,0 +1,27 @@
package com.sa.zentao.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sa.zentao.entity.ZtBugBoundUser;
import com.sa.zentao.mapper.ZtBugBoundUserMapper;
import com.sa.zentao.service.IZtBugBoundUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 服务实现类
* </p>
*
* @author gqb
* @since 2025-05-13
*/
@Service
public class ZtBugBoundUserServiceImpl extends ServiceImpl<ZtBugBoundUserMapper, ZtBugBoundUser> implements IZtBugBoundUserService {
@Override
public List<ZtBugBoundUser> listByBugId(Integer id) {
return this.baseMapper.selectList(new QueryWrapper<ZtBugBoundUser>().lambda().eq(ZtBugBoundUser::getBugId, id));
}
}

View File

@ -1,5 +1,6 @@
package com.sa.zentao.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
@ -578,6 +579,7 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
@Override
public Object searchObj(ZtAllBusinessDTO dto) {
Object result =null;
JSONObject obj=new JSONObject();
if("task".equals(dto.getSearchType())){
result=this.taskService.getById(dto.getSearchId());
}else if("story".equals(dto.getSearchType())){
@ -587,6 +589,7 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
}else if("bug".equals(dto.getSearchType())){
result=this.bugService.getById(dto.getSearchId());
}
return result;
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sa.zentao.mapper.ZtBugBoundUserMapper">
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtBugBoundUser">
<result column="id" property="id" />
<result column="bug_id" property="bugId" />
<result column="assigned_to" property="assignedTo" />
</resultMap>
</mapper>

View File

@ -10,13 +10,10 @@
<select id="releaseStoryPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
select s.* from (zt_story s,zt_projectstory ps,zt_release_details details ) left
join zt_storyspec sp on s.id = sp.story
left join zt_storyreview v on s.id = v.story and s.version = v.version
left join zt_projectstory pstory on s.id = pstory.story and pstory.execution =0
left join zt_project pj on pstory.project = pj.id
select s.* from (zt_story s,zt_release_details details )
WHERE s.id = ps.story
WHERE 1=1
and s.id = details.object_id
and details.object_type ='story'
and details.release_id = #{qo.id}

View File

@ -358,7 +358,7 @@
from zt_story s
left join zt_storyreview v on s.id = v.story and s.version = v.version
left join zt_projectstory pstory on s.id = pstory.story and pstory.execution =0
left join zt_projectstory pstory on s.id = pstory.story and pstory.`type` = 'project'
left join zt_project pj on pstory.project = pj.id
left join zt_product pt on s.product = pt.id
left join zt_projectstory ps on s.id = ps.story