zhubaomin
3 天以前 844594bc560ba6c5dd7f92ce3301295fb980282a
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
50
51
52
53
54
55
56
57
package com.dy.pipIrrTerminal.client;
 
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoSe.SeClientMapper;
import com.dy.pipIrrGlobal.voSe.VoClient;
import com.dy.pipIrrGlobal.voSe.VoTermClient;
import com.dy.pipIrrTerminal.client.qo.QoClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
import java.util.Map;
 
/**
 * @author ZhuBaoMin
 * @date 2025-05-07 17:25
 * @LastEditTime 2025-05-07 17:25
 * @Description
 */
 
@Slf4j
@Service
public class ClientSv {
    @Autowired
    private SeClientMapper seClientMapper;
 
    /**
     * 根据指定条件获取农户数据_充值机
     * @param queryVo
     * @return
     */
    public QueryResultVo<List<VoTermClient>> getTermClients(QoClient queryVo){
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo) ;
 
        Long itemTotal = (long)seClientMapper.getTermClientCount(params);
        QueryResultVo<List<VoTermClient>> rsVo = new QueryResultVo<>() ;
        rsVo.pageSize = queryVo.pageSize ;
        rsVo.pageCurr = queryVo.pageCurr ;
 
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = seClientMapper.getTermClients(params);
 
        return rsVo ;
    }
 
    /**
     * 根据农户ID获取一个农户数据_充值机
     * @param clientId
     * @return
     */
    public VoTermClient getTermOneClient(Long clientId) {
        return seClientMapper.getTermOneClient(clientId);
    }
}