添加2d模型历史版本分页查询接口
This commit is contained in:
parent
8ba8d915dc
commit
7eb15b6ad8
@ -69,6 +69,17 @@ public class Model2dController {
|
|||||||
return this.model2dService.queryAllVersionOf(code);
|
return this.model2dService.queryAllVersionOf(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询某个模型历史版本数据
|
||||||
|
* @param code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/{code}/versions/paging")
|
||||||
|
public PageVO<Model2dVO> pageQueryVersion(@PathVariable String code, Model2dQueryVO queryVO) {
|
||||||
|
return model2dService.pageQueryVersion(code, queryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回滚版本
|
* 回滚版本
|
||||||
* @param code
|
* @param code
|
||||||
|
@ -46,6 +46,14 @@ public interface Model2dService {
|
|||||||
*/
|
*/
|
||||||
List<Model2dVO> queryAllVersionOf(String code);
|
List<Model2dVO> queryAllVersionOf(String code);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询某个模型历史版本数据
|
||||||
|
* @param code
|
||||||
|
* @param queryVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageVO<Model2dVO> pageQueryVersion(String code, Model2dQueryVO queryVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回滚版本
|
* 回滚版本
|
||||||
* @param code
|
* @param code
|
||||||
|
@ -105,6 +105,16 @@ public class Model2dServiceImpl implements Model2dService {
|
|||||||
return Model2dVO.convert2VOList(model2ds);
|
return Model2dVO.convert2VOList(model2ds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageVO<Model2dVO> pageQueryVersion(String code, Model2dQueryVO queryVO) {
|
||||||
|
Model2dExample example = new Model2dExample();
|
||||||
|
example.createCriteria()
|
||||||
|
.andCodeEqualTo(code);
|
||||||
|
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||||
|
Page<Model2d> page = (Page<Model2d>) this.model2dDAO.selectByExampleWithBLOBs(example);
|
||||||
|
return PageVO.convert(page, Model2dVO.convert2VOList(page.getResult()));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rollbackVersion(String code, Integer version) {
|
public void rollbackVersion(String code, Integer version) {
|
||||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotNull(code);
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotNull(code);
|
||||||
|
Loading…
Reference in New Issue
Block a user