You've already forked FrameTour-BE
修改BUG
This commit is contained in:
@ -28,7 +28,6 @@ public class AppMemberController {
|
||||
/**
|
||||
* 登录
|
||||
*
|
||||
* @param code
|
||||
* @param userInfoDTO
|
||||
* @return
|
||||
* @throws Exception
|
||||
@ -36,9 +35,8 @@ public class AppMemberController {
|
||||
@ApiOperation("登录")
|
||||
@PostMapping("/login")
|
||||
@IgnoreToken
|
||||
public ApiResponse<?> login(@RequestParam(value = "code") String code,
|
||||
@RequestParam(value = "userInfoDTO") WeChatUserInfoDTO userInfoDTO) throws Exception {
|
||||
return memberService.login(code, userInfoDTO);
|
||||
public ApiResponse<?> login(@RequestBody WeChatUserInfoDTO userInfoDTO) throws Exception {
|
||||
return memberService.login(userInfoDTO.getCode(), userInfoDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,11 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class WeChatUserInfoDTO {
|
||||
/**
|
||||
* code
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.ycwl.basic.model.pc.member.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -21,6 +20,11 @@ public class MemberRespVO {
|
||||
*/
|
||||
@ApiModelProperty("微信openId")
|
||||
private String openId;
|
||||
/**
|
||||
* 微信头像
|
||||
*/
|
||||
@ApiModelProperty("微信头像")
|
||||
private String avatarUrl;
|
||||
/**
|
||||
* 微信昵称
|
||||
*/
|
||||
|
@ -99,6 +99,7 @@ public class AppMemberServiceImpl implements AppMemberService {
|
||||
if (list.isEmpty()) {
|
||||
MemberEntity memberEntity = new MemberEntity();
|
||||
memberEntity.setId(SnowFlakeUtil.getLongId());
|
||||
memberEntity.setOpenId(openId.toString());
|
||||
BeanCopierUtils.copyProperties(userInfoDTO, memberEntity);
|
||||
memberMapper.add(memberEntity);
|
||||
BeanCopierUtils.copyProperties(memberEntity, memberRespVO);
|
||||
|
Reference in New Issue
Block a user