提交 9e22fd72 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码 [ibz-wf,统一工作流]

上级 da16be9a
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
......@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZWFGROUP", resultMap = "WFGroupResultMap")
@ApiModel("角色/用户组")
public class WFGroup extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -50,6 +53,7 @@ public class WFGroup extends EntityMP implements Serializable {
@TableId(value = "groupid", type = IdType.ASSIGN_UUID)
@JSONField(name = "id")
@JsonProperty("id")
@ApiModelProperty("组标识")
private String id;
/**
* 组名称
......@@ -58,6 +62,7 @@ public class WFGroup extends EntityMP implements Serializable {
@TableField(value = "groupname")
@JSONField(name = "name")
@JsonProperty("name")
@ApiModelProperty("组名称")
private String name;
/**
* 范围
......@@ -65,6 +70,7 @@ public class WFGroup extends EntityMP implements Serializable {
@TableField(value = "groupscope")
@JSONField(name = "groupscope")
@JsonProperty("groupscope")
@ApiModelProperty("范围")
private String groupscope;
......
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
......@@ -34,6 +36,7 @@ import cn.ibizlab.util.annotation.Audit;
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("历史")
public class WFHistory extends EntityBase implements Serializable {
/**
......@@ -42,6 +45,7 @@ public class WFHistory extends EntityBase implements Serializable {
@DEField(name = "histid", isKeyField = true)
@JSONField(name = "id")
@JsonProperty("id")
@ApiModelProperty("标识")
private String id;
/**
......@@ -49,6 +53,7 @@ public class WFHistory extends EntityBase implements Serializable {
*/
@JSONField(name = "author")
@JsonProperty("author")
@ApiModelProperty("操作者标识")
private String author;
/**
......@@ -56,6 +61,7 @@ public class WFHistory extends EntityBase implements Serializable {
*/
@JSONField(name = "authorName")
@JsonProperty("authorName")
@ApiModelProperty("操作者")
private String authorname;
/**
......@@ -64,6 +70,7 @@ public class WFHistory extends EntityBase implements Serializable {
@DEField(name = "message")
@JSONField(name = "fullMessage")
@JsonProperty("fullMessage")
@ApiModelProperty("意见")
private String fullmessage;
/**
......@@ -73,6 +80,7 @@ public class WFHistory extends EntityBase implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
@JSONField(name = "time", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("time")
@ApiModelProperty("时间")
private Timestamp time;
/**
......@@ -81,6 +89,7 @@ public class WFHistory extends EntityBase implements Serializable {
@DEField(name = "actiontype")
@JSONField(name = "type")
@JsonProperty("type")
@ApiModelProperty("意见类型")
private String type;
/**
......@@ -88,6 +97,7 @@ public class WFHistory extends EntityBase implements Serializable {
*/
@JSONField(name = "taskId")
@JsonProperty("taskId")
@ApiModelProperty("任务标识")
private String taskid;
/**
......@@ -96,6 +106,7 @@ public class WFHistory extends EntityBase implements Serializable {
@DEField(name = "instanceid")
@JSONField(name = "processInstanceId")
@JsonProperty("processInstanceId")
@ApiModelProperty("实例标识")
private String processinstanceid;
/**
......@@ -104,6 +115,7 @@ public class WFHistory extends EntityBase implements Serializable {
@DEField(name = "businesskey")
@JSONField(name = "processInstanceBusinessKey")
@JsonProperty("processInstanceBusinessKey")
@ApiModelProperty("业务键值")
private String processinstancebusinesskey;
......
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
......@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZWFMEMBER", resultMap = "WFMemberResultMap")
@ApiModel("成员")
public class WFMember extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -50,6 +53,7 @@ public class WFMember extends EntityMP implements Serializable {
@TableId(value = "memberid", type = IdType.ASSIGN_UUID)
@JSONField(name = "memberid")
@JsonProperty("memberid")
@ApiModelProperty("组成员标识")
private String memberid;
/**
* 组成员名称
......@@ -57,6 +61,7 @@ public class WFMember extends EntityMP implements Serializable {
@TableField(value = "membername")
@JSONField(name = "membername")
@JsonProperty("membername")
@ApiModelProperty("组成员名称")
private String membername;
/**
* 组标识
......@@ -64,6 +69,7 @@ public class WFMember extends EntityMP implements Serializable {
@TableField(value = "groupid")
@JSONField(name = "groupid")
@JsonProperty("groupid")
@ApiModelProperty("组标识")
private String groupid;
/**
* 用户组
......@@ -71,6 +77,7 @@ public class WFMember extends EntityMP implements Serializable {
@TableField(exist = false)
@JSONField(name = "groupname")
@JsonProperty("groupname")
@ApiModelProperty("用户组")
private String groupname;
/**
* 用户标识
......@@ -78,6 +85,7 @@ public class WFMember extends EntityMP implements Serializable {
@TableField(value = "userid")
@JSONField(name = "userid")
@JsonProperty("userid")
@ApiModelProperty("用户标识")
private String userid;
/**
* 用户
......@@ -85,6 +93,7 @@ public class WFMember extends EntityMP implements Serializable {
@TableField(exist = false)
@JSONField(name = "personname")
@JsonProperty("personname")
@ApiModelProperty("用户")
private String personname;
/**
* 单位
......@@ -92,6 +101,7 @@ public class WFMember extends EntityMP implements Serializable {
@TableField(exist = false)
@JSONField(name = "orgid")
@JsonProperty("orgid")
@ApiModelProperty("单位")
private String orgid;
/**
* 单位
......@@ -99,6 +109,7 @@ public class WFMember extends EntityMP implements Serializable {
@TableField(exist = false)
@JSONField(name = "orgname")
@JsonProperty("orgname")
@ApiModelProperty("单位")
private String orgname;
/**
* 主部门
......@@ -106,6 +117,7 @@ public class WFMember extends EntityMP implements Serializable {
@TableField(exist = false)
@JSONField(name = "mdeptid")
@JsonProperty("mdeptid")
@ApiModelProperty("主部门")
private String mdeptid;
/**
* 主部门
......@@ -113,6 +125,7 @@ public class WFMember extends EntityMP implements Serializable {
@TableField(exist = false)
@JSONField(name = "mdeptname")
@JsonProperty("mdeptname")
@ApiModelProperty("主部门")
private String mdeptname;
/**
......
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
......@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZWFDEFINITION", resultMap = "WFProcessDefinitionResultMap")
@ApiModel("流程定义")
public class WFProcessDefinition extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -50,6 +53,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@TableId(value = "definitionkey", type = IdType.ASSIGN_UUID)
@JSONField(name = "definitionkey")
@JsonProperty("definitionkey")
@ApiModelProperty("DefinitionKey")
private String definitionkey;
/**
* 流程定义名称
......@@ -57,6 +61,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@TableField(value = "definitionname")
@JSONField(name = "definitionname")
@JsonProperty("definitionname")
@ApiModelProperty("流程定义名称")
private String definitionname;
/**
* 模型版本
......@@ -64,6 +69,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@TableField(value = "modelversion")
@JSONField(name = "modelversion")
@JsonProperty("modelversion")
@ApiModelProperty("模型版本")
private Integer modelversion;
/**
* 模型是否启用
......@@ -71,6 +77,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@TableField(value = "modelenable")
@JSONField(name = "modelenable")
@JsonProperty("modelenable")
@ApiModelProperty("模型是否启用")
private Integer modelenable;
/**
* 系统标识
......@@ -78,6 +85,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@TableField(value = "pssystemid")
@JSONField(name = "pssystemid")
@JsonProperty("pssystemid")
@ApiModelProperty("系统标识")
private String pssystemid;
/**
* 校验
......@@ -85,6 +93,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@TableField(value = "md5check")
@JSONField(name = "md5check")
@JsonProperty("md5check")
@ApiModelProperty("校验")
private String md5check;
/**
* BPMN
......@@ -92,6 +101,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@TableField(value = "bpmnfile")
@JSONField(name = "bpmnfile")
@JsonProperty("bpmnfile")
@ApiModelProperty("BPMN")
private String bpmnfile;
/**
* DeployKey
......@@ -99,6 +109,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@TableField(value = "deploykey")
@JSONField(name = "deploykey")
@JsonProperty("deploykey")
@ApiModelProperty("DeployKey")
private String deploykey;
/**
* WebServiceIds
......@@ -106,6 +117,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@TableField(value = "webserviceids")
@JSONField(name = "webserviceids")
@JsonProperty("webserviceids")
@ApiModelProperty("WebServiceIds")
private String webserviceids;
/**
* MobileServiceIds
......@@ -113,6 +125,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@TableField(value = "mobileserviceids")
@JSONField(name = "mobileserviceids")
@JsonProperty("mobileserviceids")
@ApiModelProperty("MobileServiceIds")
private String mobileserviceids;
......
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
......@@ -34,6 +36,7 @@ import cn.ibizlab.util.annotation.Audit;
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("流程实例")
public class WFProcessInstance extends EntityBase implements Serializable {
/**
......@@ -42,6 +45,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
@DEField(name = "instanceid", isKeyField = true)
@JSONField(name = "id")
@JsonProperty("id")
@ApiModelProperty("实例标识")
private String id;
/**
......@@ -50,6 +54,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
@DEField(name = "instancename")
@JSONField(name = "name")
@JsonProperty("name")
@ApiModelProperty("实例名称")
private String name;
/**
......@@ -58,6 +63,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
@DEField(name = "definitionkey")
@JSONField(name = "processDefinitionKey")
@JsonProperty("processDefinitionKey")
@ApiModelProperty("DefinitionKey")
private String processdefinitionkey;
/**
......@@ -66,6 +72,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
@DEField(name = "definitionname")
@JSONField(name = "processDefinitionName")
@JsonProperty("processDefinitionName")
@ApiModelProperty("流程定义名称")
private String processdefinitionname;
/**
......@@ -73,6 +80,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
*/
@JSONField(name = "businessKey")
@JsonProperty("businessKey")
@ApiModelProperty("业务键值")
private String businesskey;
/**
......@@ -81,6 +89,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
@JSONField(name = "startTime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("startTime")
@ApiModelProperty("启动时间")
private Timestamp starttime;
/**
......@@ -89,6 +98,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
@JSONField(name = "endTime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("endTime")
@ApiModelProperty("结束时间")
private Timestamp endtime;
/**
......@@ -96,6 +106,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
*/
@JSONField(name = "startUserId")
@JsonProperty("startUserId")
@ApiModelProperty("发起人标识")
private String startuserid;
/**
......@@ -103,6 +114,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
*/
@JSONField(name = "startUserName")
@JsonProperty("startUserName")
@ApiModelProperty("发起人")
private String startusername;
......
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
......@@ -34,6 +36,7 @@ import cn.ibizlab.util.annotation.Audit;
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("流程定义节点")
public class WFProcessNode extends EntityBase implements Serializable {
/**
......@@ -42,6 +45,7 @@ public class WFProcessNode extends EntityBase implements Serializable {
@DEField(name = "nodeid", isKeyField = true)
@JSONField(name = "userTaskId")
@JsonProperty("userTaskId")
@ApiModelProperty("节点标识")
private String usertaskid;
/**
......@@ -50,6 +54,7 @@ public class WFProcessNode extends EntityBase implements Serializable {
@DEField(name = "nodename")
@JSONField(name = "userTaskName")
@JsonProperty("userTaskName")
@ApiModelProperty("节点名称")
private String usertaskname;
/**
......@@ -58,6 +63,7 @@ public class WFProcessNode extends EntityBase implements Serializable {
@DEField(name = "definitionkey")
@JSONField(name = "processDefinitionKey")
@JsonProperty("processDefinitionKey")
@ApiModelProperty("DefinitionKey")
private String processdefinitionkey;
/**
......@@ -66,6 +72,7 @@ public class WFProcessNode extends EntityBase implements Serializable {
@DEField(name = "definitionname")
@JSONField(name = "processDefinitionName")
@JsonProperty("processDefinitionName")
@ApiModelProperty("流程定义名称")
private String processdefinitionname;
/**
......@@ -73,6 +80,7 @@ public class WFProcessNode extends EntityBase implements Serializable {
*/
@JSONField(name = "version")
@JsonProperty("version")
@ApiModelProperty("版本")
private Integer version;
/**
......@@ -80,6 +88,7 @@ public class WFProcessNode extends EntityBase implements Serializable {
*/
@JSONField(name = "cnt")
@JsonProperty("cnt")
@ApiModelProperty("数量")
private Integer cnt;
......
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
......@@ -34,6 +36,7 @@ import cn.ibizlab.util.annotation.Audit;
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("流程模型")
public class WFREModel extends EntityBase implements Serializable {
/**
......@@ -42,6 +45,7 @@ public class WFREModel extends EntityBase implements Serializable {
@DEField(name = "modelid", isKeyField = true)
@JSONField(name = "id")
@JsonProperty("id")
@ApiModelProperty("ID")
private String id;
/**
......@@ -50,6 +54,7 @@ public class WFREModel extends EntityBase implements Serializable {
@DEField(name = "modelname")
@JSONField(name = "name")
@JsonProperty("name")
@ApiModelProperty("名称")
private String name;
/**
......@@ -57,6 +62,7 @@ public class WFREModel extends EntityBase implements Serializable {
*/
@JSONField(name = "bPMNFile")
@JsonProperty("bPMNFile")
@ApiModelProperty("BPMN")
private String bpmnfile;
......
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
......@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZPSSYSTEM", resultMap = "WFSystemResultMap")
@ApiModel("系统")
public class WFSystem extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -50,6 +53,7 @@ public class WFSystem extends EntityMP implements Serializable {
@TableId(value = "pssystemid", type = IdType.ASSIGN_UUID)
@JSONField(name = "pssystemid")
@JsonProperty("pssystemid")
@ApiModelProperty("系统标识")
private String pssystemid;
/**
* 系统名称
......@@ -57,6 +61,7 @@ public class WFSystem extends EntityMP implements Serializable {
@TableField(value = "pssystemname")
@JSONField(name = "pssystemname")
@JsonProperty("pssystemname")
@ApiModelProperty("系统名称")
private String pssystemname;
......
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
......@@ -34,6 +36,7 @@ import cn.ibizlab.util.annotation.Audit;
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("工作流任务")
public class WFTask extends EntityBase implements Serializable {
/**
......@@ -42,6 +45,7 @@ public class WFTask extends EntityBase implements Serializable {
@DEField(name = "taskid", isKeyField = true)
@JSONField(name = "id")
@JsonProperty("id")
@ApiModelProperty("任务标识")
private String id;
/**
......@@ -50,6 +54,7 @@ public class WFTask extends EntityBase implements Serializable {
@DEField(name = "taskname")
@JSONField(name = "name")
@JsonProperty("name")
@ApiModelProperty("状态")
private String name;
/**
......@@ -58,6 +63,7 @@ public class WFTask extends EntityBase implements Serializable {
@DEField(name = "definitionid")
@JSONField(name = "processDefinitionId")
@JsonProperty("processDefinitionId")
@ApiModelProperty("DefinitionId")
private String processdefinitionid;
/**
......@@ -66,6 +72,7 @@ public class WFTask extends EntityBase implements Serializable {
@DEField(name = "definitionkey")
@JSONField(name = "processDefinitionKey")
@JsonProperty("processDefinitionKey")
@ApiModelProperty("DefinitionKey")
private String processdefinitionkey;
/**
......@@ -74,6 +81,7 @@ public class WFTask extends EntityBase implements Serializable {
@DEField(name = "definitionname")
@JSONField(name = "processDefinitionName")
@JsonProperty("processDefinitionName")
@ApiModelProperty("流程")
private String processdefinitionname;
/**
......@@ -81,6 +89,7 @@ public class WFTask extends EntityBase implements Serializable {
*/
@JSONField(name = "taskDefinitionKey")
@JsonProperty("taskDefinitionKey")
@ApiModelProperty("TaskDefinitionKey")
private String taskdefinitionkey;
/**
......@@ -88,6 +97,7 @@ public class WFTask extends EntityBase implements Serializable {
*/
@JSONField(name = "description")
@JsonProperty("description")
@ApiModelProperty("待办事项")
private String description;
/**
......@@ -96,6 +106,7 @@ public class WFTask extends EntityBase implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
@JSONField(name = "createTime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("createTime")
@ApiModelProperty("发起时间")
private Timestamp createtime;
/**
......@@ -104,6 +115,7 @@ public class WFTask extends EntityBase implements Serializable {
@DEField(name = "instanceid")
@JSONField(name = "processInstanceId")
@JsonProperty("processInstanceId")
@ApiModelProperty("实例标识")
private String processinstanceid;
/**
......@@ -112,6 +124,7 @@ public class WFTask extends EntityBase implements Serializable {
@DEField(name = "businesskey")
@JSONField(name = "processInstanceBusinessKey")
@JsonProperty("processInstanceBusinessKey")
@ApiModelProperty("业务键值")
private String processinstancebusinesskey;
......
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
......@@ -34,6 +36,7 @@ import cn.ibizlab.util.annotation.Audit;
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("操作路径")
public class WFTaskWay extends EntityBase implements Serializable {
/**
......@@ -42,6 +45,7 @@ public class WFTaskWay extends EntityBase implements Serializable {
@DEField(name = "wayid", isKeyField = true)
@JSONField(name = "sequenceFlowId")
@JsonProperty("sequenceFlowId")
@ApiModelProperty("路径标识")
private String sequenceflowid;
/**
......@@ -50,6 +54,7 @@ public class WFTaskWay extends EntityBase implements Serializable {
@DEField(name = "wayname")
@JSONField(name = "sequenceFlowName")
@JsonProperty("sequenceFlowName")
@ApiModelProperty("路径标识")
private String sequenceflowname;
/**
......@@ -57,6 +62,7 @@ public class WFTaskWay extends EntityBase implements Serializable {
*/
@JSONField(name = "taskId")
@JsonProperty("taskId")
@ApiModelProperty("任务标识")
private String taskid;
/**
......@@ -64,6 +70,7 @@ public class WFTaskWay extends EntityBase implements Serializable {
*/
@JSONField(name = "taskDefinitionKey")
@JsonProperty("taskDefinitionKey")
@ApiModelProperty("TaskDefinitionKey")
private String taskdefinitionkey;
/**
......@@ -72,6 +79,7 @@ public class WFTaskWay extends EntityBase implements Serializable {
@DEField(name = "instanceid")
@JSONField(name = "processInstanceId")
@JsonProperty("processInstanceId")
@ApiModelProperty("实例标识")
private String processinstanceid;
/**
......@@ -80,6 +88,7 @@ public class WFTaskWay extends EntityBase implements Serializable {
@DEField(name = "definitionkey")
@JSONField(name = "processDefinitionKey")
@JsonProperty("processDefinitionKey")
@ApiModelProperty("DefinitionKey")
private String processdefinitionkey;
/**
......@@ -88,6 +97,7 @@ public class WFTaskWay extends EntityBase implements Serializable {
@DEField(name = "businesskey")
@JSONField(name = "processInstanceBusinessKey")
@JsonProperty("processInstanceBusinessKey")
@ApiModelProperty("业务键值")
private String processinstancebusinesskey;
/**
......@@ -95,6 +105,7 @@ public class WFTaskWay extends EntityBase implements Serializable {
*/
@JSONField(name = "refViewKey")
@JsonProperty("refViewKey")
@ApiModelProperty("引用视图")
private String refviewkey;
......
......@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
......@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZUSER", resultMap = "WFUserResultMap")
@ApiModel("用户")
public class WFUser extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -50,6 +53,7 @@ public class WFUser extends EntityMP implements Serializable {
@TableId(value = "userid", type = IdType.ASSIGN_UUID)
@JSONField(name = "id")
@JsonProperty("id")
@ApiModelProperty("用户标识")
private String id;
/**
* 用户全局名
......@@ -58,6 +62,7 @@ public class WFUser extends EntityMP implements Serializable {
@TableField(value = "username")
@JSONField(name = "firstname")
@JsonProperty("firstname")
@ApiModelProperty("用户全局名")
private String firstname;
/**
* 用户名称
......@@ -66,6 +71,7 @@ public class WFUser extends EntityMP implements Serializable {
@TableField(value = "personname")
@JSONField(name = "displayname")
@JsonProperty("displayname")
@ApiModelProperty("用户名称")
private String displayname;
/**
* 主部门
......@@ -73,6 +79,7 @@ public class WFUser extends EntityMP implements Serializable {
@TableField(value = "mdeptid")
@JSONField(name = "mdeptid")
@JsonProperty("mdeptid")
@ApiModelProperty("主部门")
private String mdeptid;
/**
* 主部门代码
......@@ -80,6 +87,7 @@ public class WFUser extends EntityMP implements Serializable {
@TableField(value = "mdeptcode")
@JSONField(name = "mdeptcode")
@JsonProperty("mdeptcode")
@ApiModelProperty("主部门代码")
private String mdeptcode;
/**
* 主部门名称
......@@ -87,6 +95,7 @@ public class WFUser extends EntityMP implements Serializable {
@TableField(value = "mdeptname")
@JSONField(name = "mdeptname")
@JsonProperty("mdeptname")
@ApiModelProperty("主部门名称")
private String mdeptname;
/**
* 业务编码
......@@ -94,6 +103,7 @@ public class WFUser extends EntityMP implements Serializable {
@TableField(value = "bcode")
@JSONField(name = "bcode")
@JsonProperty("bcode")
@ApiModelProperty("业务编码")
private String bcode;
/**
* 单位
......@@ -102,6 +112,7 @@ public class WFUser extends EntityMP implements Serializable {
@TableField(value = "orgid")
@JSONField(name = "orgid")
@JsonProperty("orgid")
@ApiModelProperty("单位")
private String orgid;
/**
* 单位代码
......@@ -109,6 +120,7 @@ public class WFUser extends EntityMP implements Serializable {
@TableField(value = "orgcode")
@JSONField(name = "orgcode")
@JsonProperty("orgcode")
@ApiModelProperty("单位代码")
private String orgcode;
/**
* 单位名称
......@@ -117,6 +129,7 @@ public class WFUser extends EntityMP implements Serializable {
@TableField(value = "orgname")
@JSONField(name = "orgname")
@JsonProperty("orgname")
@ApiModelProperty("单位名称")
private String orgname;
......
......@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 服务DTO对象[WFGroupDTO]
*/
@Data
@ApiModel("角色/用户组")
public class WFGroupDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -36,6 +39,7 @@ public class WFGroupDTO extends DTOBase implements Serializable {
@JSONField(name = "id")
@JsonProperty("id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("组标识")
private String id;
/**
......@@ -45,6 +49,7 @@ public class WFGroupDTO extends DTOBase implements Serializable {
@JSONField(name = "name")
@JsonProperty("name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("组名称")
private String name;
/**
......@@ -54,6 +59,7 @@ public class WFGroupDTO extends DTOBase implements Serializable {
@JSONField(name = "groupscope")
@JsonProperty("groupscope")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("范围")
private String groupscope;
......
......@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 服务DTO对象[WFMemberDTO]
*/
@Data
@ApiModel("成员")
public class WFMemberDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -36,6 +39,7 @@ public class WFMemberDTO extends DTOBase implements Serializable {
@JSONField(name = "memberid")
@JsonProperty("memberid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("组成员标识")
private String memberid;
/**
......@@ -45,6 +49,7 @@ public class WFMemberDTO extends DTOBase implements Serializable {
@JSONField(name = "membername")
@JsonProperty("membername")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("组成员名称")
private String membername;
/**
......@@ -54,6 +59,7 @@ public class WFMemberDTO extends DTOBase implements Serializable {
@JSONField(name = "groupid")
@JsonProperty("groupid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("组标识")
private String groupid;
/**
......@@ -63,6 +69,7 @@ public class WFMemberDTO extends DTOBase implements Serializable {
@JSONField(name = "groupname")
@JsonProperty("groupname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("用户组")
private String groupname;
/**
......@@ -72,6 +79,7 @@ public class WFMemberDTO extends DTOBase implements Serializable {
@JSONField(name = "userid")
@JsonProperty("userid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("用户标识")
private String userid;
/**
......@@ -81,6 +89,7 @@ public class WFMemberDTO extends DTOBase implements Serializable {
@JSONField(name = "personname")
@JsonProperty("personname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("用户")
private String personname;
/**
......@@ -90,6 +99,7 @@ public class WFMemberDTO extends DTOBase implements Serializable {
@JSONField(name = "orgid")
@JsonProperty("orgid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("单位")
private String orgid;
/**
......@@ -99,6 +109,7 @@ public class WFMemberDTO extends DTOBase implements Serializable {
@JSONField(name = "orgname")
@JsonProperty("orgname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("单位")
private String orgname;
/**
......@@ -108,6 +119,7 @@ public class WFMemberDTO extends DTOBase implements Serializable {
@JSONField(name = "mdeptid")
@JsonProperty("mdeptid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("主部门")
private String mdeptid;
/**
......@@ -117,6 +129,7 @@ public class WFMemberDTO extends DTOBase implements Serializable {
@JSONField(name = "mdeptname")
@JsonProperty("mdeptname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("主部门")
private String mdeptname;
......
......@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 服务DTO对象[WFProcessDefinitionDTO]
*/
@Data
@ApiModel("流程定义")
public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -36,6 +39,7 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
@JSONField(name = "definitionkey")
@JsonProperty("definitionkey")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("DefinitionKey")
private String definitionkey;
/**
......@@ -45,6 +49,7 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
@JSONField(name = "definitionname")
@JsonProperty("definitionname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("流程定义名称")
private String definitionname;
/**
......@@ -53,6 +58,7 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "modelversion")
@JsonProperty("modelversion")
@ApiModelProperty("模型版本")
private Integer modelversion;
/**
......@@ -61,6 +67,7 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "modelenable")
@JsonProperty("modelenable")
@ApiModelProperty("模型是否启用")
private Integer modelenable;
/**
......@@ -70,6 +77,7 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
@JSONField(name = "pssystemid")
@JsonProperty("pssystemid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("系统标识")
private String pssystemid;
/**
......@@ -79,6 +87,7 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
@JSONField(name = "md5check")
@JsonProperty("md5check")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("校验")
private String md5check;
/**
......@@ -88,6 +97,7 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
@JSONField(name = "bpmnfile")
@JsonProperty("bpmnfile")
@Size(min = 0, max = 1000, message = "内容长度必须小于等于[1000]")
@ApiModelProperty("BPMN")
private String bpmnfile;
/**
......@@ -97,6 +107,7 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
@JSONField(name = "deploykey")
@JsonProperty("deploykey")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("DeployKey")
private String deploykey;
/**
......@@ -106,6 +117,7 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
@JSONField(name = "webserviceids")
@JsonProperty("webserviceids")
@Size(min = 0, max = 200, message = "内容长度必须小于等于[200]")
@ApiModelProperty("WebServiceIds")
private String webserviceids;
/**
......@@ -115,6 +127,7 @@ public class WFProcessDefinitionDTO extends DTOBase implements Serializable {
@JSONField(name = "mobileserviceids")
@JsonProperty("mobileserviceids")
@Size(min = 0, max = 200, message = "内容长度必须小于等于[200]")
@ApiModelProperty("MobileServiceIds")
private String mobileserviceids;
......
......@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 服务DTO对象[WFREModelDTO]
*/
@Data
@ApiModel("流程模型")
public class WFREModelDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -36,6 +39,7 @@ public class WFREModelDTO extends DTOBase implements Serializable {
@JSONField(name = "id")
@JsonProperty("id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("ID")
private String id;
/**
......@@ -45,6 +49,7 @@ public class WFREModelDTO extends DTOBase implements Serializable {
@JSONField(name = "name")
@JsonProperty("name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("名称")
private String name;
/**
......@@ -54,6 +59,7 @@ public class WFREModelDTO extends DTOBase implements Serializable {
@JSONField(name = "bpmnfile")
@JsonProperty("bpmnfile")
@Size(min = 0, max = 1000, message = "内容长度必须小于等于[1000]")
@ApiModelProperty("BPMN")
private String bpmnfile;
......
......@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 服务DTO对象[WFSystemDTO]
*/
@Data
@ApiModel("系统")
public class WFSystemDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -36,6 +39,7 @@ public class WFSystemDTO extends DTOBase implements Serializable {
@JSONField(name = "pssystemid")
@JsonProperty("pssystemid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("系统标识")
private String pssystemid;
/**
......@@ -45,6 +49,7 @@ public class WFSystemDTO extends DTOBase implements Serializable {
@JSONField(name = "pssystemname")
@JsonProperty("pssystemname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("系统名称")
private String pssystemname;
......
......@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 服务DTO对象[WFTaskDTO]
*/
@Data
@ApiModel("工作流任务")
public class WFTaskDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -36,6 +39,7 @@ public class WFTaskDTO extends DTOBase implements Serializable {
@JSONField(name = "id")
@JsonProperty("id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("任务标识")
private String id;
/**
......@@ -45,6 +49,7 @@ public class WFTaskDTO extends DTOBase implements Serializable {
@JSONField(name = "name")
@JsonProperty("name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("状态")
private String name;
/**
......@@ -54,6 +59,7 @@ public class WFTaskDTO extends DTOBase implements Serializable {
@JSONField(name = "processdefinitionid")
@JsonProperty("processdefinitionid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("DefinitionId")
private String processdefinitionid;
/**
......@@ -63,6 +69,7 @@ public class WFTaskDTO extends DTOBase implements Serializable {
@JSONField(name = "processdefinitionkey")
@JsonProperty("processdefinitionkey")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("DefinitionKey")
private String processdefinitionkey;
/**
......@@ -72,6 +79,7 @@ public class WFTaskDTO extends DTOBase implements Serializable {
@JSONField(name = "processdefinitionname")
@JsonProperty("processdefinitionname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("流程")
private String processdefinitionname;
/**
......@@ -81,6 +89,7 @@ public class WFTaskDTO extends DTOBase implements Serializable {
@JSONField(name = "taskdefinitionkey")
@JsonProperty("taskdefinitionkey")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("TaskDefinitionKey")
private String taskdefinitionkey;
/**
......@@ -90,6 +99,7 @@ public class WFTaskDTO extends DTOBase implements Serializable {
@JSONField(name = "description")
@JsonProperty("description")
@Size(min = 0, max = 1000, message = "内容长度必须小于等于[1000]")
@ApiModelProperty("待办事项")
private String description;
/**
......@@ -99,6 +109,7 @@ public class WFTaskDTO extends DTOBase implements Serializable {
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createtime" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createtime")
@ApiModelProperty("发起时间")
private Timestamp createtime;
/**
......@@ -108,6 +119,7 @@ public class WFTaskDTO extends DTOBase implements Serializable {
@JSONField(name = "processinstanceid")
@JsonProperty("processinstanceid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("实例标识")
private String processinstanceid;
/**
......@@ -117,6 +129,7 @@ public class WFTaskDTO extends DTOBase implements Serializable {
@JSONField(name = "processinstancebusinesskey")
@JsonProperty("processinstancebusinesskey")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("业务键值")
private String processinstancebusinesskey;
......
......@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 服务DTO对象[WFUserDTO]
*/
@Data
@ApiModel("用户")
public class WFUserDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -36,6 +39,7 @@ public class WFUserDTO extends DTOBase implements Serializable {
@JSONField(name = "id")
@JsonProperty("id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("用户标识")
private String id;
/**
......@@ -45,6 +49,7 @@ public class WFUserDTO extends DTOBase implements Serializable {
@JSONField(name = "firstname")
@JsonProperty("firstname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("用户全局名")
private String firstname;
/**
......@@ -54,6 +59,7 @@ public class WFUserDTO extends DTOBase implements Serializable {
@JSONField(name = "displayname")
@JsonProperty("displayname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("用户名称")
private String displayname;
/**
......@@ -63,6 +69,7 @@ public class WFUserDTO extends DTOBase implements Serializable {
@JSONField(name = "mdeptid")
@JsonProperty("mdeptid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("主部门")
private String mdeptid;
/**
......@@ -72,6 +79,7 @@ public class WFUserDTO extends DTOBase implements Serializable {
@JSONField(name = "mdeptcode")
@JsonProperty("mdeptcode")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("主部门代码")
private String mdeptcode;
/**
......@@ -81,6 +89,7 @@ public class WFUserDTO extends DTOBase implements Serializable {
@JSONField(name = "mdeptname")
@JsonProperty("mdeptname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("主部门名称")
private String mdeptname;
/**
......@@ -90,6 +99,7 @@ public class WFUserDTO extends DTOBase implements Serializable {
@JSONField(name = "bcode")
@JsonProperty("bcode")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("业务编码")
private String bcode;
/**
......@@ -99,6 +109,7 @@ public class WFUserDTO extends DTOBase implements Serializable {
@JSONField(name = "orgid")
@JsonProperty("orgid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("单位")
private String orgid;
/**
......@@ -108,6 +119,7 @@ public class WFUserDTO extends DTOBase implements Serializable {
@JSONField(name = "orgcode")
@JsonProperty("orgcode")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("单位代码")
private String orgcode;
/**
......@@ -117,6 +129,7 @@ public class WFUserDTO extends DTOBase implements Serializable {
@JSONField(name = "orgname")
@JsonProperty("orgname")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("单位名称")
private String orgname;
......
......@@ -27,6 +27,16 @@ import java.util.Map;
@Component
public class DEFieldDefaultValueAspect
{
/**
* 操作用户标识
*/
final static String TAG_PERSONID = "SRF_PERSONID";
/**
* 操作用户名称
*/
final static String TAG_PERSONNAME = "SRF_PERSONNAME";
/**
* 新建数据切入点
* @param point
......@@ -221,16 +231,16 @@ public class DEFieldDefaultValueAspect
switch(preFieldType) {
case CREATEMAN:
et.set(fieldname, curUser.getUserid());
et.set(fieldname, StringUtils.isEmpty(curUser.getUserid()) ? et.get(TAG_PERSONID) : curUser.getUserid());
break;
case CREATEMANNAME:
et.set(fieldname, curUser.getPersonname());
et.set(fieldname, StringUtils.isEmpty(curUser.getPersonname()) ? et.get(TAG_PERSONNAME) : curUser.getPersonname());
break;
case UPDATEMAN:
et.set(fieldname, curUser.getUserid());
et.set(fieldname, StringUtils.isEmpty(curUser.getUserid()) ? et.get(TAG_PERSONID) : curUser.getUserid());
break;
case UPDATEMANNAME:
et.set(fieldname, curUser.getPersonname());
et.set(fieldname, StringUtils.isEmpty(curUser.getPersonname()) ? et.get(TAG_PERSONNAME) : curUser.getPersonname());
break;
case CREATEDATE:
et.set(fieldname, new Timestamp(new Date().getTime()));
......
......@@ -7,6 +7,7 @@ import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.util.ObjectUtils;
import java.sql.Timestamp;
......@@ -231,6 +232,15 @@ public class AuthenticationUser implements UserDetails
return authuserdetail;
}
public static AuthenticationUser setAuthenticationUser(String userId , String userName) {
AuthenticationUser user = new AuthenticationUser();
user.setUserid(userId);
user.setPersonname(userName);
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(user, null, user.getAuthorities());
SecurityContextHolder.getContext().setAuthentication(authentication);
return user;
}
public Map <String,Object> getSessionParams()
{
if(this.sessionParams==null)
......
......@@ -4,11 +4,17 @@ import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.util.ObjectUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
import java.util.LinkedHashMap;
/**
* feign请求拦截器
......@@ -19,23 +25,23 @@ public class FeignRequestInterceptor implements RequestInterceptor {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Override
public void apply(RequestTemplate requestTemplate) {
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if(requestAttributes!=null){
if (requestAttributes != null) {
HttpServletRequest request = requestAttributes.getRequest();
Enumeration<String> headerNames = request.getHeaderNames();
if (headerNames != null) {
while (headerNames.hasMoreElements()) {
String name = headerNames.nextElement();
if(name.equalsIgnoreCase("transfer-encoding")){
if (name.equalsIgnoreCase("transfer-encoding")) {
continue;
}
String values = request.getHeader(name);
requestTemplate.header(name, values);
}
logger.info("feign interceptor header:{}",requestTemplate);
logger.info("feign interceptor header:{}", requestTemplate);
}
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册