This commit is contained in:
tangzh 2025-07-31 13:36:34 +08:00
parent c6cc09916b
commit 6a33d03344

View File

@ -39,9 +39,6 @@ public class WeChatServiceImpl implements WeChatService {
@Value("${weChat.secret}")
private String secret;
@Value("${spring.profiles.active}")
private String active;
@Autowired private QrCodeUtil qrCodeUtil;
@Autowired private BusUserMapper BusUserMapper;
@Autowired private RestTemplateUtils restTemplateUtil;
@ -68,13 +65,9 @@ public class WeChatServiceImpl implements WeChatService {
@Override
public LoginVo authorizeLogin(String code, HttpServletRequest request) {
LoginVo loginVo = new LoginVo();
WeChatMiniAuthorizeVo response = null;
if (!active.equals("local")) {
response = miniAuthCode(code);
} else {
response = new WeChatMiniAuthorizeVo();
response.setOpenId("123456");
}
WeChatMiniAuthorizeVo response = miniAuthCode(code);
// WeChatMiniAuthorizeVo response = new WeChatMiniAuthorizeVo();
// response.setOpenId("123456");
String openId = response.getOpenId();
String type = "login";
BusUser busUser = BusUserMapper.getUserByOpenId(openId);