liurunyu
2024-06-27 3e49ff6a3db6710bc327d99384d4b8fc6d474da4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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<List<VoCards3>> getCardsByClientID(String clientId){
        try {
            List<VoCards3> res = clientCardSv.getCardsByClientID(clientId);
 
                return BaseResponseUtils.buildSuccess(res);
 
        } catch (Exception e) {
            log.error("查询水卡异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
}