Serialized Form
-
Package cn.herodotus.engine.supplier.upms.logic.domain.event
-
Class cn.herodotus.engine.supplier.upms.logic.domain.event.SysAttributeChangeEvent
class SysAttributeChangeEvent extends AbstractApplicationEvent<SysAttribute> implements Serializable
-
-
Package cn.herodotus.engine.supplier.upms.logic.domain.generator
-
Class cn.herodotus.engine.supplier.upms.logic.domain.generator.SysAttributeIdGeneratorType
class SysAttributeIdGeneratorType extends cn.herodotus.engine.data.core.identifier.AbstractIdGeneratorType implements Serializable -
Class cn.herodotus.engine.supplier.upms.logic.domain.generator.SysInterfaceIdGeneratorTypeType
class SysInterfaceIdGeneratorTypeType extends cn.herodotus.engine.data.core.identifier.AbstractIdGeneratorType implements Serializable
-
-
Package cn.herodotus.engine.supplier.upms.logic.entity.hr
-
Class cn.herodotus.engine.supplier.upms.logic.entity.hr.SysDepartment
class SysDepartment extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable-
Serialized Fields
-
a4BizDeptId
String a4BizDeptId
-
bizDeptCode
String bizDeptCode
-
bizDeptDesc
String bizDeptDesc
-
bizDeptId
String bizDeptId
-
bizDeptName
String bizDeptName
-
bizDeptType
String bizDeptType
-
departmentId
String departmentId
-
departmentName
String departmentName
-
organizationId
String organizationId
-
parentId
String parentId
-
partitionCode
String partitionCode
-
shortName
String shortName
-
-
-
Class cn.herodotus.engine.supplier.upms.logic.entity.hr.SysEmployee
class SysEmployee extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable-
Serialized Fields
-
a4BizEmpId
String a4BizEmpId
-
avatar
String avatar
-
birthday
Date birthday
-
departments
Set<SysDepartment> departments
为了尽量保证与工作流用户体系一致,这里采用Employee与Department多对多模式。为了提升访问效率,使用@Fetch(FetchMode.SUBSELECT),这会让数据一并查出来。 从业务角度分析,一方面没有采用双向查询,避免使用部门的时候查出大量人员数据;另一方面,以人员为主,维护关联数据。
-
email
String email
-
employeeId
String employeeId
-
employeeName
String employeeName
-
employeeNo
String employeeNo
-
gender
Gender gender
-
identity
Identity identity
-
mobilePhoneNumber
String mobilePhoneNumber
-
officePhoneNumber
String officePhoneNumber
-
pkiEmail
String pkiEmail
-
user
SysUser user
-
-
-
Class cn.herodotus.engine.supplier.upms.logic.entity.hr.SysOrganization
class SysOrganization extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable-
Serialized Fields
-
a4BizOrgId
String a4BizOrgId
-
bizOrgCode
String bizOrgCode
-
bizOrgDesc
String bizOrgDesc
-
bizOrgId
String bizOrgId
-
bizOrgName
String bizOrgName
-
bizOrgType
String bizOrgType
-
category
OrganizationCategory category
-
organizationId
String organizationId
-
organizationName
String organizationName
-
parentId
String parentId
-
partitionCode
String partitionCode
-
shortName
String shortName
-
-
-
Class cn.herodotus.engine.supplier.upms.logic.entity.hr.SysOwnership
class SysOwnership extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable
-
-
Package cn.herodotus.engine.supplier.upms.logic.entity.security
-
Class cn.herodotus.engine.supplier.upms.logic.entity.security.SysAttribute
class SysAttribute extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable -
Class cn.herodotus.engine.supplier.upms.logic.entity.security.SysDefaultRole
class SysDefaultRole extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable -
Class cn.herodotus.engine.supplier.upms.logic.entity.security.SysElement
class SysElement extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable-
Serialized Fields
-
component
String component
-
detailContent
Boolean detailContent
-
elementId
String elementId
-
haveChild
Boolean haveChild
-
hideAllChild
Boolean hideAllChild
-
icon
String icon
-
ignoreAuth
Boolean ignoreAuth
-
name
String name
-
notKeepAlive
Boolean notKeepAlive
-
parentId
String parentId
-
path
String path
-
redirect
String redirect
-
roles
Set<SysRole> roles
-
title
String title
-
type
String type
-
-
-
Class cn.herodotus.engine.supplier.upms.logic.entity.security.SysInterface
class SysInterface extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable -
Class cn.herodotus.engine.supplier.upms.logic.entity.security.SysPermission
class SysPermission extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable -
Class cn.herodotus.engine.supplier.upms.logic.entity.security.SysRole
class SysRole extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable-
Serialized Fields
-
permissions
Set<SysPermission> permissions
用户 - 角色关系定义: (1) 加上fetch=FetchType.LAZY 或 @Fetch(FetchMode.SELECT), 输出结果与上面相同,说明默认设置是fetch=FetchType.LAZY 和 @Fetch(FetchMode.SELECT) 下面四种配置等效,都是N+1条sql的懒加载 (2) 加上fetch=FetchType.Eager 和 @Fetch(FetchMode.SELECT), 同样是N+1条sql,不过和上面情况不同的是,N条sql会在criteria.list()时执行 (3) 加上@Fetch(FetchMode.JOIN), 那么Hibernate将强行设置为fetch=FetchType.EAGER, 用户设置fetch=FetchType.LAZY将不会生效 从输出可看出,在执行criteria.list()时通过一条sql 获取了所有的City和Hotel。 使用@Fetch(FetchMode.JOIN)需要注意的是:它在Join查询时是Full Join, 所以会有重复City出现 (4) 加上@Fetch(FetchMode.SUBSELECT), 那么Hibernate将强行设置为fetch=FetchType.EAGER, 用户设置fetch=FetchType.LAZY将不会生效 从输出可看出,在执行criteria.list()时通过两条sql分别获取City和Hotel{@link :https://www.jianshu.com/p/23bd82a7b96e}
-
roleCode
String roleCode
-
roleId
String roleId
-
roleName
String roleName
-
-
-
Class cn.herodotus.engine.supplier.upms.logic.entity.security.SysSocialUser
class SysSocialUser extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable-
Serialized Fields
-
accessCode
String accessCode
-
accessToken
String accessToken
-
appId
String appId
-
avatar
String avatar
-
blog
String blog
-
company
String company
-
email
String email
-
expireIn
Integer expireIn
-
gender
me.zhyd.oauth.enums.AuthUserGender gender
性别 -
location
String location
-
nickname
String nickname
-
openId
String openId
-
phoneNumber
String phoneNumber
-
refreshToken
String refreshToken
-
refreshTokenExpireIn
Integer refreshTokenExpireIn
-
remark
String remark
-
scope
String scope
-
socialId
String socialId
-
source
String source
-
tokenType
String tokenType
-
uid
String uid
-
unionId
String unionId
-
username
String username
-
users
Set<SysUser> users
-
uuid
String uuid
JustAuth中的关键词 以下内容了解后,将会使你更容易地上手JustAuth。source JustAuth支持的第三方平台,比如:GITHUB、GITEE等 uuid 一般为第三方平台的用户ID。以下几个平台需特别注意: 钉钉、抖音:uuid 为用户的 unionid 微信公众平台登录、京东、酷家乐、美团:uuid 为用户的 openId 微信开放平台登录、QQ:uuid 为用户的 openId,平台支持获取unionid, unionid 在 AuthToken 中(如果支持),在登录完成后,可以通过 response.getData().getToken().getUnionId() 获取 Google:uuid 为用户的 sub,sub为Google的所有账户体系中用户唯一的身份标识符,详见:OpenID Connect (opens new window) 注:建议通过uuid + source的方式唯一确定一个用户,这样可以解决用户身份归属的问题。因为 单个用户ID 在某一平台中是唯一的,但不能保证在所有平台中都是唯一的。
-
-
-
Class cn.herodotus.engine.supplier.upms.logic.entity.security.SysUser
class SysUser extends cn.herodotus.engine.data.core.entity.BaseSysEntity implements Serializable-
Serialized Fields
-
accountExpireAt
LocalDateTime accountExpireAt
-
avatar
String avatar
-
credentialsExpireAt
LocalDateTime credentialsExpireAt
-
email
String email
-
employee
SysEmployee employee
SysUser 和 SysEmploye 为双向一对一关系,SysUser 为维护端。存在一个问题,SysUser新增操作没有问题,修改操作就会抛出 InvalidDataAccessApiUsageException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : cn.herodotus.cloud.upms.logic.entity.system.SysUser.employee -> cn.herodotus.cloud.upms.logic.entity.hr.SysEmployee; nested exception is java.lang.IllegalStateException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing
最初以为是 JPA @OneToOne 相关配置不对或者是 JPA save()方法的问题,以及 Hibernate 对象在Session是否是游离状态等几方面问题,尝试解决的好久都没有解决。
后面发现,@RequestBody 会将参数绑定为实体。 在新增操作时,只传递了几个参数,没有employee属性,所以SysUser的employee属性的反序列化之后值是null。 在修改操作时,employee的是 '{}', Jackson在反序列化的过程中就将其转换为完整的对象结构,但是相关的值是空。
这就导致,JPA 在存储数据时,employee 是游离状态的对象,所以一直抛错。
这也就解释了下面问题: 当前 @OneToOne 配置,与上面 @ManyToMany 配置基本一致,而且都是使用 @JoinTable 的方式。 那么同样的更新操作@OneToOne会出错,@ManyToMany就不会出错?
因为 @ManyToMany 使用的是集合,空对象不会被转成对象Set进去。
-
nickname
String nickname
-
password
String password
-
phoneNumber
String phoneNumber
-
roles
Set<SysRole> roles
-
userId
String userId
-
username
String username
-
-
-