提交 f1a05331 authored 作者: 黄夏豪's avatar 黄夏豪

[基础模块] 增加了BaseEntity 里面 放置了所有Entity的公共字段

上级 661b7c24
package com.tykj.workflowcore.base.aop;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import java.util.Arrays;
/**
* ClassName: EntityAop
* Package: com.tykj.workflowcore.base.aop
* Description:
* Datetime: 2021/3/11 19:40
*
* @Author: zsp
*/
@Aspect
public class EntityAop {
@Before("execution(* save*(..))")
public void permissionCheck(JoinPoint point) {
System.out.println("@Before:模拟权限检查...");
System.out.println("@Before:目标方法为:" +
point.getSignature().getDeclaringTypeName() +
"." + point.getSignature().getName());
System.out.println("@Before:参数为:" + Arrays.toString(point.getArgs()));
System.out.println("@Before:被织入的目标对象为:" + point.getTarget());
}
}
......@@ -5,15 +5,13 @@ import com.tykj.workflowcore.base.entity.BaseEntity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.UpdateTimestamp;
import org.hibernate.annotations.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import javax.persistence.Entity;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
......
......@@ -33,10 +33,6 @@ import java.util.Date;
@Where(clause = "deleted = 0")
@Api("流程表")
public class FlowsInfo extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty("流程id")
private Long id;
@ApiModelProperty("发起人的Id")
private Long userId;
......
......@@ -34,10 +34,7 @@ import java.util.Date;
@Api("表单页面")
public class FormPage extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty("主键id")
private Long id;
@ApiModelProperty("页面名称")
private String pageName;
......
package com.tykj.workflowcore.workflow_editer.entity;
import com.tykj.workflowcore.base.entity.BaseEntity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
......@@ -26,12 +27,8 @@ import javax.persistence.Id;
@Entity
@WorkFlowCoreNoScan
@Api("节点信息")
public class NodeInfo {
public class NodeInfo extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty("主键id")
private Long id;
@ApiModelProperty("节点id")
private String nodeId;
......
//package com.tykj.workflowcore.workflow_editer.entity;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.AllArgsConstructor;
//import lombok.Data;
//import lombok.NoArgsConstructor;
//
//import javax.persistence.Entity;
//import javax.persistence.GeneratedValue;
//import javax.persistence.GenerationType;
//import javax.persistence.Id;
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * ClassName: PageEntity
// * Package: com.tykj.entity
// * Description:
// * Datetime: 2021/3/3 10:51
// *
// * @Author: zsp
// */
//@Data
//@AllArgsConstructor
//@NoArgsConstructor
//@Entity
//@Api("页面实体关系")
//public class PageEntity {
//
// @Id
// @GeneratedValue(strategy = GenerationType.IDENTITY)
// @ApiModelProperty("主键id")
// private Long id;
//
// @ApiModelProperty("页面Id")
// private Long pageId;
//
// @ApiModelProperty("实体类Id")
// private String entityId;
//}
package com.tykj.workflowcore.workflow_editer.entity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;
/**
* ClassName: SiteMessage
* Package: com.tykj.entity
* Description:
* Datetime: 2021/2/23 10:29
*
* @Author: zsp
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@WorkFlowCoreNoScan
@Api("消息发送")
public class SiteMessage {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty("消息id")
private Long id;
@ApiModelProperty("用户id")
private Integer userId;
@ApiModelProperty(value = "消息类型",notes = "1 待办任务")
private Integer type;
@ApiModelProperty("消息内容")
private String content;
@ApiModelProperty(value = "是否已读",notes = "0 已读 1 未读")
private Integer isRead;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("更新时间")
private Date updateTime;
}
package com.tykj.workflowcore.workflow_editer.entity;
import com.tykj.workflowcore.base.entity.BaseEntity;
import com.tykj.workflowcore.model_layer.annotatiion.WorkFlowCoreNoScan;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -24,12 +25,9 @@ import javax.persistence.Id;
@NoArgsConstructor
@Entity
@WorkFlowCoreNoScan
public class VariableStorage {
public class VariableStorage extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty("主键id")
private Long id;
@ApiModelProperty("流程主键")
private String flowKey;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论