Commit c0330de2edc5b0554dcce3755309659d5f2a1485
Merge branch 'master' of 192.168.168.201:panzhaov5/bsth_control
Showing
1 changed file
with
16 additions
and
1 deletions
src/main/java/com/bsth/entity/StationRoute.java
| ... | ... | @@ -4,12 +4,15 @@ import java.util.Date; |
| 4 | 4 | |
| 5 | 5 | import javax.persistence.Column; |
| 6 | 6 | import javax.persistence.Entity; |
| 7 | +import javax.persistence.FetchType; | |
| 7 | 8 | import javax.persistence.GeneratedValue; |
| 8 | 9 | import javax.persistence.GenerationType; |
| 9 | 10 | import javax.persistence.Id; |
| 10 | 11 | import javax.persistence.ManyToOne; |
| 11 | 12 | import javax.persistence.Table; |
| 12 | 13 | |
| 14 | +import com.fasterxml.jackson.annotation.JsonIgnore; | |
| 15 | + | |
| 13 | 16 | /** |
| 14 | 17 | * |
| 15 | 18 | * @ClassName : StationRoute(站点路由实体类) |
| ... | ... | @@ -39,6 +42,9 @@ public class StationRoute { |
| 39 | 42 | // 站点编码 |
| 40 | 43 | private String stationCode; |
| 41 | 44 | |
| 45 | + // 站点名称 | |
| 46 | + private String stationName; | |
| 47 | + | |
| 42 | 48 | // 线路编码 |
| 43 | 49 | private String lineCode; |
| 44 | 50 | |
| ... | ... | @@ -95,7 +101,8 @@ public class StationRoute { |
| 95 | 101 | private Date updateDate; |
| 96 | 102 | |
| 97 | 103 | // 站点信息 |
| 98 | - @ManyToOne | |
| 104 | + @JsonIgnore | |
| 105 | + @ManyToOne(fetch = FetchType.LAZY) | |
| 99 | 106 | private Station station; |
| 100 | 107 | |
| 101 | 108 | // 线路信息 |
| ... | ... | @@ -126,6 +133,14 @@ public class StationRoute { |
| 126 | 133 | this.stationCode = stationCode; |
| 127 | 134 | } |
| 128 | 135 | |
| 136 | + public String getStationName() { | |
| 137 | + return stationName; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setStationName(String stationName) { | |
| 141 | + this.stationName = stationName; | |
| 142 | + } | |
| 143 | + | |
| 129 | 144 | public String getLineCode() { |
| 130 | 145 | return lineCode; |
| 131 | 146 | } | ... | ... |