| | |
| | | import com.ruoyi.system.vo.BasicDataConfigVO; |
| | | import com.ruoyi.system.vo.FieldVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.util.List; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 分页条件查询字段 |
| | | * |
| | | * @param query 字段条件查询对象 |
| | | * @return R<PageDTO < FieldVO>> |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @GetMapping("/list-fields") |
| | | @ApiOperation(value = "查询状态为展示中字段列表", notes = "基础数据配置、大屏数据配置") |
| | | public R<List<FieldVO>> listFields() { |
| | | @ApiOperation(value = "查询状态为展示中的字段列表", notes = "基础数据配置、大屏数据配置") |
| | | @ApiImplicitParam(name = "type", value = "数字、文本、百分比", required = false, dataType = "string", paramType = "query", dataTypeClass = String.class) |
| | | public R<List<FieldVO>> listFields(String type) { |
| | | try { |
| | | return R.ok(tbFieldService.listFields()); |
| | | return R.ok(tbFieldService.listFields(type)); |
| | | } catch (Exception e) { |
| | | if (e instanceof ServiceException) { |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | log.error("查询状态为展示中字段列表异常", e); |
| | | return R.fail(); |
| | | } |