diff --git a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsMemberAddress.java b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsMemberAddress.java new file mode 100644 index 000000000..d086f8ca7 --- /dev/null +++ b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsMemberAddress.java @@ -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; +} diff --git a/youlai-auth/src/main/java/com/youlai/auth/domain/User.java b/youlai-auth/src/main/java/com/youlai/auth/domain/User.java index 1ba837b7f..78a9fd64e 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/domain/User.java +++ b/youlai-auth/src/main/java/com/youlai/auth/domain/User.java @@ -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)))); }