fix:MemberDTO引用错误问题修复

This commit is contained in:
haoxr 2020-10-12 20:15:29 +08:00
parent 3ed765479c
commit bbb46a7d9d
3 changed files with 13 additions and 3 deletions

View File

@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestBody;
public interface RemoteUmsMemberService {
@GetMapping("/members/member/{openid}")
Result<UmsMember> loadMemberByOpenid(@PathVariable String openid);
Result<MemberDTO> loadMemberByOpenid(@PathVariable String openid);
@PostMapping("/members")
Result add(@RequestBody UmsMember umsMember);

View File

@ -1,6 +1,7 @@
package com.youlai.admin.api.feign;
import com.youlai.admin.api.dto.UserDTO;
import com.youlai.common.core.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@ -9,5 +10,5 @@ import org.springframework.web.bind.annotation.PathVariable;
public interface RemoteAdminService {
@GetMapping("/users/user/{username}")
UserDTO loadUserByUsername(@PathVariable String username);
Result<UserDTO> loadUserByUsername(@PathVariable String username);
}

View File

@ -78,7 +78,16 @@ public class WxOAuthController {
String openid = session.getOpenid();
String sessionKey = session.getSessionKey();
Result<UmsMember> result = remoteUmsMemberService.loadMemberByOpenid(openid);
Result<MemberDTO> result = remoteUmsMemberService.loadMemberByOpenid(openid);
if(ResultCode.SUCCESS.getCode().equals(result.getCode())){
MemberDTO memberDTO = result.getData();
if(memberDTO!=null){
}
}
WxMaUserInfo userInfo;
UmsMember member;
if (memberDTO == null || memberDTO.getId() == null) {