bug绑定多个
This commit is contained in:
@ -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 {
|
||||
|
||||
}
|
35
src/main/java/com/sa/zentao/entity/ZtBugBoundUser.java
Normal file
35
src/main/java/com/sa/zentao/entity/ZtBugBoundUser.java
Normal 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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
16
src/main/java/com/sa/zentao/mapper/ZtBugBoundUserMapper.java
Normal file
16
src/main/java/com/sa/zentao/mapper/ZtBugBoundUserMapper.java
Normal 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> {
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
|
10
src/main/resources/mapper/ZtBugBoundUserMapper.xml
Normal file
10
src/main/resources/mapper/ZtBugBoundUserMapper.xml
Normal 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>
|
@ -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}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user