默认景区登录问题

This commit is contained in:
2025-07-25 17:21:15 +08:00
parent aa5f61f488
commit 554cd56c05
2 changed files with 8 additions and 0 deletions

View File

@@ -36,6 +36,11 @@ public class AppMemberController {
public ApiResponse<?> login(@PathVariable("scenicId") Long scenicId ,@RequestBody WeChatUserInfoDTO userInfoDTO) throws Exception {
return memberService.login(scenicId, userInfoDTO.getCode(), userInfoDTO);
}
@PostMapping("/undefined/login")
@IgnoreToken
public ApiResponse<?> login(@RequestBody WeChatUserInfoDTO userInfoDTO) throws Exception {
return memberService.login(null, userInfoDTO.getCode(), userInfoDTO);
}
/**
* 获取用户信息

View File

@@ -71,6 +71,9 @@ public class AppMemberServiceImpl implements AppMemberService {
@Override
public ApiResponse login(Long scenicId, String code, WeChatUserInfoDTO userInfoDTO) throws Exception {
if (scenicId == null) {
scenicId = 3930324797233434624L;
}
Map<String, Object> weixinResponse = this.getOpenId(scenicId, code);
if (CollectionUtils.isEmpty(weixinResponse)) {
throw new AppException(BizCodeEnum.SERVER_INTERNAL_ERROR);