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,12 +4,15 @@ import java.util.Date; | ||
| 4 | 4 | ||
| 5 | import javax.persistence.Column; | 5 | import javax.persistence.Column; |
| 6 | import javax.persistence.Entity; | 6 | import javax.persistence.Entity; |
| 7 | +import javax.persistence.FetchType; | ||
| 7 | import javax.persistence.GeneratedValue; | 8 | import javax.persistence.GeneratedValue; |
| 8 | import javax.persistence.GenerationType; | 9 | import javax.persistence.GenerationType; |
| 9 | import javax.persistence.Id; | 10 | import javax.persistence.Id; |
| 10 | import javax.persistence.ManyToOne; | 11 | import javax.persistence.ManyToOne; |
| 11 | import javax.persistence.Table; | 12 | import javax.persistence.Table; |
| 12 | 13 | ||
| 14 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 15 | + | ||
| 13 | /** | 16 | /** |
| 14 | * | 17 | * |
| 15 | * @ClassName : StationRoute(站点路由实体类) | 18 | * @ClassName : StationRoute(站点路由实体类) |
| @@ -39,6 +42,9 @@ public class StationRoute { | @@ -39,6 +42,9 @@ public class StationRoute { | ||
| 39 | // 站点编码 | 42 | // 站点编码 |
| 40 | private String stationCode; | 43 | private String stationCode; |
| 41 | 44 | ||
| 45 | + // 站点名称 | ||
| 46 | + private String stationName; | ||
| 47 | + | ||
| 42 | // 线路编码 | 48 | // 线路编码 |
| 43 | private String lineCode; | 49 | private String lineCode; |
| 44 | 50 | ||
| @@ -95,7 +101,8 @@ public class StationRoute { | @@ -95,7 +101,8 @@ public class StationRoute { | ||
| 95 | private Date updateDate; | 101 | private Date updateDate; |
| 96 | 102 | ||
| 97 | // 站点信息 | 103 | // 站点信息 |
| 98 | - @ManyToOne | 104 | + @JsonIgnore |
| 105 | + @ManyToOne(fetch = FetchType.LAZY) | ||
| 99 | private Station station; | 106 | private Station station; |
| 100 | 107 | ||
| 101 | // 线路信息 | 108 | // 线路信息 |
| @@ -126,6 +133,14 @@ public class StationRoute { | @@ -126,6 +133,14 @@ public class StationRoute { | ||
| 126 | this.stationCode = stationCode; | 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 | public String getLineCode() { | 144 | public String getLineCode() { |
| 130 | return lineCode; | 145 | return lineCode; |
| 131 | } | 146 | } |