|
@@ -3,10 +3,13 @@ package com.miaxis.h5.controller.coach;
|
|
|
import java.util.List;
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.miaxis.coach.dto.CoachAuditDTO;
|
|
|
import com.miaxis.common.constant.Constants;
|
|
|
import com.miaxis.common.core.domain.entity.UserInfo;
|
|
|
import com.miaxis.common.utils.SecurityUtils;
|
|
|
+import com.miaxis.wx.domain.WxOrder;
|
|
|
+import com.miaxis.wx.service.IWxOrderService;
|
|
|
import com.sun.org.apache.bcel.internal.classfile.Constant;
|
|
|
import io.swagger.annotations.*;
|
|
|
import com.miaxis.common.core.domain.Response;
|
|
@@ -42,6 +45,9 @@ import com.miaxis.common.core.page.ResponsePageInfo;
|
|
|
public class CoachInfoController extends BaseController{
|
|
|
@Autowired
|
|
|
private ICoachInfoService coachInfoService;
|
|
|
+ @Autowired
|
|
|
+ private IWxOrderService wxOrderService;
|
|
|
+
|
|
|
|
|
|
// /**
|
|
|
// * 查询教练用户列表
|
|
@@ -72,19 +78,19 @@ public class CoachInfoController extends BaseController{
|
|
|
// return util.exportExcel(list, "info");
|
|
|
// }
|
|
|
|
|
|
- /**
|
|
|
- * 获取教练用户详细信息
|
|
|
- */
|
|
|
- @PreAuthorize("@ss.hasPermi('coach:info:query')")
|
|
|
- @GetMapping(value = "/{id}")
|
|
|
- @ApiOperation("获取教练用户详细信息")
|
|
|
- public Response<CoachInfo> getInfo(
|
|
|
- @ApiParam(name = "id", value = "教练用户参数", required = true)
|
|
|
- @PathVariable("id") Long id
|
|
|
- ){
|
|
|
- return Response.success(coachInfoService.getById(id));
|
|
|
- }
|
|
|
-//
|
|
|
+// /**
|
|
|
+// * 获取教练用户详细信息
|
|
|
+// */
|
|
|
+// @PreAuthorize("@ss.hasPermi('coach:info:query')")
|
|
|
+// @GetMapping(value = "/{id}")
|
|
|
+// @ApiOperation("获取教练用户详细信息")
|
|
|
+// public Response<CoachInfo> getInfo(
|
|
|
+// @ApiParam(name = "id", value = "教练用户参数", required = true)
|
|
|
+// @PathVariable("id") Long id
|
|
|
+// ){
|
|
|
+// return Response.success(coachInfoService.getById(id));
|
|
|
+// }
|
|
|
+////
|
|
|
// /**
|
|
|
// * 新增教练用户
|
|
|
// */
|
|
@@ -109,6 +115,29 @@ public class CoachInfoController extends BaseController{
|
|
|
return toResponse(coachInfoService.updateById(coachInfo) ? 1 : 0);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @GetMapping("/order/list")
|
|
|
+ @ApiOperation("微信订单")
|
|
|
+ public Response<List<WxOrder>> wxOrderList(Integer orderStatus){
|
|
|
+ CoachInfo coachInfo= SecurityUtils.getLoginUser().getCoach();
|
|
|
+ QueryWrapper<WxOrder> wxOrderQueryWrapper = new QueryWrapper<>();
|
|
|
+ wxOrderQueryWrapper.eq("coachUnionId",coachInfo.getUnionId());
|
|
|
+ if (orderStatus!=null){
|
|
|
+ wxOrderQueryWrapper.eq("order_status",orderStatus);
|
|
|
+ };
|
|
|
+ return Response.success(wxOrderService.list(wxOrderQueryWrapper));
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/order/{id}")
|
|
|
+ @ApiOperation("微信订单")
|
|
|
+ public Response<WxOrder> wxOrder(
|
|
|
+ @ApiParam(name = "id", value = "微信订单id", required = true)
|
|
|
+ @PathVariable("id") Long id
|
|
|
+ ){
|
|
|
+ return Response.success(wxOrderService.getById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// /**
|
|
|
// * 删除教练用户
|
|
|
// */
|