| | |
| | | |
| | | @Transactional |
| | | public int save(PrDevOpsPlan plan) { |
| | | if(devOpsDao.exists(plan.name,plan.id)){ |
| | | throw new RuntimeException("计划名不能重复"); |
| | | } |
| | | BaUser loginUser = userUtil.getUser(UserTokenContext.get()); |
| | | if(loginUser!=null){ |
| | | plan.creator = loginUser.id; |
| | |
| | | } |
| | | @Transactional |
| | | public int update(PrDevOpsPlan plan) { |
| | | if(devOpsDao.exists(plan.name,plan.id)){ |
| | | throw new RuntimeException("计划名不能重复"); |
| | | } |
| | | return devOpsDao.updateByPrimaryKeySelective(plan); |
| | | } |
| | | public QueryResultVo<List<PrDevOpsPlan>> selectSome(QueryVo queryVo) { |
| | |
| | | rsVo.obj = devOpsDao.selectSome(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 只更新状态,不更新其他字段 |
| | | * @param plan |
| | | * @return |
| | | */ |
| | | public int updateStatus(PrDevOpsPlan plan) { |
| | | PrDevOpsPlan param = new PrDevOpsPlan(); |
| | | param.id =plan.id; |
| | | param.status = plan.status; |
| | | return devOpsDao.updateByPrimaryKeySelective(param); |
| | | } |
| | | } |