From 2f59d05be0f990b81cdb1c4ce0ed7de0408e54a2 Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Mon, 24 Jan 2022 11:52:13 +0800 Subject: [PATCH] =?UTF-8?q?aps=E6=92=A4=E9=94=80=E8=AE=A2=E5=8D=95=20?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/merchants/web/PartnerViewController.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java index 2953de97c..7d04cc0f2 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java @@ -11,6 +11,7 @@ import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean; import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientSignEventSupport; import au.com.royalpay.payment.manage.permission.manager.PartnerMapping; +import au.com.royalpay.payment.manage.permission.manager.RequireManager; import au.com.royalpay.payment.manage.permission.manager.RequirePartner; import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection; import au.com.royalpay.payment.manage.signin.core.SignInAccountService; @@ -25,6 +26,7 @@ import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.http.HttpUtils; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; +import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import au.com.royalpay.payment.tools.permission.enums.PartnerRole; import au.com.royalpay.payment.tools.permission.wechat.WechatMapping; import com.alibaba.fastjson.JSONObject; @@ -683,8 +685,11 @@ public class PartnerViewController { } @PartnerMapping(value = "/cancel_order", method = RequestMethod.POST) @ResponseBody + @RequireManager(role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF, ManagerRole.SERVANT}) + @RequirePartner public JSONObject cancel(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody JSONObject order, Errors errors) { System.out.println("=====>cancel_order"); - return cancelOrderService.cancelOrderOrNot(order.getString("orderId")); + //暂时未给运营端使用,仅商户端使用 + return cancelOrderService.cancelOrderOrNot(order.getString("orderId"),account.getIntValue("client_id")); } }