|
|
|
|
@ -69,6 +69,7 @@ import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; |
|
|
|
|
import static org.springblade.core.cache.constant.CacheConstant.USER_CACHE; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -360,4 +361,22 @@ public class UserController { |
|
|
|
|
List<User> users = userService.list(Wrappers.lambdaQuery(User.class).eq(User::getRoleId, "1839552581620793346")); |
|
|
|
|
return R.data(users); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 维修人员坐标更新 |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/updateCoordinate") |
|
|
|
|
public R updateCoordinate(@RequestBody User user) { |
|
|
|
|
CacheUtil.put(SYS_CACHE, "coordinate:id:", user.getId(), user.getAddressLon() + "," + user.getAddressLon()); |
|
|
|
|
return R.status(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取维修人员坐标 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/getCoordinate") |
|
|
|
|
public R getCoordinate(String userId) { |
|
|
|
|
String coordinate = CacheUtil.get(SYS_CACHE, "coordinate:id:", userId, String.class); |
|
|
|
|
return R.data(coordinate); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|