2 Commits a105891e16 ... c303f800fa

Author SHA1 Message Date
  liying c303f800fa Merge remote-tracking branch 'origin/master' 7 years ago
  liying 80454bf57d [新增]优惠券获得接口 7 years ago

+ 6 - 1
src/main/java/com/example/cinema/controller/CouponController.java

@@ -1,6 +1,8 @@
 package com.example.cinema.controller;
 
+import com.example.cinema.bl.CouponService;
 import com.example.cinema.vo.ResponseVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -13,9 +15,12 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/coupon")
 public class CouponController {
 
+    @Autowired
+    CouponService couponService;
+
     @GetMapping("{userId}/get")
     public ResponseVO getCoupons(@PathVariable int userId){
-        return null;
+        return couponService.getCouponsByUser(userId);
     }
 
 

+ 0 - 49
src/main/java/com/example/cinema/vo/TicketSeatVO.java

@@ -1,49 +0,0 @@
-package com.example.cinema.vo;
-
-/**
- * Created by liying on 2019/4/16.
- */
-public class TicketSeatVO {
-    /**
-     * 排片id
-     */
-    private int scheduleId;
-    /**
-     * 列号
-     */
-    private int columnIndex;
-    /**
-     * 排号
-     */
-    private int rowIndex;
-
-
-    public TicketSeatVO() {
-    }
-
-
-    public int getScheduleId() {
-        return scheduleId;
-    }
-
-    public void setScheduleId(int scheduleId) {
-        this.scheduleId = scheduleId;
-    }
-
-    public int getColumnIndex() {
-        return columnIndex;
-    }
-
-    public void setColumnIndex(int columnIndex) {
-        this.columnIndex = columnIndex;
-    }
-
-    public int getRowIndex() {
-        return rowIndex;
-    }
-
-    public void setRowIndex(int rowIndex) {
-        this.rowIndex = rowIndex;
-    }
-
-}