From 2dd9790f5d7d27b350fec1412fc1e50d12280d7c Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 15 八月 2025 14:40:14 +0800
Subject: [PATCH] 完善代码
---
pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/crops/CropsCtrl.java | 28 +++++++++++++++++++++++++---
1 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/crops/CropsCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/crops/CropsCtrl.java
index 0e73e45..a5d2f82 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/crops/CropsCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/crops/CropsCtrl.java
@@ -1,7 +1,6 @@
package com.dy.pipIrrModel.crops;
import com.dy.common.aop.SsoAop;
-import com.dy.common.util.DateTime;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
@@ -75,7 +74,7 @@
})
@GetMapping(path = "some")
@SsoAop()
- public BaseResponse<QueryResultVo<List<VoCrops>>> some(@RequestBody CropsQo qo){
+ public BaseResponse<QueryResultVo<List<VoCrops>>> some(CropsQo qo){
try {
QueryResultVo<List<VoCrops>> res = this.sv.selectSome(qo) ;
return BaseResponseUtils.buildSuccess(res);
@@ -84,7 +83,30 @@
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 = VoCrops.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琛ㄥ崟瀵硅薄
--
Gitblit v1.8.0