mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-06-28 13:34:18 +08:00
24 lines
573 B
Java
24 lines
573 B
Java
package com.pj.test;
|
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
import com.kfyty.loveqq.framework.core.autoconfig.annotation.Service;
|
|
import reactor.core.publisher.Mono;
|
|
|
|
/**
|
|
* 模拟 Service 方法
|
|
* @author click33
|
|
* @since 2025/4/6
|
|
*/
|
|
@Service
|
|
public class UserService {
|
|
|
|
public boolean isLogin() {
|
|
System.out.println("UserService 里调用 API 测试,是否登录:" + StpUtil.isLogin());
|
|
return StpUtil.isLogin();
|
|
}
|
|
|
|
public Mono<Long> findUserIdByNamePwd(String name, String pwd) {
|
|
// ...
|
|
return Mono.just(10001L);
|
|
}
|
|
} |