You've already forked FrameTour-BE
默认景区登录问题
This commit is contained in:
@@ -36,6 +36,11 @@ public class AppMemberController {
|
|||||||
public ApiResponse<?> login(@PathVariable("scenicId") Long scenicId ,@RequestBody WeChatUserInfoDTO userInfoDTO) throws Exception {
|
public ApiResponse<?> login(@PathVariable("scenicId") Long scenicId ,@RequestBody WeChatUserInfoDTO userInfoDTO) throws Exception {
|
||||||
return memberService.login(scenicId, userInfoDTO.getCode(), userInfoDTO);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户信息
|
* 获取用户信息
|
||||||
|
@@ -71,6 +71,9 @@ public class AppMemberServiceImpl implements AppMemberService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ApiResponse login(Long scenicId, String code, WeChatUserInfoDTO userInfoDTO) throws Exception {
|
public ApiResponse login(Long scenicId, String code, WeChatUserInfoDTO userInfoDTO) throws Exception {
|
||||||
|
if (scenicId == null) {
|
||||||
|
scenicId = 3930324797233434624L;
|
||||||
|
}
|
||||||
Map<String, Object> weixinResponse = this.getOpenId(scenicId, code);
|
Map<String, Object> weixinResponse = this.getOpenId(scenicId, code);
|
||||||
if (CollectionUtils.isEmpty(weixinResponse)) {
|
if (CollectionUtils.isEmpty(weixinResponse)) {
|
||||||
throw new AppException(BizCodeEnum.SERVER_INTERNAL_ERROR);
|
throw new AppException(BizCodeEnum.SERVER_INTERNAL_ERROR);
|
||||||
|
Reference in New Issue
Block a user