use of com.ngtesting.platform.vo.DocumentVo in project ngtesting-platform by aaronchen2k.
the class DocumentServiceImpl method genVos.
@Override
public List<DocumentVo> genVos(List<TestDocument> pos) {
List<DocumentVo> vos = new LinkedList<DocumentVo>();
for (TestDocument po : pos) {
DocumentVo vo = genVo(po);
vos.add(vo);
}
return vos;
}
use of com.ngtesting.platform.vo.DocumentVo in project ngtesting-platform by aaronchen2k.
the class DocumentAction method list.
@AuthPassport(validate = true)
@RequestMapping(value = "list", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> list(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
long eventId = json.getLong("eventId");
int page = json.getInteger("page") == null ? 0 : json.getInteger("page") - 1;
int pageSize = json.getInteger("pageSize") == null ? Constant.PAGE_SIZE : json.getInteger("pageSize");
Page pageData = documentService.listByPage(eventId, page, pageSize, null);
List<DocumentVo> vos = documentService.genVos(pageData.getItems());
ret.put("collectionSize", pageData.getTotal());
ret.put("data", vos);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.DocumentVo in project ngtesting-platform by aaronchen2k.
the class DocumentServiceImpl method genVo.
@Override
public DocumentVo genVo(TestDocument po) {
DocumentVo vo = new DocumentVo();
BeanUtilEx.copyProperties(vo, po);
return vo;
}
Aggregations