liying 7 лет назад
Родитель
Сommit
e3709420da

+ 1 - 0
src/main/java/com/example/cinema/blImpl/sales/TicketServiceImpl.java

@@ -136,6 +136,7 @@ public class TicketServiceImpl implements TicketService {
                 TicketWithScheduleVO vo=ticket.getWithScheduleVO();
                 ScheduleItem scheduleItem=scheduleMapper.selectScheduleById(ticket.getScheduleId());
                 vo.setSchedule(scheduleItem);
+                vo.setTime(ticket.getTime());
                 return vo;
             }).collect(Collectors.toList());
             return ResponseVO.buildSuccess(vos);

+ 13 - 0
src/main/java/com/example/cinema/po/Ticket.java

@@ -3,6 +3,8 @@ package com.example.cinema.po;
 import com.example.cinema.vo.TicketVO;
 import com.example.cinema.vo.TicketWithScheduleVO;
 
+import java.sql.Timestamp;
+
 /**
  * Created by liying on 2019/4/16.
  */
@@ -35,6 +37,16 @@ public class Ticket {
      */
     private int state;
 
+    private Timestamp time;
+
+    public Timestamp getTime() {
+        return time;
+    }
+
+    public void setTime(Timestamp time) {
+        this.time = time;
+    }
+
     public Ticket() {
     }
 
@@ -61,6 +73,7 @@ public class Ticket {
                 stateString = "未完成";
         }
         vo.setState(stateString);
+        vo.setTime(time);
         return vo;
 
     }

+ 12 - 0
src/main/java/com/example/cinema/vo/TicketVO.java

@@ -1,5 +1,7 @@
 package com.example.cinema.vo;
 
+import java.sql.Timestamp;
+
 /**
  * Created by liying on 2019/4/16.
  */
@@ -31,6 +33,16 @@ public class TicketVO {
      */
     private String state;
 
+    private Timestamp time;
+
+    public Timestamp getTime() {
+        return time;
+    }
+
+    public void setTime(Timestamp time) {
+        this.time = time;
+    }
+
     public TicketVO() {
     }
 

+ 14 - 0
src/main/java/com/example/cinema/vo/TicketWithScheduleVO.java

@@ -1,5 +1,7 @@
 package com.example.cinema.vo;
 
+import java.sql.Timestamp;
+
 /**
  * Created by liying on 2019/4/16.
  */
@@ -31,9 +33,21 @@ public class TicketWithScheduleVO {
      */
     private String state;
 
+    private Timestamp time;
+
+
+
     public TicketWithScheduleVO() {
     }
 
+    public Timestamp getTime() {
+        return time;
+    }
+
+    public void setTime(Timestamp time) {
+        this.time = time;
+    }
+
     public int getId() {
         return id;
     }

+ 1 - 0
src/main/resources/dataImpl/sales/TicketMapper.xml

@@ -49,6 +49,7 @@
         <result column="column_index" property="columnIndex"></result>
         <result column="row_index" property="rowIndex"></result>
         <result column="state" property="state"></result>
+        <result column="time" property="time"></result>
     </resultMap>
 
 </mapper>