package com.stylefeng.guns.modular.system.service.impl; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.stylefeng.guns.modular.system.dao.DriverOnlineMapper; import com.stylefeng.guns.modular.system.model.DriverOnline; import com.stylefeng.guns.modular.system.service.IDriverOnlineService; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; @Service public class DriverOnlineServiceImpl extends ServiceImpl implements IDriverOnlineService { @Resource private DriverOnlineMapper driverOnlineMapper; /** * 获取列表数据 * @param name * @param phone * @param offset * @param limit * @return * @throws Exception */ @Override public Map queryOnlineDriver(String name, String phone, Integer offset, Integer limit) throws Exception { Map map = new HashMap<>(); List> list = driverOnlineMapper.queryOnlineDriver(name, phone, offset, limit); int i = driverOnlineMapper.queryOnlineDriverCount(name, phone); map.put("rows", list); map.put("total", i); return map; } @Override public int queryOnlineDriverCount(String name, String phone) { return driverOnlineMapper.queryOnlineDriverCount(name, phone); } @Override public int queryOnlineDriverCount1(String name, String phone) { return driverOnlineMapper.queryOnlineDriverCount1(name, phone); } }