发布id查询
This commit is contained in:
@ -6,6 +6,7 @@ import com.sa.zentao.dao.Result;
|
|||||||
import com.sa.zentao.dao.ZtReleaseDTO;
|
import com.sa.zentao.dao.ZtReleaseDTO;
|
||||||
import com.sa.zentao.dao.ZtStoryDTO;
|
import com.sa.zentao.dao.ZtStoryDTO;
|
||||||
import com.sa.zentao.dao.ZtTaskDTO;
|
import com.sa.zentao.dao.ZtTaskDTO;
|
||||||
|
import com.sa.zentao.entity.ZtRelease;
|
||||||
import com.sa.zentao.entity.ZtStory;
|
import com.sa.zentao.entity.ZtStory;
|
||||||
import com.sa.zentao.qo.ZtProjectQo;
|
import com.sa.zentao.qo.ZtProjectQo;
|
||||||
import com.sa.zentao.qo.ZtReleaseQo;
|
import com.sa.zentao.qo.ZtReleaseQo;
|
||||||
@ -40,6 +41,12 @@ public class ZtReleaseController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/getById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||||
|
public Result getById(@RequestBody ZtReleaseQo qo){
|
||||||
|
ZtReleaseDTO ztRelease = releaseService.getReleaseById(qo.getId());
|
||||||
|
return Result.success(ztRelease);
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/modifyRelease", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
@RequestMapping(value = "/modifyRelease", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||||
public Result modifyRelease(@RequestBody ZtReleaseDTO dto){
|
public Result modifyRelease(@RequestBody ZtReleaseDTO dto){
|
||||||
releaseService.modifyRelease(dto);
|
releaseService.modifyRelease(dto);
|
||||||
|
@ -46,4 +46,6 @@ public interface IZtReleaseService extends IService<ZtRelease> {
|
|||||||
void removeStory(ZtReleaseQo qo);
|
void removeStory(ZtReleaseQo qo);
|
||||||
|
|
||||||
void batchSyncStory(ZtReleaseQo qo);
|
void batchSyncStory(ZtReleaseQo qo);
|
||||||
|
|
||||||
|
ZtReleaseDTO getReleaseById(Integer id);
|
||||||
}
|
}
|
||||||
|
@ -419,4 +419,27 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
|||||||
releaseDetailsService.saveBatch(saveBatch);
|
releaseDetailsService.saveBatch(saveBatch);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ZtReleaseDTO getReleaseById(Integer id) {
|
||||||
|
ZtRelease ztRelease = this.baseMapper.selectById(id);
|
||||||
|
ZtReleaseDTO d=new ZtReleaseDTO();
|
||||||
|
BeanUtils.copyProperties(ztRelease,d);
|
||||||
|
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ZtUser ztUser = userMap.get(d.getAssignedTo());
|
||||||
|
if(ztUser!=null){
|
||||||
|
d.setAssignedToName(ztUser.getNickname());
|
||||||
|
}
|
||||||
|
|
||||||
|
ztUser = userMap.get(d.getCreatedby());
|
||||||
|
if(ztUser!=null){
|
||||||
|
d.setCreatedby(ztUser.getNickname());
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user