Parcourir la source

feat: add serialization

Blizzard il y a 1 an
Parent
commit
a285dcc627
26 fichiers modifiés avec 82 ajouts et 6 suppressions
  1. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/DeptToDept.java
  2. 1 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/FileAndFolderHistory.java
  3. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/FileRead.java
  4. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/IndexMessage.java
  5. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/ProjectAuth.java
  6. 8 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/Task.java
  7. 8 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/TaskContract.java
  8. 9 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/TaskCost.java
  9. 3 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/TaskFile.java
  10. 6 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/TaskLog.java
  11. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/TaskToExecute.java
  12. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/WorkStatus.java
  13. 4 1
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/AuthUserInfo.java
  14. 13 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/MyTask.java
  15. 1 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/ProjectVO.java
  16. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/TaskContractVO.java
  17. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/TaskCostVO.java
  18. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/TaskFileVO.java
  19. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/TaskLogVO.java
  20. 1 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/TaskVO.java
  21. 3 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/UserStatusVO.java
  22. 2 0
      blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/WorkStatusVO.java
  23. 1 1
      blade-service/wt-okr/src/main/java/com/wtkj/controller/CommonController.java
  24. 0 2
      blade-service/wt-okr/src/main/java/com/wtkj/controller/TaskController.java
  25. 1 1
      blade-service/wt-okr/src/main/java/com/wtkj/service/IDeptToDeptService.java
  26. 1 1
      blade-service/wt-okr/src/main/java/com/wtkj/service/impl/DeptToDeptServiceImpl.java

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/DeptToDept.java

@@ -20,6 +20,8 @@ import javax.validation.constraints.NotNull;
 @Data
 @TableName("blade_dept_to_dept")
 public class DeptToDept extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+
 
 	@JsonSerialize(using = ToStringSerializer.class)
 	@TableField("org_dept_id")

+ 1 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/FileAndFolderHistory.java

@@ -18,6 +18,7 @@ import org.springblade.core.mp.base.BaseEntity;
 @TableName("blade_file_and_folder_history")
 public class FileAndFolderHistory extends BaseEntity {
 
+	private static final long serialVersionUID = 1L;
 
 	//blade_file的主键id
 	@JsonSerialize(using = ToStringSerializer.class)

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/FileRead.java

@@ -17,6 +17,8 @@ import org.springblade.core.mp.base.BaseEntity;
 @TableName("blade_file_read")
 public class FileRead extends BaseEntity {
 
+	private static final long serialVersionUID = 1L;
+
 	@TableField("file_id")
 	@ApiModelProperty(value = "文件主键id")
 	private Long fileId;

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/IndexMessage.java

@@ -18,6 +18,8 @@ import org.springblade.core.mp.base.BaseEntity;
 @Data
 @TableName("blade_index_message_log")
 public class IndexMessage extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+
 
 	@TableField("category")
 	@ApiModelProperty("分类,1:待办 2:内容更新")

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/ProjectAuth.java

@@ -17,6 +17,8 @@ import org.springblade.core.mp.base.BaseEntity;
 @Data
 @TableName("blade_project_auth")
 public class ProjectAuth extends BaseEntity {
+	private static final long serialVersionUID = 1L;
+
 
 	@TableField("user_id")
 	@JsonSerialize(using = ToStringSerializer.class)

+ 8 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/Task.java

@@ -3,6 +3,8 @@ package com.wtkj.entity;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -21,13 +23,19 @@ import java.util.Date;
 @Data
 @TableName("blade_task")
 public class Task extends BaseEntity {
+	private static final long serialVersionUID = 1L;
 
+
+	@JsonSerialize(using = ToStringSerializer.class)
+	@TableField("project_id")
 	private Long projectId;
 
+	@TableField("title")
 	private String title;
 
 	@ApiModelProperty(value = "派遣给哪个机构:顶级机构")
 	@NotNull(message = "orgDeptId不可为空")
+	@TableField("org_dept_id")
 	private Long orgDeptId;
 
 	@TableField("task_status")

+ 8 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/TaskContract.java

@@ -2,6 +2,8 @@ package com.wtkj.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -20,17 +22,23 @@ import java.math.BigDecimal;
 @Data
 public class TaskContract extends BaseEntity {
 
+	private static final long serialVersionUID = 1L;
+
+
 	@TableField("task_id")
 	@NotNull(message = "taskId can't be null")
+	@JsonSerialize(using = ToStringSerializer.class)
 	private Long taskId;
 
 	@TableField("org_dept_id")
 	@ApiModelProperty(value = "任务执行机构的顶级id,即乙方")
 	@NotNull(message = "orgDeptId can't be null")
+	@JsonSerialize(using = ToStringSerializer.class)
 	private Long orgDeptId;
 
 	@TableField("blade_file_id")
 	@ApiModelProperty(value = "文件上传完返回的主键id")
+	@JsonSerialize(using = ToStringSerializer.class)
 	private Long bladeFileId;
 
 	@TableField("amount")

+ 9 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/TaskCost.java

@@ -2,12 +2,14 @@ package com.wtkj.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springblade.core.mp.base.BaseEntity;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -22,6 +24,9 @@ import java.util.Date;
 @Data
 public class TaskCost extends BaseEntity {
 
+	private static final long serialVersionUID = 1L;
+
+
 	@TableField("task_id")
 	@JsonSerialize(using = ToStringSerializer.class)
 	private Long taskId;
@@ -36,10 +41,14 @@ public class TaskCost extends BaseEntity {
 
 	@ApiModelProperty(value = "开始时间")
 	@TableField("start_time")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	private Date startTime;
 
 	@ApiModelProperty(value = "结束时间")
 	@TableField("end_time")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	private Date endTime;
 
 	@ApiModelProperty(value = "交通方式 字典值")

+ 3 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/TaskFile.java

@@ -19,6 +19,9 @@ import org.springblade.core.mp.base.BaseEntity;
 @TableName("blade_task_file")
 public class TaskFile extends BaseEntity {
 
+	private static final long serialVersionUID = 1L;
+
+
 	@JsonSerialize(using = ToStringSerializer.class)
 	@TableField("task_id")
 	@ApiModelProperty("任务ID")

+ 6 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/TaskLog.java

@@ -2,6 +2,8 @@ package com.wtkj.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springblade.core.mp.base.BaseEntity;
@@ -16,7 +18,11 @@ import org.springblade.core.mp.base.BaseEntity;
 @TableName("blade_task_log")
 public class TaskLog extends BaseEntity {
 
+	private static final long serialVersionUID = 1L;
+
+
 	@TableField("task_id")
+	@JsonSerialize(using = ToStringSerializer.class)
 	private Long taskId;
 
 	@TableField("content")

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/TaskToExecute.java

@@ -15,6 +15,8 @@ import org.springblade.core.mp.base.BaseEntity;
 @TableName("blade_task_to_execute")
 public class TaskToExecute extends BaseEntity {
 
+	private static final long serialVersionUID = 1L;
+
 	private Long taskId;
 
 

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/WorkStatus.java

@@ -19,6 +19,8 @@ import org.springblade.core.mp.base.BaseEntity;
 @TableName("blade_work_status")
 public class WorkStatus extends BaseEntity {
 
+	private static final long serialVersionUID = 1L;
+
 	@ApiModelProperty("用户id")
 	@TableField("user_id")
 	@JsonSerialize(using = ToStringSerializer.class)

+ 4 - 1
blade-service-api/wt-okr-api/src/main/java/com/wtkj/entity/AuthUserInfo.java → blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/AuthUserInfo.java

@@ -1,4 +1,4 @@
-package com.wtkj.entity;
+package com.wtkj.vo;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -15,6 +15,9 @@ import org.springblade.system.user.entity.User;
 @Data
 public class AuthUserInfo extends BladeUser {
 
+	private static final long serialVersionUID = 1L;
+
+
 	@ApiModelProperty(value = "当前登录用户的顶级部门ID")
 	private Long topDept;
 

+ 13 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/MyTask.java

@@ -0,0 +1,13 @@
+package com.wtkj.vo;
+
+import java.io.Serializable;
+
+/**
+ * @author Blizzard
+ * @create at 2023-09-18 15:52
+ * @describe
+ */
+public class MyTask implements Serializable {
+	private static final long serialVersionUID = 1L;
+
+}

+ 1 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/ProjectVO.java

@@ -13,6 +13,7 @@ import lombok.EqualsAndHashCode;
 @Data
 public class ProjectVO extends Project {
 
+	private static final long serialVersionUID = 1L;
 
 	private String currentStageName;
 }

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/TaskContractVO.java

@@ -14,6 +14,8 @@ import lombok.EqualsAndHashCode;
 @Data
 public class TaskContractVO extends TaskContract {
 
+	private static final long serialVersionUID = 1L;
+
 	private String partyB;
 
 	private FileVO fileVO;

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/TaskCostVO.java

@@ -16,6 +16,8 @@ import java.util.List;
 @Data
 public class TaskCostVO extends TaskCost {
 
+	private static final long serialVersionUID = 1L;
+
 	private String submitUser;
 
 	private List<FileVO> files;

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/TaskFileVO.java

@@ -14,6 +14,8 @@ import lombok.EqualsAndHashCode;
 @Data
 public class TaskFileVO extends TaskFile {
 
+	private static final long serialVersionUID = 1L;
+
 	private FileVO fileVO;
 
 	private String fileName;

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/TaskLogVO.java

@@ -16,5 +16,7 @@ import java.util.Set;
 @Data
 public class TaskLogVO extends TaskLog {
 
+	private static final long serialVersionUID = 1L;
+
 	private Set<User> users;
 }

+ 1 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/TaskVO.java

@@ -16,6 +16,7 @@ import java.util.List;
 @EqualsAndHashCode(callSuper = true)
 @Data
 public class TaskVO extends Task {
+	private static final long serialVersionUID = 1L;
 
 	private User projectManagerUser;
 

+ 3 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/UserStatusVO.java

@@ -13,5 +13,8 @@ import org.springblade.system.user.entity.User;
 @Data
 public class UserStatusVO extends User {
 
+	private static final long serialVersionUID = 1L;
+
+
 	private String workStatus;
 }

+ 2 - 0
blade-service-api/wt-okr-api/src/main/java/com/wtkj/vo/WorkStatusVO.java

@@ -14,5 +14,7 @@ import org.springblade.system.user.entity.User;
 @Data
 public class WorkStatusVO extends WorkStatus {
 
+	private static final long serialVersionUID = 1L;
+
 	private User user;
 }

+ 1 - 1
blade-service/wt-okr/src/main/java/com/wtkj/controller/CommonController.java

@@ -1,9 +1,9 @@
 package com.wtkj.controller;
 
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.wtkj.entity.AuthUserInfo;
 import com.wtkj.entity.DeptToDept;
 import com.wtkj.service.IDeptToDeptService;
+import com.wtkj.vo.AuthUserInfo;
 import com.wtkj.wrapper.UserListWrapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;

+ 0 - 2
blade-service/wt-okr/src/main/java/com/wtkj/controller/TaskController.java

@@ -229,7 +229,5 @@ public class TaskController {
 	}
 
 
-
-
 }
 

+ 1 - 1
blade-service/wt-okr/src/main/java/com/wtkj/service/IDeptToDeptService.java

@@ -1,7 +1,7 @@
 package com.wtkj.service;
 
-import com.wtkj.entity.AuthUserInfo;
 import com.wtkj.entity.DeptToDept;
+import com.wtkj.vo.AuthUserInfo;
 import org.springblade.core.mp.base.BaseService;
 import org.springblade.system.entity.Dept;
 

+ 1 - 1
blade-service/wt-okr/src/main/java/com/wtkj/service/impl/DeptToDeptServiceImpl.java

@@ -1,9 +1,9 @@
 package com.wtkj.service.impl;
 
-import com.wtkj.entity.AuthUserInfo;
 import com.wtkj.entity.DeptToDept;
 import com.wtkj.mapper.DeptToDeptMapper;
 import com.wtkj.service.IDeptToDeptService;
+import com.wtkj.vo.AuthUserInfo;
 import lombok.AllArgsConstructor;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.secure.BladeUser;