fix merchant

master
luoyang 6 years ago
parent 94c971baeb
commit de55f0b10c

@ -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);
}
}

Loading…
Cancel
Save