feat:会员管理

This commit is contained in:
hxrui 2021-01-11 18:11:14 +08:00
parent 8afa848a81
commit e74a4677ae
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,36 @@
package com.youlai.mall.ums.pojo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.youlai.common.core.base.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDate;
@Data
@Accessors(chain = true)
public class UmsMemberAddress extends BaseEntity {
@TableId(type = IdType.AUTO)
private Long id;
private Long memberId;
private String receiverName;
private String receiverMobile;
private String province;
private String city;
private String area;
private String addressDetail;
private String zipCode;
private Integer defaulted;
}

View File

@ -1,5 +1,6 @@
package com.youlai.auth.domain;
import cn.hutool.core.collection.CollectionUtil;
import com.youlai.admin.pojo.dto.UserDTO;
import com.youlai.common.core.constant.AuthConstants;
import com.youlai.mall.ums.pojo.dto.AuthMemberDTO;
@ -38,7 +39,7 @@ public class User implements UserDetails {
this.setPassword(AuthConstants.BCRYPT + user.getPassword());
this.setEnabled(Integer.valueOf(1).equals(user.getStatus()));
this.setClientId(user.getClientId());
if (user.getRoles() != null) {
if (CollectionUtil.isNotEmpty(user.getRoles())) {
authorities = new ArrayList<>();
user.getRoles().forEach(roleId -> authorities.add(new SimpleGrantedAuthority(String.valueOf(roleId))));
}