Merge remote-tracking branch 'origin/develop' into develop

master
lujian 6 years ago
commit 174064e245

@ -40,6 +40,10 @@
<groupId>au.com.royalpay.payment</groupId> <groupId>au.com.royalpay.payment</groupId>
<artifactId>rpay-core</artifactId> <artifactId>rpay-core</artifactId>
</dependency> </dependency>
<dependency>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>yeepay-core</artifactId>
</dependency>
<dependency> <dependency>
<groupId>com.github.stuxuhai</groupId> <groupId>com.github.stuxuhai</groupId>
<artifactId>jpinyin</artifactId> <artifactId>jpinyin</artifactId>

@ -30,6 +30,8 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
listChannel.add(putParam(params,"AlipayOnline")); listChannel.add(putParam(params,"AlipayOnline"));
listChannel.add(putParam(params,"jd")); listChannel.add(putParam(params,"jd"));
listChannel.add(putParam(params,"hf")); listChannel.add(putParam(params,"hf"));
listChannel.add(putParam(params,"Rpay"));
listChannel.add(putParam(params,"Yeepay"));
return listChannel; return listChannel;
} }
@ -40,7 +42,7 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
} }
List<JSONObject> list = new ArrayList<>(); List<JSONObject> list = new ArrayList<>();
Map<Date,JSONObject> analysisMap = new TreeMap<>(); Map<Date,JSONObject> analysisMap = new TreeMap<>();
String[] channels = {"Wechat","Bestpay","Alipay","jd","AlipayOnline","hf", "Rpay"}; String[] channels = {"Wechat","Bestpay","Alipay","jd","AlipayOnline","hf", "Rpay","Yeepay"};
for (String channel:channels){ for (String channel:channels){
analysisChannelCustomers(params, analysisMap, channel); analysisChannelCustomers(params, analysisMap, channel);
} }

@ -556,7 +556,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
} }
} }
private JSONObject getTodayChannelCount(JSONObject params){ private JSONObject getTodayChannelCount(JSONObject params){
String[] channels = new String[]{"Bestpay","Wechat","Alipay","jd","AlipayOnline","hf", "Rpay"}; String[] channels = new String[]{"Bestpay","Wechat","Alipay","jd","AlipayOnline","hf", "Rpay","Yeepay"};
JSONObject resp = new JSONObject(); JSONObject resp = new JSONObject();
for(String channel:channels) { for(String channel:channels) {
params.put("channel", channel); params.put("channel", channel);

@ -1378,6 +1378,10 @@ public class RetailAppServiceImp implements RetailAppService {
if (Hf.containsKey("channel")) { if (Hf.containsKey("channel")) {
channels.add(Hf); channels.add(Hf);
} }
JSONObject Yeepay = getChannel(clientId, now, "Yeepay");
if (Yeepay.containsKey("channel")) {
channels.add(Yeepay);
}
res.put("channels", channels); res.put("channels", channels);
return res; return res;
} }

@ -28,9 +28,11 @@ public class AfterPaymentFinishListener implements ApplicationListener<AfterPaym
@Override @Override
public void onApplicationEvent(AfterPaymentFinishEvent event) { public void onApplicationEvent(AfterPaymentFinishEvent event) {
JSONObject order = event.getFinishedEvent().getOrder(); JSONObject order = event.getFinishedEvent().getOrder();
if(!"hf".equals(order.getString("channel"))){ if(!"hf".equals(order.getString("channel"))||!"Yeepay".equals(order.getString("channel"))){
return; return;
} }
switch (order.getString("channel")){
case "hf":
if(StringUtils.isEmpty(order.getString("ext_params"))){ if(StringUtils.isEmpty(order.getString("ext_params"))){
return; return;
} }
@ -52,5 +54,10 @@ public class AfterPaymentFinishListener implements ApplicationListener<AfterPaym
customerPaymentInfoService.save(lastOrderInfo); customerPaymentInfoService.save(lastOrderInfo);
} }
clientManager.sendHfEmailNotice(order); clientManager.sendHfEmailNotice(order);
return;
case "Yeepay":
clientManager.sendGatewayEmailNotice(order);
return;
}
} }
} }

@ -80,7 +80,7 @@ public class BDPrizeServiceImpl implements BDPrizeService {
private static BigDecimal percent = new BigDecimal(100); private static BigDecimal percent = new BigDecimal(100);
private static String[] channels = new String[]{"Wechat", "Alipay", "Bestpay", "jd", "AlipayOnline","hf", "Rpay"}; private static String[] channels = new String[]{"Wechat", "Alipay", "Bestpay", "jd", "AlipayOnline","hf", "Rpay","Yeepay"};
private static Logger logger = LoggerFactory.getLogger(BDPrizeServiceImpl.class); private static Logger logger = LoggerFactory.getLogger(BDPrizeServiceImpl.class);
@Override @Override

@ -64,6 +64,9 @@ public interface ClientManager {
@Transactional @Transactional
void updateClientRpayPaymentConfig(JSONObject manager, String clientMoniker, JSONObject rpaySubMerchantInfo); void updateClientRpayPaymentConfig(JSONObject manager, String clientMoniker, JSONObject rpaySubMerchantInfo);
@Transactional
void updateClientYeepayPaymentConfig(JSONObject manager, String clientMoniker, JSONObject yeepaySubMerchantInfo);
@Transactional @Transactional
void updateAliSubMerchantId(JSONObject manager, String clientMoniker, JSONObject aliSubMerchantInfo); void updateAliSubMerchantId(JSONObject manager, String clientMoniker, JSONObject aliSubMerchantInfo);
@ -304,6 +307,8 @@ public interface ClientManager {
List<JSONObject> listRpaySubMerchantIdApplys(JSONObject manager, String clientMoniker); List<JSONObject> listRpaySubMerchantIdApplys(JSONObject manager, String clientMoniker);
List<JSONObject> listYeepaySubMerchantIdApplys(JSONObject manager, String clientMoniker);
String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply,JSONObject manager); String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply,JSONObject manager);
List<JSONObject> listMerchantIds(String clientMoniker,JSONObject manager); List<JSONObject> listMerchantIds(String clientMoniker,JSONObject manager);
@ -332,13 +337,22 @@ public interface ClientManager {
String getShortLink(String client_moniker); String getShortLink(String client_moniker);
String getGatewayShortLink(String client_moniker,String channel);
@Transactional @Transactional
void switchHfLink(JSONObject manager, String clientMoniker,boolean allow); void switchHfLink(JSONObject manager, String clientMoniker,boolean allow);
@Transactional
void switchGatewayLink(JSONObject manager, String clientMoniker,String channel,boolean allow);
void sendHfEmailNotice(JSONObject order); void sendHfEmailNotice(JSONObject order);
void sendGatewayEmailNotice(JSONObject order);
void subRpayMerchantApplication(String clientMoniker,JSONObject merchantInfo, JSONObject manager); void subRpayMerchantApplication(String clientMoniker,JSONObject merchantInfo, JSONObject manager);
void subYeepayMerchantApplication(String clientMoniker,JSONObject merchantInfo, JSONObject manager);
void updateAllPartnerPassword(String clientMoniker, List<String> emails); void updateAllPartnerPassword(String clientMoniker, List<String> emails);
void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client); void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client);

@ -7,6 +7,8 @@ import au.com.royalpay.payment.channels.wechat.config.WechatPayEnvironment;
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi; import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient; import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfo; import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfo;
import au.com.royalpay.payment.channels.yeepay.mappers.YeePayClientConfigMapper;
import au.com.royalpay.payment.channels.yeepay.runtime.YeePayClient;
import au.com.royalpay.payment.core.PaymentChannelApi; import au.com.royalpay.payment.core.PaymentChannelApi;
import au.com.royalpay.payment.core.exceptions.EmailException; import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException; import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
@ -120,6 +122,7 @@ import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList; import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.yeepay.yop.sdk.service.kj.model.SubmerchantRegisterResult;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
@ -243,6 +246,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource @Resource
private RpayApi rpayApi; private RpayApi rpayApi;
@Resource
private YeePayClient yeePayClient;
@Resource
private YeePayClientConfigMapper yeePayClientConfigMapper;
@Resource @Resource
private ManagerMapper managerMapper; private ManagerMapper managerMapper;
@Resource @Resource
@ -432,6 +441,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
String hfQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/hf_gateway/partners/" + client.getString("client_moniker") + "/jump/app"); String hfQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/hf_gateway/partners/" + client.getString("client_moniker") + "/jump/app");
client.put("hfQrcodeUrl", QRCodeUtils.qrcodeImageCode(hfQrcodeUrl, 250, true)); client.put("hfQrcodeUrl", QRCodeUtils.qrcodeImageCode(hfQrcodeUrl, 250, true));
} }
if (client.getString("yeepay_pay_url") != null) {
String yeepayQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/yeepay/partners/" + client.getString("client_moniker") + "/jump/app");
client.put("yeepayQrcodeUrl", QRCodeUtils.qrcodeImageCode(yeepayQrcodeUrl, 250, true));
}
return client; return client;
} }
@ -795,6 +808,25 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(clientId); clientInfoCacheSupport.clearClientCache(clientId);
} }
@Transactional
@Override
public void updateClientYeepayPaymentConfig(JSONObject manager, String clientMoniker, JSONObject yeepaySubMerchantInfo) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
if(client.getString("yeepay_sub_merchant_id").equals(yeepaySubMerchantInfo.getString("yeepay_sub_merchant_id"))){
throw new BadRequestException("The sub merchant Id is in use");
}
JSONObject yeepayConfigValid =yeePayClientConfigMapper.findMerchantConfig(client.getIntValue("client_id"));
yeePayClientConfigMapper.updateSubMerchantIdValid(yeepayConfigValid.getString("yeepay_config_id"),0);
JSONObject yeepayConfig = yeePayClientConfigMapper.findMerchantConfigBySub(yeepaySubMerchantInfo.getString("yeepay_sub_merchant_id"));
yeePayClientConfigMapper.updateSubMerchantIdValid(yeepayConfig.getString("yeepay_config_id"),1);
client.put("yeepay_sub_merchant_id",yeepaySubMerchantInfo.getString("yeepay_sub_merchant_id"));
clientMapper.update(client);
}
@Override @Override
public void updateAliSubMerchantId(JSONObject manager, String clientMoniker, JSONObject aliSubMerchantInfo) { public void updateAliSubMerchantId(JSONObject manager, String clientMoniker, JSONObject aliSubMerchantInfo) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -1220,6 +1252,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (channel.equals("hf") && !allow && client.getBoolean("enable_hf_email_notice")) { if (channel.equals("hf") && !allow && client.getBoolean("enable_hf_email_notice")) {
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_hf_email_notice", allow)); clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_hf_email_notice", allow));
} }
if (channel.equals("yeepay") && !allow && client.getBoolean("enable_yeepay_email_notice")) {
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_yeepay_email_notice", allow));
}
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_" + channel.toLowerCase(), allow)); clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_" + channel.toLowerCase(), allow));
logger.info(manager.getString("display_name") + "(" + manager.getString("manager_id") + ") switched client " + clientMoniker + " channel " logger.info(manager.getString("display_name") + "(" + manager.getString("manager_id") + ") switched client " + clientMoniker + " channel "
@ -1591,6 +1626,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkAddRate(config, "jd", "jd_rate_value", org, "min_jd_rate"); checkAddRate(config, "jd", "jd_rate_value", org, "min_jd_rate");
checkAddRate(config, "hf", "hf_rate_value", org, "min_hf_rate"); checkAddRate(config, "hf", "hf_rate_value", org, "min_hf_rate");
checkAddRate(config, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate"); checkAddRate(config, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
checkAddRate(config, "Yeepay", "yeepay_rate_value", org, "min_yeepay_rate");
configNewClientRate(config, clientId, "Wechat", "wechat_rate_value", org, "min_wechat_rate"); configNewClientRate(config, clientId, "Wechat", "wechat_rate_value", org, "min_wechat_rate");
configNewClientRate(config, clientId, "Alipay", "alipay_rate_value", org, "min_alipay_rate"); configNewClientRate(config, clientId, "Alipay", "alipay_rate_value", org, "min_alipay_rate");
@ -1599,6 +1635,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
configNewClientRate(config, clientId, "jd", "jd_rate_value", org, "min_jd_rate"); configNewClientRate(config, clientId, "jd", "jd_rate_value", org, "min_jd_rate");
configNewClientRate(config, clientId, "hf", "hf_rate_value", org, "min_hf_rate"); configNewClientRate(config, clientId, "hf", "hf_rate_value", org, "min_hf_rate");
configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate"); configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
configNewClientRate(config, clientId, "Yeepay", "yeepay_rate_value", org, "min_yeepay_rate");
//todo 暂不更新Rpay+ 费率信息 //todo 暂不更新Rpay+ 费率信息
rpayApi.modifySurchargeConfig(client); rpayApi.modifySurchargeConfig(client);
@ -3572,6 +3609,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return null; return null;
} }
@Override
public List<JSONObject> listYeepaySubMerchantIdApplys(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
List<JSONObject> applices = yeePayClientConfigMapper.findAllMerchantConfig(client.getInteger("client_id"));
if (!applices.isEmpty()) {
return applices;
}
return null;
}
@Override @Override
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker") @CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager) { public String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager) {
@ -3635,6 +3686,39 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
@Override
@Transactional
public void subYeepayMerchantApplication(String clientMoniker, JSONObject merchantInfo, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
List<JSONObject> yeepayClientConfigs = yeePayClientConfigMapper.findAllMerchantConfig(client.getIntValue("client_id"));
if(yeepayClientConfigs!=null){
for(JSONObject yeepayClientConfig:yeepayClientConfigs){
if(yeepayClientConfig.getIntValue("is_valid")==1){
yeePayClientConfigMapper.updateSubMerchantIdValid(yeepayClientConfig.getString("yeepay_config_id"),0);
}
}
}
merchantInfo.put("create_time",new Date());
merchantInfo.put("operator",manager.getString("display_name"));
merchantInfo.put("client_id",client.getIntValue("client_id"));
merchantInfo.put("vouchers",merchantInfo.getJSONObject("vouchers").toJSONString());
yeePayClientConfigMapper.saveMerchantConfig(merchantInfo);
JSONObject yeepayConfig = yeePayClientConfigMapper.findMerchantConfig(client.getIntValue("client_id"));
SubmerchantRegisterResult result = yeePayClient.registerMerchant(client,yeepayConfig);
if(result.getStatus().equals("FAILED")){
throw new BadRequestException(result.getErrorMsg());
}
yeepayConfig.put("sub_merchant_id",result.getSubMerchantId());
yeePayClientConfigMapper.updateSubMerchantId(yeepayConfig.getString("yeepay_config_id"),result.getMerchantId(),result.getSubMerchantId());
client.put("yeepay_sub_merchant_id",result.getSubMerchantId());
clientMapper.update(client);
}
@Override @Override
public List<JSONObject> listMerchantIds(String clientMoniker, JSONObject manager) { public List<JSONObject> listMerchantIds(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -3878,6 +3962,30 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
@Override
public void switchGatewayLink(JSONObject manager, String clientMoniker,String channel, boolean allow) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
if (allow) {
if (StringUtils.isEmpty(client.getString(channel+"_pay_url"))) {
String channel_pay_url = getGatewayShortLink(clientMoniker,channel.toLowerCase());
client.put(channel+"_pay_url", channel_pay_url);
JSONObject clientConfig = new JSONObject();
clientConfig.put(channel+"_pay_url", channel_pay_url);
clientConfig.put("client_id", client.getIntValue("client_id"));
clientConfigMapper.update(clientConfig);
clientMapper.update(client);
}
}
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_"+channel+"_link", allow));
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_"+channel, allow));
}
@Override @Override
public void sendHfEmailNotice(JSONObject order) { public void sendHfEmailNotice(JSONObject order) {
JSONObject client = clientMapper.findClient(order.getIntValue("client_id")); JSONObject client = clientMapper.findClient(order.getIntValue("client_id"));
@ -3917,6 +4025,55 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}).start(); }).start();
} }
@Override
public void sendGatewayEmailNotice(JSONObject order) {
JSONObject client = clientMapper.findClient(order.getIntValue("client_id"));
JSONObject clientConfig = clientConfigMapper.find(order.getIntValue("client_id"));
if (client == null || clientConfig == null) {
return;
}
if (client.getString("contact_email") == null ||
!clientConfig.getBoolean("enable_"+order.getString("channel").toLowerCase()+"_email_notice")) {
return;
}
Context ctx = new Context();
ctx.setVariable("img_url", PlatformEnvironment.getEnv().concatUrl("/static/images/royalpay_logo.png"));
ctx.setVariable("name", client.getString("contact_person"));
ctx.setVariable("order_id", order.getString("order_id"));
ctx.setVariable("amount", order.getString("total_amount"));
ctx.setVariable("currency", order.getString("currency"));
ctx.setVariable("channel", getOrderChannel(order.getString("channel")));
String create_time = "";
if (client.getString("timezone") != null) {
create_time = DateFormatUtils.format(order.getDate("create_time"),
"yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone(client.getString("timezone")));
} else {
create_time = DateFormatUtils.format(order.getDate("create_time"), "yyyy-MM-dd HH:mm:ss");
}
ctx.setVariable("time", create_time);
final String content = thymeleaf.process( "mail/gateway_email_notice", ctx);
final String mailTo = client.getString("contact_email");
if (StringUtils.isEmpty(mailTo)) {
throw new EmailException("Client Contact Email is invalid");
}
new Thread(() -> {
try {
mailService.sendEmail("你刚刚有一笔到账信息", mailTo, "", content);
} catch (Exception ignored) {
logger.error("邮件发送失败", ignored);
}
}).start();
}
private String getOrderChannel(String channel){
switch(channel){
case "hf":
return "汇付";
case "Yeepay":
return "易宝支付";
}
return "";
}
@Override @Override
public void updateAllPartnerPassword(String clientMoniker, List<String> emails) { public void updateAllPartnerPassword(String clientMoniker, List<String> emails) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -3946,6 +4103,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return api.registerShortUrl(longUrl); return api.registerShortUrl(longUrl);
} }
@Override
public String getGatewayShortLink(String clientMoniker, String channel) {
String longUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/"+channel+"/partners/" + clientMoniker + "/jump/pc");
MpWechatApi api = mpWechatApiProvider.getNewPaymentApi();
return api.registerShortUrl(longUrl);
}
private void isRiskyMerchant(JSONObject client, JSONObject bankAccount) { private void isRiskyMerchant(JSONObject client, JSONObject bankAccount) {
JSONObject needCheckParams = new JSONObject(); JSONObject needCheckParams = new JSONObject();

@ -178,6 +178,11 @@ public class PartnerManageController {
clientManager.updateClientRpayPaymentConfig(manager, clientMoniker, rpaySubMerchantInfo); clientManager.updateClientRpayPaymentConfig(manager, clientMoniker, rpaySubMerchantInfo);
} }
@ManagerMapping(value = "/{clientMoniker}/yeepay_payment_config", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void updatePartnerYeepayPaymentConfig(@PathVariable String clientMoniker, @RequestBody JSONObject yeepaySubMerchantInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.updateClientYeepayPaymentConfig(manager, clientMoniker, yeepaySubMerchantInfo);
}
@ManagerMapping(value = "/{clientMoniker}/ali_sub_merchant_id", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR}) @ManagerMapping(value = "/{clientMoniker}/ali_sub_merchant_id", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR})
public void updateAliSubMerchantId(@PathVariable String clientMoniker, @RequestBody JSONObject aliSubMerchantInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public void updateAliSubMerchantId(@PathVariable String clientMoniker, @RequestBody JSONObject aliSubMerchantInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.updateAliSubMerchantId(manager, clientMoniker, aliSubMerchantInfo); clientManager.updateAliSubMerchantId(manager, clientMoniker, aliSubMerchantInfo);
@ -546,6 +551,11 @@ public class PartnerManageController {
return clientManager.listRpaySubMerchantIdApplys(manager, clientMoniker); return clientManager.listRpaySubMerchantIdApplys(manager, clientMoniker);
} }
@ManagerMapping(value = "/{clientMoniker}/list_yeepay_sub_applices", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public List<JSONObject> listYeepaySubMerchantIdApplys(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.listYeepaySubMerchantIdApplys(manager, clientMoniker);
}
@ManagerMapping(value = "/{clientMoniker}/sub_apply", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @ManagerMapping(value = "/{clientMoniker}/sub_apply", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public String subMerchantApplication(@PathVariable String clientMoniker, @RequestBody SubMerchantIdApply subMerchantIdApply, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public String subMerchantApplication(@PathVariable String clientMoniker, @RequestBody SubMerchantIdApply subMerchantIdApply, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.subMerchantApplication(clientMoniker,subMerchantIdApply,manager); return clientManager.subMerchantApplication(clientMoniker,subMerchantIdApply,manager);
@ -580,11 +590,26 @@ public class PartnerManageController {
clientManager.switchPermission(manager, clientMoniker, "enable_hf_email_notice", pass.getBooleanValue("allow")); clientManager.switchPermission(manager, clientMoniker, "enable_hf_email_notice", pass.getBooleanValue("allow"));
} }
@ManagerMapping(value = "/{clientMoniker}/{channel}", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void switchGateWayLinkPermission(@PathVariable String clientMoniker, @PathVariable String channel,@RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.switchGatewayLink(manager, clientMoniker, channel,pass.getBooleanValue("allow"));
}
@ManagerMapping(value = "/{clientMoniker}/{channel}/email_notice", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void switchGatewayEmailNotice(@PathVariable String clientMoniker, @PathVariable String channel,@RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.switchPermission(manager, clientMoniker,"enable_"+channel+"_email_notice", pass.getBooleanValue("allow"));
}
@ManagerMapping(value = "/{clientMoniker}/registRpaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @ManagerMapping(value = "/{clientMoniker}/registRpaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void subRpayMerchantApplication(@PathVariable String clientMoniker,@RequestBody JSONObject merchantInfo,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public void subRpayMerchantApplication(@PathVariable String clientMoniker,@RequestBody JSONObject merchantInfo,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.subRpayMerchantApplication(clientMoniker, merchantInfo,manager); clientManager.subRpayMerchantApplication(clientMoniker, merchantInfo,manager);
} }
@ManagerMapping(value = "/{clientMoniker}/registYeepaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void subYeepayMerchantApplication(@PathVariable String clientMoniker,@RequestBody JSONObject merchantInfo,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.subYeepayMerchantApplication(clientMoniker, merchantInfo,manager);
}
@RequestMapping(value = "/compliance", method = RequestMethod.GET) @RequestMapping(value = "/compliance", method = RequestMethod.GET)
@RequireManager(role = { ManagerRole.OPERATOR}) @RequireManager(role = { ManagerRole.OPERATOR})
public JSONObject lisPartnersByCompliance(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, PartnerQuery query) { public JSONObject lisPartnersByCompliance(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, PartnerQuery query) {

@ -29,6 +29,7 @@ public class OrgInfo {
private Double alipayonline_rate_value; private Double alipayonline_rate_value;
private Double jd_rate_value; private Double jd_rate_value;
private Double hf_rate_value; private Double hf_rate_value;
private Double yeepay_rate_value;
private int is_valid; private int is_valid;
private String search_text; private String search_text;
private int page = 1; private int page = 1;
@ -42,6 +43,7 @@ public class OrgInfo {
private Double min_jd_rate; private Double min_jd_rate;
private Double min_alipayonline_rate; private Double min_alipayonline_rate;
private Double min_hf_rate; private Double min_hf_rate;
private Double min_yeepay_rate;
private String state; private String state;
private String senior_parent_org_id; private String senior_parent_org_id;
@ -323,4 +325,20 @@ public class OrgInfo {
public void setSenior_parent_org_id(String senior_parent_org_id) { public void setSenior_parent_org_id(String senior_parent_org_id) {
this.senior_parent_org_id = senior_parent_org_id; this.senior_parent_org_id = senior_parent_org_id;
} }
public Double getYeepay_rate_value() {
return yeepay_rate_value;
}
public void setYeepay_rate_value(Double yeepay_rate_value) {
this.yeepay_rate_value = yeepay_rate_value;
}
public Double getMin_yeepay_rate() {
return min_yeepay_rate;
}
public void setMin_yeepay_rate(Double min_yeepay_rate) {
this.min_yeepay_rate = min_yeepay_rate;
}
} }

@ -233,7 +233,7 @@ public class OrgManagerImpl implements OrgManager {
JSONArray rate1 = new JSONArray(); JSONArray rate1 = new JSONArray();
JSONArray rate2 = new JSONArray(); JSONArray rate2 = new JSONArray();
if(orgObject.getString("commission_type").equals(json.getString("commission_type"))){ if(orgObject.getString("commission_type").equals(json.getString("commission_type"))){
String[] rates = new String[]{"alipay_rate_value","wechat_rate_value","bestpay_rate_value","alipayonline_rate_value","jd_rate_value"}; String[] rates = new String[]{"alipay_rate_value","wechat_rate_value","bestpay_rate_value","alipayonline_rate_value","jd_rate_value","yeepay_rate_value"};
for (String rateName: rates ){ for (String rateName: rates ){
if(StringUtils.isEmpty(orgObject.getString(rateName))){ if(StringUtils.isEmpty(orgObject.getString(rateName))){
rate1.add(rateName); rate1.add(rateName);

@ -1,9 +1,11 @@
package au.com.royalpay.payment.manage.support.attachment.web; package au.com.royalpay.payment.manage.support.attachment.web;
import au.com.royalpay.payment.channels.yeepay.runtime.YeePayClient;
import au.com.royalpay.payment.manage.permission.manager.RequireManager; import au.com.royalpay.payment.manage.permission.manager.RequireManager;
import au.com.royalpay.payment.manage.permission.manager.RequirePartner; import au.com.royalpay.payment.manage.permission.manager.RequirePartner;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient; import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeepay.yop.sdk.service.kj.model.FileUploadResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -20,6 +22,8 @@ import java.io.IOException;
public class AttachmentController { public class AttachmentController {
@Resource @Resource
private AttachmentClient attachmentClient; private AttachmentClient attachmentClient;
@Resource
private YeePayClient yeePayClient;
@RequestMapping(value = "/files", method = RequestMethod.POST) @RequestMapping(value = "/files", method = RequestMethod.POST)
@RequirePartner @RequirePartner
@ -27,6 +31,14 @@ public class AttachmentController {
public JSONObject uploadImage(@RequestParam MultipartFile file) throws IOException { public JSONObject uploadImage(@RequestParam MultipartFile file) throws IOException {
return attachmentClient.uploadFile(file,false); return attachmentClient.uploadFile(file,false);
} }
@RequestMapping(value = "/yeepayFiles", method = RequestMethod.POST)
@RequirePartner
@RequireManager
public FileUploadResult uploadYeepayImage(@RequestParam MultipartFile file) throws IOException {
return yeePayClient.uploadFile(file.getOriginalFilename(),"VOUCHER",file.getInputStream());
}
@RequestMapping(value = "/riskFiles", method = RequestMethod.POST) @RequestMapping(value = "/riskFiles", method = RequestMethod.POST)
public JSONObject uploadRiskImage(@RequestParam MultipartFile file) throws IOException { public JSONObject uploadRiskImage(@RequestParam MultipartFile file) throws IOException {
return attachmentClient.uploadFile(file,false); return attachmentClient.uploadFile(file,false);

@ -0,0 +1,15 @@
app.yeepay.merchant-id=
app.yeepay.app-key=cbp_120180219
app.yeepay.aes-secret-key=
app.yeepay.public-key.store-type=string
app.yeepay.public-key.cert-type=RSA2048
app.yeepay.public-key.value=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6p0XWjscY+gsyqKRhw9MeLsEmhFdBRhT2emOck/F1Omw38ZWhJxh9kDfs5HzFJMrVozgU+SJFDONxs8UB0wMILKRmqfLcfClG9MyCNuJkkfm0HFQv1hRGdOvZPXj3Bckuwa7FrEXBRYUhK7vJ40afumspthmse6bs6mZxNn/mALZ2X07uznOrrc2rk41Y2HftduxZw6T4EmtWuN2x4CZ8gwSyPAW5ZzZJLQ6tZDojBK4GZTAGhnn3bg5bBsBlw2+FLkCQBuDsJVsFPiGh/b6K/+zGTvWyUcu+LUj2MejYQELDO3i2vQXVDk7lVi2/TcUYefvIcssnzsfCfjaorxsuwIDAQAB
app.yeepay.public-key.password=
app.yeepay.private-key.store-type=string
app.yeepay.private-key.cert-type=RSA2048
app.yeepay.private-key.value=MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCdaxJm3b5bvPZHvvXDfJ4NUiG7yISRYgUfiQycVKCJZ2jL+Y29Hmcnc1hPMZjVbJYPkhaIp+f92j7qf5P/qo+Ru4DyY3HhzsJAZMMWVlWeaEG+nZsyN06XC7NiUrFMLUAyqtaYRPDBKHKss54at16rQO7UoqXVqhKZyWdBgRbX0J3X0z82LEh11u8Izi/mUH42NY6ttkDsxBzXeNcT81RHrm9A/R/6AzzykFAPxGVdjjmbYnrk/WUwLDaKdf1RvDF/kWSCmbzQSX/D24UcDekd50TJHaqhjvBVFwLtiFWAO7xudEDhByfj22YOZuhuddyhJygkUI996IKtl+UFIfI1AgMBAAECggEATWTgBj0NIxNTTlDfib4SAuCXfziFnOjBNhDuZ0ngJ830oxxNiGaTNr0p9L2gs4WQfZVIiOVsVM1hU29n9zIHJhI2wnUL/4Xk0T35AFlv/NKrSCk6rUSt2etBxZx8WMSCpKaDnRd/+qeFQc2JdP8khzQEd/yDZfoY7Q0tO/JYpb++XMFYBRpLINYwH8xteTAeRGp1A5+UwvPMJelNeBlPqMqTAPruh/yLUvYg1/rJjkOUi0yOUyKhs+NJDOXdBcrSXswdJyMMITYQ9dhpWFz4/imklHDKk29+Oy5uEGB1OQvTW469Cm2b2suAyvI4oE1pAFb6dGz6uE9fwzJljM1+IQKBgQDshMwyOC3BmXOo54o92cUwYR0TJg0KHQAbJLirQxlX4ILUGxxEFsv2TdVzushYS/1K8zecz9VQnch19mo+qyxfdq/FNXe1DDXolnu2AoYVvqpeCXumjmz4v2dlBW2TTFvmUpy0QK2QImgBW1/sjI88OgiJHdyqaqR0ASMLB1mGWQKBgQCqYl82MSqUqRl2yTiW+h9lymlgXWl5qFx/J3YGMURz3Xq5qzK4swEYfHfmkofNNpTXwIbDjGGq/ipZZLmyLfS68PRnquJEwCyFX3cgXUKg8380nDPdUQxsLpvMupUuKjyNhN4twpy2A/Ti53UC7vx5J+Z/mVjE3QgaURIAEBSHPQKBgQCOI0x3za0p0KdiVSuN+gZ4CZSoglCJyF3c8heMzLk5R3I4N8an4K9YaPQjJZfrAFfLKBk+wuPmG7xxr9Gvsbzr7e657GTxR9JJ4c2c1y1vefL2qmpF8QfqAVUIr9dnExeTdgg4hzoHCbZJQnmGNf6KajHg/TI0s/v6vwgpQ5R4mQKBgDI3Kd574RPNPp7+sPn2H5jNbf8jqLldQF2NUMCEdqs7RDdCWIGM6C7CSEghOXrmsjlgGZe6YPKXU/3irMPxvWX3K+D9wRAIH1bzitV0BvYOrZfgzXxVrbaYifxtpRflBNGkriKIb81JHzxcgOTrcGd4tfs3Q61Jg2DWMdro4lP1AoGBAOJ8JLkbrODRvHp9fCy9cOiF0LD/fZBW49l6xQbx7lLtzbwa/nk672hFhzfy565j4ejywykVIOWmoMS5RqWXB07rbyF0OZrfEcLPArfXZ4iE6T9OZ2UJLK0gdUWz4oYWBRK7NQd5qEMOiUFy8YOGgT+dESVYwN2irwLikuET0S9a
app.yeepay.private-key.password=
app.yeepay.http-client.connect-timeout=30000
app.yeepay.http-client.read-timeout=30000
app.yeepay.http-client.max-conn-total=200
app.yeepay.http-client.max-conn-per-route=0

@ -1,6 +1,6 @@
server.port=5000 server.port=5000
spring.profiles.active=dev,alipay,bestpay,jd,wechat,rpay spring.profiles.active=dev,alipay,bestpay,jd,wechat,rpay,yeepay
env.company=RoyalPay env.company=RoyalPay

@ -318,7 +318,9 @@
ifnull(sum(CASE WHEN s.channel = 'hf' THEN s.total ELSE 0 END),0) hfamount, ifnull(sum(CASE WHEN s.channel = 'hf' THEN s.total ELSE 0 END),0) hfamount,
ifnull(sum(CASE WHEN s.channel = 'hf' THEN s.orders ELSE 0 END),0) hf_order_count, ifnull(sum(CASE WHEN s.channel = 'hf' THEN s.orders ELSE 0 END),0) hf_order_count,
ifnull(sum(CASE WHEN s.channel = 'Rpay' THEN s.total ELSE 0 END),0) rpayamount, ifnull(sum(CASE WHEN s.channel = 'Rpay' THEN s.total ELSE 0 END),0) rpayamount,
ifnull(sum(CASE WHEN s.channel = 'Rpay' THEN s.orders ELSE 0 END),0) rpay_order_count ifnull(sum(CASE WHEN s.channel = 'Rpay' THEN s.orders ELSE 0 END),0) rpay_order_count,
ifnull(sum(CASE WHEN s.channel = 'Yeepay' THEN s.total ELSE 0 END),0) yeepayamount,
ifnull(sum(CASE WHEN s.channel = 'Yeepay' THEN s.orders ELSE 0 END),0) yeepay_order_count
FROM statistics_customer_order s FROM statistics_customer_order s
LEFT JOIN sys_clients c ON c.client_id = s.client_id and c.is_valid=1 LEFT JOIN sys_clients c ON c.client_id = s.client_id and c.is_valid=1
]]> ]]>

@ -0,0 +1,32 @@
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
</head>
<body>
<div style="width: 91%;border: 1px #F2F2F2 solid;margin: 0 auto; ">
<div style="height: 3%;background-color: #F2F2F2;"></div>
<div style="text-align: center;margin-top: 2.5%;">
<img th:src="${img_url}"/>
</div>
<div style="width: 80.3%;margin: 0 auto;">
<p>您好,<span th:text="${name}"></span></p>
<p>您有一笔收款信息如下:</p>
<div style="border: 1px #EAEAEA solid;margin-bottom: 5.5%;font-size: 12px;">
<p style="margin-left: 3%;">RoyalPay到账提醒</p>
<ul>
<li style="margin-bottom: 6px;">支付渠道:<span style="color: #EE6723;" th:text="${channel}"></span></li>
<li style="margin-bottom: 6px;">订单编号:<span style="color: #EE6723;" th:text="${order_id}"></span></li>
<li style="margin-bottom: 6px;">收款金额:<span style="color: #EE6723;" th:text="${currency}"></span>&nbsp;<span style="color: #EE6723;" th:text="${amount}"></span></li>
<li style="margin-bottom: 6px;">到账时间:<span style="color: #EE6723;" th:text="${time}"></span></li>
</ul>
</div>
<span>此致</span><br />
<span>RoyalPay</span>
</div>
<div style="height: 3%;background-color: #F2F2F2;margin-top: 6.5%;"></div>
</div>
</body>
</html>

@ -158,7 +158,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
trigger: 'axis' trigger: 'axis'
}, },
legend: { legend: {
data: ['Alipay交易金额','AlipayOnline交易金额', 'Bestpay交易金额','Wechat交易金额',"JD Pay交易金额","HF Pay交易金额"], data: ['Alipay交易金额','AlipayOnline交易金额', 'Bestpay交易金额','Wechat交易金额',"JD Pay交易金额","HF Pay交易金额","Yeepay交易金额"],
bottom: 0, bottom: 0,
height: '15%', height: '15%',
width: '80%', width: '80%',
@ -170,7 +170,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
type: 'value' type: 'value'
} }
], ],
color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33"] color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00"]
}, },
xAxis: { xAxis: {
basic: {type: 'category', boundaryGap: false}, basic: {type: 'category', boundaryGap: false},
@ -242,6 +242,17 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
yAxisIndex: 0 yAxisIndex: 0
}, },
column: {key: 'hf.total'} column: {key: 'hf.total'}
},
{
basic: {
name: 'Yeepay交易金额',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0
},
column: {key: 'Yeepay.total'}
} }
] ]
}; };
@ -252,7 +263,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
trigger: 'axis' trigger: 'axis'
}, },
legend: { legend: {
data: ['Alipay交易订单','AlipayOnline交易订单', 'Bestpay交易订单','Wechat交易订单',"JD Pay交易订单","HF Pay交易订单"], data: ['Alipay交易订单','AlipayOnline交易订单', 'Bestpay交易订单','Wechat交易订单',"JD Pay交易订单","HF Pay交易订单","Yeepay交易订单"],
bottom: 0, bottom: 0,
height: '15%', height: '15%',
width: '80%', width: '80%',
@ -264,7 +275,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
type: 'value' type: 'value'
} }
], ],
color: ['#00a0e9','00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33"] color: ['#00a0e9','00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00"]
}, },
xAxis: { xAxis: {
basic: {type: 'category', boundaryGap: false}, basic: {type: 'category', boundaryGap: false},
@ -336,7 +347,18 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
yAxisIndex: 0 yAxisIndex: 0
}, },
column: {key: 'hf.orders'} column: {key: 'hf.orders'}
} },
{
basic: {
name: 'Yeepay交易订单',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0
},
column: {key: 'Yeepay.orders'}
},
] ]
}; };
var channels_single_amount_chart = { var channels_single_amount_chart = {
@ -345,7 +367,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
trigger: 'axis' trigger: 'axis'
}, },
legend: { legend: {
data: ['Alipay交易客单价','AlipayOnline交易客单价', 'Bestpay交易客单价','Wechat交易客单价',"JD Pay交易客单价","HF Pay交易客单价"], data: ['Alipay交易客单价','AlipayOnline交易客单价', 'Bestpay交易客单价','Wechat交易客单价',"JD Pay交易客单价","HF Pay交易客单价","Yeepay交易客单价"],
bottom: 0, bottom: 0,
}, },
yAxis: [ yAxis: [
@ -354,7 +376,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
type: 'value' type: 'value'
} }
], ],
color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33"] color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00"]
}, },
xAxis: { xAxis: {
basic: {type: 'category', boundaryGap: false}, basic: {type: 'category', boundaryGap: false},
@ -426,6 +448,17 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
yAxisIndex: 0 yAxisIndex: 0
}, },
column: {key: 'hf.single_amount'} column: {key: 'hf.single_amount'}
},
{
basic: {
name: 'Yeepay交易客单价',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0
},
column: {key: 'Yeepay.single_amount'}
} }
] ]
}; };

@ -545,6 +545,8 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
return '/static/images/hf_sign_lg.png'; return '/static/images/hf_sign_lg.png';
case 'Rpay': case 'Rpay':
return '/static/images/rpayplus_sign_lg.png'; return '/static/images/rpayplus_sign_lg.png';
case 'Yeepay':
return '/static/images/yeepay_sign_lg.png';
} }
} }
}); });

@ -203,6 +203,8 @@
uib-tooltip="HF Pay" ng-if="order.channel=='hf'"/> uib-tooltip="HF Pay" ng-if="order.channel=='hf'"/>
<img src="/static/images/rpayplus_sign.png" <img src="/static/images/rpayplus_sign.png"
uib-tooltip="RPay+" ng-if="order.channel=='Rpay'"/> uib-tooltip="RPay+" ng-if="order.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png"
uib-tooltip="Yeepay" ng-if="order.channel=='Yeepay'"/>
{{order.order_id}} {{order.order_id}}
</td> </td>
<td>{{order.short_name}}(<a class="text-primary" role="button" title="Detail" <td>{{order.short_name}}(<a class="text-primary" role="button" title="Detail"

@ -92,7 +92,9 @@
<a role="button" ng-class="{'bg-primary':params.channel=='hf'}" <a role="button" ng-class="{'bg-primary':params.channel=='hf'}"
ng-click="params.channel='hf';doAnalysis(1)">HF Pay</a> | ng-click="params.channel='hf';doAnalysis(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';doAnalysis(1)">RPay +</a> ng-click="params.channel='RPAY';doAnalysis(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='Yeepay'}"
ng-click="params.channel='Yeepay';doAnalysis(1)">Yeepay</a>
</p> </p>
</div> </div>
</div> </div>

@ -101,6 +101,10 @@
ng-click="params.channel='jd';doAnalysis(1)">JD Pay</a> | ng-click="params.channel='jd';doAnalysis(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}" <a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';doAnalysis(1)">HF Pay</a> ng-click="params.channel='HF';doAnalysis(1)">HF Pay</a>
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';doAnalysis(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';doAnalysis(1)">Yeepay</a>
</p> </p>
</div> </div>
</div> </div>

@ -100,7 +100,9 @@
<a role="button" ng-class="{'bg-primary':params.channel=='jd'}" <a role="button" ng-class="{'bg-primary':params.channel=='jd'}"
ng-click="params.channel='jd';doAnalysis(1)">JD Pay</a> | ng-click="params.channel='jd';doAnalysis(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='hf'}" <a role="button" ng-class="{'bg-primary':params.channel=='hf'}"
ng-click="params.channel='hf';doAnalysis(1)">HF Pay</a> ng-click="params.channel='hf';doAnalysis(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';doAnalysis(1)">Yeepay</a>
</p> </p>
</div> </div>
</div> </div>

@ -99,7 +99,9 @@
<a role="button" ng-class="{'bg-primary':params.channel=='hf'}" <a role="button" ng-class="{'bg-primary':params.channel=='hf'}"
ng-click="params.channel='hf';doAnalysis(1)">HF Pay</a> | ng-click="params.channel='hf';doAnalysis(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';doAnalysis(1)">RPay +</a> ng-click="params.channel='RPAY';doAnalysis(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';doAnalysis(1)">Yeepay</a>
</p> </p>
</div> </div>
</div> </div>
@ -209,6 +211,15 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/yeepay_sign.png"/>Yeepay</div>
<div class="description-text text-red">
<label class="description-text"
ng-bind="totalChannelAmount.yeepayamount|currency: ' $ '"></label>
</div>
</div>
</div>
</div> </div>
<!--<table class="table"> <!--<table class="table">

@ -179,6 +179,15 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/yeepay_sign.png"/>Yeepay</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.yeepayamount|currency: ' $ '"></label>
</div>
</div>
</div>
</div> </div>
<!-- <table class="table"> <!-- <table class="table">

@ -40,9 +40,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='jd'}" <a role="button" ng-class="{'bg-primary':params.channel=='jd'}"
ng-click="params.channel='jd';loadTradeLogs()">JD Pay</a> | ng-click="params.channel='jd';loadTradeLogs()">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='hf'}" <a role="button" ng-class="{'bg-primary':params.channel=='hf'}"
ng-click="params.channel='hf';loadTradeLogs()">HF Pay</a> ng-click="params.channel='hf';loadTradeLogs()">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a>
</p> </p>
</div> </div>
</div> </div>

@ -9,6 +9,8 @@ define(['./app',
'./services/chartParser', './services/chartParser',
'./services/orderService', './services/orderService',
'./services/businessStructuresMap', './services/businessStructuresMap',
'./services/yeepayBusinessContentMap',
'./services/yeepayIndustryMap',
'./services/stateMap', './services/stateMap',
'./services/industryMap', './services/industryMap',
'./services/sectorMap', './services/sectorMap',

@ -0,0 +1,41 @@
define(['../app'], function (app) {
'use strict';
var yeepayBusinessContentMap = [
{
"label": "服务贸易",
"value": "SERVICETRADE"
},
{
"label": "货物贸易",
"value": "GOODSTRADE"
},
{
"label": "留学",
"value": "OVERSEASTUDY"
},
{
"label": "酒店机票",
"value": "HOTELTICKET"
},
{
"label": "国际运输",
"value": "INTTRANSPORT"
},
{
"label": "旅游服务",
"value": "TOURSERVICE"
},
{
"label": "保险",
"value": "INSURANCE"
}
];
app.factory('yeepayBusinessContentMap', function () {
return {
configs: function () {
return yeepayBusinessContentMap;
}
}
});
});

@ -0,0 +1,45 @@
define(['../app'], function (app) {
'use strict';
var yeepayIndustryMap = [
{
"label": "货物贸易",
"value": "ehk100000"
},
{
"label": "旅游",
"value": "ehk200000"
},
{
"label": "文化教育",
"value": "ehk300000"
},
{
"label": "服务贸易",
"value": "ehk400000"
},
{
"label": "物流",
"value": "ehk500000"
},
{
"label": "数字娱乐",
"value": "ehk600000"
},
{
"label": "金融保险",
"value": "ehk700000"
},
{
"label": "其他",
"value": "ehk999999"
}
];
app.factory('yeepayIndustryMap', function () {
return {
configs: function () {
return yeepayIndustryMap;
}
}
});
});

@ -47,6 +47,8 @@
uib-tooltip="HF Pay" ng-if="order.channel=='hf'"/> uib-tooltip="HF Pay" ng-if="order.channel=='hf'"/>
<img src="/static/images/rpayplus_sign.png" <img src="/static/images/rpayplus_sign.png"
uib-tooltip="RPay+" ng-if="order.channel=='Rpay'"/> uib-tooltip="RPay+" ng-if="order.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png"
uib-tooltip="Yeepay" ng-if="order.channel=='Yeepay'"/>
{{order.order_id}} {{order.order_id}}
</td> </td>
</p> </p>

@ -394,6 +394,8 @@ define(['angular', '../../analysis/bd/analysis-bd'], function (angular) {
return '/static/images/hf_sign_lg.png'; return '/static/images/hf_sign_lg.png';
case 'Rpay': case 'Rpay':
return '/static/images/rpayplus_sign_lg.png'; return '/static/images/rpayplus_sign_lg.png';
case 'Yeepay':
return '/static/images/yeepay_sign_lg.png';
} }
} }
}); });

@ -191,6 +191,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"
ng-class="{'has-error':org_form.yeepay_rate_value.$invalid && org_form.yeepay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="yeepay_rate_value_input">Yeepay Rate *</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="number" ng-model="org.yeepay_rate_value"
id="yeepay_rate_value_input" name="yeepay_rate_value"
max="100" min="0">
<span class="input-group-addon">%</span>
</div>
</div>
</div>
</div> </div>
<div> <div>
@ -267,6 +279,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"
ng-class="{'has-error':org_form.min_yeepay_rate.$invalid && org_form.min_yeepay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_yeepay_rate_input">Min Yeepay Rate *</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="number" ng-model="org.min_yeepay_rate"
id="min_yeepay_rate_input" name="min_yeepay_rate" max="100"
min="0" required>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"

@ -159,6 +159,13 @@
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<div class="form-group" ng-class="{'has-error':org_form.yeepay_rate_value.$invalid && org_form.yeepay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="yeepay_rate_value_input">Yeepay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.yeepay_rate_value" id="yeepay_rate_value_input" name="yeepay_rate_value" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div> </div>
@ -220,6 +227,15 @@
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<div class="form-group"
ng-class="{'has-error':org_form.min_yeepay_rate.$invalid && org_form.min_yeepay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_yeepay_rate_input">Min Yeepay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.min_yeepay_rate"
id="min_yeepay_rate_input" name="min_yeepay_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div> </div>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 59 KiB

@ -174,6 +174,19 @@
<div class="description-header text-bold"><img src="/static/images/rpayplus_sign.png"/>Rpay+</div> <div class="description-header text-bold"><img src="/static/images/rpayplus_sign.png"/>Rpay+</div>
</div> </div>
</div> </div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.yeepayamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.yeepay_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/yeepay_sign.png"/>Yeepay</div>
</div>
</div>
</div> </div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

@ -103,6 +103,8 @@
uib-tooltip="HF Pay" ng-if="order.channel=='hf'"/> uib-tooltip="HF Pay" ng-if="order.channel=='hf'"/>
<img src="/static/images/rpayplus_sign.png" <img src="/static/images/rpayplus_sign.png"
uib-tooltip="RPay+" ng-if="order.channel=='Rpay'"/> uib-tooltip="RPay+" ng-if="order.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png"
uib-tooltip="Yeepay" ng-if="order.channel=='Yeepay'"/>
{{order.order_id}} {{order.order_id}}
</td> </td>
</p> </p>

@ -202,6 +202,8 @@
uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/> uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/>
<img src="/static/images/rpayplus_sign.png" <img src="/static/images/rpayplus_sign.png"
uib-tooltip="RPay+" ng-if="trade.channel=='Rpay'"/> uib-tooltip="RPay+" ng-if="trade.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png"
uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
{{trade.order_id2}} {{trade.order_id2}}
</td> </td>
<td ng-bind="trade.currency"></td> <td ng-bind="trade.currency"></td>

@ -1308,6 +1308,16 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'}); commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'});
} }
}; };
$scope.copyYeepayLink = function() {
var e=document.getElementById("cpyeepay");
e.select();
var successful = document.execCommand("Copy");
if (successful) {
commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'});
}else {
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'});
}
};
$scope.loadPartnerPaymentInfo = function () { $scope.loadPartnerPaymentInfo = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) { $http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {
$scope.paymentInfo = resp.data; $scope.paymentInfo = resp.data;
@ -1486,7 +1496,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}) })
}) })
}; };
$scope.init = {jsapi: false, gateway: false, offline: false, refund: false,common_sub_merchant_id:false, channel: {},gateway_alipay_online:false,hf_Link:false,enable_hf_email_notice:false}; $scope.init = {jsapi: false, gateway: false, offline: false, refund: false,common_sub_merchant_id:false, channel: {},gateway_alipay_online:false,hf_Link:false,enable_hf_email_notice:false,enable_yeepay_link:false,enable_yeepay_email_notice:false};
$scope.switchCommonSubMerchantId = function () { $scope.switchCommonSubMerchantId = function () {
if (!$scope.paymentInfo) { if (!$scope.paymentInfo) {
return; return;
@ -1591,6 +1601,49 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}) })
}; };
$scope.toggleGatewayLink = function (channel) {
if (!channel) {
return;
}
if (!$scope.paymentInfo) {
return;
}
var channelLink = 'enable_'+channel+'_link';
if (!$scope.init[channelLink]) {
$scope.init[channelLink] = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/'+channel, {allow: $scope.paymentInfo[channelLink]}).then(function () {
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'Failed to change '+channelLink+' permission status',
content: resp.data.message,
type: 'error'
});
})
};
$scope.toggleGatewayEmailNotice = function (channel) {
if (!$scope.paymentInfo) {
return;
}
var channelNotice = 'enable_'+channel+'_email_notice';
if (!$scope.init[channelNotice]) {
$scope.init[channelNotice] = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/'+channel+'/email_notice', {allow: $scope.paymentInfo[channelNotice]}).then(function () {
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'Failed to change '+channelNotice+' permission status',
content: resp.data.message,
type: 'error'
});
})
};
$scope.toggleHfEmailNotice = function () { $scope.toggleHfEmailNotice = function () {
if (!$scope.paymentInfo) { if (!$scope.paymentInfo) {
return; return;
@ -3190,6 +3243,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_rpay_sub_applices', {params: {}}).then(function (resp) { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_rpay_sub_applices', {params: {}}).then(function (resp) {
$scope.subRpayMerchantInfos = resp.data; $scope.subRpayMerchantInfos = resp.data;
}); });
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_yeepay_sub_applices', {params: {}}).then(function (resp) {
$scope.subYeepayMerchantInfos = resp.data;
});
}; };
$scope.useSubMerchantId = function (sub_merchant_id) { $scope.useSubMerchantId = function (sub_merchant_id) {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', {sub_merchant_id: sub_merchant_id}).then(function (resp) { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', {sub_merchant_id: sub_merchant_id}).then(function (resp) {
@ -3215,6 +3272,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
}); });
} }
$scope.useYeepaySubMerchantId = function (sub_merchant_id) {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/yeepay_payment_config', {yeepay_sub_merchant_id: sub_merchant_id}).then(function (resp) {
commonDialog.alert({
title: 'Success',
content: 'Modify Yeepay Sub Merchant ID successfully',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
});
}
$scope.applyWxSubMerchantId = function () { $scope.applyWxSubMerchantId = function () {
$uibModal.open({ $uibModal.open({
templateUrl: '/static/payment/partner/templates/apply_wx_sub_merchant_id.html', templateUrl: '/static/payment/partner/templates/apply_wx_sub_merchant_id.html',
@ -3244,6 +3313,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.loadSubMerchantInfos(); $scope.loadSubMerchantInfos();
}) })
}; };
$scope.applyYeepaySubMerchantId = function () {
$uibModal.open({
templateUrl: '/static/payment/partner/templates/apply_yeepay_sub_merchant_id.html',
controller: 'applyYeepaySubMerchantIdCtrl',
resolve: {
subMerchantInfo: function () {
return $scope.partner;
}
}
}).result.then(function () {
$scope.loadSubMerchantInfos();
})
};
$scope.loadSubMerchantInfos(); $scope.loadSubMerchantInfos();
}]); }]);
app.controller('applyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog) { app.controller('applyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog) {
@ -3341,6 +3423,256 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}]); }]);
app.controller('applyYeepaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state','subMerchantInfo','yeepayIndustryMap','yeepayBusinessContentMap','$filter', 'commonDialog','Upload', function ($scope, $http, $uibModal, $state,subMerchantInfo,yeepayIndustryMap,yeepayBusinessContentMap,$filter, commonDialog,Upload) {
$scope.yeepay_industries = yeepayIndustryMap.configs();
$scope.yeepay_business_contents = yeepayBusinessContentMap.configs();
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
var vouchers={};
var merchantId = '';
$scope.uploadLegalIDcardFront = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.legalIDcardFrontProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.legalIDcardFrontProgress;
$scope.legalIDcardFront = resp.data.path;
vouchers['legalIDcardFront'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.legalIDcardFrontProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadLegalIDcardBack = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.legalIDcardBackProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.legalIDcardBackProgress;
$scope.legalIDcardBack = resp.data.path;
vouchers['legalIDcardBack'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.legalIDcardBackProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadBusinessLicence = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.businessLicenceProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.businessLicenceProgress;
$scope.businessLicence = resp.data.path;
vouchers['businessLicence'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.businessLicenceProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.businessLicenceProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadTaxLevel = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.taxLevelProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.taxLevelProgress;
$scope.taxLevel = resp.data.path;
vouchers['taxLevel'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.taxLevelProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadBankAccountOpen = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.bankAccountOpenProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.bankAccountOpenProgress;
$scope.bankAccountOpen = resp.data.path;
vouchers['bankAccountOpen'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.bankAccountOpenProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadOrgCode = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.orgCodeProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.orgCodeProgress;
$scope.orgCode = resp.data.path;
vouchers['orgCode'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.orgCodeProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadNonStanProtocol = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.nonStanProtocolProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.nonStanProtocolProgress;
$scope.nonStanProtocol = resp.data.path;
vouchers['nonStanProtocol'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.nonStanProtocolProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadZipPath = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.zipPathProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.zipPathProgress;
$scope.zipPath = resp.data.path;
vouchers['zipPath'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.zipPathProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.saveYeepayApply = function (form) {
var merchantInfo = {};
$scope.errmsg = null;
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
angular.forEach(form, function (item, key) {
if(item !=null) {
if(item.$name !=null) {
merchantInfo[key] = item.$modelValue;
}
}
});
merchantInfo['vouchers'] = vouchers;
merchantInfo['merchantId'] = merchantId;
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registYeepaySubMerchantId', merchantInfo).then(function (resp) {
$scope.apply_sub_merchant_id = resp.data;
$scope.$close();
if (subMerchantInfo.yeepay_sub_merchant_id != null) {
commonDialog.alert({
title: 'Success',
content: 'Modify Yeepay Sub Merchant ID successfully',
type: 'success'
});
$state.reload();
}
}, function (resp) {
commonDialog.alert({
title: 'Error',
content: resp.data.message,
type: 'error'
});
})
}
}]);
app.controller('permissionClientCtrl', ['$scope', '$http', '$uibModal', '$state', '$filter', 'commonDialog', function ($scope, $http, $uibModal, $state, $filter, commonDialog) { app.controller('permissionClientCtrl', ['$scope', '$http', '$uibModal', '$state', '$filter', 'commonDialog', function ($scope, $http, $uibModal, $state, $filter, commonDialog) {
$scope.clientPermission = {client_moniker:$scope.partner.client_moniker}; $scope.clientPermission = {client_moniker:$scope.partner.client_moniker};
$scope.loadPermissionList = function () { $scope.loadPermissionList = function () {
@ -3404,6 +3736,50 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return industry; return industry;
} }
}); });
app.filter('yeepayIndustry', function () {
return function (value) {
switch (value + '') {
case 'ehk100000':
return '货物贸易';
case 'ehk200000':
return '旅游';
case 'ehk300000':
return '文化教育';
case 'ehk400000':
return '服务贸易';
case 'ehk500000':
return '物流';
case 'ehk600000':
return '数字娱乐';
case 'ehk700000':
return '金融保险';
case 'ehk999999':
return '其他';
}
}
});
app.filter('yeepayBusinessContent', function () {
return function (value) {
switch (value + '') {
case 'SERVICETRADE':
return '服务贸易';
case 'GOODSTRADE':
return '货物贸易';
case 'OVERSEASTUDY':
return '留学';
case 'HOTELTICKET':
return '酒店机票';
case 'INTTRANSPORT':
return '国际运输';
case 'TOURSERVICE':
return '旅游服务';
case 'INSURANCE':
return '保险';
}
}
});
app.filter('bdOrgSelect', function () { app.filter('bdOrgSelect', function () {
return function (bdUsers, params) { return function (bdUsers, params) {
var org_id; var org_id;

@ -576,6 +576,17 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
} }
}; };
$scope.clientCopyYeepayLink = function() {
var e=document.getElementById("c-cpyeepay");
e.select();
var successful = document.execCommand("Copy");
if (successful) {
commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'});
}else {
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'});
}
};
$scope.reloadQRCode = function () { $scope.reloadQRCode = function () {
$http.get('/client/partner_info/qrcode', {params: $scope.qrConfig}).then(function (resp) { $http.get('/client/partner_info/qrcode', {params: $scope.qrConfig}).then(function (resp) {
$scope.qrcode = resp.data; $scope.qrcode = resp.data;

@ -0,0 +1,181 @@
<div class="content">
<form novalidate name="subForm">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">Apply Yeepay Sub Merchant Id</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error':subForm.business_content.$invalid && subForm.business_content.$dirty}">
<label class="control-label col-sm-3" for="business_content">* Business Content</label>
<div class="col-sm-8">
<select class="form-control" name="business_content"
ng-model="subMerchantInfo.business_content"
id="business_content" required
ng-options="business_content.value as business_content.label for business_content in yeepay_business_contents">
<option value="">Please Choose</option>
</select>
<div ng-messages="subForm.business_content.$error" ng-if="subForm.business_content.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.industry.$invalid && subForm.industry.$dirty}">
<label class="control-label col-sm-3" for="industry">* Business Category</label>
<div class="col-sm-8">
<select class="form-control" name="industry"
ng-model="subMerchantInfo.industry"
id="industry" required
ng-options="industry.value as industry.label for industry in yeepay_industries">
<option value="">Please Choose</option>
</select>
<div ng-messages="subForm.industry.$error" ng-if="subForm.industry.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" >* Corporate ID Card Front</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-success" type="button"
ngf-select="uploadLegalIDcardFront($file)"
accept="image/*">
<i class="fa fa-upload"></i> Upload Corporate ID Card Front
</button>
</div>
<uib-progressbar value="legalIDcardFrontProgress.value"
ng-if="legalIDcardFrontProgress"></uib-progressbar>
<div ng-if="legalIDcardFront">Url:{{legalIDcardFront}}</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" >* Corporate ID Card Back</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-success" type="button"
ngf-select="uploadLegalIDcardBack($file)"
accept="image/*">
<i class="fa fa-upload"></i> Upload Corporate ID Card Back
</button>
</div>
<uib-progressbar value="legalIDcardBackProgress.value"
ng-if="legalIDcardBackProgress"></uib-progressbar>
<div ng-if="legalIDcardBack">Url:{{legalIDcardBack}}</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" >* Business Licence</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-success" type="button"
ngf-select="uploadBusinessLicence($file)"
accept="image/*">
<i class="fa fa-upload"></i> Upload Business Licence
</button>
</div>
<uib-progressbar value="businessLicenceProgress.value"
ng-if="businessLicenceProgress"></uib-progressbar>
<div ng-if="businessLicence">Url:{{businessLicence}}</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" >* Tax Level</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-success" type="button"
ngf-select="uploadTaxLevel($file)"
accept="image/*">
<i class="fa fa-upload"></i> Upload Tax Level
</button>
</div>
<uib-progressbar value="taxLevelProgress.value"
ng-if="taxLevelProgress"></uib-progressbar>
<div ng-if="taxLevel">Url:{{taxLevel}}</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" >* Bank Account Opening Permit</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-success" type="button"
ngf-select="uploadBankAccountOpen($file)"
accept="image/*">
<i class="fa fa-upload"></i> Upload Bank Account Opening Permit
</button>
</div>
<uib-progressbar value="bankAccountOpenProgress.value"
ng-if="bankAccountOpenProgress"></uib-progressbar>
<div ng-if="bankAccountOpen">Url:{{bankAccountOpen}}</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" >* Organization Code Proof</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-success" type="button"
ngf-select="uploadOrgCode($file)"
accept="image/*">
<i class="fa fa-upload"></i> Upload Organization Code Proof
</button>
</div>
<uib-progressbar value="orgCodeProgress.value"
ng-if="orgCodeProgress"></uib-progressbar>
<div ng-if="orgCode">Url:{{orgCode}}</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" >Non-standard Protocol File</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-success" type="button"
ngf-select="uploadNonStanProtocol($file)"
accept="image/*">
<i class="fa fa-upload"></i> Upload Non-standard Protocol File
</button>
</div>
<uib-progressbar value="nonStanProtocolProgress.value"
ng-if="nonStanProtocolProgress"></uib-progressbar>
<div ng-if="nonStanProtocol">Url:{{nonStanProtocol}}</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" >Other Zip File</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-success" type="button"
ngf-select="uploadZipPath($file)"
accept="image/*">
<i class="fa fa-upload"></i> Upload Other Zip File
</button>
</div>
<uib-progressbar value="zipPathProgress.value"
ng-if="zipPathProgress"></uib-progressbar>
<div ng-if="zipPath">Url:{{zipPath}}</div>
</div>
</div>
</div>
</div>
</div>
<div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button"
ng-click="saveYeepayApply(subForm)">Submit
</button>
</div>
</div>
</div>
</form>
</div>

@ -99,9 +99,15 @@
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Bestpay'}" ng-if="currentUser.client.enable_bestpay"> <li role="presentation" ng-class="{active:bankCtrl.rate_name=='Bestpay'}" ng-if="currentUser.client.enable_bestpay">
<a role="button" ng-click="bankCtrl.rate_name='Bestpay'">Bestpay</a> <a role="button" ng-click="bankCtrl.rate_name='Bestpay'">Bestpay</a>
</li> </li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Bestpay'}" ng-if="currentUser.client.enable_hf"> <li role="presentation" ng-class="{active:bankCtrl.rate_name=='jd'}" ng-if="currentUser.client.enable_jd">
<a role="button" ng-click="bankCtrl.rate_name='jd'">JD Pay</a>
</li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='hf'}" ng-if="currentUser.client.enable_hf">
<a role="button" ng-click="bankCtrl.rate_name='hf'">HF</a> <a role="button" ng-click="bankCtrl.rate_name='hf'">HF</a>
</li> </li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Yeepay'}" ng-if="currentUser.client.enable_yeepay">
<a role="button" ng-click="bankCtrl.rate_name='Yeepay'">Yeepay</a>
</li>
</ul> </ul>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered"> <table class="table table-bordered">

@ -188,6 +188,86 @@
</div> </div>
</div> </div>
<div class="panel panel-default" ng-if="partner.enable_yeepay&&partner.yeepay_pay_url">
<div class="panel-heading">Yeepay Link
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Yeepay Link</label>
<div class="col-sm-10">
<a href={{partner.yeepay_pay_url}} target="_Blank">
<span class="form-control-static">{{partner.yeepay_pay_url}}
</span>
</a>
<i class="fa fa-clipboard margin-r-5" style="cursor: pointer" ng-click="clientCopyYeepayLink()"></i>
<input style="opacity: 0" id="c-cpyeepay" value={{partner.yeepay_pay_url}} readonly>
</div>
</div>
<div class="form-group" style="display: flex">
<label class="col-sm-2 control-label">Yeepay QR Code</label>
<div style="text-align: center">
<img ng-src="{{partner.yeepayQrcodeUrl}}" class="img-responsive" />
<span style="font-size:9px;">仅支持微信客户端扫描</span>
</div>
<!--<div style="padding-top: 30px;padding-left: 20%;text-align: center">-->
<!--<img style="width: 220px;height: 150px;cursor: pointer" src="/static/images/hfpaylink_intro/pc_hf_pay_step1.png" class="img-responsive" ng-click="reset();toPcFirst();toPcShow()"/>-->
<!--<span style="font-size:9px;">微信/支付宝电脑端</span>-->
<!--<span >-->
<!--<div class="pos" ng-show="pcshow">-->
<!--<i class="tocancle glyphicon glyphicon-remove" ng-click="toHide()"></i>-->
<!--<uib-carousel active=0 interval="myInterval" no-wrap="false">-->
<!--<uib-slide ng-repeat="slide1 in slidesPc track by slide1.id" index="slide1.id">-->
<!--<img ng-src="{{slide1.image}}" style="margin:auto;height: 400px;background-color: black">-->
<!--<div class="carousel-caption" style="bottom: 10px;text-shadow: 0 0px 0px">-->
<!--<p class="text-primary">{{slide1.text}}</p>-->
<!--</div>-->
<!--</uib-slide>-->
<!--</uib-carousel>-->
<!--</div>-->
<!--</span>-->
<!--</div>-->
<!--<div style="padding-top: 30px;padding-left: 4%;text-align: center">-->
<!--<img style="width: 220px;height: 150px;cursor: pointer" src="/static/images/hfpaylink_intro/pc_hf_pay_step1.png" class="img-responsive" ng-click="reset();toBankFirst();toBankShow()"/>-->
<!--<span style="font-size:9px;">网银电脑端</span>-->
<!--<span id="intro">-->
<!--<div class="pos" ng-show="bankshow">-->
<!--<i class="tocancle glyphicon glyphicon-remove" ng-click="toHide()"></i>-->
<!--<uib-carousel active=0 interval="myInterval" no-wrap="false">-->
<!--<uib-slide ng-repeat="slide2 in slidesBank track by slide2.id" index="slide2.id">-->
<!--<img ng-src="{{slide2.image}}" style="margin:auto;height: 400px;background-color: black">-->
<!--<div class="carousel-caption" style="bottom: 10px;text-shadow: 0 0px 0px">-->
<!--<p class="text-primary">{{slide2.text}}</p>-->
<!--</div>-->
<!--</uib-slide>-->
<!--</uib-carousel>-->
<!--</div>-->
<!--</span>-->
<!--</div>-->
<!--<div style="padding-top: 30px;padding-left: 4%;text-align: center">-->
<!--<img style="width: 220px;height: 150px;cursor: pointer" src="/static/images/hfpaylink_intro/app_bank_hf_pay_step1.png" class="img-responsive" ng-click="reset();toAppFirst();toAppShow()"/>-->
<!--<span style="font-size:9px;">手机端</span>-->
<!--<span >-->
<!--<div class="pos" ng-show="appshow">-->
<!--<i class="tocancle glyphicon glyphicon-remove" ng-click="toHide()"></i>-->
<!--<uib-carousel active=0 interval="myInterval" no-wrap="false">-->
<!--<uib-slide ng-repeat="slide3 in slidesApp track by slide3.id" index="slide3.id">-->
<!--<img ng-src="{{slide3.image}}" style="margin:auto;height: 400px;background-color: black">-->
<!--<div class="carousel-caption" style="bottom: 10px;text-shadow: 0 0px 0px">-->
<!--<p class="text-primary">{{slide3.text}}</p>-->
<!--</div>-->
<!--</uib-slide>-->
<!--</uib-carousel>-->
<!--</div>-->
<!--</span>-->
<!--</div>-->
</div>
</div>
</div>
</div>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Paying Surcharge <div class="panel-heading">Paying Surcharge
</div> </div>

@ -172,6 +172,7 @@
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='jd'}"><a role="button" ng-click="bankCtrl.rate_name='jd'">JDpay</a></li> <li role="presentation" ng-class="{active:bankCtrl.rate_name=='jd'}"><a role="button" ng-click="bankCtrl.rate_name='jd'">JDpay</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='hf'}"><a role="button" ng-click="bankCtrl.rate_name='hf'">HFpay</a></li> <li role="presentation" ng-class="{active:bankCtrl.rate_name=='hf'}"><a role="button" ng-click="bankCtrl.rate_name='hf'">HFpay</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Rpay'}"><a role="button" ng-click="bankCtrl.rate_name='Rpay'">Rpay+</a></li> <li role="presentation" ng-class="{active:bankCtrl.rate_name=='Rpay'}"><a role="button" ng-click="bankCtrl.rate_name='Rpay'">Rpay+</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Yeepay'}"><a role="button" ng-click="bankCtrl.rate_name='Yeepay'">Yeepay</a></li>
</ul> </ul>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered"> <table class="table table-bordered">

@ -160,6 +160,30 @@
</div> </div>
</div> </div>
<div class="form-group"
ng-class="{'has-error':rate_form.yeepay_rate_value.$invalid && rate_form.yeepay_rate_value.$dirty}">
<label class="control-label col-sm-4" for="yeepay_rate_value_input">Yeepay Rate Value</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="yeepay_rate_value" stringToNumber2 class="form-control" ng-model="rate.yeepay_rate_value"
min="0.6" max="2.2" step="0.1" id="yeepay_rate_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_form.yeepay_rate_value.$error" ng-if="rate_form.yeepay_rate_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 2.2%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<!-- 新增transaction_fee --> <!-- 新增transaction_fee -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':rate_form.transaction_fee.$invalid && rate_form.transaction_fee.$dirty}"> ng-class="{'has-error':rate_form.transaction_fee.$invalid && rate_form.transaction_fee.$dirty}">

@ -31,7 +31,9 @@
<a role="button" ng-class="{'bg-primary':params.status=='PARTIAL_REFUNDED'}" <a role="button" ng-class="{'bg-primary':params.status=='PARTIAL_REFUNDED'}"
ng-click="params.status='PARTIAL_REFUNDED';loadTradeLogs(1)">Partial Refund</a> | ng-click="params.status='PARTIAL_REFUNDED';loadTradeLogs(1)">Partial Refund</a> |
<a role="button" ng-class="{'bg-primary':params.status=='FULL_REFUNDED'}" <a role="button" ng-class="{'bg-primary':params.status=='FULL_REFUNDED'}"
ng-click="params.status='FULL_REFUNDED';loadTradeLogs(1)">Full Refund</a> ng-click="params.status='FULL_REFUNDED';loadTradeLogs(1)">Full Refund</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a>
</p> </p>
</div> </div>
</div> </div>
@ -87,7 +89,9 @@
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}" <a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HFpay</a> | ng-click="params.channel='HF';loadTradeLogs(1)">HFpay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a>
</p> </p>
</div> </div>
</div> </div>
@ -188,6 +192,7 @@
<img src="/static/images/jd_sign.png" uib-tooltip="JD Pay" ng-if="trade.channel=='jd'"/> <img src="/static/images/jd_sign.png" uib-tooltip="JD Pay" ng-if="trade.channel=='jd'"/>
<img src="/static/images/hf_sign.png" uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/> <img src="/static/images/hf_sign.png" uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/>
<img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+" ng-if="trade.channel=='Rpay'"/> <img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+" ng-if="trade.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png" uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
{{trade.order_id}} {{trade.order_id}}
</td> </td>
<td> <td>

@ -56,6 +56,14 @@
</p> </p>
</div> </div>
</div> </div>
<div class="form-group" ng-if="'10'|withRole">
<label class="col-sm-3 control-label">Yeepay Sub Merchant Id</label>
<div class="col-sm-9">
<p class="form-control-static">
{{paymentInfo.yeepay_sub_merchant_id||'初始化'}}
</p>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">Ali Sub Merchant Id</label> <label class="col-sm-3 control-label">Ali Sub Merchant Id</label>
@ -209,6 +217,12 @@
<input type="checkbox" ng-model="paymentInfo.enable_hf" bs-switch switch-change="toggleChannel('hf')"> <input type="checkbox" ng-model="paymentInfo.enable_hf" bs-switch switch-change="toggleChannel('hf')">
</div> </div>
</div> </div>
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">Yeepay|易宝支付</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_yeepay" bs-switch switch-change="toggleChannel('yeepay')">
</div>
</div>
</div> </div>
</div> </div>
@ -354,6 +368,29 @@
<input type="checkbox" ng-model="paymentInfo.enable_hf_email_notice" bs-switch switch-change="toggleHfEmailNotice()"> <input type="checkbox" ng-model="paymentInfo.enable_hf_email_notice" bs-switch switch-change="toggleHfEmailNotice()">
</div> </div>
</div> </div>
<hr ng-if="paymentInfo.enable_yeepay">
<div class="form-group" ng-if="paymentInfo.enable_yeepay">
<label class="col-sm-2 control-label">Yeepay Link</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_yeepay_link" bs-switch switch-change="toggleGatewayLink('yeepay')">
&nbsp;&nbsp;<a href={{paymentInfo.yeepay_pay_url}} target="_Blank"><span ng-if="paymentInfo.enable_yeepay_link">{{paymentInfo.yeepay_pay_url}}</span></a>
<i ng-if="paymentInfo.enable_yeepay_link" class="fa fa-clipboard margin-r-5" style="cursor: pointer" ng-click="copyYeepayLink()"></i>
<input ng-if="paymentInfo.enable_link" style="opacity: 0" id="cpyeepay" value={{paymentInfo.yeepay_pay_url}} readonly>
</div>
</div>
<div class="form-group" ng-if="paymentInfo.enable_yeepay && paymentInfo.enable_yeepay_link">
<label class="col-sm-2 control-label">Yeepay QR Code</label>
<img ng-src="{{paymentInfo.yeepayQrcodeUrl}}" class="img-responsive" />
<div>
&nbsp;&nbsp;<span style="padding-left: 19.2%;font-size:9px;">仅支持微信客户端扫描</span>
</div>
</div>
<div class="form-group" ng-if="paymentInfo.enable_yeepay">
<label class="col-sm-2 control-label">Yeepay Email Notice</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_yeepay_email_notice" bs-switch switch-change="toggleGatewayEmailNotice('yeepay')">
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

@ -149,4 +149,65 @@
</div> </div>
</div> </div>
</div> </div>
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<h3 class="box-title pull-left" ng-if="partner.yeepay_sub_merchant_id">
Yeepay Sub Merchant Id : {{partner.yeepay_sub_merchant_id}}
<i class="fa fa-clock-o text-danger" title="Using temp Sub Merchant ID" ng-if="partner.temp_sub_merchant"></i>
</h3>
<button role="button" class="btn btn-info pull-right" title="Apply Sub Merchant Id"
ng-click="applyYeepaySubMerchantId()">
<i class="fa fa-plus"></i>
Apply Sub Merchant Id
</button>
</div>
</div>
<div class="box">
<div class="box-header">
<h3 class="box-title">List of Sub Merchant Id</h3>
</div>
<div class="box-body col-sm-6" ng-repeat="id_apply in subYeepayMerchantInfos">
<ul class="list-group ui_desk">
<li class="list-group-item list-group-item-success">
<b>Sub Merchant Id</b>
<b style="float: right"><span
ng-if="partner.yeepay_sub_merchant_id == id_apply.sub_merchant_id"><small
class="text-red">(当前使用)</small></span>{{id_apply.sub_merchant_id}}</b>
</li>
<li class="list-group-item list-group-item-success">
Apply Time
<span style="float: right" ng-bind="id_apply.create_time"></span>
</li>
<li class="list-group-item list-group-item-success">
Business Content
<span style="float:right;">{{id_apply.business_content | yeepayBusinessContent}}</span>
</li>
<li class="list-group-item list-group-item-success">
Business Category
<span style="float: right">{{id_apply.industry | yeepayIndustry}}</span>
</li>
<li class="list-group-item list-group-item-success">
Operator
<span style="float: right" ng-bind="id_apply.operator"></span>
</li>
</ul>
<div class="box_desk">
<div class="content_button">
<button role="button" class="btn btn-info" title="use"
ng-click="useYeepaySubMerchantId(id_apply.sub_merchant_id)">
USE
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> </div>

@ -97,7 +97,9 @@
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}" <a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> | ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a>
</p> </p>
</div> </div>
</div> </div>
@ -298,6 +300,8 @@
uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/> uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/>
<img src="/static/images/rpayplus_sign.png" <img src="/static/images/rpayplus_sign.png"
uib-tooltip="RPay" ng-if="trade.channel=='Rpay'"/> uib-tooltip="RPay" ng-if="trade.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png"
uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
{{trade.order_id2}} {{trade.order_id2}}
</td> </td>
<td ng-bind="trade.currency"></td> <td ng-bind="trade.currency"></td>

@ -45,6 +45,11 @@
<img src="/static/images/rpayplus_sign_lg.png"> <img src="/static/images/rpayplus_sign_lg.png">
</a> </a>
</li> </li>
<li ng-class="{active:ctrl.channel=='Yeepay'}" ng-if="report.channels.Yeepay">
<a role="button" ng-click="ctrl.channel='Yeepay';channelAndDayOfAnalysis()" title="Yeepay">
<img src="/static/images/yeepay_sign_lg.png">
</a>
</li>
</ul> </ul>
</div> </div>
</div> </div>

@ -95,9 +95,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='JD'}" <a role="button" ng-class="{'bg-primary':params.channel=='JD'}"
ng-click="params.channel='JD';loadTradeLogs(1)">JD Pay</a> | ng-click="params.channel='JD';loadTradeLogs(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}" <a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay+</a> ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay+</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a>
</p> </p>
</div> </div>
</div> </div>
@ -325,6 +327,7 @@
<img src="/static/images/jd_sign.png" uib-tooltip="JD Pay" ng-if="trade.channel=='jd'"/> <img src="/static/images/jd_sign.png" uib-tooltip="JD Pay" ng-if="trade.channel=='jd'"/>
<img src="/static/images/hf_sign.png" uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/> <img src="/static/images/hf_sign.png" uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/>
<img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+" ng-if="trade.channel=='Rpay'"/> <img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+" ng-if="trade.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png" uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
{{trade.order_id}} {{trade.order_id}}
</td> </td>
<td> <td>

@ -135,7 +135,9 @@
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}" <a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> | ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a>
</p> </p>
</div> </div>
</div> </div>
@ -355,6 +357,8 @@
uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/> uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/>
<img src="/static/images/rpayplus_sign.png" <img src="/static/images/rpayplus_sign.png"
uib-tooltip="Royal Pay" ng-if="trade.channel=='Rpay'"/> uib-tooltip="Royal Pay" ng-if="trade.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png"
uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
{{trade.order_id}} {{trade.order_id}}
</td> </td>
<td> <td>

Loading…
Cancel
Save