master
wangning 7 years ago
parent 13f8547d47
commit e68fb40acf

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.appclient.web;
import au.com.royalpay.payment.core.exceptions.NotEnoughBalanceException;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.activities.app_index.core.AppActService;
import au.com.royalpay.payment.manage.activities.monsettledelay.core.ActMonDelaySettleService;
@ -112,7 +113,8 @@ public class RetailAppController {
@RequestMapping(value = "/orders_new", method = RequestMethod.GET)
public JSONObject listOrdersNew(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean query) {
return retailAppService.listOrdersNew(device, query);
throw new NotEnoughBalanceException();
// return retailAppService.listOrdersNew(device, query);
}
@RequestMapping(value = "/orders/share_code", method = RequestMethod.GET)

@ -245,7 +245,7 @@ public interface ClientManager {
void setSkipClearing(JSONObject account,String clientMoniker, Boolean skip_clearing);
void enableGatewayUpgrade(String clientMoniker, boolean gatewayUpgrade);
void enableGatewayUpgrade(JSONObject account,String clientMoniker, boolean gatewayUpgrade);
void setCustomerSurchargeRate(JSONObject account,String clientMoniker, BigDecimal customer_surcharge_rate);

@ -2774,6 +2774,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("refuse_remark", refuse_remark);
}
saveClientAuditProcess(client.getIntValue("client_id"), open_status, client.getInteger("open_status"), "打回," + refuse_remark, manager);
clientMapper.update(client);
try {
sendMessageToBD(client, refuse_remark);
@ -2821,27 +2822,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject update = new JSONObject();
int clientId = client.getIntValue("client_id");
update.put("client_id", clientId);
update.put("skip_clearing", skip_clearing);
clientModifySupport.processClientConfigModify(new SwitchPermissionModify());
clientMapper.update(update);
clientInfoCacheSupport.clearClientCache(clientId);
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account,clientMoniker,"skip_clearing",skip_clearing));
}
@Override
public void enableGatewayUpgrade(String clientMoniker, boolean gatewayUpgrade) {
public void enableGatewayUpgrade(JSONObject account,String clientMoniker, boolean gatewayUpgrade) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject update = new JSONObject();
int clientId = client.getIntValue("client_id");
update.put("client_id", clientId);
update.put("gateway_upgrade", gatewayUpgrade);
clientMapper.update(update);
clientInfoCacheSupport.clearClientCache(clientId);
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account,clientMoniker,"gateway_upgrade",gatewayUpgrade));
}
private void sendMessagetoCompliance(JSONObject client, String bd_user_name) {

@ -1,30 +1,41 @@
package au.com.royalpay.payment.manage.merchants.web;
import com.google.code.kaptcha.Producer;
import au.com.royalpay.payment.core.exceptions.NotEnoughBalanceException;
import au.com.royalpay.payment.manage.merchants.beans.ClientApplyInfo;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.merchants.core.ClientApply;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.manage.permission.manager.RequireManager;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.permission.wechat.WechatMapping;
import com.alibaba.fastjson.JSONObject;
import com.google.code.kaptcha.Producer;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import java.awt.image.BufferedImage;
import java.util.List;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.awt.image.BufferedImage;
import java.util.List;
/**
* Created by yishuqian on 18/10/2016.
@ -37,6 +48,10 @@ public class PartnerApplyController {
@Resource
private Producer captchaProducer;
@RequestMapping(value = "/asd")
public void asd(){
throw new NotEnoughBalanceException();
}
@RequestMapping(method = RequestMethod.POST)
public void applyPartner(@CookieValue(CommonConsts.CODE_KEY) String codeKey, @RequestBody @Valid ClientApplyInfo apply,
Errors errors, HttpServletResponse response) throws Exception {

@ -176,8 +176,8 @@ public class PartnerManageController {
}
@ManagerMapping(value = "/{clientMoniker}/gateway_upgrade", method = RequestMethod.PUT, role = {ManagerRole.DEVELOPER})
public void enableGatewayUpgrade(@PathVariable String clientMoniker, @RequestBody JSONObject config) {
clientManager.enableGatewayUpgrade(clientMoniker, config.getBooleanValue("gateway_upgrade"));
public void enableGatewayUpgrade(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,@PathVariable String clientMoniker, @RequestBody JSONObject config) {
clientManager.enableGatewayUpgrade(manager,clientMoniker, config.getBooleanValue("gateway_upgrade"));
}
@ManagerMapping(value = "/{clientMoniker}/api_surcharge", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.SERVANT})

Loading…
Cancel
Save