| | |
| | | @ApiOperation(value = "查询列表", notes = "传入查询") |
| | | public R<IPage<AttributeVO>> pageList(@ApiIgnore @RequestParam Map<String, Object> condition, Query query) { |
| | | IPage<AttributeVO> pageVO = new Page<>(); |
| | | IPage<Attribute> page = attributeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, Attribute.class).lambda().orderByAsc(Attribute::getId)); |
| | | IPage<Attribute> page = attributeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, Attribute.class).lambda().orderByDesc(Attribute::getCreateTime)); |
| | | BeanUtil.copy(page,pageVO); |
| | | pageVO.setRecords( AttributeWrapper.build().listEntityVO(page.getRecords())); |
| | | return R.data(pageVO); |
| | |
| | | |
| | | @GetMapping("/query-page") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "key",value = "属性名模糊",paramType = "query",dataType = "string"), |
| | | @ApiImplicitParam(name = "notIn",value = "属性名排除",paramType = "query",dataType = "string") |
| | | @ApiImplicitParam(name = "key",value = "属性编号模糊",paramType = "query",dataType = "string"), |
| | | @ApiImplicitParam(name = "notIn",value = "属性编号排除",paramType = "query",dataType = "string") |
| | | }) |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "查询列表",notes = "传入查的值和不查的值") |
| | |
| | | return R.data(pageVO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * @param dto 元数据页面传输对象 |
| | | * @return 执行结果 |
| | | */ |
| | | /** |
| | | * 新增或修改 |
| | | * @param dto 元数据页面传输对象 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "新增或修改", notes = "传入元数据对象") |
| | | public R submit(@Valid @RequestBody AttributeDTO dto) { |
| | | public R submit(@RequestBody AttributeDTO dto) { |
| | | CacheUtil.clear(OmdCacheConstant.ATTR_CACHE); |
| | | return R.status(attributeService.submit(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param ids 主键集合 |
| | | * @param oid 主键集合 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "删除", notes = "主键集合") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String oid) { |
| | | CacheUtil.clear(OmdCacheConstant.ATTR_CACHE); |
| | | return R.status(attributeService.removeAttrs(ids)); |
| | | return attributeService.remove(oid); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R applyRange(String oid){ |
| | | return R.data(attributeService.applyRange(oid)); |
| | | } |
| | | |
| | | } |