|
@@ -1,6 +1,7 @@
|
|
|
package cn.qinys.platform.mobile.service.impl;
|
|
package cn.qinys.platform.mobile.service.impl;
|
|
|
|
|
|
|
|
import cn.qinys.platform.base.exceptions.BizException;
|
|
import cn.qinys.platform.base.exceptions.BizException;
|
|
|
|
|
+import cn.qinys.platform.base.security.utils.CurrentUtils;
|
|
|
import cn.qinys.platform.base.service.AbstractLoginService;
|
|
import cn.qinys.platform.base.service.AbstractLoginService;
|
|
|
import cn.qinys.platform.base.service.ICaptchaService;
|
|
import cn.qinys.platform.base.service.ICaptchaService;
|
|
|
import cn.qinys.platform.base.vo.LoginUserInfo;
|
|
import cn.qinys.platform.base.vo.LoginUserInfo;
|
|
@@ -9,13 +10,16 @@ import cn.qinys.platform.mobile.mapper.WishingUserMapper;
|
|
|
import cn.qinys.platform.mobile.req.LoginReq;
|
|
import cn.qinys.platform.mobile.req.LoginReq;
|
|
|
import cn.qinys.platform.mobile.resp.CaptchaResp;
|
|
import cn.qinys.platform.mobile.resp.CaptchaResp;
|
|
|
import cn.qinys.platform.mobile.resp.LoginResp;
|
|
import cn.qinys.platform.mobile.resp.LoginResp;
|
|
|
|
|
+import cn.qinys.platform.mobile.resp.UserWishSummaryResp;
|
|
|
import cn.qinys.platform.mobile.service.LoginService;
|
|
import cn.qinys.platform.mobile.service.LoginService;
|
|
|
import jakarta.annotation.Resource;
|
|
import jakarta.annotation.Resource;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
import java.util.UUID;
|
|
import java.util.UUID;
|
|
|
|
|
+import java.util.concurrent.ThreadLocalRandom;
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -23,6 +27,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
|
|
* @description
|
|
* @description
|
|
|
* @date 2026-06-06 13:35
|
|
* @date 2026-06-06 13:35
|
|
|
**/
|
|
**/
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
@Service
|
|
|
public class LoginServiceImpl extends AbstractLoginService implements LoginService {
|
|
public class LoginServiceImpl extends AbstractLoginService implements LoginService {
|
|
|
|
|
|
|
@@ -76,4 +81,20 @@ public class LoginServiceImpl extends AbstractLoginService implements LoginServi
|
|
|
resp.setValue(value.get());
|
|
resp.setValue(value.get());
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void logout() {
|
|
|
|
|
+ LoginUserInfo currentUserInfo = CurrentUtils.getCurrentUserInfo();
|
|
|
|
|
+ this.kicKOut(currentUserInfo.getWxId());
|
|
|
|
|
+ log.info("user logout: {}", currentUserInfo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public UserWishSummaryResp wishSummary() {
|
|
|
|
|
+ UserWishSummaryResp resp = new UserWishSummaryResp();
|
|
|
|
|
+ // 随机生成 0 ~ 999 的整数,作为 wishCount
|
|
|
|
|
+ resp.setWishCount(ThreadLocalRandom.current().nextInt(1000));
|
|
|
|
|
+ resp.setReceiveCount(ThreadLocalRandom.current().nextInt(100));
|
|
|
|
|
+ return resp;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|