瀏覽代碼

教练端提交审核

Althars123 2 年之前
父節點
當前提交
f9a1b32420

+ 42 - 13
fx-admin/src/main/java/com/miaxis/h5/controller/coach/CoachInfoController.java

@@ -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));
+    }
+
+
 //    /**
 //     * 删除教练用户
 //     */

+ 1 - 1
fx-service/src/main/java/com/miaxis/wx/domain/WxOrder.java

@@ -169,7 +169,7 @@ public class WxOrder extends BaseBusinessEntity {
     /** 订单状态 */
     @Excel(name = "订单数据详情")
     @TableField("order_status")
-    @ApiModelProperty(value = "订单状态: 1 -进行中 2-购买成功 3-购买失败")
+    @ApiModelProperty(value = "订单状态: 1 -未付款 2-已付款(未完成) 3-已完成 4-取消(退款)")
     private String orderStatus;