Browse Source

更新为 mybatis- 忽略数据库字段

wuweihao 3 years ago
parent
commit
0c3e22cd34

+ 2 - 0
gis_admin/src/main/java/com/gis/admin/entity/po/SysResourceEntity.java

@@ -1,6 +1,7 @@
 package com.gis.admin.entity.po;
 
 import com.alibaba.fastjson.annotation.JSONField;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.gis.common.base.entity.po.BaseEntity;
 import lombok.Data;
@@ -57,6 +58,7 @@ public class SysResourceEntity extends BaseEntity implements Serializable {
     private Long parentId;
 
     /** 封装权限字段,不需要映射到数据库, 默认有全部权限*/
+    @TableField(exist  = false)
     @Transient
 //    private Boolean authority ;
     private Boolean authority = true;

+ 2 - 0
gis_admin/src/main/java/com/gis/admin/entity/po/SysRoleEntity.java

@@ -1,5 +1,6 @@
 package com.gis.admin.entity.po;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.gis.common.base.entity.po.BaseEntity;
 import io.swagger.annotations.ApiModelProperty;
@@ -46,6 +47,7 @@ public class SysRoleEntity extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "是否启动 0: 禁用  1:启用(默认值)")
     private Integer isEnabled;
 
+    @TableField(exist  = false)
     @Transient
     @ApiModelProperty(value = "该角色的用户数")
     private Integer count;

+ 6 - 1
gis_admin/src/main/java/com/gis/admin/entity/po/SysUserEntity.java

@@ -1,6 +1,7 @@
 package com.gis.admin.entity.po;
 
 import com.alibaba.fastjson.annotation.JSONField;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.gis.common.base.entity.po.BaseEntity;
 import io.swagger.annotations.ApiModelProperty;
@@ -64,24 +65,28 @@ public class SysUserEntity extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "军衔等级")
     private Integer level;
 
-//    @JSONField(serialize = false)
+    @TableField(exist  = false)
     @Transient
     @ApiModelProperty(value = "角色,sys_admin:系统管理员,sys_high:高级管理员, sys_normal:普通管理员, sys_visitor:游客")
     private String roleKey;
 
+    @TableField(exist  = false)
     @Transient
     @ApiModelProperty(value = "角色id")
     private Integer roleId;
 
+    @TableField(exist  = false)
     @Transient
     @ApiModelProperty(value = "角色名称")
     private String roleName;
 
+    @TableField(exist  = false)
     @Transient
     @ApiModelProperty(value = "积分")
     private Integer grade;
 
 
+    @TableField(exist  = false)
     @Transient
     @ApiModelProperty(value = "今日积分")
     private Integer gradeToday;

+ 2 - 0
gis_cms/src/main/java/com/gis/cms/entity/po/QuestionGroupEntity.java

@@ -1,5 +1,6 @@
 package com.gis.cms.entity.po;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.gis.common.base.entity.po.BaseEntity;
 import io.swagger.annotations.ApiModelProperty;
@@ -36,6 +37,7 @@ public class QuestionGroupEntity extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "是否显示,1:显示, 0:不显示, 默认显示")
     private Integer display;
 
+    @TableField(exist  = false)
     @Transient
     @ApiModelProperty(value = "题目数量")
     private Integer questionCount;

+ 2 - 0
gis_cms/src/main/java/com/gis/cms/entity/po/QuestionUserEntity.java

@@ -1,5 +1,6 @@
 package com.gis.cms.entity.po;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.gis.common.base.entity.po.BaseEntity;
 import io.swagger.annotations.ApiModelProperty;
@@ -38,6 +39,7 @@ public class QuestionUserEntity extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "提交答案" )
     private String answer;
 
+    @TableField(exist  = false)
     @ApiModelProperty(value = "用户真名" )
     @Transient
     private String realName;

+ 2 - 0
gis_cms/src/main/java/com/gis/cms/entity/po/RaceEntity.java

@@ -1,5 +1,6 @@
 package com.gis.cms.entity.po;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.gis.common.base.entity.po.BaseEntity;
 import io.swagger.annotations.ApiModelProperty;
@@ -30,6 +31,7 @@ public class RaceEntity extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "耗时", required = true)
     private Long  time;
 
+    @TableField(exist  = false)
     @ApiModelProperty(value = "用户真名" )
     @Transient
     private String realName;

+ 1 - 1
run.sh

@@ -37,7 +37,7 @@ restartApp(){
 	stopApp
 	APP_PID=''  #将进程号置空
 	sleep 2
-	echo "进程号:" ${APP_PID} 
+	echo "进程号:" ${APP_PID} "端口号:" ${APP_PORT}
 	echo " 2 执行 restart 方法"
 	startApp
 }