Sfoglia il codice sorgente

订单微信支付接口、余额支付接口新增api注释

codingliang 1 anno fa
parent
commit
4d2d462229

+ 11 - 2
src/main/java/com/sqx/modules/pay/controller/app/ApiWeiXinPayController.java

@@ -6,6 +6,7 @@ import com.sqx.modules.pay.dao.PayDetailsDao;
 import com.sqx.modules.pay.service.WxService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -46,14 +47,22 @@ public class ApiWeiXinPayController {
     @Login
     @ApiOperation("微信支付宝支付订单")
     @PostMapping("/wxPayJsApiOrder")
-    public Result wxPayJsApiOrder(@RequestAttribute("userId") Long userId, Long parentId, Integer type, Long addressId, Integer orderType, Long activityId) throws Exception {
+    public Result wxPayJsApiOrder(@RequestAttribute("userId") Long userId, @ApiParam("订单id") Long parentId,
+                                  @ApiParam("支付方式 1表示微信支付、4或5表示支付宝支付") Integer type,
+                                  @ApiParam("地址id") Long addressId,
+                                  @ApiParam("订单类型 1到店、2外卖") Integer orderType,
+                                  @ApiParam("活动id") Long activityId) throws Exception {
         return wxService.payOrder(userId,parentId,type, addressId, orderType, activityId);
     }
 
     @Login
     @ApiOperation("余额支付订单")
     @PostMapping(value = "balanceOrder")
-    public Result balanceOrder(@RequestAttribute Long userId, Long parentId, Integer orderType, Long addressId, Long activityId){
+    public Result balanceOrder(@RequestAttribute Long userId,
+                               @ApiParam("订单id") Long parentId,
+                               @ApiParam("订单类型 1到店、2外卖") Integer orderType,
+                               @ApiParam("地址id") Long addressId,
+                               @ApiParam("活动id") Long activityId){
 
         return wxService.balanceOrder(userId, parentId, orderType, addressId, activityId);
     }