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);
|
}
|
}
|