|
@@ -6,6 +6,7 @@ import com.sqx.modules.pay.dao.PayDetailsDao;
|
|
|
import com.sqx.modules.pay.service.WxService;
|
|
import com.sqx.modules.pay.service.WxService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -46,14 +47,22 @@ public class ApiWeiXinPayController {
|
|
|
@Login
|
|
@Login
|
|
|
@ApiOperation("微信支付宝支付订单")
|
|
@ApiOperation("微信支付宝支付订单")
|
|
|
@PostMapping("/wxPayJsApiOrder")
|
|
@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);
|
|
return wxService.payOrder(userId,parentId,type, addressId, orderType, activityId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Login
|
|
@Login
|
|
|
@ApiOperation("余额支付订单")
|
|
@ApiOperation("余额支付订单")
|
|
|
@PostMapping(value = "balanceOrder")
|
|
@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);
|
|
return wxService.balanceOrder(userId, parentId, orderType, addressId, activityId);
|
|
|
}
|
|
}
|