|  |  | 
 |  |  |  | 
 |  |  | import com.dy.common.webUtil.QueryResultVo; | 
 |  |  | import com.dy.pipIrrGlobal.daoBa.BaDistrictMapper; | 
 |  |  | import com.dy.pipIrrGlobal.daoBa.BaSettingsMapper; | 
 |  |  | import com.dy.pipIrrGlobal.daoSe.SeClientMapper; | 
 |  |  | import com.dy.pipIrrGlobal.daoSe.SeOpenIdMapper; | 
 |  |  | import com.dy.pipIrrGlobal.pojoSe.SeClient; | 
 |  |  | import com.dy.pipIrrGlobal.pojoSe.SeOpenId; | 
 |  |  | import com.dy.pipIrrGlobal.voSe.VoClient; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | import org.apache.dubbo.common.utils.PojoUtils; | 
 |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private BaDistrictMapper baDistrictMapper; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private BaSettingsMapper baSettingsMapper; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private SeOpenIdMapper seOpenIdMapper; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 根据指定条件获取农户数据 | 
 |  |  |      * @param queryVo | 
 |  |  | 
 |  |  |         Long itemTotal = seClientMapper.getRecordCount(params); | 
 |  |  |  | 
 |  |  |         QueryResultVo<List<VoClient>> rsVo = new QueryResultVo<>() ; | 
 |  |  |         Integer pageCurr = 0; | 
 |  |  |         Integer pageSize = 10000; | 
 |  |  |         rsVo.pageCurr = 1; | 
 |  |  |         rsVo.pageSize = 10000; | 
 |  |  |         if(queryVo.pageSize != null && queryVo.pageCurr != null) { | 
 |  |  |             rsVo.pageSize = queryVo.pageSize ; | 
 |  |  |             rsVo.pageCurr = queryVo.pageCurr; | 
 |  |  |             pageSize = queryVo.pageSize ; | 
 |  |  |             pageCurr = (Integer.parseInt(params.get("pageCurr").toString()) - 1) * Integer.parseInt(params.get("pageSize").toString()); | 
 |  |  |         } | 
 |  |  |         params.put("pageCurr", pageCurr); | 
 |  |  |         params.put("pageSize", pageSize); | 
 |  |  |         rsVo.pageSize = queryVo.pageSize ; | 
 |  |  |         rsVo.pageCurr = queryVo.pageCurr ; | 
 |  |  |  | 
 |  |  |         rsVo.calculateAndSet(itemTotal, params); | 
 |  |  |         rsVo.obj = seClientMapper.getClients(params); | 
 |  |  | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     public Integer addClient(SeClient po) { | 
 |  |  |         return seClientMapper.insert(po); | 
 |  |  |         return seClientMapper.insertSelective(po); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |     public List<Map<String, Object>> getWaterTypes() { | 
 |  |  |         return seClientMapper.getWaterTypes(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 根据配置项获取配置项值 | 
 |  |  |      * @param itemName | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     public String getItemValue(String itemName) { | 
 |  |  |         return baSettingsMapper.getItemValue(itemName); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 根据电话号码获取农户ID | 
 |  |  |      * @param phoneNumber | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     public Long getClientIdByPhone(String phoneNumber) { | 
 |  |  |         return seClientMapper.getClientIdByPhone(phoneNumber); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 添加微信用户账户记录 | 
 |  |  |      * @param po | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     public Long addOpenId(SeOpenId po) { | 
 |  |  |         seOpenIdMapper.insert(po); | 
 |  |  |         //return po.getClientId(); | 
 |  |  |         return po.getId(); | 
 |  |  |     } | 
 |  |  | } |