use of com.ngtesting.platform.entity.TestCaseComments in project ngtesting-platform by aaronchen2k.
the class CaseCommentsServiceImpl method save.
@Override
public TestCaseCommentsVo save(JSONObject json, UserVo userVo) {
TestCaseCommentsVo vo = JSON.parseObject(JSON.toJSONString(json), TestCaseCommentsVo.class);
TestCaseComments po = new TestCaseComments();
if (vo.getId() != null) {
po = (TestCaseComments) get(TestCaseComments.class, vo.getId());
} else {
po.setId(null);
}
po.setSummary(vo.getSummary());
po.setContent(vo.getContent());
po.setTestCaseId(vo.getTestCaseId());
po.setUserId(userVo.getId());
po.setChangeTime(new Date());
saveOrUpdate(po);
return genVo(po);
}
use of com.ngtesting.platform.entity.TestCaseComments in project ngtesting-platform by aaronchen2k.
the class CaseCommentsServiceImpl method delete.
@Override
public boolean delete(Long id, Long userId) {
TestCaseComments po = (TestCaseComments) get(TestCaseComments.class, id);
po.setDeleted(true);
saveOrUpdate(po);
return true;
}
Aggregations