Althars123 3 жил өмнө
parent
commit
90fdbb9e53

+ 0 - 18
twzd-admin/src/main/java/com/miaxis/app/controller/wx/WxController.java

@@ -195,26 +195,8 @@ public class WxController extends BaseController {
     }
 
 
-    /**
-     * 微信提现
-     */
-    @PostMapping(value = "/withdraw")
-    @ApiOperation("微信提现")
-    public Response getPrepareOrder(Integer amount) throws Exception{
-
-        if (amount == null){
-            throw new CustomException("提现金额不能为空");
-
-        }
-        if (amount > 200 && amount <0){
-            throw new CustomException("提现金额必须在200以内");
-        }
-        wxOrderService.wxwithdrawal(amount);
-        return Response.success();
 
 
-    }
-
 
 
     private HttpPost initHttpPost() {

+ 27 - 0
twzd-admin/src/main/java/com/miaxis/app/controller/wx/WxExtractController.java

@@ -1,16 +1,20 @@
 package com.miaxis.app.controller.wx;
 
 import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.core.domain.Response;
 import com.miaxis.common.core.page.ResponsePageInfo;
+import com.miaxis.common.exception.CustomException;
 import com.miaxis.common.utils.SecurityUtils;
 import com.miaxis.wx.domain.WxExtract;
 import com.miaxis.wx.service.IWxExtractService;
+import com.miaxis.wx.service.IWxOrderService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -29,6 +33,9 @@ public class WxExtractController extends BaseController{
     @Autowired
     private IWxExtractService wxExtractService;
 
+    @Autowired
+    private IWxOrderService wxOrderService;
+
     /**
      * 查询微信提现列表
      */
@@ -46,6 +53,26 @@ public class WxExtractController extends BaseController{
         return toResponsePageInfo(list);
     }
 
+    /**
+     * 微信提现
+     */
+    @PostMapping(value = "/withdraw")
+    @ApiOperation("微信提现")
+    public Response getPrepareOrder(Integer amount) throws Exception{
+
+        if (amount == null){
+            throw new CustomException("提现金额不能为空");
+
+        }
+        if (amount > 200 && amount <0){
+            throw new CustomException("提现金额必须在200以内");
+        }
+        wxOrderService.wxwithdrawal(amount);
+        return Response.success();
+
+
+    }
+