Commit eeb3d3c5a7fca0b1385473058508a2673c757a9d
1 parent
fba402ea
添加注解,拼装json时可以忽略掉自定义的get方法
Showing
1 changed file
with
6 additions
and
0 deletions
src/main/java/com/huaheng/pc/config/corporation/domain/Corporation.java
1 | package com.huaheng.pc.config.corporation.domain; | 1 | package com.huaheng.pc.config.corporation.domain; |
2 | 2 | ||
3 | +import com.alibaba.fastjson.annotation.JSONField; | ||
3 | import com.baomidou.mybatisplus.annotation.IdType; | 4 | import com.baomidou.mybatisplus.annotation.IdType; |
4 | import com.baomidou.mybatisplus.annotation.TableField; | 5 | import com.baomidou.mybatisplus.annotation.TableField; |
5 | import com.baomidou.mybatisplus.annotation.TableId; | 6 | import com.baomidou.mybatisplus.annotation.TableId; |
@@ -108,6 +109,7 @@ public class Corporation implements Serializable { | @@ -108,6 +109,7 @@ public class Corporation implements Serializable { | ||
108 | * 拼装图片存储 | 109 | * 拼装图片存储 |
109 | * @return | 110 | * @return |
110 | */ | 111 | */ |
112 | + @JSONField(serialize = false) | ||
111 | public String getSavePath(){ | 113 | public String getSavePath(){ |
112 | return this.getBaseAddress() + this.getSubPath(); | 114 | return this.getBaseAddress() + this.getSubPath(); |
113 | } | 115 | } |
@@ -116,6 +118,7 @@ public class Corporation implements Serializable { | @@ -116,6 +118,7 @@ public class Corporation implements Serializable { | ||
116 | * 拼装图片相对路径 | 118 | * 拼装图片相对路径 |
117 | * @return | 119 | * @return |
118 | */ | 120 | */ |
121 | + @JSONField(serialize = false) | ||
119 | public String getSubPath(){ | 122 | public String getSubPath(){ |
120 | return "img/corporation/" + this.getId() + "/"; | 123 | return "img/corporation/" + this.getId() + "/"; |
121 | } | 124 | } |
@@ -124,6 +127,7 @@ public class Corporation implements Serializable { | @@ -124,6 +127,7 @@ public class Corporation implements Serializable { | ||
124 | * 取pLogoBig的存储路径 | 127 | * 取pLogoBig的存储路径 |
125 | * @return | 128 | * @return |
126 | */ | 129 | */ |
130 | + @JSONField(serialize = false) | ||
127 | public String getPLogoBigPath(){ | 131 | public String getPLogoBigPath(){ |
128 | return this.getBaseAddress() + this.getPLogoBig(); | 132 | return this.getBaseAddress() + this.getPLogoBig(); |
129 | } | 133 | } |
@@ -132,6 +136,7 @@ public class Corporation implements Serializable { | @@ -132,6 +136,7 @@ public class Corporation implements Serializable { | ||
132 | * 取pLogoSmall的存储路径 | 136 | * 取pLogoSmall的存储路径 |
133 | * @return | 137 | * @return |
134 | */ | 138 | */ |
139 | + @JSONField(serialize = false) | ||
135 | public String getPLogoSmallPath(){ | 140 | public String getPLogoSmallPath(){ |
136 | return this.getBaseAddress() + this.getPLogoSmall(); | 141 | return this.getBaseAddress() + this.getPLogoSmall(); |
137 | } | 142 | } |
@@ -140,6 +145,7 @@ public class Corporation implements Serializable { | @@ -140,6 +145,7 @@ public class Corporation implements Serializable { | ||
140 | * 取pIcon的存储路径 | 145 | * 取pIcon的存储路径 |
141 | * @return | 146 | * @return |
142 | */ | 147 | */ |
148 | + @JSONField(serialize = false) | ||
143 | public String getPIconPath(){ | 149 | public String getPIconPath(){ |
144 | return this.getBaseAddress() + this.getPIcon(); | 150 | return this.getBaseAddress() + this.getPIcon(); |
145 | } | 151 | } |