|
@@ -142,20 +142,17 @@ public class bootACourseController extends BaseController {
|
|
//生成订单编号
|
|
//生成订单编号
|
|
String orderId = IdUtils.fastSimpleUUID();
|
|
String orderId = IdUtils.fastSimpleUUID();
|
|
//生成订单信息
|
|
//生成订单信息
|
|
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
BootACourse bootACourse = new BootACourse(
|
|
BootACourse bootACourse = new BootACourse(
|
|
course.getUserId(), //用户id
|
|
course.getUserId(), //用户id
|
|
course.getContactPeople(), //联系人
|
|
course.getContactPeople(), //联系人
|
|
course.getContactNumber(), //联系电话
|
|
course.getContactNumber(), //联系电话
|
|
- simpleDateFormat.format(new Date()), //下单时间
|
|
|
|
|
|
+ new Date(), //下单时间
|
|
"payment_status_to_be_paid", //支付状态
|
|
"payment_status_to_be_paid", //支付状态
|
|
orderId, //订单比那好
|
|
orderId, //订单比那好
|
|
course.getTicketId(), //场次id
|
|
course.getTicketId(), //场次id
|
|
course.getTicketType(), //场地类型
|
|
course.getTicketType(), //场地类型
|
|
course.getClubCardId(), //会员卡号
|
|
course.getClubCardId(), //会员卡号
|
|
refund); //最晚退单时间
|
|
refund); //最晚退单时间
|
|
-
|
|
|
|
-
|
|
|
|
//验证场次是否可用
|
|
//验证场次是否可用
|
|
if (courseService.isOk(course)) {
|
|
if (courseService.isOk(course)) {
|
|
//调用会员卡接口减少次数
|
|
//调用会员卡接口减少次数
|
|
@@ -168,7 +165,7 @@ public class bootACourseController extends BaseController {
|
|
cardService.addStream(memberStream);
|
|
cardService.addStream(memberStream);
|
|
|
|
|
|
//扣除成功后, 修改订单状态为已付款.
|
|
//扣除成功后, 修改订单状态为已付款.
|
|
- bootACourse.setPaymentTime(simpleDateFormat.format(new Date()));
|
|
|
|
|
|
+ bootACourse.setPaymentTime(new Date());
|
|
bootACourse.setPaymentStatus("payment_status_have_paid");
|
|
bootACourse.setPaymentStatus("payment_status_have_paid");
|
|
|
|
|
|
//将门票信息修改为2: 线上预约的时段;
|
|
//将门票信息修改为2: 线上预约的时段;
|
|
@@ -189,7 +186,12 @@ public class bootACourseController extends BaseController {
|
|
@PostMapping("/getCourseList")
|
|
@PostMapping("/getCourseList")
|
|
public AjaxResult getCourseList(@RequestBody BootACourseBO courseBO) {
|
|
public AjaxResult getCourseList(@RequestBody BootACourseBO courseBO) {
|
|
courseBO.setUserId(courseBO.getUserId());
|
|
courseBO.setUserId(courseBO.getUserId());
|
|
- return AjaxResult.success(courseService.getCourseList(courseBO));
|
|
|
|
|
|
+ List<BootACourse> courseList = courseService.getCourseList(courseBO);
|
|
|
|
+ Map<String, String> paymentStatus = DictUtils.getDictCacheToMap("payment_status");
|
|
|
|
+ courseList.forEach(course->{
|
|
|
|
+ course.setPaymentStatusLabel(paymentStatus.get(course.getPaymentStatus()));
|
|
|
|
+ });
|
|
|
|
+ return AjaxResult.success(courseList);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -225,7 +227,7 @@ public class bootACourseController extends BaseController {
|
|
|
|
|
|
//修改订单信息状态为退款,
|
|
//修改订单信息状态为退款,
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
- course.setRefundTime(simpleDateFormat.format(new Date()));
|
|
|
|
|
|
+ course.setRefundTime(new Date());
|
|
course.setRefundInstructions(courseBo.getRefundInstructions());
|
|
course.setRefundInstructions(courseBo.getRefundInstructions());
|
|
course.setPaymentStatus("payment_status_refunded");
|
|
course.setPaymentStatus("payment_status_refunded");
|
|
return toAjax(courseService.updateCourse(course));
|
|
return toAjax(courseService.updateCourse(course));
|