package com.dy.pipIrrWechat.client; import com.dy.common.aop.SsoAop; import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; import com.dy.pipIrrGlobal.voWe.VoCards3; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * @author :WuZeYu * @Date :2024/6/26 15:58 * @LastEditTime :2024/6/26 15:58 * @Description */ @Slf4j @Tag(name = "农户水卡操作", description = "农户水卡操作") @RestController @RequestMapping(path="clientCard") public class ClientCardCtrl { @Autowired private ClientCardSv clientCardSv; /** * 根据农户ID查询正常状态的水卡列表 * @param clientId * @return */ @GetMapping(path = "getCardsByClientID") @SsoAop() public BaseResponse> getCardsByClientID(String clientId){ try { List res = clientCardSv.getCardsByClientID(clientId); return BaseResponseUtils.buildSuccess(res); } catch (Exception e) { log.error("查询水卡异常", e); return BaseResponseUtils.buildException(e.getMessage()) ; } } }