|  | @@ -0,0 +1,73 @@
 | 
											
												
													
														|  | 
 |  | +package com.ym.mec.student.controller;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.CloudTeacherStudent;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.TenantOrderRecord;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.page.CloudTeacherAddQueryInfo;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.page.CloudTeacherOrderQueryInfo;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.CloudTeacherOrderService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.TenantOrderRecordService;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.common.controller.BaseController;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.common.entity.HttpResponseResult;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.common.page.PageInfo;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.common.page.WrapperUtil;
 | 
											
												
													
														|  | 
 |  | +import io.swagger.annotations.Api;
 | 
											
												
													
														|  | 
 |  | +import io.swagger.annotations.ApiOperation;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.beans.factory.annotation.Autowired;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.security.access.prepost.PreAuthorize;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.web.bind.annotation.*;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +import java.util.List;
 | 
											
												
													
														|  | 
 |  | +import java.util.Map;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +/**
 | 
											
												
													
														|  | 
 |  | + * Description
 | 
											
												
													
														|  | 
 |  | + *
 | 
											
												
													
														|  | 
 |  | + * @author: feng-ji
 | 
											
												
													
														|  | 
 |  | + * @date: 2021-12-21
 | 
											
												
													
														|  | 
 |  | + */
 | 
											
												
													
														|  | 
 |  | +@RequestMapping("cloudTeacherOrder")
 | 
											
												
													
														|  | 
 |  | +@Api(tags = "团练宝注册,激活,添加用户,支付等")
 | 
											
												
													
														|  | 
 |  | +@RestController
 | 
											
												
													
														|  | 
 |  | +public class CloudTeacherOrderController extends BaseController {
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    @Autowired
 | 
											
												
													
														|  | 
 |  | +    private CloudTeacherOrderService cloudTeacherOrderService;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    @Autowired
 | 
											
												
													
														|  | 
 |  | +    private TenantOrderRecordService tenantOrderRecordService;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    @ApiOperation(value = "查询未激活团练宝用户")
 | 
											
												
													
														|  | 
 |  | +    @PostMapping("/queryInactive")
 | 
											
												
													
														|  | 
 |  | +    @PreAuthorize("@pcs.hasPermissions('cloudTeacherOrder/queryInActive')")
 | 
											
												
													
														|  | 
 |  | +    public HttpResponseResult<PageInfo<CloudTeacherStudent>> queryInactive(@RequestBody CloudTeacherOrderQueryInfo cloudTeacherOrderQueryInfo) throws Exception {
 | 
											
												
													
														|  | 
 |  | +        cloudTeacherOrderQueryInfo.setStatus(1);
 | 
											
												
													
														|  | 
 |  | +        // 学生端不要乐团限制, 返回学生会重复
 | 
											
												
													
														|  | 
 |  | +        // if (cloudTeacherOrderQueryInfo.getMusicGroupId() == null) {
 | 
											
												
													
														|  | 
 |  | +        //     throw new Exception("乐团Id必须填写");
 | 
											
												
													
														|  | 
 |  | +        // }
 | 
											
												
													
														|  | 
 |  | +        return succeed(cloudTeacherOrderService.queryInactive(cloudTeacherOrderQueryInfo));
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    @ApiOperation(value = "查询已激活团练宝用户")
 | 
											
												
													
														|  | 
 |  | +    @PostMapping("/queryActive")
 | 
											
												
													
														|  | 
 |  | +    @PreAuthorize("@pcs.hasPermissions('cloudTeacherOrder/queryActive')")
 | 
											
												
													
														|  | 
 |  | +    public HttpResponseResult<PageInfo<CloudTeacherStudent>> queryActive(@RequestBody CloudTeacherOrderQueryInfo cloudTeacherOrderQueryInfo) throws Exception {
 | 
											
												
													
														|  | 
 |  | +        cloudTeacherOrderQueryInfo.setStatus(2);
 | 
											
												
													
														|  | 
 |  | +        return succeed(cloudTeacherOrderService.queryInactive(cloudTeacherOrderQueryInfo));
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    @ApiOperation(value = "激活记录")
 | 
											
												
													
														|  | 
 |  | +    @PostMapping("/queryActiveRecord")
 | 
											
												
													
														|  | 
 |  | +    @PreAuthorize("@pcs.hasPermissions('cloudTeacherOrder/queryActiveRecord')")
 | 
											
												
													
														|  | 
 |  | +    public HttpResponseResult<PageInfo<CloudTeacherStudent>> queryActiveRecord(@RequestBody CloudTeacherOrderQueryInfo cloudTeacherOrderQueryInfo) {
 | 
											
												
													
														|  | 
 |  | +        return succeed(cloudTeacherOrderService.queryRecord(cloudTeacherOrderQueryInfo));
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    @ApiOperation(value = "轮询查询订单状态")
 | 
											
												
													
														|  | 
 |  | +    @GetMapping("/payCheck")
 | 
											
												
													
														|  | 
 |  | +    @PreAuthorize("@pcs.hasPermissions('cloudTeacherOrder/payCheck')")
 | 
											
												
													
														|  | 
 |  | +    public HttpResponseResult<Boolean> payCheck(@RequestParam String orderNo) throws Exception {
 | 
											
												
													
														|  | 
 |  | +        return succeed(cloudTeacherOrderService.payCheck(orderNo));
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +}
 |