| | |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | private ITTaxiCardService taxiCardService; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | |
| | | for(TDriver driver : tDrivers){ |
| | | keys += "DRIVER" + driver.getId() + ","; |
| | | } |
| | | String value = redisUtil.getValues(keys.substring(0, keys.length() - 1)); |
| | | String value = (String)redisTemplate.opsForValue().get(keys.substring(0, keys.length() - 1)); |
| | | JSONArray jsonArray = JSON.parseArray(value); |
| | | int size = driverOnlineService.queryOnlineDriverCount(null, null); |
| | | map1.put("netcardriver", size); //在线司机 |
| | |
| | | List<Object> list = new ArrayList<>(); |
| | | for(TDriver tDriver : tDrivers){ |
| | | Map<String, Object> d = new HashMap<>(); |
| | | String value = redisUtil.getValue("DRIVER" + tDriver.getId()); |
| | | String value = (String)redisTemplate.opsForValue().get("DRIVER" + tDriver.getId()); |
| | | if(ToolUtil.isEmpty(value)){ |
| | | continue; |
| | | } |