| | |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoMd.MdCrops; |
| | | import com.dy.pipIrrGlobal.voMd.VoCrops; |
| | | import com.dy.pipIrrGlobal.voMd.VoParam; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 客户端请求得到所有作物数据 |
| | | * @return 所有作物数据 |
| | | */ |
| | | @Operation(summary = "获得所有作物", description = "返回所有作物数据") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回所有作物数据(BaseResponse.content:QueryResultVo[{}])", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = VoParam.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "all") |
| | | @SsoAop() |
| | | public BaseResponse<List<VoCrops>> all(){ |
| | | try { |
| | | List<VoCrops> res = this.sv.selectAll() ; |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("查询作物异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | /** |
| | | * 新增保存作物 |
| | | * @param po 新增保存作物form表单对象 |