mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2025-01-03 17:42:20 +08:00
feat:菜单重构
This commit is contained in:
parent
3e3cb43ab2
commit
eaae0b1aa7
@ -22,20 +22,22 @@ public class SysMenu extends BaseEntity {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
private Long parentId;
|
||||
|
||||
private String name;
|
||||
|
||||
private Long parentId;
|
||||
private String icon;
|
||||
|
||||
private String path;
|
||||
|
||||
private String redirect;
|
||||
|
||||
private String icon;
|
||||
private String component;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private String redirect;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Integer> roles;
|
||||
|
||||
|
@ -10,24 +10,24 @@ import java.util.List;
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
public class MenuVO extends BaseEntity {
|
||||
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
private Long parentId;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer parentId;
|
||||
|
||||
private Integer type;
|
||||
private String icon;
|
||||
|
||||
private String path;
|
||||
|
||||
private String icon;
|
||||
private String component;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private Integer visible;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private String redirect;
|
||||
|
||||
@JsonInclude(value = JsonInclude.Include.NON_NULL)
|
||||
private List<MenuVO> children;
|
||||
|
||||
|
@ -78,8 +78,6 @@ public class AuthController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private WxMaService wxService;
|
||||
private MemberFeignService memberFeignService;
|
||||
private PasswordEncoder passwordEncoder;
|
||||
@ -103,7 +101,6 @@ public class AuthController {
|
||||
|
||||
Result<AuthMemberDTO> result = memberFeignService.getUserByOpenid(openid);
|
||||
|
||||
String username;
|
||||
if (ResultCode.USER_NOT_EXIST.getCode().equals(result.getCode())) { // 微信授权登录 会员信息不存在时 注册会员
|
||||
String encryptedData = parameters.get("encryptedData");
|
||||
String iv = parameters.get("iv");
|
||||
@ -125,15 +122,11 @@ public class AuthController {
|
||||
if (!ResultCode.SUCCESS.getCode().equals(res.getCode())) {
|
||||
throw new BizException("注册会员失败");
|
||||
}
|
||||
username = openid;
|
||||
} else {
|
||||
AuthMemberDTO authMemberDTO = result.getData();
|
||||
username = authMemberDTO.getUsername();
|
||||
}
|
||||
|
||||
// oauth2认证参数对应授权登录时注册会员的username、password信息,模拟通过oauth2的密码模式认证
|
||||
parameters.put("username", username);
|
||||
parameters.put("password", username);
|
||||
parameters.put("username", openid);
|
||||
parameters.put("password", openid);
|
||||
|
||||
OAuth2AccessToken oAuth2AccessToken = tokenEndpoint.postAccessToken(principal, parameters).getBody();
|
||||
Oauth2Token oauth2Token = Oauth2Token.builder()
|
||||
|
Loading…
Reference in New Issue
Block a user