|
|
@@ -3,6 +3,7 @@ package com.cyksj.web.controller.user;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import cn.hutool.extra.servlet.ServletUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.common.annotation.NoSubmit;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
@@ -390,4 +391,12 @@ public class UserController {
|
|
|
});
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询用户ip地址
|
|
|
+ */
|
|
|
+ @GetMapping("/get/ip")
|
|
|
+ public Result<String> getUserIp(){
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(ServletUtil.getClientIP(request));
|
|
|
+ }
|
|
|
}
|