zuoxiao
3 天以前 44030fd43d3b8009a6ba0591dc60fa7720b20e0a
pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/java/com/dy/pipIrrTerminal/card/CardCtrl.java
@@ -316,4 +316,32 @@
        }
    }
    /**
     * 根据农户编号获取卡信息
     * @param clientNum 农户编号
     * @return
     */
    @Operation(summary = "根据农户编号获取卡信息", description = "根据农户编号获取对应的卡信息")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "返回卡信息(BaseResponse.content:VoCardByClientNum)",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoCardByClientNum.class))}
            )
    })
    @GetMapping(path = "getcardbyclientnum")
    @SsoAop()
    public BaseResponse<VoCardByClientNum> getCardByClientNum(@RequestParam String clientNum){
        try {
            VoCardByClientNum res = cardSv.getCardByClientNum(clientNum);
            if (res == null) {
                return BaseResponseUtils.buildFail("未找到对应的卡信息");
            }
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("根据农户编号查询卡信息异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
}