|
@@ -13,6 +13,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -28,6 +29,8 @@ import com.ym.mec.biz.dal.dto.VipGroupApplyDto;
|
|
|
import com.ym.mec.biz.dal.entity.CourseSchedule;
|
|
|
import com.ym.mec.biz.dal.entity.Employee;
|
|
|
import com.ym.mec.biz.dal.entity.StudentApplyRefunds;
|
|
|
+import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
|
|
|
+import com.ym.mec.biz.dal.entity.VipGroup;
|
|
|
import com.ym.mec.biz.dal.enums.AuditStatusEnum;
|
|
|
import com.ym.mec.biz.dal.page.VipGroupAttendanceQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.VipGroupQueryInfo;
|
|
@@ -35,6 +38,7 @@ import com.ym.mec.biz.dal.page.VipGroupSalaryQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.VipGroupTeachingRecordQueryInfo;
|
|
|
import com.ym.mec.biz.service.CourseScheduleService;
|
|
|
import com.ym.mec.biz.service.StudentApplyRefundsService;
|
|
|
+import com.ym.mec.biz.service.StudentPaymentOrderService;
|
|
|
import com.ym.mec.biz.service.VipGroupService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
|
|
@@ -59,6 +63,9 @@ public class VipGroupManageController extends BaseController {
|
|
|
@Autowired
|
|
|
private StudentApplyRefundsService studentApplyRefundsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private StudentPaymentOrderService studentPaymentOrderService;
|
|
|
+
|
|
|
@ApiOperation(value = "vip课申请")
|
|
|
@PostMapping("/vipGroupApply")
|
|
|
@PreAuthorize("@pcs.hasPermissions('vipGroupManage/vipGroupApply')")
|
|
@@ -130,11 +137,33 @@ public class VipGroupManageController extends BaseController {
|
|
|
@GetMapping("/queryApplyRefundDetail")
|
|
|
@PreAuthorize("@pcs.hasPermissions('vipGroupManage/queryApplyRefundDetail')")
|
|
|
public Object queryApplyRefundDetail(Long id) {
|
|
|
- StudentApplyRefunds studentApplyRefunds = studentApplyRefundsService.get(id);
|
|
|
- if(studentApplyRefunds == null){
|
|
|
- return failed("");
|
|
|
- }
|
|
|
- return succeed();
|
|
|
+ StudentApplyRefunds studentApplyRefunds = studentApplyRefundsService.get(id);
|
|
|
+ if (studentApplyRefunds == null) {
|
|
|
+ return failed("参数输入有误");
|
|
|
+ }
|
|
|
+
|
|
|
+ Long orderId = studentApplyRefunds.getOrigPaymentOrderId();
|
|
|
+
|
|
|
+ StudentPaymentOrder paymentOrder = studentPaymentOrderService.get(orderId);
|
|
|
+ if (paymentOrder == null) {
|
|
|
+ return failed("支付订单信息找不到");
|
|
|
+ }
|
|
|
+ String vipGroupId = paymentOrder.getMusicGroupId();
|
|
|
+ VipGroup vipGroup = vipGroupService.get(Long.parseLong(vipGroupId));
|
|
|
+ if (vipGroup == null) {
|
|
|
+ return failed("vip课信息找不到");
|
|
|
+ }
|
|
|
+
|
|
|
+ SysUser student = sysUserFeignService.queryUserById(studentApplyRefunds.getUserId());
|
|
|
+
|
|
|
+ SysUser teacher = sysUserFeignService.queryUserById(vipGroup.getUserId());
|
|
|
+
|
|
|
+ ModelMap model = new ModelMap();
|
|
|
+ model.put("student", student.getUsername());
|
|
|
+ model.put("teacher", teacher.getUsername());
|
|
|
+ model.put("className", vipGroup.getName());
|
|
|
+
|
|
|
+ return succeed(model);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取VIP课教学记录")
|