| | |
| | | |
| | | import com.lf.server.controller.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.DictEntity; |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.service.data.DirService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectDir") |
| | | public DirEntity selectDir(int id) { |
| | | return dirService.selectDir(id); |
| | | public ResponseMsg<DirEntity> selectDir(int id) { |
| | | try { |
| | | DirEntity dirEntity = dirService.selectDir(id); |
| | | |
| | | return success(dirEntity); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询所有数据") |
| | | @GetMapping(value = "/selectDirAll") |
| | | public List<DirEntity> selectDirAll() { |
| | | |
| | | return dirService.selectDirAll(); |
| | | public ResponseMsg<List<DirEntity>> selectDirAll() { |
| | | try { |
| | | List<DirEntity> list = dirService.selectDirAll(); |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | } |