From 47fc73f389d369634ce9312d3ba0303188560c97 Mon Sep 17 00:00:00 2001 From: yuan <1551130722@qq.com> Date: Mon, 25 Dec 2017 20:39:07 +0800 Subject: [PATCH] FIX~ --- .../manage/merchants/core/impls/ClientManagerImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 097c7ca93..6a20c951c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -2305,12 +2305,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (client == null) { throw new InvalidShortIdException(); } + if (manager != null && ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) { int bdOperatClientRole = clientBDMapper.checkBDPermission(client.getIntValue("client_id"), manager.getString("manager_id")); if (bdOperatClientRole <= 0) { throw new ForbiddenException(); } } + + if (client.getInteger("open_status") == null) { + int countProduct = commoditiesMapper.checkProduct(client.getInteger("client_id")); + if (countProduct <= 0) { + throw new BadRequestException("The Merchant's Product is empty!"); + } + } + JSONObject surCharge = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat"); if (surCharge == null || surCharge.size() <= 0) { throw new BadRequestException("The Partner's Rate is not config!");