Explorar el Código

约场订单修改为get请求, 增加分页信息, 放入场地信息

Memory_LG hace 4 meses
padre
commit
e90d0a4cf0

+ 5 - 7
qmjszx-admin/src/main/java/beilv/web/controller/bootacourse/bootACourseController.java

@@ -23,10 +23,7 @@ import beilv.venue.domain.BeilvVenue;
 import beilv.venue.service.IBeilvVenueService;
 import org.apache.commons.collections4.MapUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.text.ParseException;
@@ -183,13 +180,14 @@ public class bootACourseController extends BaseController {
     /**
      * 查询订单
      */
-    @PostMapping("/getCourseList")
-    public AjaxResult getCourseList(@RequestBody BootACourseBO courseBO) {
-        courseBO.setUserId(courseBO.getUserId());
+    @GetMapping("/getCourseList")
+    public AjaxResult getCourseList(BootACourseBO courseBO) {
+        startPage();
         List<BootACourse> courseList = courseService.getCourseList(courseBO);
         Map<String, String> paymentStatus = DictUtils.getDictCacheToMap("payment_status");
         courseList.forEach(course->{
             course.setPaymentStatusLabel(paymentStatus.get(course.getPaymentStatus()));
+            course.setCoverList(course.getCover().split(","));
         });
         return AjaxResult.success(courseList);
     }

+ 7 - 0
qmjszx-business/src/main/java/beilv/bootacourse/domain/BootACourse.java

@@ -84,6 +84,13 @@ public class BootACourse {
     private Date verificationTime;
 
 
+    private String session;
+    private String ticketDate;
+    private String siteName;
+    private String cover;
+    private String[] coverList;
+
+
 
     public BootACourse(String userId, String contactPeople, String contactNumber, Date registrationTime, String paymentStatus, String orderId, String ticketId, String orderType, String clubCardId, Date refund) {
         this.userId = userId;

+ 14 - 6
qmjszx-business/src/main/resources/mapper/bootacourse/BootACourseMapper.xml

@@ -21,6 +21,11 @@
         <result property="clubCardId" column="club_card_id"/>
         <result property="refund" column="refund"/>
         <result property="verificationTime" column="verification_time"/>
+
+        <result property="session" column="session"/>
+        <result property="ticketDate" column="ticket_date"/>
+        <result property="siteName" column="site_name"/>
+        <result property="cover" column="cover"/>
     </resultMap>
 
 
@@ -81,18 +86,21 @@
 
     <select id="getCourseList" parameterType="bootACourseBO" resultMap="BootACourseResult">
         select
-            user_id, contact_people, contact_number, registration_time, payment_time, cancellation_time, refund_time,
-            payment_status, order_id, ticket_id, order_type, refund_instructions, club_card_id, refund, verification_time
-        from beilv_book_a_course
+        bbac.user_id, bbac.contact_people, bbac.contact_number, bbac.registration_time, bbac.payment_time, bbac.cancellation_time, bbac.refund_time,
+        bbac.payment_status, bbac.order_id, bbac.ticket_id, bbac.order_type, bbac.refund_instructions, bbac.club_card_id, bbac.refund, bbac.verification_time,
+        bat.session, bat.ticket_date, bs.name as site_name, bs.cover
+        from beilv_book_a_course bbac
+        left join beilv_admission_ticket bat on bbac.ticket_id = bat.id
+        left join beilv_site bs on bat.site_id = bs.id
         <where>
             <if test="userId != null and userId != ''">
-                and user_id = #{userId}
+                and bbac.user_id = #{userId}
             </if>
             <if test="paymentStatus != null and paymentStatus != ''">
-                and paymen_status = #{paymentStatus}
+                and bbac.paymen_status = #{paymentStatus}
             </if>
         </where>
-        order by registration_time desc
+        order by bbac.registration_time desc
     </select>
 
     <select id="getCourseInfo" parameterType="bootACourseBO" resultMap="BootACourseResult">