Administrator
2024-07-08 fdecbc710888e8f048f08ec16428f192b8251dfe
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/ClientCardCtrl.java
@@ -136,13 +136,18 @@
    @GetMapping(path = "getcards")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoCards>>> getcards(QoCards vo){
        // 如果传入的是10位的水卡编号,升为17位水卡编号
        if(vo != null && vo.getCardNum() != null) {
            String cardNumS = String.valueOf(vo.getCardNum()).trim();
            if(cardNumS.length() == 10) {
                cardNumS = "100000" + cardNumS.substring(0,6) + "0" + cardNumS.substring(6);
                vo.setCardNum(Long.parseLong(cardNumS));
            }
        }
        try {
            QueryResultVo<List<VoCards>> res = clientCardSv.getCards(vo);
            if(res.itemTotal != null && res.itemTotal > 0) {
                return BaseResponseUtils.buildSuccess(res);
            }else {
                return BaseResponseUtils.buildFail(SellResultCode.THE_CARD_NOT_EXIST.getMessage());
            }
            return BaseResponseUtils.buildSuccess(res);
        } catch (Exception e) {
            log.error("查询农户异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;