fix merchant

master
luoyang 6 years ago
parent aea70ff828
commit 6cd99c841c

@ -99,4 +99,7 @@ public interface ClientMapper {
List<JSONObject> findByhfPayUrlNotNull();
@AutoSql(type = SqlType.UPDATE)
void updateRpayEnterpriseId(@Param("client_id") int clientId, @Param("rpay_enterprise_id") String rpayEnterpriseId);
}

@ -21,6 +21,6 @@ public interface SysRpayMerchantApplyMapper {
void insertRpayMerchantApply(JSONObject params);
@AutoSql(type = SqlType.SELECT)
List<JSONObject> selectByShortName(@Param("client_id") int client_id,@Param("merchant_shortname") String shortName);
List<JSONObject> listByShortName(@Param("client_id") int client_id,@Param("merchant_shortname") String shortName);
}

@ -336,7 +336,7 @@ public interface ClientManager {
void sendHfEmailNotice(JSONObject order);
String subRpayMerchantApplication(String clientMoniker, JSONObject manager);
void subRpayMerchantApplication(String clientMoniker, JSONObject manager);
void updateAllPartnerPassword(String clientMoniker, List<String> emails);
}

@ -3598,16 +3598,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
public String subRpayMerchantApplication(String clientMoniker, JSONObject manager) {
public void subRpayMerchantApplication(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
List<JSONObject> selectByshortName = sysRpayMerchantApplyMapper.selectByShortName(client.getIntValue("client_id"),client.getString("short_name"));
List<JSONObject> listByshortName = sysRpayMerchantApplyMapper.listByShortName(client.getIntValue("client_id"),client.getString("short_name"));
if (selectByshortName.size()>0) {
if (listByshortName.size()>0) {
throw new BadRequestException("请修改【" + clientMoniker + "】的Company shortName信息请避免和Rpay+商务号列表内的Company Short Name重复");
}
@ -3625,11 +3625,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
merchantApply.put("business_category", client.getString("royalpayindustry"));
merchantApply.put("merchant_shortname", client.getString("short_name"));
sysRpayMerchantApplyMapper.insertRpayMerchantApply(merchantApply);
clientMapper.updateRpayEnterpriseId(client.getIntValue("client_id"), rpayMerchantInfo.getString("merchantId"));
}else {
throw new BadRequestException("请求失败");
}
return null;
}
@Override

@ -582,8 +582,8 @@ public class PartnerManageController {
clientManager.switchPermission(manager, clientMoniker, "enable_hf_email_notice", pass.getBooleanValue("allow"));
}
@ManagerMapping(value = "/{clientMoniker}/registRpaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public String subRpayMerchantApplication(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.subRpayMerchantApplication(clientMoniker, manager);
public void subRpayMerchantApplication(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.subRpayMerchantApplication(clientMoniker, manager);
}
}

@ -95,7 +95,7 @@
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<h3 class="box-title pull-left" ng-if="partner.enable_rpay">
<h3 class="box-title pull-left">
Rpay+ Sub Merchant Id : {{partner.rpay_enterprise_id}}
<i class="fa fa-clock-o text-danger" title="Using temp Sub Merchant ID" ng-if="partner.temp_sub_merchant"></i>
</h3>

Loading…
Cancel
Save