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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user