|
@@ -1,12 +1,7 @@
|
|
|
package com.ruoyi.system.api;
|
|
package com.ruoyi.system.api;
|
|
|
|
|
|
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import com.ruoyi.common.core.constant.SecurityConstants;
|
|
import com.ruoyi.common.core.constant.SecurityConstants;
|
|
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
|
|
import com.ruoyi.common.core.domain.R;
|
|
import com.ruoyi.common.core.domain.R;
|
|
@@ -43,7 +38,7 @@ public interface RemoteUserService
|
|
|
public R<Boolean> registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
public R<Boolean> registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 记录用户登录IP地址和登录时间
|
|
|
|
|
|
|
+ * 获取用户
|
|
|
*
|
|
*
|
|
|
* @param sysUser 用户信息
|
|
* @param sysUser 用户信息
|
|
|
* @param source 请求来源
|
|
* @param source 请求来源
|
|
@@ -51,4 +46,36 @@ public interface RemoteUserService
|
|
|
*/
|
|
*/
|
|
|
@PutMapping("/user/recordlogin")
|
|
@PutMapping("/user/recordlogin")
|
|
|
public R<Boolean> recordUserLogin(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
public R<Boolean> recordUserLogin(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取用户
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param jsCode 用户信息
|
|
|
|
|
+ * @param source 请求来源
|
|
|
|
|
+ * @return 结果
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/front/wxmini/getOpenId")
|
|
|
|
|
+ public R<String> getOpenId(@RequestParam("jsCode") String jsCode, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取用户
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param code 用户信息
|
|
|
|
|
+ * @param source 请求来源
|
|
|
|
|
+ * @return 结果
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/front/wxmini/getPhoneNumber")
|
|
|
|
|
+ public R<String> getPhoneNumber(@RequestParam("code") String code, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 通过用户名和openId查询用户信息
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param sysUser 用户名 openId
|
|
|
|
|
+ * @param source 请求来源
|
|
|
|
|
+ * @return 结果
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("/front/wxmini/getUserByOpenId")
|
|
|
|
|
+ public R<LoginUser> getUserByOpenId(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
|
|
|
|
+
|
|
|
}
|
|
}
|