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 | 1 | package com.huaheng.pc.config.corporation.domain; |
2 | 2 | |
3 | +import com.alibaba.fastjson.annotation.JSONField; | |
3 | 4 | import com.baomidou.mybatisplus.annotation.IdType; |
4 | 5 | import com.baomidou.mybatisplus.annotation.TableField; |
5 | 6 | import com.baomidou.mybatisplus.annotation.TableId; |
... | ... | @@ -108,6 +109,7 @@ public class Corporation implements Serializable { |
108 | 109 | * 拼装图片存储 |
109 | 110 | * @return |
110 | 111 | */ |
112 | + @JSONField(serialize = false) | |
111 | 113 | public String getSavePath(){ |
112 | 114 | return this.getBaseAddress() + this.getSubPath(); |
113 | 115 | } |
... | ... | @@ -116,6 +118,7 @@ public class Corporation implements Serializable { |
116 | 118 | * 拼装图片相对路径 |
117 | 119 | * @return |
118 | 120 | */ |
121 | + @JSONField(serialize = false) | |
119 | 122 | public String getSubPath(){ |
120 | 123 | return "img/corporation/" + this.getId() + "/"; |
121 | 124 | } |
... | ... | @@ -124,6 +127,7 @@ public class Corporation implements Serializable { |
124 | 127 | * 取pLogoBig的存储路径 |
125 | 128 | * @return |
126 | 129 | */ |
130 | + @JSONField(serialize = false) | |
127 | 131 | public String getPLogoBigPath(){ |
128 | 132 | return this.getBaseAddress() + this.getPLogoBig(); |
129 | 133 | } |
... | ... | @@ -132,6 +136,7 @@ public class Corporation implements Serializable { |
132 | 136 | * 取pLogoSmall的存储路径 |
133 | 137 | * @return |
134 | 138 | */ |
139 | + @JSONField(serialize = false) | |
135 | 140 | public String getPLogoSmallPath(){ |
136 | 141 | return this.getBaseAddress() + this.getPLogoSmall(); |
137 | 142 | } |
... | ... | @@ -140,6 +145,7 @@ public class Corporation implements Serializable { |
140 | 145 | * 取pIcon的存储路径 |
141 | 146 | * @return |
142 | 147 | */ |
148 | + @JSONField(serialize = false) | |
143 | 149 | public String getPIconPath(){ |
144 | 150 | return this.getBaseAddress() + this.getPIcon(); |
145 | 151 | } |
... | ... |