Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/ui/static/payment/partner/templates/sub_partners.html
master
luoyang 6 years ago
commit 73bbc16ec3

@ -13,7 +13,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.1.2</jib-maven-plugin.version>
<docker-image.version>1.0.3</docker-image.version>
<docker-image.version>1.0.29</docker-image.version>
</properties>
<dependencies>

@ -12,6 +12,7 @@
"Overview",
"QRCode",
"NewQRCode",
"NativeQRCode",
"QRCodePay",
"JSApi",
"NewJSAPI",

@ -93,6 +93,45 @@
* @apiError (ERROR_CODE) ORDER_PAID 订单已支付
*
*/
/**
* @api {PUT} /api/v1.0/gateway/partners/{partner_code}/native_orders/{order_id} 创建Native QRCode支付单
* @apiName NativeQRCode
* @apiGroup QRCode
* @apiVersion 1.0.0
* @apiDescription
* QRCode支付单适用于PC端网页/应用进行支付用户使用微信/支付宝客户端扫描下单后生成的二维码完成支付<br>
* <img src="img/qroce_process_ch.png"><br>
* 返回值包括二维码字符串二维码图片支付地址商户可以自行决定直接展示二维码或跳转支付页跳转支付页需要带上签名信息
* 货币类型如果是CNY注意通过汇率转换后不得低于0.01AUD否则订单可以创建成功但支付时会报金额不合法错误
* @apiHeader Accept application/json
* @apiHeader Content-Type application/json
* @apiParam (PathVariable) {String} partner_code 必填商户编码由4-6位大写字母或数字构成
* @apiParam (PathVariable) {String} order_id 必填商户支付订单号要求同一商户唯一
* @apiUse Sign
* @apiParam (JSON) {String} description 必填订单标题最大长度128字符超出自动截取
* @apiParam (JSON) {int} price 必填金额单位为货币最小单位例如使用100表示1.00 AUD
* @apiParam (JSON) {String=AUD,CNY} currency=AUD 币种代码
* @apiParam (JSON) {String=Alipay,Wechat} channel 支付渠道大小写敏感
* @apiParam (JSON) {String} notify_url 支付通知url详见支付通知api不填则不会推送支付通知
* @apiParam (JSON) {String} operator 操作人员标识
*
* @apiSuccess {String} return_code 执行结果
* @apiSuccess {String} result_code SUCCESS表示创建订单成功EXISTS表示订单已存在
* @apiSuccess {String} channel 支付渠道
* @apiSuccess {String} partner_code 商户编码
* @apiSuccess {String} full_name 商户注册全名
* @apiSuccess {String} partner_name 商户名称
* @apiSuccess {String} order_id GlobalFreePay订单ID同时也是微信订单ID最终支付成功的订单ID可能不同
* @apiSuccess {String} partner_order_id 商户订单ID
* @apiSuccess {String} code_url 支付码字符串商户可以据此自行生产二维码
* @apiSuccess {String} qrcode_img Base64封装的二维码图片可直接作为img的src属性
* @apiSuccess {String} pay_url 跳转URL
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配
* @apiError (ERROR_CODE) ORDER_PAID 订单已支付
*
*/
/**
* @api {GET} /api/v1.0/gateway/partners/{partner_code}/orders/{order_id}/pay QRCode支付跳转页
* @apiName QRCodePay
@ -541,7 +580,7 @@
* <li>7: RoyalPay 商户静态码(已停用)</li>
* <li>8: H5网关</li>
* </ul>
* @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝Wechat|微信Bestpay|翼支付
* @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝AlipayOnline|支付宝线上Wechat|微信Bestpay|翼支付
* @apiSuccess (transactions) {String} type 流水类型
* <ul>
* <li>Credit: 入账</li>
@ -603,7 +642,7 @@
* <li>7: RoyalPay 商户静态码(已停用)</li>
* <li>8: H5网关</li>
* </ul>
* @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝Wechat|微信Bestpay|翼支付
* @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝AlipayOnline|支付宝线上Wechat|微信Bestpay|翼支付
* @apiSuccess (transactions) {String} type 流水类型
* <ul>
* <li>Credit: 入账</li>
@ -643,7 +682,7 @@
* @apiParam (JSON) {int} real_fee 支付金额单位是最小货币单位
* @apiParam (JSON) {Double} rate 交易时使用的汇率1AUD=?CNY
* @apiParam (JSON) {String} currency 币种AUD
* @apiParam (JSON) {String} channel 支付渠道 Alipay|支付宝Wechat|微信Bestpay|翼支付
* @apiParam (JSON) {String} channel 支付渠道 Alipay|支付宝AlipayOnline|支付宝线上Wechat|微信Bestpay|翼支付
* @apiParam (JSON) {String} create_time 订单创建时间格式为'yyyy-MM-dd HH:mm:ss'GMT+10
* @apiParam (JSON) {String} pay_time 订单支付时间格式为'yyyy-MM-dd HH:mm:ss'GMT+10
*

@ -12,6 +12,7 @@
"Overview",
"QRCode",
"NewQRCode",
"NativeQRCode",
"QRCodePay",
"JSApi",
"NewJSAPI",

@ -95,6 +95,46 @@
* @apiError (ERROR_CODE) ORDER_PAID Order has already been paid
*
*/
/**
* @api {PUT} /api/v1.0/gateway/partners/{partner_code}/native_orders/{order_id} Create QR Code Payment
* @apiName NativeQRCode
* @apiGroup QRCode
* @apiVersion 1.0.0
* @apiDescription
* QR Code Payment is used for webpage/application on PC. Customers use WeChat or Alipay app to scan QR Code generated when creating order and finish the payment.<br>
* <img src="img/qrcode_process_en.png"><br>
* Return value contains QR Code string, QR Ccode image and payment page address. Partners can decide how to finish the payment.
* If the currency is CNY, equivalent AUD amount shall never less than 0.01 AUD,
* otherwise user will get Invalid Amount Error from WeChat when making the payment.
* @apiHeader Accept application/json
* @apiHeader Content-Type application/json
* @apiParam (PathVariable) {String} partner_code Required, Partner Code
* @apiParam (PathVariable) {String} order_id Required, Partner order id. Shall be unique for the same partner. If repeated, order will be recognized as an existing order.
* @apiUse Sign
* @apiParam (JSON) {String} description Required, Description of an order.
* @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency.
* @apiParam (JSON) {String=AUD,CNY} currency=AUD Currency
* @apiParam (JSON) {String=Alipay,Wechat} channel Payment channel, case sensitive
* @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds
* @apiParam (JSON) {String} operator Note for the operator who created this order.
*
* @apiSuccess {String} return_code Execution result
* @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed.
* @apiSuccess {String} channel Payment channel
* @apiSuccess {String} partner_code Partner code
* @apiSuccess {String} full_name Partner's full company name when registered
* @apiSuccess {String} partner_name Partner's name
* @apiSuccess {String} order_id Order id in GlobalFreePay, which is also WeChat order id. The final order id which is paid may be different from this one.
* @apiSuccess {String} partner_order_id Partner order id
* @apiSuccess {String} code_url QR Code string. Partners can create the payment QR Code according to this value.
* @apiSuccess {String} qrcode_img QR Code image formatted in Base64. Can be used as the src attribute on img element
* @apiSuccess {String} pay_url Payment page in GlobalFreePay
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner.
* @apiError (ERROR_CODE) ORDER_PAID Order has already been paid
*
*/
/**
* @api {GET} /api/v1.0/gateway/partners/{partner_code}/orders/{order_id}/pay QR Code Payment Page in RoyalPay
* @apiName QRCodePay
@ -550,7 +590,7 @@
* <li>7: RoyalPay Static Merchant QRCode(deprecated)</li>
* <li>8: H5 Payment Gateway</li>
* </ul>
* @apiSuccess (transactions) {String} channel Payment Channel (Alipay, Wechat, Bestpay)
* @apiSuccess (transactions) {String} channel Payment Channel (Alipay, AlipayOnline, Wechat, Bestpay)
* @apiSuccess (transactions) {String} type Trade Direction
* <ul>
* <li>Credit: Income</li>
@ -613,7 +653,7 @@
* <li>7: RoyalPay Static Merchant QRCode(deprecated)</li>
* <li>8: H5 Payment Gateway</li>
* </ul>
* @apiSuccess (transactions) {String} channel Payment Channel (Alipay, Wechat, Bestpay)
* @apiSuccess (transactions) {String} channel Payment Channel (Alipay, AlipayOnline, Wechat, Bestpay)
* @apiSuccess (transactions) {String} type Trade Direction
* <ul>
* <li>Credit: Income</li>
@ -653,7 +693,7 @@
* @apiParam (JSON) {int} real_fee Actual paid amount
* @apiParam (JSON) {Double} rate Exchange Rate used while trading. 1AUD=?CNY
* @apiParam (JSON) {String} currency Currency,AUD
* @apiParam (JSON) {String} channel Payment Channel AlipayWechatBestpay
* @apiParam (JSON) {String} channel Payment Channel AlipayAlipayOnlineWechatBestpay
* @apiParam (JSON) {String} create_time Time when order is created, which is formatted in 'yyyy-MM-dd HH:mm:ss', UTC+10
* @apiParam (JSON) {String} pay_time Time when order is paid, which is formatted in 'yyyy-MM-dd HH:mm:ss', UTC+10.
*

@ -2,9 +2,12 @@ package au.com.royalpay.payment.manage.analysis.core.impls;
import au.com.royalpay.payment.manage.analysis.core.DailyReport;
import au.com.royalpay.payment.manage.mappers.cashback.CashbackRecordsMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDCommissionConfigMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDPrizeLogMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingLogMapper;
import au.com.royalpay.payment.manage.mappers.log.DailyReportMapper;
import au.com.royalpay.payment.manage.mappers.redpack.ActPartnerLMLogMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
@ -20,13 +23,13 @@ import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@ -38,6 +41,8 @@ public class DailyReportImp implements DailyReport {
@Resource
private ManagerMapper managerMapper;
@Resource
private ClientMapper clientMapper;
@Resource
private DailyReportMapper dailyReportMapper;
@Resource
private CashbackRecordsMapper cashbackRecordsMapper;
@ -47,6 +52,10 @@ public class DailyReportImp implements DailyReport {
private ClearingLogMapper clearingLogMapper;
@Resource
private MpWechatApiProvider mpWechatApiProvider;
@Resource
private FinancialBDPrizeLogMapper financialBDPrizeLogMapper;
@Resource
private FinancialBDCommissionConfigMapper financialBDCommissionConfigMapper;
private Logger logger = LoggerFactory.getLogger(getClass());
@ -71,6 +80,9 @@ public class DailyReportImp implements DailyReport {
JSONObject debitReport = getDebitReport(dt);
report.put("debit", JSON.toJSONString(debitReport));
JSONObject kpiReport = getKPI(dt);
report.put("kpi", JSON.toJSONString(kpiReport));
dailyReportMapper.save(report);
if (sendMsg) {
List<JSONObject> users = managerMapper.getDirectors();
@ -85,6 +97,69 @@ public class DailyReportImp implements DailyReport {
}
private JSONObject getKPI(Date dt){
JSONObject report = new JSONObject();
List<JSONObject> kpiList =new ArrayList<>();
List<JSONObject> prizeAmountAndBdTypeList = financialBDPrizeLogMapper.findBdPrizeAmountMonth(DateUtils.truncate(dt, Calendar.DATE),DateUtils.truncate(DateUtils.addDays(dt,1), Calendar.DATE),DateUtils.truncate(dt, Calendar.MONTH));
List<JSONObject> prizeAmountAndBdTypeListYesterDay = financialBDPrizeLogMapper.findBdPrizeAmountMonth(DateUtils.truncate(DateUtils.addDays(dt,-1), Calendar.DATE),DateUtils.truncate(dt, Calendar.DATE),DateUtils.truncate(DateUtils.addDays(dt,-1), Calendar.MONTH));
List<JSONObject> clientsAmount = clientMapper.createClientsByGroup(DateUtils.truncate(dt, Calendar.DATE),DateUtils.truncate(DateUtils.addDays(dt,1), Calendar.DATE),DateUtils.truncate(dt, Calendar.MONTH));
//BD团队总KPI
BigDecimal total_kpi_amount = BigDecimal.ZERO;
//BD团队当月总销售额
BigDecimal total_month_amount = BigDecimal.ZERO;
for(JSONObject p :prizeAmountAndBdTypeList){
JSONObject kpi = new JSONObject();
kpi.put("bd_group",p.getString("bd_group"));
kpi.put("bd_name",p.getString("bd_name"));
kpi.put("group_name",groupName(p.getIntValue("bd_type")));
//昨日数据
kpi.put("total_amount",p.getBigDecimal("total_amount"));
//当月数据
kpi.put("month_amount",p.getBigDecimal("month_amount"));
BigDecimal kpi_amount = financialBDCommissionConfigMapper.findCurrentCommissionMaxAmount(DateFormatUtils.format(DateUtils.truncate(dt,Calendar.MONTH),"yyyy-MM"), p.getIntValue("bd_type"));
kpi.put("kpi_amount",kpi_amount);
for(JSONObject prize : prizeAmountAndBdTypeListYesterDay){
if(prize.getString("bd_group").equals(kpi.getString("bd_group"))){
BigDecimal compare = kpi.getBigDecimal("total_amount").subtract(prize.getBigDecimal("total_amount"));
kpi.put("compare",compare);
kpi.put("compare_value",Math.abs(compare.doubleValue()));
}
}
kpi.put("kpi_percent", p.getBigDecimal("month_amount").divide(kpi_amount,4,BigDecimal.ROUND_HALF_DOWN).multiply(BigDecimal.valueOf(100)).toString().substring(0,5)+"%");
for(JSONObject clientAmount :clientsAmount ){
if(clientAmount.getString("bd_group").equals(kpi.getString("bd_group"))){
kpi.put("clients_month",clientAmount.getIntValue("clients_month"));
kpi.put("clients_yesterday",clientAmount.getIntValue("clients_yesterday"));
}
}
total_kpi_amount = total_kpi_amount.add(kpi_amount);
total_month_amount = total_month_amount.add(p.getBigDecimal("month_amount"));
kpiList.add(kpi);
}
report.put("kpiList",kpiList);
report.put("kpi_percent_total",total_month_amount.divide(total_kpi_amount,4,BigDecimal.ROUND_HALF_DOWN).multiply(BigDecimal.valueOf(100)).toString().substring(0,5)+"%");
report.put("total_month_amount",total_month_amount);
Calendar calendar = Calendar.getInstance();
calendar.setTime(dt);
report.put("time_percent",BigDecimal.valueOf(calendar.get(Calendar.DAY_OF_MONTH)).divide(BigDecimal.valueOf(calendar.getActualMaximum(Calendar.DAY_OF_MONTH)),4,BigDecimal.ROUND_HALF_DOWN).multiply(BigDecimal.valueOf(100)).toString().substring(0,5)+"%");
return report;
}
private String groupName(int bd_type){
switch (bd_type) {
case 1:
return "Sydney Team";
case 2:
return "KA Manager";
case 6:
return "Melbourne Team";
case 7:
return "KA Manager";
default:
return "Unknown Group";
}
}
private JSONObject getDebitReport(Date dt) {
JSONObject report = new JSONObject();
BigDecimal redpack = actPartnerLMLogMapper.getRedpackAmount(dt);
@ -141,6 +216,7 @@ public class DailyReportImp implements DailyReport {
}
report.put("credit", JSON.parseObject(report.getString("credit")));
report.put("debit", JSON.parseObject(report.getString("debit")));
report.put("kpi", JSON.parseObject(report.getString("kpi")));
report.put("range", report.getDate("analysis_date"));
report.put("report_date", report.getDate("report_date"));
return report;

@ -53,6 +53,9 @@ public class ClientPreApplyBean {
private String codeKey;
private boolean agree;
private String nation_code;
private String client_pay_type;
private String client_pay_desc;
public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this);
@ -234,4 +237,20 @@ public class ClientPreApplyBean {
public void setNation_code(String nation_code) {
this.nation_code = nation_code;
}
public void setClient_pay_type(String client_pay_type) {
this.client_pay_type = client_pay_type;
}
public void setClient_pay_desc(String client_pay_desc) {
this.client_pay_desc = client_pay_desc;
}
public String getClient_pay_type() {
return client_pay_type;
}
public String getClient_pay_desc() {
return client_pay_desc;
}
}

@ -378,6 +378,10 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
clientConfig.put("client_moniker", clientMoniker);
clientConfig.put("clean_days", apply.getIntValue("clean_days"));
clientConfig.put("common_sub_merchant_id", 1);
if (StringUtils.isNotBlank(apply.getString("client_pay_type")) && StringUtils.isNotBlank(apply.getString("client_pay_desc"))) {
clientConfig.put("client_pay_type", apply.getString("client_pay_type"));
clientConfig.put("client_pay_desc", apply.getString("client_pay_desc"));
}
clientConfigMapper.save(clientConfig);
apply.put("client_moniker", clientMoniker);

@ -655,7 +655,7 @@ public class BDPrizeServiceImpl implements BDPrizeService {
int rowNum = 0;
Row row = sheet.createRow(rowNum);
String[] title = {"Client Moniker", "Order Date Range", "Client Rate", "Client Source", "Init Months", "Transaction", "Coefficient", "BD Rate",
"Commission", "Channel"};
"Commission", "RoyalPay Surcharge", "Channel"};
for (int i = 0; i < title.length; i++) {
row.createCell(i, Cell.CELL_TYPE_STRING).setCellValue(title[i]);
}
@ -673,7 +673,8 @@ public class BDPrizeServiceImpl implements BDPrizeService {
row.createCell(6, Cell.CELL_TYPE_STRING).setCellValue(bdlog.getString("coefficient"));
row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(bdlog.getString("bd_rate") + "%");
row.createCell(8, Cell.CELL_TYPE_STRING).setCellValue(bdlog.getString("prize_value"));
row.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(bdlog.getString("channel"));
row.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(bdlog.getString("royal_surcharge"));
row.createCell(10, Cell.CELL_TYPE_STRING).setCellValue(bdlog.getString("channel"));
}
wb.write(ous);
ous.flush();

@ -9,5 +9,13 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public interface AliforexcelService {
JSONObject listClients(HttpServletResponse httpResponse,JSONObject manager, AliExcel query);
JSONObject listClients(HttpServletResponse httpResponse, JSONObject manager, AliExcel query);
JSONObject registerAlipayOnlineMerchant();
JSONObject registerAlipayMerchant();
JSONObject getLessPartnerInfo();
void initClientPayType(int begin,int end);
}

@ -1,26 +1,49 @@
package au.com.royalpay.payment.manage.dev.core.impl;
import au.com.royalpay.payment.channels.alipay.config.AlipayConfig;
import au.com.royalpay.payment.channels.alipay.config.AlipayEnvironment;
import au.com.royalpay.payment.channels.alipay.runtime.AlipayClient;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.mappers.PmtOrderMapper;
import au.com.royalpay.payment.manage.dev.bean.AliExcel;
import au.com.royalpay.payment.manage.dev.core.AliforexcelService;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import com.alibaba.fastjson.JSONObject;
import com.yeepay.shade.org.apache.commons.lang3.StringUtils;
import org.apache.commons.io.IOUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.dom4j.Element;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.security.InvalidParameterException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@Service
public class AliforexcelServiceImpl implements AliforexcelService {
@Resource
private ClientMapper clientMapper;
@Resource
private ClientConfigMapper clientConfigMapper;
@Resource
private TransactionMapper transactionMapper;
@Resource
private AlipayClient alipayClient;
@Resource
private OrderMapper orderMapper;
@Override
public JSONObject listClients(HttpServletResponse httpResponse,JSONObject manager, AliExcel query) {
@ -75,4 +98,225 @@ public class AliforexcelServiceImpl implements AliforexcelService {
return null;
}
@Override
public JSONObject registerAlipayOnlineMerchant() {
JSONObject result = new JSONObject();
List<String> needRegisterMerchant = new ArrayList<>();
List<String> registerSuccessMerchant = new ArrayList<>();
List<JSONObject> registerFailMerchant = new ArrayList<>();
List<JSONObject> lessInfoMerchant = new ArrayList<>();
List<Integer> useAlipayOnlineMerchant = transactionMapper.useAlipayOnlineClients();
for (int clientId : useAlipayOnlineMerchant) {
JSONObject client = clientMapper.findClient(clientId);
if (client == null) {
continue;
}
try {
needRegisterMerchant.add(client.getString("client_moniker"));
checkPartnerInfo(client,"online");
} catch (InvalidParameterException e) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", e.getMessage());
exception.put("bd_name", client.getString("bd_user_name"));
lessInfoMerchant.add(exception);
continue;
}
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant();
Element resultElement = alipayClient.registerOnlineGmsPortal(mch.getPid(), client);
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", resultElement.elementText("error"));
registerFailMerchant.add(exception);
continue;
}
Element responseElement = resultElement.element("response").element("alipay");
if (!StringUtils.equalsIgnoreCase("SUCCESS", responseElement.elementText("result_code"))) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", resultElement.elementText("error"));
registerFailMerchant.add(exception);
continue;
}
registerSuccessMerchant.add(client.getString("client_moniker"));
}
result.put("need_register_merchant", needRegisterMerchant);
result.put("success_register_merchant", registerSuccessMerchant);
result.put("fail_register_merchant", registerFailMerchant);
result.put("less_info_merchant", lessInfoMerchant);
return result;
}
@Override
public JSONObject registerAlipayMerchant() {
JSONObject result = new JSONObject();
List<String> needRegisterMerchant = new ArrayList<>();
List<String> registerSuccessMerchant = new ArrayList<>();
List<JSONObject> registerFailMerchant = new ArrayList<>();
List<JSONObject> lessInfoMerchant = new ArrayList<>();
String alipayOfflineMerchantsStr = "FORE,RAYI,AASO,BGWI,HYMQ,LIFE,TWTA,AMYW,CCTM,JCYA,JICH,ADGJ,MAGL,TOMA,MCNE,LILC,YOTR,PENG,CASM,SHAO,SWCG,TMCF,BPAR,DNLG,OVAU,SJZH,VWPA,BCOL,MOLI,LIYA,TST3,AUKN,MMEK,GINF,EZE2,GOTR,CJKD,QR12,NJHI,WHAP,HOTO,OMNI,UGGM,JJTV,HHPL,BSPL,TOUR,AUMG,AYUC,BFLI,WAOR,SUTR,LTEA,BRAV,BTTC,FATT,VFPL,LEOH,BHHO,ISSP,JOLP,SUNH,NEVC,QR56,GNH9,SHFO,4UBW,ZZAO,B12H,QUMA,MAYH,FMPS,OWPL,CUDE,I2MI,FAGO,FADA,ZHHS,MANT,DOMU,NTTB,SDCN,8QNF,BHLW,KNIT,U4N9,WNNN";
String[] alipayOfflineMerchants = alipayOfflineMerchantsStr.split(",");
for (String clientMoniker : alipayOfflineMerchants) {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
continue;
}
try {
needRegisterMerchant.add(client.getString("client_moniker"));
checkPartnerInfo(client,"offline");
} catch (InvalidParameterException e) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", e.getMessage());
exception.put("bd_name", client.getString("bd_user_name"));
lessInfoMerchant.add(exception);
continue;
}
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant();
Element resultElement = alipayClient.registerGmsPortal(mch.getPid(), client);
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", resultElement.elementText("error"));
registerFailMerchant.add(exception);
continue;
}
Element responseElement = resultElement.element("response").element("alipay");
if (!StringUtils.equalsIgnoreCase("SUCCESS", responseElement.elementText("result_code"))) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", resultElement.elementText("error"));
registerFailMerchant.add(exception);
continue;
}
registerSuccessMerchant.add(client.getString("client_moniker"));
}
result.put("need_register_merchant", needRegisterMerchant);
result.put("success_register_merchant", registerSuccessMerchant);
result.put("fail_register_merchant", registerFailMerchant);
result.put("less_info_merchant", lessInfoMerchant);
return result;
}
@Override
public JSONObject getLessPartnerInfo() {
JSONObject result = new JSONObject();
List<JSONObject> lessInfoMerchant = new ArrayList<>();
List<Integer> useAlipayOnlineMerchant = transactionMapper.useAlipayOnlineClients();
for (int clientId : useAlipayOnlineMerchant) {
JSONObject client = clientMapper.findClient(clientId);
if (client == null) {
continue;
}
try {
checkPartnerInfo(client,"online");
} catch (InvalidParameterException e) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", e.getMessage());
exception.put("bd_name", client.getString("bd_user_name"));
lessInfoMerchant.add(exception);
}
}
result.put("less_info_merchant", lessInfoMerchant);
return result;
}
private void checkPartnerInfo(JSONObject client,String type) {
if ("online".equals(type)) {
if (!client.containsKey("company_website") || StringUtils.isBlank(client.getString("company_website"))) {
throw new InvalidParameterException("Website cannot be empty ");
}
}else {
if (!client.containsKey("store_photo") && !client.containsKey("company_photo")) {
throw new InvalidParameterException("store photo cannot be empty ");
}
if (client.containsKey("store_photo") && !client.containsKey("company_photo")) {
client.put("company_photo", client.getString("store_photo"));
}
if (client.containsKey("company_photo") && !client.containsKey("store_photo")) {
client.put("store_photo", client.getString("company_photo"));
}
}
if (StringUtils.isBlank(client.getString("business_structure"))) {
throw new InvalidParameterException("Business Structure can't be null");
}
if (StringUtils.isBlank(client.getString("alipayindustry"))) {
throw new InvalidParameterException("Alipay Industry can't be null");
}
}
@Override
public void initClientPayType(int begin,int end) {
List<JSONObject> merchants = clientMapper.clientPayTypeInfoByClientIdRange(begin, end);
for (JSONObject partner : merchants) {
JSONObject clientConfig = new JSONObject();
List<String> types = new ArrayList<>();
List<String> descs = new ArrayList<>();
clientConfig.put("client_id", partner.getIntValue("client_id"));
clientConfig.put("client_moniker", partner.getString("client_moniker"));
List<Integer> gateways = orderMapper.listGatewayByClientId(partner.getIntValue("client_id"));
if (gateways.size() == 0) {
unOrdersPartner(partner, clientConfig);
continue;
}
if (gateways.contains(0) || gateways.contains(1) || gateways.contains(2)) {
descs.add("6");
}
if (gateways.contains(3) || gateways.contains(9) || gateways.contains(14)) {
descs.add("1");
}
if (gateways.contains(4) || gateways.contains(7)) {
descs.add("4");
}
if (gateways.contains(5) || gateways.contains(6) || gateways.contains(11)) {
descs.add("8");
descs.add("12");
}
if (gateways.contains(8)) {
descs.add("2");
}
if (gateways.contains(10)) {
descs.add("3");
}
if (gateways.contains(12)) {
descs.add("5");
}
if (gateways.contains(13)) {
descs.add("6");
}
if (descs.contains("1") || descs.contains("2") || descs.contains("3") || descs.contains("4") ||
descs.contains("5")) {
types.add("1");
}
if (descs.contains("6") || descs.contains("7") || descs.contains("8") || descs.contains("9") ||
descs.contains("10") || descs.contains("11") || descs.contains("12") ||descs.contains("13")) {
types.add("2");
}
clientConfig.put("client_pay_type", StringUtils.join(types, ','));
clientConfig.put("client_pay_desc", StringUtils.join(descs, ','));
clientConfigMapper.update(clientConfig);
}
}
private void unOrdersPartner(JSONObject partner,JSONObject clientConfig) {
if (StringUtils.isBlank(partner.getString("client_pay_type"))) {
clientConfig.put("client_pay_type", "2");
clientConfig.put("client_pay_desc", "6");
} else {
String[] types = partner.getString("client_pay_type").split(",");
List<String> descs = new ArrayList<>();
if (Arrays.asList(types).contains("1")) {
descs.add("3");
}
if (Arrays.asList(types).contains("2")) {
descs.add("6");
}
clientConfig.put("client_pay_desc", StringUtils.join(descs, ','));
}
clientConfigMapper.update(clientConfig);
}
}

@ -449,4 +449,24 @@ public class TestController implements ApplicationEventPublisherAware {
public void downloadHanyinSecureReports(@PathVariable String date) {
tradeSecureService.uploadSecureReport(DateTime.parse(date).toDate());
}
@ManagerMapping(value = "/register/alipayOnlineGms", role = ManagerRole.DEVELOPER, method = RequestMethod.POST)
public JSONObject registerAlipayOnlineMerchant() {
return aliforexcelService.registerAlipayOnlineMerchant();
}
@ManagerMapping(value = "/register/alipayGms", role = ManagerRole.DEVELOPER, method = RequestMethod.POST)
public JSONObject registerAlipayMerchant() {
return aliforexcelService.registerAlipayMerchant();
}
@ManagerMapping(value = "/register/getLessPartnerInfo", role = ManagerRole.DEVELOPER, method = RequestMethod.GET)
public JSONObject getLessPartnerInfo() {
return aliforexcelService.getLessPartnerInfo();
}
@ManagerMapping(value = "/init/client_pay_type", role = ManagerRole.DEVELOPER, method = RequestMethod.GET)
public void initClientPayType(@RequestParam int begin,@RequestParam int end) {
aliforexcelService.initClientPayType(begin,end);
}
}

@ -91,13 +91,14 @@ public interface FinancialBDPrizeLogMapper {
List<JSONObject> findBdPrizeAmountAndBdType(@Param("record_id") String recordId);
@Select("SELECT\n" +
"\tc.*,\n" +
"\tsum( ( o.total ) * d.proportion ) AS total_amount\n" +
"\tfbc.*,\n" +
"\tsum( ( o.total ) * d.proportion ) AS total_amount \n" +
"FROM\n" +
"\tstatistics_customer_order o\n" +
"\tINNER JOIN sys_clients sc ON sc.client_id = o.client_id\n" +
"\tINNER JOIN sys_client_bd d ON o.client_id = d.client_id\n" +
"\tINNER JOIN financial_bd_config c ON d.bd_id = c.manager_id \n" +
"\tINNER JOIN financial_bd_config c ON d.bd_id = c.manager_id\n" +
"\tINNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group \n" +
"WHERE\n" +
"\tsc.org_id = 1 \n" +
"\tAND o.date >= #{start_date} \n" +
@ -106,6 +107,52 @@ public interface FinancialBDPrizeLogMapper {
"\t) \n" +
"\tAND c.bd_group IS NOT NULL \n" +
"GROUP BY\n" +
"\tc.bd_group")
"\tfbc.bd_type")
List<JSONObject> findBdPrizeAmountRealTime(@Param("start_date") Date start_date, @Param("end_date") Date end_date);
@Select("SELECT\n" +
"\tt1.*,\n" +
"\tt2.total_amount AS month_amount \n" +
"FROM\n" +
"\t(\n" +
"SELECT\n" +
"\tfbc.*,\n" +
"\tsum( ( o.total ) * d.proportion ) AS total_amount \n" +
"FROM\n" +
"\tstatistics_customer_order o\n" +
"\tINNER JOIN sys_clients sc ON sc.client_id = o.client_id\n" +
"\tINNER JOIN sys_client_bd d ON o.client_id = d.client_id\n" +
"\tINNER JOIN financial_bd_config c ON d.bd_id = c.manager_id\n" +
"\tINNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group \n" +
"WHERE\n" +
"\tsc.org_id = 1 \n" +
"\tAND o.date >= #{start_date} \n" +
"\tAND o.date < #{end_date} \n" +
"\tAND d.start_date <= o.date AND d.is_valid = 1 AND ( d.end_date IS NULL OR d.end_date > o.date \n" +
"\t) \n" +
"\tAND c.bd_group IS NOT NULL \n" +
"GROUP BY\n" +
"\tfbc.bd_type \n" +
"\t) t1\n" +
"\tLEFT JOIN (\n" +
"SELECT\n" +
"\tfbc.*,\n" +
"\tsum( ( o.total ) * d.proportion ) AS total_amount \n" +
"FROM\n" +
"\tstatistics_customer_order o\n" +
"\tINNER JOIN sys_clients sc ON sc.client_id = o.client_id\n" +
"\tINNER JOIN sys_client_bd d ON o.client_id = d.client_id\n" +
"\tINNER JOIN financial_bd_config c ON d.bd_id = c.manager_id\n" +
"\tINNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group \n" +
"WHERE\n" +
"\tsc.org_id = 1 \n" +
"\tAND o.date >= #{month_start_date} \n" +
"\tAND o.date < #{end_date} \n" +
"\tAND d.start_date <= o.date AND d.is_valid = 1 AND ( d.end_date IS NULL OR d.end_date > o.date \n" +
"\t) \n" +
"\tAND c.bd_group IS NOT NULL \n" +
"GROUP BY\n" +
"\tfbc.bd_type \n" +
"\t) t2 ON t1.bd_group = t2.bd_group")
List<JSONObject> findBdPrizeAmountMonth(@Param("start_date") Date start_date, @Param("end_date") Date end_date,@Param("month_start_date") Date month_start_date);
}

@ -70,5 +70,5 @@ public interface OrderMapper {
@AdvanceSelect(addonWhereClause = "status in (5,6,7) AND channel in('Wechat','Alipay')")
List<JSONObject> listNewYearOrdersByOpenId(@Param("customer_id") String open_id,@Param("transaction_date") String date);
List<Integer> listGatewayByClientId(@Param("client_id") int clientId);
}

@ -157,4 +157,6 @@ public interface TransactionMapper {
List<JSONObject> getClientOrderByTransactionTime(JSONObject params);
List<JSONObject> getLastDaytransAmount(JSONObject params);
List<Integer> useAlipayOnlineClients();
}

@ -22,6 +22,9 @@ public interface ClearingDistributedSurchargeMapper {
@AutoSql(type = SqlType.INSERT)
void save(JSONObject transactions);
@AutoSql(type = SqlType.SELECT)
List<JSONObject> findByClearingId(@Param("client_id") int clientId, @Param("clearing_detail_id") String clearingDetailId);
List<JSONObject> getMonthDetailByClientId(@Param("datefrom") Date datefrom, @Param("dateto") Date dateto);
List<JSONObject> findSurchargeTransactionsByDetailId(@Param("client_id") int clientId, @Param("detailId") String detailId);

@ -118,4 +118,8 @@ public interface ClientMapper {
@Select("select client_id from sys_clients where parent_client_id=#{parent_client_id}")
List<Integer> childClientId(@Param("parent_client_id") int parent_client_id);
List<JSONObject> createClientsByGroup(@Param("start_date") Date start_date,@Param("end_date") Date end_date,@Param("start_date_month") Date start_date_month);
List<JSONObject> clientPayTypeInfoByClientIdRange(@Param("begin") int begin, @Param("end") int end);
}

@ -243,6 +243,8 @@ public interface ClientManager {
void changePaymentSuccessPage(JSONObject manager, String clientMoniker, String paysuccess_version);
void switchChildEachRefund(JSONObject manager, String clientMoniker, boolean childEachRefund);
void changePaymentPage(JSONObject account, String paypad_version);
void changeManualSettle(JSONObject account , int client_id, boolean manual_settle,String operator_id,int type,String operation);
@ -323,9 +325,9 @@ public interface ClientManager {
String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply,JSONObject manager);
void registerAlipayGms(String clientMoniker, JSONObject representative_id, JSONObject manager);
void registerAlipayGms(String clientMoniker, JSONObject manager);
void registerAlipayOnlineGms(String clientMoniker, JSONObject representative_id, JSONObject manager);
void registerAlipayOnlineGms(String clientMoniker, JSONObject manager);
String queryAlipayGmsStatus(String clientMoniker, JSONObject manager);

@ -26,6 +26,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
@ -217,6 +218,10 @@ public class ClientApplyImpl implements ClientApply, ApplicationEventPublisherAw
clientMapper.save(partner);
JSONObject clientConfig = new JSONObject();
if (StringUtils.isNotBlank(apply.getString("client_pay_type")) && StringUtils.isNotBlank(apply.getString("client_pay_desc"))) {
clientConfig.put("client_pay_type", apply.getString("client_pay_type"));
clientConfig.put("client_pay_desc", apply.getString("client_pay_desc"));
}
clientConfig.put("client_id",partner.getIntValue("client_id"));
clientConfig.put("client_moniker",info.getClientMoniker());
clientConfigService.save(clientConfig);

@ -16,6 +16,7 @@ import au.com.royalpay.payment.channels.yeepay.runtime.YeePayClient;
import au.com.royalpay.payment.core.PaymentChannelApi;
import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.mappers.SysClientMapper;
import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver;
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
@ -271,6 +272,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private FinancialSurchargeAccountDetailMapper financialSurchargeAccountDetailMapper;
@Resource
private SysClientMapper sysClientMapper;
@Resource
private Locker locker;
@ -409,6 +412,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
String cbBankPayQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/sys/partners/" + client.getString("client_moniker") + "/cb_bankpay/link");
client.put("cbBankPayQrcodeUrl", QRCodeUtils.qrcodeImageCode(cbBankPayQrcodeUrl, 250, true));
}
//商户支付场景
if (StringUtils.isNotBlank(client.getString("client_pay_type"))) {
client.put("client_pay_type",client.getString("client_pay_type").split(","));
client.put("client_pay_desc",client.getString("client_pay_desc").split(","));
}
if (StringUtils.isNotBlank(client.getString("parent_client_id"))
&& sysClientMapper.childClientId(client.getIntValue("client_id")).size() > 0) {
client.put("level2_client", 1);
}
return client;
}
@ -3061,12 +3073,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException();
}
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
if (client.getInteger("open_status") == null) {
int countProduct = commoditiesMapper.checkProduct(client.getInteger("client_id"));
if (countProduct <= 0) {
throw new BadRequestException("The Merchant's Product is empty!");
}
}
if (manager != null && ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
int bdOperatClientRole = clientBDMapper.checkBDPermission(client.getIntValue("client_id"), manager.getString("manager_id"));
if (bdOperatClientRole <= 0) {
@ -3140,13 +3146,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
if (client.getInteger("open_status") == null) {
int countProduct = commoditiesMapper.checkProduct(client.getInteger("client_id"));
if (countProduct <= 0) {
throw new BadRequestException("The Merchant's Product is empty!");
}
}
JSONObject surCharge = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat");
if (surCharge == null || surCharge.size() <= 0) {
throw new BadRequestException("The Partner's Rate is not config!");
@ -3174,12 +3173,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException();
}
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
if (client.getInteger("open_status") == null) {
int countProduct = commoditiesMapper.checkProduct(client.getInteger("client_id"));
if (countProduct <= 0) {
throw new BadRequestException("The Merchant's Product is empty!");
}
}
if (manager != null && ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
int bdOperatClientRole = clientBDMapper.checkBDPermission(client.getIntValue("client_id"), manager.getString("manager_id"));
@ -3230,6 +3223,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientMapper.update(client);
}
@Override
public void switchChildEachRefund(JSONObject manager, String clientMoniker, boolean childEachRefund) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
JSONObject clientConfig = clientConfigMapper.find(client.getIntValue("client_id"));
clientConfig.put("child_each_refund", childEachRefund);
clientConfigMapper.update(clientConfig);
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
}
@Override
public void changePaymentPage(JSONObject account, String paypad_version) {
int clientId = account.getIntValue("client_id");
@ -3979,7 +3985,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
public void registerAlipayGms(String clientMoniker, JSONObject representative_id, JSONObject manager) {
public void registerAlipayGms(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
@ -4002,13 +4008,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("Alipay Industry can't be null");
}
if (!"Company".equals(client.getString("business_structure"))) {
if (StringUtils.isBlank(representative_id.getString("representative_id"))) {
throw new BadRequestException("ID or passport number can't be null");
}
client.put("representative_id", representative_id.getString("representative_id"));
}
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant();
Element resultElement = alipayClient.registerGmsPortal(mch.getPid(), client);
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
@ -4117,7 +4116,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
public void registerAlipayOnlineGms(String clientMoniker, JSONObject representative_id, JSONObject manager) {
public void registerAlipayOnlineGms(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
@ -4140,11 +4139,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
client.put("bank_id", client_bank.getString("account_no"));
if (StringUtils.isBlank(representative_id.getString("representative_id"))) {
throw new BadRequestException("ID or passport number can't be null");
}
client.put("representative_id", representative_id.getString("representative_id"));
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant();
Element resultElement = alipayClient.registerOnlineGmsPortal(mch.getPid(), client);
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {

@ -0,0 +1,48 @@
package au.com.royalpay.payment.manage.merchants.enums;
/**
* @Author: luoyang
* @Date: 2019-05-29 10:30
*/
public enum paymentScenarioEnum {
PC_WEB(1, "PC网站"),
MOBILE_WEB(2, "手机端网站"),
APP(3, "APP"),
WECHAT_ALIPAY_WEB(4, "微信内、支付宝内网站"),
MINIPROGRAM(5, "小程序"),
QRCODE_BOARD(6, "二维码立牌"),
ROYALPAY_POS(7,"Royalpay POS"),
CASHIER_POS(8,"收银系统"),
IPOS(9,"ipos"),
POSPAL(10,"pospal"),
AUPOS(11,"aupos"),
OTHER(12,"other"),
VENDING_MACHINE(13,"无人售货机");
private final int scenarioTypeId;
private final String desc;
public int getScenarioTypeId() {
return scenarioTypeId;
}
public String getDesc() {
return desc;
}
paymentScenarioEnum(int scenarioTypeId, String desc) {
this.scenarioTypeId = scenarioTypeId;
this.desc = desc;
}
}

@ -275,6 +275,11 @@ public class PartnerManageController {
clientManager.switchPermission(manager, clientMoniker, "sub_manage", pass.getBooleanValue("allow"));
}
@ManagerMapping(value = "/{clientMoniker}/child_each_refund", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR})
public void switchChildEachRefund(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.switchChildEachRefund(manager, clientMoniker, pass.getBooleanValue("allow"));
}
@ManagerMapping(value = "/{clientMoniker}/channels/{channel}/permission", method = RequestMethod.PUT, role = {ManagerRole.SERVANT, ManagerRole.DEVELOPER})
public void switchChannelPermission(@PathVariable String clientMoniker, @PathVariable String channel, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.switchChannelPermission(manager, clientMoniker, channel, pass.getBooleanValue("allow"));
@ -628,8 +633,8 @@ public class PartnerManageController {
}
@ManagerMapping(value = "/{clientMoniker}/register/alipay_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void registerAlipayGms(@PathVariable String clientMoniker,@RequestBody JSONObject representative_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayGms(clientMoniker, representative_id, manager);
public void registerAlipayGms(@PathVariable String clientMoniker,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayGms(clientMoniker, manager);
}
@ManagerMapping(value = "/{clientMoniker}/query/alipay_gms", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
@ -638,8 +643,8 @@ public class PartnerManageController {
}
@ManagerMapping(value = "/{clientMoniker}/register/alipayOnline_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void registerAlipayOnlineGms(@PathVariable String clientMoniker,@RequestBody JSONObject representative_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayOnlineGms(clientMoniker, representative_id, manager);
public void registerAlipayOnlineGms(@PathVariable String clientMoniker,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayOnlineGms(clientMoniker, manager);
}
@ManagerMapping(value = "/{clientMoniker}/query/alipayOnline_gms", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})

@ -0,0 +1,9 @@
package au.com.royalpay.payment.manage.posters.core;
/**
* create by todking at 2019-6-3
*/
public interface PosterService {
void updatePoster(String imgUrl);
}

@ -0,0 +1,44 @@
package au.com.royalpay.payment.manage.posters.core.impls;
import au.com.royalpay.payment.manage.posters.core.PosterService;
import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMethod;
import java.net.URISyntaxException;
/**
* create by todking at 2019-6-3
*/
@Service
public class PosterServiceImpl implements PosterService {
private Logger logger = LoggerFactory.getLogger(getClass());
@Value("${app.cms.host}")
private String cmsHost;
@Override
public void updatePoster(String imgUrl) {
String url = cmsHost + "/api/statistics/count";
HttpRequestGenerator htg = new HttpRequestGenerator(url, RequestMethod.PUT);
try {
HttpRequestResult result = htg.addQueryString("imgUrl", imgUrl).execute();
if (result.isSuccess()) {
int statusCode = result.getStatusCode();
if (statusCode == 200) {
logger.info("CMS request succeeded");
}
}
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
}

@ -0,0 +1,25 @@
package au.com.royalpay.payment.manage.posters.web;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.posters.core.PosterService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* create by todking at 2019-6-3
*/
@RestController
@RequestMapping(value = "/app/poster")
public class posterController {
@Resource
private PosterService posterService;
@RequestMapping(method = RequestMethod.PUT)
public void updatePoster(@RequestBody JSONObject img ){
posterService.updatePoster(img.getString("imgUrl"));
}
}

@ -3,16 +3,22 @@ package au.com.royalpay.payment.manage.product.core;
import au.com.royalpay.payment.manage.product.beans.ProductBean;
import com.alibaba.fastjson.JSONObject;
import java.util.List;
/**
* Created by yuan on 2017/11/24.
*/
public interface ClientProduct {
JSONObject listAllProduct(JSONObject manager, ProductBean productBean);
List<JSONObject> listClientMcc(JSONObject manager, String clientMoniker);
void saveProduct(JSONObject manager, ProductBean productBean);
void updateProduct(JSONObject manager, ProductBean productBean);
void updateMerchantMccInfo(JSONObject manager, JSONObject mccInfo);
void deleteProduct(JSONObject manager, String commodity_id);
void importExcelToDb(String client_id, JSONObject manager, String sourceFile);

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.product.core.impls;
import au.com.royalpay.payment.channels.wechat.runtime.mappers.PaymentChannelMccGoodMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.CommoditiesMapper;
import au.com.royalpay.payment.manage.product.beans.ProductBean;
@ -23,6 +24,7 @@ import java.io.InputStream;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.checkOrgPermission;
@ -37,6 +39,8 @@ public class ClientProductImpl implements ClientProduct {
private static final String EXCEL_XLSX = "xlsx";
@Resource
private CommoditiesMapper commoditiesMapper;
@Resource
private PaymentChannelMccGoodMapper paymentChannelMccGoodMapper;
@Resource
private ClientMapper clientMapper;
@ -50,6 +54,14 @@ public class ClientProductImpl implements ClientProduct {
return PageListUtils.buildPageListResult(listProducts);
}
@Override
public List<JSONObject> listClientMcc(JSONObject manager, String clientMoniker) {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
Assert.notNull(client);
checkOrgPermission(manager, client);
return paymentChannelMccGoodMapper.findPaymentChannelMccByClientId(client.getIntValue("client_id"));
}
@Override
public void saveProduct(JSONObject manager,ProductBean productBean) {
JSONObject param = productBean.toJsonParam();
@ -69,6 +81,17 @@ public class ClientProductImpl implements ClientProduct {
commoditiesMapper.updateProduct(param);
}
@Override
public void updateMerchantMccInfo(JSONObject manager, JSONObject mccInfo) {
JSONObject client = clientMapper.findClientByMoniker(mccInfo.getString("client_moniker"));
Assert.notNull(client);
checkOrgPermission(manager, client);
mccInfo.put("client_id", client.getIntValue("client_id"));
mccInfo.put("creation_date", new Date());
mccInfo.put("creation_by", manager.getString("display_name"));
paymentChannelMccGoodMapper.update(mccInfo);
}
@Override
public void deleteProduct(JSONObject manager,String commodity_id) {
JSONObject param = new JSONObject();

@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
/**
* Created by yuan on 2017/11/24.
@ -23,8 +24,13 @@ public class ManagerProductController {
@Resource
private ClientProduct clientProduct;
@ManagerMapping(value = "/{clientMoniker}/list", method = RequestMethod.GET, role = ManagerRole.ADMIN)
public List<JSONObject> listProducts(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker) {
return clientProduct.listClientMcc(manager, clientMoniker);
}
@ManagerMapping(value = "/list",method = RequestMethod.GET,role = ManagerRole.ADMIN)
public JSONObject listProducts(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, ProductBean productBean){
public JSONObject listSysProducts(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, ProductBean productBean){
return clientProduct.listAllProduct(manager,productBean);
}
@ -34,11 +40,12 @@ public class ManagerProductController {
clientProduct.saveProduct(manager,productBean);
}
@ManagerMapping(value = "",method = RequestMethod.PUT,role = ManagerRole.ADMIN)
public void updateProduct(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody @Valid ProductBean productBean, Errors errors){
@ManagerMapping(value = "/update", method = RequestMethod.PUT, role = ManagerRole.ADMIN)
public void updateProduct(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody JSONObject mccInfo, Errors errors) {
HttpUtils.handleValidErrors(errors);
clientProduct.updateProduct(manager,productBean);
clientProduct.updateMerchantMccInfo(manager, mccInfo);
}
@ManagerMapping(value = "/{commodity_id}/delete",method = RequestMethod.POST,role = ManagerRole.ADMIN)
public void deleteProduct(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String commodity_id){
clientProduct.deleteProduct(manager,commodity_id);

@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.surchargeAccount.core;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
public interface SurchargeAccountService {
@ -12,4 +13,5 @@ public interface SurchargeAccountService {
void fillMothsSurcharge(JSONObject manager, String detailId);
void exportInvoicePDF(int clientId, String clearingDetailIdJSONObject,JSONObject manager, HttpServletResponse httpResponse);
}

@ -1,6 +1,9 @@
package au.com.royalpay.payment.manage.surchargeAccount.core.impl;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailAnalysisMapper;
import au.com.royalpay.payment.manage.mappers.system.ClearingDistributedSurchargeMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientsSurchargeAccountsMapper;
import au.com.royalpay.payment.manage.mappers.system.FinancialSurchargeAccountDetailMapper;
import au.com.royalpay.payment.manage.surchargeAccount.core.SurchargeAccountService;
@ -10,7 +13,9 @@ import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.lock.Locker;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.utils.PdfUtils;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -18,11 +23,14 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
@Service
@ -33,6 +41,10 @@ public class SurchargeAccountServiceImpl implements SurchargeAccountService {
@Resource
private FinancialSurchargeAccountDetailMapper financialSurchargeAccountDetailMapper;
@Resource
private ClientMapper clientMapper;
@Resource
private ClearingDetailAnalysisMapper clearingDetailAnalysisMapper;
@Resource
private Locker locker;
@Resource
private ClientsSurchargeAccountsMapper clientsSurchargeAccountsMapper;
@ -129,6 +141,75 @@ public class SurchargeAccountServiceImpl implements SurchargeAccountService {
locker.unlock(detail.getIntValue("client_id") + "_" + detail.getString("settle_month") + "_fill");
}
}
}
@Override
public void exportInvoicePDF(int clientId, String clearingDetailId,JSONObject manager, HttpServletResponse httpResponse) {
JSONObject client = clientMapper.findClient(clientId);
if (client == null) {
throw new InvalidShortIdException();
}
List<JSONObject> distributedDetail = clearingDistributedSurchargeMapper.findByClearingId(clientId, clearingDetailId);
if (distributedDetail.size() > 1) {
throw new BadRequestException("此次清算扣款已回滚");
}
JSONObject detial = distributedDetail.get(0);
String date = DateFormatUtils.format(detial.getDate("settle_date"), "dd MMM yyyy", Locale.US);
httpResponse.setContentType("application/pdf");
httpResponse.setHeader("content-disposition", "attachment;filename="+ client.getString("client_moniker") + "_Invoice_" + date + ".pdf");
ServletOutputStream sos = null;
JSONObject pdfInfo = new JSONObject();
try {
sos = httpResponse.getOutputStream();
List<JSONObject> clearingAnalysis = clearingDetailAnalysisMapper.listReportChannels(clearingDetailId);
invoiceChannelAmount(clearingAnalysis, pdfInfo);
httpResponse.getOutputStream();
pdfInfo.put("date", date);
pdfInfo.put("company_name", client.getString("company_name"));
pdfInfo.put("address", client.getString("address"));
pdfInfo.put("suburb", client.getString("suburb") +" " + client.getString("state") +" " +client.getString("postcode"));
pdfInfo.put("country", client.getString("country"));
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath("https://file.royalpay.com.au/open/2019/05/21/1558428021205_9pyF7U1rEloxVOXx2k7bTeRxzJaXi0.pdf");
pdu.setPdfTemplate(pdfInfo);
File file = new File(client.getString("client_moniker") + "_Invoice_"+ date + ".pdf");
ByteArrayOutputStream bos = pdu.templetPdfBos(file);
sos.write(bos.toByteArray());
sos.close();
} catch (Exception e) {
e.printStackTrace();
}
}
private void invoiceChannelAmount(List<JSONObject> analysis,JSONObject pdfInfo) {
BigDecimal wechatSurcharge = BigDecimal.ZERO;
BigDecimal wechatTaxAmount = BigDecimal.ZERO;
BigDecimal wechatAmount = BigDecimal.ZERO;
BigDecimal alipaySurcharge = BigDecimal.ZERO;
BigDecimal alipayTaxAmount = BigDecimal.ZERO;
BigDecimal alipayAmount = BigDecimal.ZERO;
for (JSONObject detail : analysis) {
switch (detail.getString("channel")) {
case "Wechat":
wechatSurcharge = detail.getBigDecimal("total_charge");
wechatTaxAmount = detail.getBigDecimal("tax_amount");
wechatAmount = detail.getBigDecimal("distributed_surcharge");
break;
case "Alipay":
alipaySurcharge = detail.getBigDecimal("total_charge");
alipayTaxAmount = detail.getBigDecimal("tax_amount");
alipayAmount = detail.getBigDecimal("distributed_surcharge");
break;
default:
break;
}
}
pdfInfo.put("surcharge_wechat", wechatSurcharge);
pdfInfo.put("amount_wechat", wechatSurcharge.add(wechatTaxAmount));
pdfInfo.put("surcharge_alipay", alipaySurcharge);
pdfInfo.put("amount_alipay", alipaySurcharge.add(alipayTaxAmount));
pdfInfo.put("amount", wechatSurcharge.add(alipaySurcharge));
pdfInfo.put("gst", wechatTaxAmount.add(alipayTaxAmount));
pdfInfo.put("total_amount", (wechatAmount.add(alipayAmount)).setScale(2, RoundingMode.DOWN));
}
}

@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@RequestMapping("/sys/surcharge_account")
@ -26,4 +27,10 @@ public class SurchargeAccountController {
public void fillMothsSurcharge(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String detailId) {
surchargeAccountService.fillMothsSurcharge(manager, detailId);
}
@ManagerMapping(value = "/{clientId}/settlement_logs/{clearingDetailId}/export", role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF}, method = RequestMethod.GET)
public void exportInvoicePDF(@PathVariable int clientId, @PathVariable String clearingDetailId,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
surchargeAccountService.exportInvoicePDF(clientId, clearingDetailId, manager, httpResponse);
}
}

@ -139,7 +139,7 @@ settle.abafile.bank.NAB.account-name=Tunnel Show Pty Ltd
# 瀚银Secure
app.hanyin-secure.pid=ROYALPAY
app.hanyin-secure.sftp-host=180.168.61.86
app.hanyin-secure.sftp-host=180.168.61.93
app.hanyin-secure.sftp-port=28480
app.hanyin-secure.sftp-username=royalpay
app.hanyin-secure.sftp-pwd=royalpay

@ -377,11 +377,10 @@
<select id="countNewCustomers" resultType="java.lang.Integer">
<![CDATA[
SELECT COUNT(DISTINCT customer_id) FROM (SELECT o.customer_id FROM pmt_transactions t
INNER JOIN pmt_orders o ON o.order_id = t.order_id
SELECT COUNT(DISTINCT customer_id) FROM pmt_orders o
]]>
<![CDATA[
WHERE o.create_time >= #{begin} AND o.create_time < #{end}
WHERE o.create_time >= #{begin} AND o.create_time < #{end} AND o.status>4
]]>
<if test="client_ids!=null">
AND o.client_id IN
@ -392,30 +391,31 @@
<if test="client_ids==null and client_id != null">
and o.client_id=#{client_id}
</if>
<if test="org_id!=null and org_ids==null">and t.org_id=#{org_id}</if>
<if test="org_ids!=null">and t.org_id in
<if test="org_id!=null and org_ids==null">and o.org_id=#{org_id}</if>
<if test="org_ids!=null">and o.org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
</if>
<if test="channel !=null">and o.channel = #{channel}</if>
<![CDATA[
GROUP BY o.customer_id) p
where p.customer_id NOT IN (SELECT o.customer_id FROM pmt_transactions t INNER JOIN pmt_orders o ON o.order_id = t.order_id
]]>
<![CDATA[
WHERE o.create_time < #{begin}
]]>
<if test="client_ids!=null">
AND o.client_id IN
<foreach collection="client_ids" open="(" close=")" separator="," item="client_id">
#{client_id}
</foreach>
</if>
<if test="client_ids==null and client_id != null">
and o.client_id=#{client_id}
</if>
<![CDATA[
AND EXISTS (
<![CDATA[
select customer_id from pmt_orders oo where oo.customer_id=o.customer_id
and oo.create_time < #{begin} AND oo.status>4
]]>
<if test="client_ids!=null">
AND oo.client_id IN
<foreach collection="client_ids" open="(" close=")" separator="," item="client_id">
#{client_id}
</foreach>
</if>
<if test="client_ids==null and client_id != null">
and oo.client_id=#{client_id}
</if>
<if test="org_id!=null and org_ids==null">and oo.org_id=#{org_id}</if>
<if test="org_ids!=null">and oo.org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
</if>
<if test="channel !=null">and oo.channel = #{channel}</if>
)
]]>
</select>
<select id="countOldCustomers" resultType="java.lang.Integer">
<![CDATA[

@ -27,6 +27,7 @@
d.total_transaction,
d.prize_value,
d.coefficient,
d.royal_surcharge,
d.channel
FROM
financial_bd_prize_detail d

@ -846,4 +846,10 @@
and t.clearing_amount >= 1.99
]]>
</select>
<select id="listGatewayByClientId" resultType="java.lang.Integer">
SELECT gateway FROM pmt_orders
WHERE status>=5
AND client_id = #{client_id}
GROUP BY gateway
</select>
</mapper>

@ -3,53 +3,50 @@
<mapper namespace="au.com.royalpay.payment.manage.mappers.payment.RefundMapper">
<select id="listOrderRefunds" resultType="com.alibaba.fastjson.JSONObject">
SELECT
r.*,
a.audit_result,
a.auditorname,
a.audittime
SELECT r.*,
a.audit_result,
a.auditorname,
a.audittime
FROM pmt_refunds r
LEFT JOIN pmt_refund_applies a ON a.refund_id = r.refund_id
LEFT JOIN pmt_refund_applies a ON a.refund_id = r.refund_id
WHERE r.order_id = #{order_id}
</select>
<select id="findRefundInfoByDay" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT
IFNULL(SUM(prf.amount), 0) total_refund_amount,
IFNULL(COUNT(prf.refund_id), 0) total_refund_count,
MAX(prf.amount) max_refund_amount
SELECT IFNULL(SUM(prf.amount), 0) total_refund_amount,
IFNULL(COUNT(prf.refund_id), 0) total_refund_count,
MAX(prf.amount) max_refund_amount
FROM pmt_refunds prf
WHERE prf.create_time <= #{end}
AND prf.create_time >= #{begin}
AND prf.status IN ('2', '4', '5')
AND prf.create_time >= #{begin}
AND prf.status IN ('2', '4', '5')
]]>
</select>
<select id="findClientMoniker" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT DISTINCT sysc.*
FROM sys_clients sysc,
pmt_refunds prf
pmt_refunds prf
WHERE prf.create_time <= #{end}
AND prf.create_time >= #{begin}
AND prf.amount = #{amount}
AND sysc.client_id = prf.client_id
AND prf.status IN ('2', '4', '5')
AND prf.create_time >= #{begin}
AND prf.amount = #{amount}
AND sysc.client_id = prf.client_id
AND prf.status IN ('2', '4', '5')
]]>
</select>
<select id="listRefundCount" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT
count(1) refund_counts,
sum(prf.amount) refund_amount,
sysc.client_moniker
FROM pmt_refunds prf,
sys_clients sysc
WHERE prf.create_time <= #{end}
AND prf.create_time >= #{begin}
AND prf.client_id = sysc.client_id
AND prf.status IN ('2', '4', '5')
SELECT count(1) refund_counts,
sum(ptr.clearing_amount) refund_amount,
sysc.client_moniker
FROM sys_clients sysc
inner join pmt_refunds prf on prf.client_id = sysc.client_id and prf.create_time <= #{end}
AND prf.create_time >= #{begin}
inner join pmt_transactions ptr on ptr.refund_id = prf.refund_id and ptr.transaction_type = 'Debit' and
ptr.system_generate = 0
GROUP BY prf.client_id
ORDER BY refund_amount DESC
limit 30
]]>
</select>
<select id="listRefundDate" resultType="com.alibaba.fastjson.JSONObject">
@ -57,7 +54,7 @@
SELECT *
FROM calendar
WHERE datelist >= #{begin}
AND datelist <= #{end}
AND datelist <= #{end}
ORDER BY datelist ASC
]]>
</select>
@ -71,53 +68,53 @@
</select>
<select id="listUnionAllApply" resultType="com.alibaba.fastjson.JSONObject">
SELECT
order_id order_id,
client_id client_id,
create_time create_time,
confirm_time confirm_time,
operator_name operator_name,
`status` `status` ,
amount amount,
currency currency,
1 type
order_id order_id,
client_id client_id,
create_time create_time,
confirm_time confirm_time,
operator_name operator_name,
`status` `status` ,
amount amount,
currency currency,
1 type
FROM
pmt_refunds
pmt_refunds
<where>
<if test="client_id!=null">
and client_id = #{client_id}
and client_id = #{client_id}
</if>
<if test="start_time!=null">
and create_time &gt;= #{start_time}
</if>
<if test="start_time!=null">
and create_time &lt;= #{end_time}
</if>
<if test="client_ids!=null">
client_id in
<foreach collection="client_ids" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</if>
<if test="start_time!=null">
and create_time &gt;= #{start_time}
</if>
<if test="start_time!=null">
and create_time &lt;= #{end_time}
</if>
<if test="client_ids!=null">
client_id in
<foreach collection="client_ids" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</if>
</where>
UNION ALL
UNION ALL
SELECT
ra.order_id order_id,
ra.client_id client_id,
ra.applytime create_time,
ra.audittime confirm_time,
ra.auditorname operator_name,
ra.audit_result `status` ,
r.amount amount,
r.currency currency,
2 type
ra.order_id order_id,
ra.client_id client_id,
ra.applytime create_time,
ra.audittime confirm_time,
ra.auditorname operator_name,
ra.audit_result `status` ,
r.amount amount,
r.currency currency,
2 type
FROM
pmt_refund_applies ra left join pmt_refunds r on ra.refund_id = r.refund_id
pmt_refund_applies ra left join pmt_refunds r on ra.refund_id = r.refund_id
<where>
<if test="client_id!=null">
and ra.client_id = #{client_id}
and ra.client_id = #{client_id}
</if>
<if test="start_time!=null">
and ra.applytime &gt;= #{start_time}
and ra.applytime &gt;= #{start_time}
</if>
<if test="start_time!=null">
and ra.applytime &lt;= #{end_time}

@ -1208,4 +1208,9 @@
AND transaction_time &lt; #{dateto}
GROUP BY channel
</select>
<select id="useAlipayOnlineClients" resultType="java.lang.Integer">
SELECT DISTINCT client_id FROM pmt_transactions
WHERE order_channel='AlipayOnline'
</select>
</mapper>

@ -543,4 +543,60 @@
<bind name="manager_id_pattern" value="'%'+manager_id+'%'"/>
bd_user LIKE #{manager_id_pattern} AND is_valid=1;
</select>
<select id="createClientsByGroup" resultType="com.alibaba.fastjson.JSONObject">
SELECT
t1.*,
ifnull( t2.clients_yesterday, 0 ) clients_yesterday
FROM
(
SELECT
fbc.bd_name,
fbc.bd_group,
fbc.bd_type,
count( * ) clients_month
FROM
sys_clients sc
INNER JOIN sys_client_bd d ON sc.client_id = d.client_id
INNER JOIN financial_bd_config c ON d.bd_id = c.manager_id
INNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group
WHERE
sc.org_id = 1
AND sc.create_time &gt;= #{start_date_month}
AND d.is_valid = 1
AND c.bd_group IS NOT NULL
AND d.start_date &lt;= now( ) AND d.is_valid = 1 AND ( d.end_date IS NULL OR d.end_date &gt; now( )
)
GROUP BY
fbc.bd_type
) t1
LEFT JOIN (
SELECT
count( * ) clients_yesterday,
fbc.bd_group
FROM
sys_clients sc
INNER JOIN sys_client_bd d ON sc.client_id = d.client_id
INNER JOIN financial_bd_config c ON d.bd_id = c.manager_id
INNER JOIN financial_bd_config fbc ON fbc.manager_id = c.bd_group
WHERE
sc.org_id = 1
AND sc.create_time &gt;= #{start_date}
AND sc.create_time &lt; #{end_date}
AND d.is_valid = 1
AND d.start_date &lt;= now( ) AND d.is_valid = 1 AND ( d.end_date IS NULL OR d.end_date &gt; now( )
)
GROUP BY
fbc.bd_type
) t2 ON t1.bd_group = t2.bd_group
WHERE
t1.bd_type IN ( 1, 2, 6, 7 )
</select>
<select id="clientPayTypeInfoByClientIdRange" resultType="com.alibaba.fastjson.JSONObject">
SELECT p.client_id,p.client_moniker,c.client_pay_type,c.client_pay_desc FROM sys_clients p
INNER JOIN sys_client_config c ON c.client_id=p.client_id
WHERE p.is_valid=1
AND p.client_id >= #{begin}
AND p.client_id &lt; #{end}
</select>
</mapper>

@ -10,5 +10,6 @@
<plugin interceptor="com.github.miemiedev.mybatis.paginator.OffsetLimitInterceptor">
<property name="dialectClass" value="com.github.miemiedev.mybatis.paginator.dialect.MySQLDialect"/>
</plugin>
<plugin interceptor="cn.yixblog.support.mybatis.plugins.AdvancedPaginationInterceptor"/>
</plugins>
</configuration>

@ -19,7 +19,7 @@
1300 10 77 50<br>
<br>
Service WeChat Account:<br>
<img src="https://mpay.royalpay.com.au/static/images/customer_service.jpg"
<img src="https://mpay.royalpay.com.au/static/images/customer_service3.jpg"
style="width: 60px"><br>
Level 14, 383 Kent Street, Sydney NSW 2000<br>
<br>

@ -22,7 +22,7 @@
1300 10 77 50<br>
<br>
Service WeChat Account:<br>
<img src="https://mpay.royalpay.com.au/static/images/customer_service.jpg"
<img src="https://mpay.royalpay.com.au/static/images/customer_service3.jpg"
style="width: 60px"><br>
Level 14, 383 Kent Street, Sydney NSW 2000<br>
<br>

@ -1,110 +1,182 @@
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<h4>Dear <span th:text="${short_name}"></span> :</h4>
<p>I'm happy to let you know that your RoyalPay Cross-border Payment account has been set up.<br>
很高兴通知您贵司RoyalPay跨境全支付已经开通</p>
<p>Please kindly log on the website below to manage your accounts and transactions:<br>
请登录这个网站查询管理所有交易</p>
<table style="border: 1px solid #333;width: 100%">
<tbody>
<tr>
<td colspan="3" align="center">
Log on website:<a href="https://mpay.royalpay.com.au">https://mpay.royalpay.com.au/</a>
</td>
</tr>
<tr>
<th></th>
<th>Account Name</th>
<th>p/w</th>
</tr>
<tr>
<th>Manager Account</th>
<td align="center" th:text="${username}"></td>
<td align="center" th:text="${password}"></td>
</tr>
</tbody>
</table>
<ul>
<li>The password can be changed any time when you login. 您登陆后可以任意修改密码</li>
<li>It's recommended to change your password as soon as first login. 建议首次登陆后就修改您的密码</li>
<li>You can set up different accounts for the staff. (At the category:"Accounts")
您可以为您的员工配置其他账号在Accounts菜单内
</li>
</ul>
<p>Please find the User Guide here :<a
href="https://www.royalpay.com.au/downloads/royalpay_user_guide.pdf" target="_blank">User
Guide for PC</a> or
<a
href="https://help.royalpay.com.au/iphone/app_manual_v1.pdf" target="_blank">User
Guide for APP</a>
</p>
<p>您可以点击链接下载用户手册:<a href="https://www.royalpay.com.au/downloads/royalpay_user_guide.pdf"
target="_blank">PC用户手册</a>
<a href="https://help.royalpay.com.au/iphone/app_manual_v1.pdf"
target="_blank">APP用户手册</a>
</p>
<p>(If you cannot open the link above, you can copy and paste this url to your browser.
如果您无法点击上面的链接可以复制当前url到浏览器地址栏
<b>https://www.royalpay.com.au/downloads/royalpay_user_guide.pdf</b>)</p>
<hr>
<p>You can search "<a
href="https://itunes.apple.com/app/royalpay/id1049566852?l=en&mt=8">RoyalPay</a>" in APP
Store to download APP for IOSwhich helps check your payment receiving records.</p>
<p>您可以在APP Store里搜索"RoyalPay"下载royalpay的app来进行收款和接收到账提醒等。</p>
<p><img src="https://mpay.royalpay.com.au/static/images/app_guide.png"> <br></p>
<hr>
<p>Online RoyalPay Cross-border Payment is also available! The development of the document (API) is
here.</p>
<p>如需接入网站支付系统可将下方API链接及授权信息发给IT团队</p>
<p style="background: #e0e0e0">
Chinse version:<br>
<a href="https://mpay.royalpay.com.au/docs/cn/">https://mpay.royalpay.com.au/docs/cn/</a><br><br>
English version:<br>
<a href="https://mpay.royalpay.com.au/docs/en/">https://mpay.royalpay.com.au/docs/en/</a><br><br>
<span th:text="'Partner Code:'+${client_moniker}"></span><br>
<span th:text="'Credential Code:'+${credential_code}"></span>
</p>
<p>
Please contact us via any way displaying below if you have any questions. Thank you for choosing
RoyalPay.<br>
十分感谢您对RoyalPay皇家支付的信任和支持。如果您有任何问题随时可以按以下方式与我们联系。谢谢
</p>
<div style="background: #d0d0d0" th:if="${#lists.size(bds)>0}">
<h4>
Your dedicated account manager<br>
您的专属客户经理
</h4>
<p th:each="bd : ${bds}">
<span th:text="${bd.display_name}"></span><br>
Email:<a href="mailto:$bd.email" th:utext="${bd.email}"></a><br>
<span th:text="${bd.phone}"></span><br>
<span th:if="${bd['wechat']!=null} and ${bd['wechat']!=''}" th:text="${bd.wechat}"></span>
<div style="margin-left: 1rem;margin-right: 1rem;margin-top: 2rem;margin-bottom: 2rem">
<h4 style="font-family: Avenir-Heavy;font-size: 2rem;color: #000000;letter-spacing: 0;">Dear <span
th:text="${short_name}"></span> :</h4>
<p style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;">I'm happy to let you know
that your RoyalPay Cross-border Payment account has been set up.<br>
很高兴通知您贵司RoyalPay跨境全支付已经开通</p>
<p style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;">Please kindly log on the
website below to manage your accounts and transactions:<br>
请登录这个网站查询管理所有交易</p>
<div style="background-image: linear-gradient(-177deg, #FFF7ED 0%, #FFECD7 100%);width: 100%;">
<div style="display: flex;justify-content: center;font-family: Avenir-Light;font-size: 2rem;color: #FF6600;letter-spacing: 0;padding: 1rem">
Manager Account
</div>
<div style="display: flex;justify-content: space-around;padding: 1rem">
<div>
<div style="display: inline;font-family: Avenir-Heavy;font-size: 1rem;color: #9A948F;letter-spacing: 0;">
Account Name:
</div>
<div th:text="${username}"
style="display: inline; font-family: Avenir-Heavy;font-size: 1rem;color: #000000;letter-spacing: 0;">
</div>
<div style="margin-bottom: 2rem;margin-top: 2rem;">
<div style="display: inline;font-family: Avenir-Heavy;font-size: 1rem;color: #9A948F;letter-spacing: 0;">
Log on website:
</div>
<div style="display: inline"><a href="https://mpay.royalpay.com.au"
style="color: #FF700F;font-family: Avenir-Light;font-size: 1rem;letter-spacing: 0;">https://mpay.royalpay.com.au/</a>
</div>
</div>
</div>
<div>
<div style="display: inline;font-family: Avenir-Heavy;font-size: 1rem;color: #9A948F;letter-spacing: 0;">
p/w:
</div>
<div th:text="${password}"
style="display: inline; font-family: Avenir-Heavy;font-size: 1rem;color: #000000;letter-spacing: 0;">
</div>
</div>
</div>
</div>
<div style="font-family: Avenir-Heavy;font-size: 2rem;color: #000000;letter-spacing: 0; margin-top: 1rem;">
attention
</div>
<ul style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;">
<li>The password can be changed any time when you login. 您登陆后可以任意修改密码</li>
<li>It's recommended to change your password as soon as first login. 建议首次登陆后就修改您的密码</li>
<li>You can set up different accounts for the staff. (At the category:"Accounts")
您可以为您的员工配置其他账号在Accounts菜单内
</li>
</ul>
<div style="margin-top: 1rem">
<div style="display: inline">Please find the User Guide here :</div>
<div style="display: inline;font-family: Avenir-Light;font-size: 1rem;color: #FF6600;letter-spacing: 0;text-decoration: underline">
<a style="color: #FF6600" href="https://www.royalpay.com.au/downloads/royalpay_user_guide.pdf"
target="_blank">User
Guide for PC</a>
</div>
<div style="display: inline">or</div>
<div style="display: inline;font-family: Avenir-Light;font-size: 1rem;color: #FF6600;letter-spacing: 0;text-decoration: underline">
<a style="color: #FF6600;" href="https://help.royalpay.com.au/iphone/app_manual_v1.pdf" target="_blank">User
Guide for APP</a>
</div>
</div>
<div style="margin-top: 1rem">
<div style="display: inline">您可以点击链接下载用户手册 :</div>
<div style="display: inline;font-family: Avenir-Light;font-size: 1rem;color: #FF6600;letter-spacing: 0;text-decoration: underline
"><a style="color: #FF6600" href="https://www.royalpay.com.au/downloads/royalpay_user_guide.pdf"
target="_blank">PC用户手册</a>
</div>
<div style="display: inline"></div>
<div style="display: inline;font-family: Avenir-Light;font-size: 1rem;color: #FF6600;letter-spacing: 0;text-decoration: underline
"><a style="color: #FF6600" href="https://help.royalpay.com.au/iphone/app_manual_v1.pdf"
target="_blank">APP用户手册</a>
</div>
</div>
<div style="margin-top: 1rem;margin-bottom: 1rem;font-family: Avenir-Light;font-size: 1rem;color: #4A4A4A;letter-spacing: 0;">
<div style="display: inline;font-family: Avenir-Light;font-size: 1rem;color: #4A4A4A;letter-spacing: 0;">(If
you
cannot open the link above, you can copy and paste this url to your
browser.如果您无法点击上面的链接可以复制当前url到浏览器地址栏
</div>
<div style="display: inline"><b style="color: #FF6600;">https://www.royalpay.com.au/downloads/royalpay_user_guide.pdf</b>
</div>
<div style="display: inline">)</div>
</div>
<div style="width: 100%;height: 0.1rem;background: #F9E6D8;margin-top: 2rem;margin-bottom: 2rem;"></div>
<p style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;">You can search "<a
style="color: #FF6600;text-decoration: none"
href="https://itunes.apple.com/app/royalpay/id1049566852?l=en&mt=8">RoyalPay</a>" in APP
Store to download APP for IOSwhich helps check your payment receiving records.</p>
<p style="font-family: PingFang-SC-Medium;font-size: 1rem;color: #000000;letter-spacing: 0;">
您可以在APP Store里搜索"<a style="color: #FF6600;text-decoration: none"
href="https://itunes.apple.com/app/royalpay/id1049566852?l=en&mt=8">RoyalPay</a>"下载royalpay的app来进行收款和接收到账提醒等。
</p>
<p><img style="width: 100%" src="https://mpay.royalpay.com.au/static/images/App_banner.png"> <br>
</p>
<div style="width: 100%;height: 0.1rem;background: #F9E6D8;margin-top: 2rem;margin-bottom: 2rem;"></div>
<p style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;">Online RoyalPay
Cross-border
Payment is also available! The development of the document (API) is
here.</p>
<p style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;">
如需接入网站支付系统可将下方API链接及授权信息发给IT团队</p>
<div style="background: #F4F4F4;width: 100%;">
<div style="font-family: Avenir-Heavy;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;padding-left: 2rem;padding-top: 2rem">
Chinse version:
</div>
<div style="font-family: Avenir-Light;font-size: 1rem;color: #002A00;letter-spacing: 0;padding-left: 2rem;">
<a style="color: #FF6600"
href="https://mpay.royalpay.com.au/docs/cn/">https://mpay.royalpay.com.au/docs/cn/</a>
</div>
<div style="font-family: Avenir-Heavy;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;padding-left: 2rem;padding-top: 2rem">
English version:
</div>
<div style="font-family: Avenir-Light;font-size: 1rem;color: #002A00;letter-spacing: 0;padding-left: 2rem;">
<a style="color: #FF6600"
href="https://mpay.royalpay.com.au/docs/en/">https://mpay.royalpay.com.au/docs/en/</a>
</div>
<div style="font-family: Avenir-Heavy;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;padding-left: 2rem;padding-top: 2rem">
<span th:text="'Partner Code:'+${client_moniker}"></span>
</div>
<div style="font-family: Avenir-Heavy;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;padding-left: 2rem;padding-bottom: 2rem">
<span th:text="'Credential Code:'+${credential_code}"></span>
</div>
</div>
<div style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;margin-top: 1rem;margin-bottom: 1rem">
Please
contact us via any
way displaying below if you have any questions. Thank you for choosing
RoyalPay.
</div>
<div style="font-family: Avenir-Light;font-size: 1rem;color: #2A2A2A;letter-spacing: 0;margin-top: 1rem;margin-bottom: 1rem">
十分感谢您对RoyalPay皇家支付的信任和支持。如果您有任何问题随时可以按以下方式与我们联系。谢谢
</div>
<div style="width: 100%;height: 0.2rem;background: #FF6600;margin-top: 2rem;margin-bottom: 2rem;"></div>
<h4 style="font-family: Avenir-Heavy;font-size: 2rem;color: #000000;letter-spacing: 0;">Best Regards</h4>
<div style="display: flex;justify-content: center;">
<img style="width: 10rem;height: 7.5rem"
src="https://mpay.royalpay.com.au/static/images/logo_light.png">
</div>
<div style="display: flex;justify-content: space-around">
<div style="font-family: Avenir-Medium;font-size: 1rem;color: #888888;">
<div style="">Email:<br/><a style="color: #888888;text-decoration: none" href="mailto:info@royalpay.com.au">info@royalpay.com.au</a></div>
<div style="margin-top: 1rem;">Tel:<br/>1300 10 77 50</div>
<div style="margin-top: 1rem;">Level 14, 383 Kent Street, Sydney NSW 2000</div>
<div style="margin-top: 1rem;">Tunnel Show Pty Ltd trading as RoyalPay</div>
</div>
<div style="font-family: Avenir-Medium;font-size: 1rem;color: #888888;">
<div>
<div style="display: inline;">Service WeChat Account:</div>
<br/>
<img src="https://mpay.royalpay.com.au/static/images/customer_service3.jpg"
style="width: 3rem;height: 3rem">
</div>
<div style="margin-top: 2rem;">Level 11, 15 William Street, Melbourne VIC 3000</div>
<div style="margin-top: 1rem;">Representative of AFSL licensee 448066</div>
</div>
</div>
<div style="width: 100%;height: 0.1rem;background: #F9E6D8;margin-top: 2rem;margin-bottom: 2rem;"></div>
</div>
<hr>
<h4>Best Regards</h4>
<p>
<img style="width: 120px;height: 120px"
src="https://mpay.royalpay.com.au/static/images/logo_new.jpg"> <br>
Contact Us<br>
Email:<br>
<a href="mailto:info@royalpay.com.au">info@royalpay.com.au</a> <br>
Tel:<br>
1300 10 77 50<br>
<br>
Service WeChat Account:<br>
<img src="https://mpay.royalpay.com.au/static/images/customer_service.jpg"
style="width: 60px"><br>
Level 14, 383 Kent Street, Sydney NSW 2000<br>
<br>
Level 11, 15 William Street, Melbourne VIC 3000
</p>
<p>Tunnel Show Pty Ltd trading as RoyalPay<br>
Representative of AFSL licensee 448066
</p>
</html>

@ -12,7 +12,7 @@
1300 10 77 50<br>
<br>
Service WeChat Account:<br>
<img src="https://mpay.royalpay.com.au/static/images/customer_service.jpg"
<img src="https://mpay.royalpay.com.au/static/images/customer_service3.jpg"
style="width: 60px"><br>
Level 14, 383 Kent Street, Sydney NSW 2000<br>
<br>

@ -163,7 +163,7 @@
1300 10 77 50<br>
<br>
Service WeChat Account:<br>
<img src="https://mpay.royalpay.com.au/static/images/customer_service.jpg"
<img src="https://mpay.royalpay.com.au/static/images/customer_service3.jpg"
style="width: 60px"><br>
Level 14, 383 Kent Street, Sydney NSW 2000<br>
<br>

@ -13,7 +13,7 @@
1300 10 77 50<br>
<br>
Service WeChat Account:<br>
<img src="https://mpay.royalpay.com.au/static/images/customer_service.jpg"
<img src="https://mpay.royalpay.com.au/static/images/customer_service3.jpg"
style="width: 60px"><br>
Level 14, 383 Kent Street, Sydney NSW 2000<br>
<br>

@ -31,6 +31,7 @@
<div class="weui-navbar">
<a class="weui-navbar__item weui-bar__item_on">收入</a>
<a class="weui-navbar__item">支出</a>
<a class="weui-navbar__item">KPI</a>
</div>
<div class="weui-tab__panel">
<div class="tabcontent">
@ -132,6 +133,80 @@
</div>
</div>
</div>
<div class="tabcontent" style="display: none;">
<div class="weui-panel">
<div class="weui-panel__hd">KPI进度</div>
<div class="weui-panel__bd">
<div class="weui-media-box weui-media-box_small-appmsg">
<div class="weui-cells">
<div class="weui-cell weui-flex">
<div class="weui-cell__hd weui-flex__item">总KPI完成度</div>
<div class="weui-cell__ft weui-flex__item"
th:text="${report.kpi.kpi_percent_total}"></div>
</div>
<div class="weui-cell weui-flex">
<div class="weui-cell__hd weui-flex__item">时间进度</div>
<div class="weui-cell__ft weui-flex__item"
th:text="${report.kpi.time_percent}"></div>
</div>
<div class="weui-cell weui-flex"
th:each=" kpi : ${report.kpi.kpiList}">
<div class="weui-cell__hd weui-flex__item"
th:text="${kpi.group_name}"></div>
<div class="weui-cell__ft weui-flex__item"
th:text="${kpi.kpi_percent}"></div>
</div>
</div>
</div>
</div>
</div>
<div class="weui-panel">
<div class="weui-panel__hd">昨日销售额(增长量)</div>
<div class="weui-panel__bd">
<div class="weui-media-box weui-media-box_small-appmsg">
<div class="weui-cells">
<!--<div class="weui-cell weui-flex">-->
<!--<div class="weui-cell__hd weui-flex__item">当月总销售额</div>-->
<!--<div class="weui-cell__ft weui-flex__item" th:text="${report.kpi.total_month_amount}"></div>-->
<!--</div>-->
<div class="weui-cell weui-flex"
th:each=" kpi : ${report.kpi.kpiList}">
<div class="weui-cell__hd weui-flex__item"
th:text="${kpi.group_name}"></div>
<div style="color: green" class="weui-cell__ft weui-flex__item" th:if="${kpi.compare>0}"
th:text="${kpi.total_amount}+'('+'↑'+${kpi.compare_value}+')'">
</div>
<div style="color: red" class="weui-cell__ft weui-flex__item" th:if="${kpi.compare<0}"
th:text="${kpi.total_amount}+'('+'↓'+${kpi.compare_value}+')'"></div>
<div class="weui-cell__ft weui-flex__item" th:if="${kpi.compare==0}"
th:text="${kpi.total_amount}+'('+${kpi.compare_value}+')'"></div>
</div>
</div>
</div>
</div>
</div>
<div class="weui-panel">
<div class="weui-panel__hd">昨日开户数(当月开户数)</div>
<div class="weui-panel__ft">
<div class="weui-media-box weui-media-box_small-appmsg">
<div class="weui-cells">
<div class="weui-cell weui-flex"
th:each=" kpi : ${report.kpi.kpiList}">
<div class="weui-cell__hd weui-flex__item"
th:text="${kpi.group_name}"></div>
<div class="weui-cell__ft weui-flex__item" th:if="${kpi['clients_month']!=null}"
th:text="${kpi.clients_yesterday}+'('+${kpi.clients_month}+')'"></div>
<div class="weui-cell__ft weui-flex__item" th:if="${kpi['clients_month']==null}">0(0)</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

@ -122,7 +122,7 @@
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
<!-- User image -->
<li class="user-header user-header-yedian">
<img src="static/images/customer_service.jpg"
<img src="static/images/customer_service3.jpg"
alt="Customer Service Qrcode">
<p>
Technical Support WeChat
@ -203,7 +203,7 @@
</style>
<span style="font-size: smaller"> ( <i class="fa fa-phone" aria-hidden="true"></i> 1300-10-77-50 |
<i class="fa fa-envelope-o" aria-hidden="true"></i> info@royalpay.com.au |
WeChat <i class="fa fa-qrcode" aria-hidden="true" tooltip-class="customClass" uib-tooltip-html="'<img src=static/images/customer_service.jpg>'"></i> )
WeChat <i class="fa fa-qrcode" aria-hidden="true" tooltip-class="customClass" uib-tooltip-html="'<img src=static/images/customer_service3.jpg>'"></i> )
</span>
</footer>
</div>

@ -218,7 +218,7 @@
RoyalPay服务号
</div>
<div class="qr">
<img src="static/images/customer_service.jpg" class="img-block img-full">
<img src="static/images/customer_service3.jpg" class="img-block img-full">
RoyalPay官方客服
</div>
</div>

@ -198,7 +198,7 @@ margin-bottom: 10%;"/>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
&lt;!&ndash; User image &ndash;&gt;
<li class="user-header user-header-yedian">
<img src="static/images/customer_service.jpg"
<img src="static/images/customer_service3.jpg"
alt="Customer Service Qrcode">
<p>
Technical Support WeChat
@ -457,7 +457,7 @@ margin-bottom: 10%;"/>
</style>
<span style="font-size: smaller"> ( <i class="fa fa-phone" aria-hidden="true"></i> 1300-10-77-50 |
<i class="fa fa-envelope-o" aria-hidden="true"></i> info@royalpay.com.au |
WeChat <i class="fa fa-qrcode" aria-hidden="true" tooltip-class="customClass" uib-tooltip-html="'<img src=static/images/customer_service.jpg>'"></i> )
WeChat <i class="fa fa-qrcode" aria-hidden="true" tooltip-class="customClass" uib-tooltip-html="'<img src=static/images/customer_service3.jpg>'"></i> )
</span>
</footer>
@ -673,7 +673,7 @@ margin-bottom: 10%;"/>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
&lt;!&ndash; User image &ndash;&gt;
<li class="user-header user-header-yedian">
<img src="static/images/customer_service.jpg"
<img src="static/images/customer_service3.jpg"
alt="Customer Service Qrcode">
<p>
Technical Support WeChat
@ -786,7 +786,7 @@ margin-bottom: 10%;"/>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
<!-- User image -->
<li class="user-header user-header-yedian">
<img src="static/images/customer_service2.jpg"
<img src="static/images/customer_service3.jpg"
alt="Customer Service Qrcode">
<p>
Technical Support WeChat
@ -1073,7 +1073,7 @@ margin-bottom: 10%;"/>
</style>
<span style="font-size: smaller"> ( <i class="fa fa-phone" aria-hidden="true"></i> 1300-10-77-50 |
<i class="fa fa-envelope-o" aria-hidden="true"></i> info@royalpay.com.au |
WeChat <i class="fa fa-qrcode" aria-hidden="true" tooltip-class="customClass" uib-tooltip-html="'<img src=static/images/customer_service2.jpg>'"></i> )
WeChat <i class="fa fa-qrcode" aria-hidden="true" tooltip-class="customClass" uib-tooltip-html="'<img src=static/images/customer_service3.jpg>'"></i> )
</span>
</footer>

@ -400,14 +400,126 @@
</div>
</div>
</div>
<!-- <div class="form-group has-feedback"
ng-class="{'has-error':companyForm.royalpayindustry.$invalid && companyForm.royalpayindustry.$dirty}">
<input class="form-control" id="royalpayindustry" required
name="royalpayindustry" readonly
ng-model="partner.royalpayindustry"
multi-level-select-popup="royalpayindustry"
on-select="onRoyalPayIndustrySelect($selected)">
</div>-->
<div class="panel panel-default">
<div class="panel-heading">Merchant Payment Scenario</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-5">*
Merchant Payment Scenario Type</label>
<div class="col-sm-5">
<a class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('1')>=0}"
ng-click="toggleClientPayType('1')">
<i class="fa fa-mixcloud"></i>
Online</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('2')>=0}"
ng-click="toggleClientPayType('2')">
<i class="fa fa-shopping-basket"></i>
Offline</a>
</div>
</div>
<div class="form-group"
ng-if="partner.client_pay_type.indexOf('1')>=0">
<label class="control-label col-sm-2">
*Online</label>
<div class="col-sm-10">
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('1')>=0}"
ng-click="toggleClientPayDesc('1')">
<i class="fa fa-desktop"></i>
PC Web</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('2')>=0}"
ng-click="toggleClientPayDesc('2')">
<i class="fa fa-mobile-phone"></i>
Moblie Web</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('3')>=0}"
ng-click="toggleClientPayDesc('3')">
<i class="fa fa-mobile-phone"></i>
APP</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('4')>=0}"
ng-click="toggleClientPayDesc('4')">
<i class="fa fa-wechat"></i>
Wechat/Alipay JSAPI</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('5')>=0}"
ng-click="toggleClientPayDesc('5')">
<i class="fa fa-wechat"></i>
MiniProgram</a>
</div>
</div>
<div ng-if="partner.client_pay_type.indexOf('2')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">*Offline</label>
<div class="col-sm-8">
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('6')>=0}"
ng-click="toggleClientPayDesc('6')">
<i class="fa fa-qrcode"></i>
QR Code</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('7')>=0}"
ng-click="toggleClientPayDesc('7')">
<i class="fa fa-user"></i>
RoyalPay POS</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('8')>=0}"
ng-click="toggleClientPayDesc('8')">
<i class="fa fa-laptop"></i>
POS</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('9')>=0}"
ng-click="toggleClientPayDesc('9')">
<i class="fa fa-shopping-cart"></i>
Vending machine</a>
</div>
</div>
</div>
<div ng-if="partner.client_pay_desc.indexOf('8')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">* POS</label>
<div class="col-sm-8">
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('10')>=0}"
ng-click="toggleClientPayDesc('10')">
<i class="fa fa-laptop"></i>
ipos</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('11')>=0}"
ng-click="toggleClientPayDesc('11')">
<i class="fa fa-laptop"></i>
pospal</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('12')>=0}"
ng-click="toggleClientPayDesc('12')">
<i class="fa fa-laptop"></i>
aupos</a>
<a class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('13')>=0}"
ng-click="toggleClientPayDesc('13')">
<i class="fa fa-laptop"></i>
other</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="form-group has-feedback"
ng-class="{'has-error':companyForm.royalpayindustry.$invalid && companyForm.royalpayindustry.$dirty}">
<input class="form-control" id="royalpayindustry" required
name="royalpayindustry" readonly
ng-model="partner.royalpayindustry"
multi-level-select-popup="royalpayindustry"
on-select="onRoyalPayIndustrySelect($selected)">
</div>-->
<div class="row">
<div class="col-xs-12 margin-bottom">

@ -13,6 +13,7 @@ define(['./app',
'./services/yeepayIndustryMap',
'./services/stateMap',
'./services/industryMap',
'./services/wechatGoodMcc',
'./services/sectorMap',
'./services/countryMap',
'./services/clearingDetailService',

@ -70,17 +70,6 @@ define(['../app', 'jquery'], function (app, $) {
}
});
var offlineDesc = [];
$.ajax({
url: '/static/data/client_offline_desc.json',
method: 'GET',
async: false,
dataType: 'json',
success: function (data) {
offlineDesc = data;
}
});
app.filter('partner_state', ['stateMap', function (stateMap) {
return function (stateValue) {
@ -116,6 +105,17 @@ define(['../app', 'jquery'], function (app, $) {
return industryLabel;
}
}]);
app.filter('wechat_mcc', ['wechatGoodMcc', function (wechatGoodMcc) {
return function (industryCode) {
var industryLabel = '';
angular.forEach(wechatGoodMcc.configs(), function (industry) {
if (industry.value == industryCode) {
industryLabel = industry.label;
}
});
return industryLabel;
}
}]);
app.filter('partner_alipay_industry', ['$http', function ($http) {
@ -225,29 +225,6 @@ define(['../app', 'jquery'], function (app, $) {
}]);
app.filter('partner_offline_desc', ['$http', function ($http) {
return function (industryCode) {
var industryLabel = '';
angular.forEach(offlineDesc, function (category) {
if (category.value == industryCode) {
industryLabel = category.label;
}
angular.forEach(category.children, function (categoryChildren1) {
if (categoryChildren1.value == industryCode) {
industryLabel = categoryChildren1.label;
}
angular.forEach(categoryChildren1.children, function (categoryChildren2) {
if (categoryChildren2.value == industryCode) {
industryLabel = categoryChildren2.label;
}
});
});
});
return industryLabel;
}
}]);
app.filter('partner_sector', ['sectorMap', function (sectorMap) {
return function (sectorValue) {
var sectorLabel = '';

@ -0,0 +1,582 @@
define(["../app"], function (app) {
"use strict";
var wechatGoodMcc = [
{
"label": "Duty-free shops 免税店",
"value": 5309
}, {
"label": "Department stores 百货商店",
"value": 5311
}, {
"label": "Discount shops 折扣商店",
"value": 5310
}, {
"label": "Auto and home supply outlets 汽车商店、家庭用品商店",
"value": 5531
}, {
"label": "Mens and boys clothing and accessory shops 男子和男童服装及用品商店",
"value": 5611
}, {
"label": "Womens ready-to-wear shops 妇女成衣商店",
"value": 5621
}, {
"label": "Womens accessory and speciality shops 女性用品商店",
"value": 5631
}, {
"label": "Childrens and infants wear shops 婴儿、儿童服装店",
"value": 5641
}, {
"label": "Family clothing shops 家庭服装商店",
"value": 5651
}, {
"label": "Sports and riding apparel shops 运动服饰商店",
"value": 5655
}, {
"label": "Shoe shops 鞋店",
"value": 5661
}, {
"label": "Furriers and fur shops 皮货店",
"value": 5681
}, {
"label": "Mens and womens clothing shops 成人成衣店",
"value": 5691
}, {
"label": "Miscellaneous apparel and accessory shops 各类服装及饰物店",
"value": 5699
}, {
"label": "Furniture, home furnishings and equipment shops and manufacturers, except appliances 家具、家庭摆品、家用设备零售商",
"value": 5712
}, {
"label": "Household appliance shops 家用电器商店",
"value": 5722
}, {
"label": "Jewellery, watch, clock and silverware shops 珠宝、钟表、银器店",
"value": 5944
}, {
"label": "Luggage and leather goods shops 箱包、皮具店",
"value": 5948
}, {
"label": "Precious stones and metals, watches and jewellery 宝石和金属、手表和珠宝",
"value": 5094
}, {
"label": "Variety stores 各类杂货店、便利店",
"value": 5331
}, {
"label": "Groceries and supermarkets 大型仓储式超级市场",
"value": 5411
}, {
"label": "Home supply warehouse outlets 大型仓储式家庭用品卖场",
"value": 5200
}, {
"label": "Tailors, seamstresses, mending and alterations 裁缝、修补、改衣店",
"value": 5697
}, {
"label": "Wig and toupee shops 假发商店",
"value": 5698
}, {
"label": "Floor covering services 地板商店",
"value": 5713
}, {
"label": "Drapery, window covering and upholstery shops 帏帐、窗帘、室内装潢商店",
"value": 5714
}, {
"label": "Alcoholic beverage wholesalers 酒精饮料",
"value": 5715
}, {
"label": "Fireplaces, fireplace screens and accessories shops 壁炉、壁炉防护网及配件商店",
"value": 5718
}, {
"label": "Miscellaneous home furnishing speciality shops 各种家庭装饰专营店",
"value": 5719
}, {
"label": "Electronics shops 电子设备商店",
"value": 5732
}, {
"label": "Music shops - musical instruments, pianos and sheet music 音乐商店-乐器、钢琴、乐谱",
"value": 5733
}, {
"label": "Computer software outlets 计算机软件商店",
"value": 5734
}, {
"label": "Record shops 音像制品商店",
"value": 5735
}, {
"label": "Package shops - beer, wine and liquor 瓶装酒零售店",
"value": 5921
}, {
"label": "Used merchandise and second-hand shops 旧商品店、二手商品店",
"value": 5931
}, {
"label": "Antique shop - sale, repair and restoration 古玩店-出售、维修及还原",
"value": 5932
}, {
"label": "Antique reproduction shops 古玩复制店",
"value": 5937
}, {
"label": "Bicycle shops - sales and service 自行车商店",
"value": 5940
}, {
"label": "Sporting goods shops 体育用品店",
"value": 5941
}, {
"label": "Bookshops 书店",
"value": 5942
}, {
"label": "Stationery, office and school supply shops 文具用品商店、各类办公用品商店",
"value": 5943
}, {
"label": "Hobby, toy and game shops 玩具、游戏店",
"value": 5945
}, {
"label": "Camera and photographic supply shops 照相器材商店",
"value": 5946
}, {
"label": "Gift, card, novelty and souvenir shops 礼品、卡片、装饰品、纪念品商店",
"value": 5947
}, {
"label": "Sewing, needlework, fabric and piece goods shops 纺织品及针织品零售",
"value": 5949
}, {
"label": "Glassware and crystal shops 玻璃器皿和水晶饰品店",
"value": 5950
}, {
"label": "Artist supply and craft shops 工艺美术商店",
"value": 5970
}, {
"label": "Art dealers and galleries 艺术商和画廊",
"value": 5971
}, {
"label": "Stamp and coin shops 邮票和纪念币商店",
"value": 5972
}, {
"label": "Religious goods and shops 宗教品商店",
"value": 5973
}, {
"label": "Cosmetic shops 化妆品商店",
"value": 5977
}, {
"label": "Typewriter outlets - sales, service and rentals 打字机商店-销售、服务和出租",
"value": 5978
}, {
"label": "Florists 花店",
"value": 5992
}, {
"label": "Cigar shops and stands 香烟、雪茄专卖店",
"value": 5993
}, {
"label": "Newsagents and news-stands 报亭、报摊",
"value": 5994
}, {
"label": "Pet shops, pet food and supplies 宠物商店、宠物食品及用品",
"value": 5995
}, {
"label": "Electric razor shops - sales and service 电动剃刀商店-销售和服务",
"value": 5997
}, {
"label": "Miscellaneous and speciality retail outlets 其他专门零售店",
"value": 5999
}, {
"label": "Office, photographic, photocopy and microfilm equipment 办公、影印及微缩摄影器材",
"value": 5044
}, {
"label": "Computers, computer peripheral equipment - not elsewhere classified 计算机、计算机外围设备",
"value": 5045
}, {
"label": "Piece goods, notions and other dry goods 布料、缝纫用品和其他纺织品",
"value": 5131
}, {
"label": "Books, periodicals and newspapers 书、期刊和报纸",
"value": 5192
}, {
"label": "Glass, paint and wallpaper shops 玻璃、油漆涂料、墙纸零售",
"value": 5231
}, {
"label": "Hardware shops 五金商店",
"value": 5251
}, {
"label": "Lawn and garden supplies outlets, including nurseries 草坪、花园用品商店",
"value": 5261
}, {
"label": "Freezer and locker meat provisioners 各类肉类零售商",
"value": 5422
}, {
"label": "Candy, nut and confectionery shops 糖果及坚果商店",
"value": 5441
}, {
"label": "Dairies 乳制品店、冷饮店",
"value": 5451
}, {
"label": "Bakeries 面包房、糕点商店",
"value": 5462
}, {
"label": "Miscellaneous food shops - convenience and speciality retail outlets 各类食品店及专门食品零售店",
"value": 5499
}, {
"label": "Automotive tyre outlets 汽车轮胎经销商",
"value": 5532
}, {
"label": "Automotive parts and accessories outlets 汽车零配件商店",
"value": 5533
}, {
"label": "Motorcycle shops and dealers 摩托车商店和经销商",
"value": 5571
}, {
"label": "Lodging - hotels, motels and resorts 住宿服务(旅馆、酒店、汽车旅馆、度假村等)",
"value": 7011
}, {
"label": "Time-sharing villa or holiday home 分时使用的别墅或度假用房",
"value": 7012
}, {
"label": "Sporting and recreational camps 运动和娱乐露营地",
"value": 7032
}, {
"label": "Trailer parks and camp-sites 活动房车场及露营场所",
"value": 7033
}, {
"label": "Caterers 包办伙食,宴会承包商",
"value": 5811
}, {
"label": "Eating places and restaurants 就餐场所和餐馆",
"value": 5812
}, {
"label": "Fast food restaurants 快餐店",
"value": 5814
}, {
"label": "Railroads 铁路运输",
"value": 4011
}, {
"label": "Local and suburban commuter passenger transportation, including ferries 本市和市郊通勤旅客运输(包括轮渡)",
"value": 4111
}, {
"label": "Passenger railways 铁路客运",
"value": 4112
}, {
"label": "Ambulance services 救护车服务",
"value": 4119
}, {
"label": "Taxi-cabs and limousines 出租车服务",
"value": 4121
}, {
"label": "Bus lines 公路客运",
"value": 4131
}, {
"label": "Motor freight carriers and trucking - local and long distance, moving and storage companies and local delivery 货物搬运和托运—当地和长途,移动和存储公司,以及当地递送服务",
"value": 4214
}, {
"label": "Courier services - air and ground and freight forwarders 快递服务(空运、地面运输或海运)",
"value": 4215
}, {
"label": "Steamships and cruise lines 轮船及巡游航线服务",
"value": 4411
}, {
"label": "Boat rentals and leasing 出租船只",
"value": 4457
}, {
"label": "Marinas, marine service and supplies 船舶、海运服务提供商",
"value": 4468
}, {
"label": "Airlines and air carriers 航空公司",
"value": 4511
}, {
"label": "Tolls and bridge fees 路桥通行费",
"value": 4784
}, {
"label": "Laundry, cleaning and garment services 洗衣店",
"value": 7210
}, {
"label": "Laundry services - family and commercial 洗熨服务(自助洗衣服务)",
"value": 7211
}, {
"label": "Dry cleaners 干洗店",
"value": 7216
}, {
"label": "Carpet and upholstery cleaning 室内清洁服务(地毯、沙发、家具表面的清洁服务)",
"value": 7217
}, {
"label": "Photographic studios 摄影工作室",
"value": 7221
}, {
"label": "Beauty and barber shops 美容理发店",
"value": 7230
}, {
"label": "Shoe repair shops, shoe shine parlours and hat cleaning shops 修鞋店、擦鞋店、帽子清洗店",
"value": 7251
}, {
"label": "Funeral services and crematoriums 殡葬服务",
"value": 7261
}, {
"label": "Dating and escort services 婚姻介绍及陪同服务",
"value": 7273
}, {
"label": "Advertising services 广告服务",
"value": 7311
}, {
"label": "Commercial photography, art and graphics 商业摄影、工艺、绘图服务",
"value": 7333
}, {
"label": "Quick copy, reproduction and blueprinting services 复印及绘图服务",
"value": 7338
}, {
"label": "Stenographic and secretarial support services 速记、秘书服务(包括各类办公服务)",
"value": 7339
}, {
"label": "Exterminating and disinfecting services 灭虫及消毒服务",
"value": 7342
}, {
"label": "Cleaning, maintenance and janitorial services 清洁、保养及门卫服务",
"value": 7349
}, {
"label": "Employment agencies and temporary help services 职业中介、临时工",
"value": 7361
}, {
"label": "Computer programming, data processing and integrated systems design services 计算机编程、数据处理和系统集成设计服务",
"value": 7372
}, {
"label": "Information retrieval services 信息检索服务",
"value": 7375
}, {
"label": "Detective agencies, protective agencies and security services, including armoured cars and guard dogs 侦探、保安、安全服务",
"value": 7393
}, {
"label": "Equipment, tool, furniture and appliance rentals and leasing 设备、工具、家具和电器出租",
"value": 7394
}, {
"label": "Photofinishing laboratories and photo developing 照相洗印服务",
"value": 7395
}, {
"label": "Automobile rentals 汽车出租",
"value": 7512
}, {
"label": "Truck and utility trailer rentals 卡车及拖车出租",
"value": 7513
}, {
"label": "Motor home and recreational vehicle rentals 房车和娱乐车辆出租",
"value": 7519
}, {
"label": "Parking lots and garages 停车场",
"value": 7523
}, {
"label": "Automotive body repair shops 车体维修店",
"value": 7531
}, {
"label": "Tyre retreading and repair shops 轮胎翻新、维修店",
"value": 7534
}, {
"label": "Automotive paint shops 汽车喷漆店",
"value": 7535
}, {
"label": "Automotive service shops (non-dealer) 汽车服务商店(非经销商)",
"value": 7538
}, {
"label": "Car washes 洗车",
"value": 7542
}, {
"label": "Towing services 拖车服务",
"value": 7549
}, {
"label": "Electronics repair shops 电器设备维修",
"value": 7622
}, {
"label": "Air conditioning and refrigeration repair shops 空调、制冷设备维修",
"value": 7623
}, {
"label": "Electrical and small appliance repair shops 电器设备、小家电维修",
"value": 7629
}, {
"label": "Watch, clock and jewellery repair shops 手表、钟表和首饰维修店",
"value": 7631
}, {
"label": "Furniture reupholstery, repair and refinishing 家具维修、翻新",
"value": 7641
}, {
"label": "Welding services 焊接维修服务",
"value": 7692
}, {
"label": "Miscellaneous repair shops and related services 各类维修店及相关服务",
"value": 7699
}, {
"label": "Babysitting and housekeeping services 家政服务",
"value": 7295
}, {
"label": "Clothing rentals - costumes, uniforms and formal wear 出租衣物-服装、制服和正式场合服装",
"value": 7296
}, {
"label": "Utilities - electric, gas, water and sanitary 公共事业(电力、煤气、自来水、清洁服务)",
"value": 4900
}, {
"label": "Service stations (with or without ancillary services) 加油站、服务站",
"value": 5541
}, {
"label": "Automated fuel dispensers 自助加油站",
"value": 5542
}, {
"label": "Airports, flying fields and airport terminals 机场服务",
"value": 4582
}, {
"label": "Car and truck dealers (new and used) sales, services, repairs, parts and leasing 汽车货车经销商-新旧车的销售、服务、维修、零件及出租",
"value": 5511
}, {
"label": "Car and truck dealers (used only) sales, service, repairs, parts and leasing 汽车货车经销商-专门从事旧车的销售、服务、维修、零件及出租",
"value": 5521
}, {
"label": "Embassy and consulate fees 使领馆收费",
"value": 9400
}, {
"label": " Postal Services - Government Only 国家邮政服务",
"value": 9402
}, {
"label": "Ticketing 票务",
"value": 4733
}, {
"label": "Travel agencies and tour operators 旅行社",
"value": 4722
}, {
"label": "Motion picture and video tape production and distribution 电影和录像创作、发行",
"value": 7829
}, {
"label": "Motion picture theatres 电影院",
"value": 7832
}, {
"label": "Video tape rentals 音像制品出租商店",
"value": 7841
}, {
"label": "Dance halls, studios and schools 歌舞厅",
"value": 7911
}, {
"label": "Theatrical producers (except motion pictures) and ticket agencies 戏剧制片(不含电影)、演出和票务",
"value": 7922
}, {
"label": "Billiard and pool establishments 台球、撞球场所",
"value": 7932
}, {
"label": "Bowling alleys 保龄球馆",
"value": 7933
}, {
"label": "Commercial sports, professional sports clubs, athletic fields and sports promoters 商业运动",
"value": 7941
}, {
"label": "Tourist attractions and exhibits 景点、展览",
"value": 7991
}, {
"label": "Public golf courses 公开高尔夫球赛",
"value": 7992
}, {
"label": "Video amusement game supplies 电子游戏等",
"value": 7993
}, {
"label": "Video game arcades and establishments 大型游戏机和游戏场所",
"value": 7994
}, {
"label": "Amusement parks, circuses, carnivals and fortune tellers 游乐园、马戏团、嘉年华、占卜",
"value": 7996
}, {
"label": "Membership clubs (sports, recreation, athletic), country clubs and private golf courses 会员俱乐部(体育、娱乐、运动等)、乡村俱乐部以及私人高尔夫课程班",
"value": 7997
}, {
"label": "Aquariums, seaquariums and dolphinariums 水族馆、海洋馆和海豚馆",
"value": 7998
}, {
"label": "Drinking places (alcoholic beverages) - bars, taverns, night-clubs, cocktail lounges and discothèques 饮酒场所(酒吧、酒馆、夜总会、鸡尾酒大厅、迪斯科舞厅)",
"value": 5813
}, {
"label": "Massage parlours 按摩店",
"value": 7297
}, {
"label": "Health and beauty spas 保健及美容SPA",
"value": 7298
}, {
"label": "Telecommunication equipment and telephone sales 电信设备和销售",
"value": 4812
}, {
"label": "Telecommunication services 电信服务,包括本地和长途电话、信用卡电话、磁卡电话和传真",
"value": 4814
}, {
"label": "Monthly summary telephone charges 月结电话服务",
"value": 4815
}, {
"label": "Computer network information services 计算机网络/信息服务",
"value": 4816
}, {
"label": "Cable and other pay television services 有线和其他付费电视服务",
"value": 4899
}, {
"label": "private hospital 私人医院",
"value": 7280
}, {
"label": "Doctors and physicians - not elsewhere classified 其他医疗卫生活动",
"value": 8011
}, {
"label": "Dentists and orthodontists 牙科医生",
"value": 8021
}, {
"label": "Osteopaths 正骨医生",
"value": 8031
}, {
"label": "Chiropractors 按摩医生",
"value": 8041
}, {
"label": "Optometrists and ophthalmologists 眼科医生",
"value": 8042
}, {
"label": "Opticians, optical goods and eyeglasses 光学产品、眼镜店",
"value": 8043
}, {
"label": "Podiatrists and chiropodists 手足病医生",
"value": 8049
}, {
"label": "Nursing and personal care facilities 护理和照料服务",
"value": 8050
}, {
"label": "Hospitals 公立医院",
"value": 8062
}, {
"label": "Medical and dental laboratories 医学及牙科实验室",
"value": 8071
}, {
"label": "Medical services and health practitioners - not elsewhere classified 其他医疗保健服务",
"value": 8099
}, {
"label": "Drug stores and pharmacies 药店、药房",
"value": 5912
}, {
"label": "Hearing aids - sales, service and supplies 助听器-销售、服务和用品",
"value": 5975
}, {
"label": "Orthopaedic goods and prosthetic devices 假肢店(整形外科用品、辅助设备)",
"value": 5976
}, {
"label": "Dental laboratory medical ophthalmic hospital equipment and supplies 牙科/实验室/医疗/眼科医院器材和用品",
"value": 5047
}, {
"label": "Elementary and secondary schools 中小学校(公立)",
"value": 8211
}, {
"label": "Colleges, universities, professional schools and junior colleges 普通高校(公立)",
"value": 8220
}, {
"label": "Correspondence schools 函授学校(成人教育)",
"value": 8241
}, {
"label": "Business and secretarial schools 商业和文秘学校(中等专业学校)",
"value": 8244
}, {
"label": "Trade and vocational schools 贸易和职业学校(职业技能培训)",
"value": 8249
}, {
"label": "Schools and educational services - not elsewhere classified 其他学校和教育服务",
"value": 8299
}, {
"label": "Child care services 儿童保育服务(含学前教育)",
"value": 8351
}
];
app.factory("wechatGoodMcc", function () {
return {
configs: function () {
return wechatGoodMcc;
}
}
});
})
;

@ -161,6 +161,7 @@
<th>Coefficient</th>
<th>BD Rate</th>
<th>Commission</th>
<th>RoyalPay Surcharge</th>
<th>Fund</th>
<th>Channel</th>
</tr>
@ -179,6 +180,7 @@
<td ng-bind="log.coefficient"></td>
<td ng-bind="log.bd_rate+'%'"></td>
<td ng-bind="log.prize_value|currency:'AUD '"></td>
<td ng-bind="log.royal_surcharge|currency:'AUD '"></td>
<td ng-bind="log.donation|currency:'AUD '"></td>
<td>
<img ng-if="log.channel=='Alipay'" uib-tooltip="Alipay" src="/static/images/alipay_sign_lg.png">

@ -67,6 +67,10 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
url: '/rpayupdate',
templateUrl: '/static/config/devtools/templates/rpayupdate.html',
controller: 'rpayupdateCtrl'
}).state('devtools.registerAlipayOnlineMerchant', {
url: '/registerAlipayOnlineMerchant',
templateUrl: '/static/config/devtools/templates/registerAlipayOnlineMerchant.html',
controller: 'registerAlipayOnlineMerchantCtrl'
})
}]);
app.controller('devManualRefundCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) {
@ -404,6 +408,50 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
}]);
app.controller('registerAlipayOnlineMerchantCtrl', ['$scope', '$http','$filter', function ($scope, $http,$filter) {
$scope.selecttotal = true;
$scope.registerOnlineGMS = function () {
$scope.totalhide = true;
$scope.selecttotal = false;
$http.post('/dev/register/alipayOnlineGms').then(function (resp) {
$scope.totalhide = false;
$scope.selecttotal = true;
$scope.need_register_merchant = resp.data.need_register_merchant.toString();
$scope.success_register_merchant = resp.data.success_register_merchant.toString();
$scope.fail_register_merchant = resp.data.fail_register_merchant;
$scope.less_info_merchant = resp.data.less_info_merchant();
}, function (resp) {
alert(resp.data.message);
})
};
$scope.registerGMS = function () {
$scope.totalhide = true;
$scope.selecttotal = false;
$http.post('/dev/register/alipayGms').then(function (resp) {
$scope.totalhide = false;
$scope.selecttotal = true;
$scope.need_register_merchant = resp.data.need_register_merchant.toString();
$scope.success_register_merchant = resp.data.success_register_merchant.toString();
$scope.fail_register_merchant = resp.data.fail_register_merchant;
$scope.less_info_merchant = resp.data.less_info_merchant();
}, function (resp) {
alert(resp.data.message);
})
};
$scope.getLessPartnerInfo = function () {
$scope.totalhide = true;
$scope.selecttotal = false;
$http.get('/dev/register/getLessPartnerInfo').then(function (resp) {
$scope.totalhide = false;
$scope.selecttotal = true;
}, function (resp) {
alert(resp.data.message);
})
}
}]);
return app;
});

@ -0,0 +1,46 @@
<section class="content-header">
<h1>批量支付宝线上报备</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-cog"></i> Basic Config
</li>
<li><a ui-sref="^">Dev Tools</a></li>
<li class="active">批量支付宝线上报备</li>
</ol>
</section>
<section class="content">
<div class="box">
<button class="btn btn-primary" ng-click="registerOnlineGMS()">register Online</button> <label ng-hide="selecttotal" style="padding-left: 30px">请稍后</label>
</div>
<div class="box">
<button class="btn btn-primary" ng-click="getLessPartnerInfo()">缺少信息的商户(online)</button>
</div>
<div class="box">
<button class="btn btn-primary" ng-click="registerGMS()">register offline</button> <label ng-hide="selecttotal" style="padding-left: 30px">请稍后</label>
</div>
<div class="row" ng-if="need_register_merchant">
<span>需要报备的商户编码</span><p ng-bind="need_register_merchant"></p>
</div>
<div class="row" ng-if="success_register_merchant">
<span>成功报备的商户编码</span><p ng-bind="success_register_merchant"></p>
</div>
<div class="box-body table-responsive" ng-if="fail_register_merchant">
<span>注册失败的商户编码</span>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>client_moniker</th>
<th>失败原因</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="client in fail_register_merchant">
<td>
{{client.client_moniker}}
</td>
<td ng-bind="client.return_msg"></td>
</tr>
</tbody>
</table>
</div>
</section>

@ -87,6 +87,10 @@
<i class="fa fa-credit-card-alt"></i>
更新Rpay+商户费率时间
</a>
<a class="btn btn-app" role="button" ui-sref=".registerAlipayOnlineMerchant">
<i class="fa fa-credit-card-alt"></i>
批量报备支付宝线上商户
</a>
</div>
</div>
</section>

@ -1,5 +1,5 @@
<div class="thumbnail">
<img src="static/images/customer_service2.jpg">
<img src="static/images/customer_service3.jpg">
<div class="caption" style="padding-left: 20px">
<i class="fa fa-phone" aria-hidden="true"></i> 1300-10-77-50 <br/>
<i class="fa fa-envelope-o" aria-hidden="true"></i> info@royalpay.com.au<br/>

@ -1,54 +0,0 @@
[
{
"children": [
{
"children": [],
"label": "立牌",
"value": "qrcode"
},
{
"children": [],
"label": "POS",
"value": "pos"
}
],
"label": "门店",
"value": "1"
},
{
"children": [
{
"children": [],
"label": "ipos",
"value": "ipos"
},
{
"children": [],
"label": "银豹",
"value": "pospal"
},
{
"children": [],
"label": "aupos",
"value": "aupos"
},
{
"children": [],
"label": "其他",
"value": "other"
}
],
"label": "收银系统",
"value": "2"
},{
"children": [
{
"children": [],
"label": "无门店",
"value": "no-store"
}
],
"label": "其他",
"value": "3"
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -60,6 +60,8 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.partner = {nation_code:"+61"};
$scope.bankaccount = {};
$scope.rate = {};
$scope.partner.client_pay_type = [];
$scope.partner.client_pay_desc = [];
$scope.phone_code_timer=$interval(function () {}, 1000);
$scope.loadRoyalpayindustry = function () {
@ -229,6 +231,55 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
}
};
var resetClientPayDescByTpey = function (type) {
type = parseInt(type);
if (type == 1) {
while (parseInt($scope.partner.client_pay_desc[0]) < 6) {
$scope.partner.client_pay_desc.splice(0, 1);
}
}
if (type == 2) {
while (parseInt($scope.partner.client_pay_desc[$scope.partner.client_pay_desc.length-1]) > 5) {
$scope.partner.client_pay_desc.splice($scope.partner.client_pay_desc.length-1, 1);
}
}
};
var compare = function (x, y) {
x = parseInt(x);
y = parseInt(y);
if (x < y) {
return -1;
} else if (x > y) {
return 1;
} else {
return 0;
}
}
$scope.toggleClientPayType = function (type) {
if ($scope.partner.client_pay_type == null) {
$scope.partner.client_pay_type = [];
$scope.partner.client_pay_desc = [];
}
var $idx = $scope.partner.client_pay_type.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_type.splice($idx, 1);
resetClientPayDescByTpey(type);
} else {
$scope.partner.client_pay_type.push(type);
$scope.partner.client_pay_type.sort(compare);
}
};
$scope.toggleClientPayDesc = function (type) {
var $idx = $scope.partner.client_pay_desc.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_desc.splice($idx, 1);
} else {
$scope.partner.client_pay_desc.push(type);
$scope.partner.client_pay_desc.sort(compare);
}
};
$scope.saveStep1 = function (form,index) {
alert('Do not forget your login id ('+$scope.partner.contact_phone+') and password');
$scope.initErrorMsg();
@ -269,6 +320,33 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
alert("Company Name包含敏感词汇请检查后重新提交");
return;
}
if ($scope.partner.client_pay_type.length==0) {
alert('请选择商户支付场景')
return;
}
if ($scope.partner.client_pay_desc.length==0) {
alert('请选择商户支付方式')
return;
}
if ($scope.partner.client_pay_type.indexOf('1') >= 0 && $scope.partner.client_pay_type.indexOf('2') >= 0) {
var fristDesc = $scope.partner.client_pay_desc[0];
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
if (parseInt(fristDesc) > 5 || parseInt(lastDesc) < 6) {
alert("请检查线上/线下支付场景是否已选择支付方式")
return;
}
}
if ($scope.partner.client_pay_desc.indexOf('8') >= 0) {
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
if (parseInt(lastDesc) < 10) {
alert("请检查线下支付是否已选择收银系统类型")
return;
}
}
if ($scope.partner.client_pay_type instanceof Array) {
$scope.partner.client_pay_type = $scope.partner.client_pay_type.join(',');
$scope.partner.client_pay_desc = $scope.partner.client_pay_desc.join(',');
}
$http.post('/register/info/update/' + $scope.partner.username, $scope.partner).then(function (resp) {
if (index == 3) {
$scope.getRateConfig();

@ -174,7 +174,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}).state('partners.detail.product', {
url: '/partner_product',
templateUrl: 'static/payment/product/templates/product.html',
templateUrl: 'static/payment/product/templates/partner_product.html',
controller: 'productCtrl'
}).state('partners.detail.sub_merchant_applicaitons', {
url: '/sub_merchant_applicaitons',
@ -370,8 +370,52 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
$scope.partner.company_phone_c = 61;
$scope.partner.contact_phone_c = 61;
$scope.partner.client_pay_type = [];
$scope.partner.client_pay_desc = [];
var resetClientPayDescByTpey = function (type) {
type = parseInt(type);
if (type == 1) {
while (parseInt($scope.partner.client_pay_desc[0]) < 6) {
$scope.partner.client_pay_desc.splice(0, 1);
}
}
if (type == 2) {
while (parseInt($scope.partner.client_pay_desc[$scope.partner.client_pay_desc.length-1]) > 5) {
$scope.partner.client_pay_desc.splice($scope.partner.client_pay_desc.length-1, 1);
}
}
};
var compare = function (x, y) {
x = parseInt(x);
y = parseInt(y);
if (x < y) {
return -1;
} else if (x > y) {
return 1;
} else {
return 0;
}
}
$scope.toggleClientPayType = function (type) {
var $idx = $scope.partner.client_pay_type.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_type.splice($idx, 1);
resetClientPayDescByTpey(type);
} else {
$scope.partner.client_pay_type.push(type);
$scope.partner.client_pay_type.sort(compare);
}
};
$scope.toggleClientPayDesc = function (type) {
var $idx = $scope.partner.client_pay_desc.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_desc.splice($idx, 1);
} else {
$scope.partner.client_pay_desc.push(type);
$scope.partner.client_pay_desc.sort(compare);
}
};
$scope.pagination = {};
$scope.industries = industryMap.configs();
$scope.states = stateMap.configs();
@ -382,12 +426,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.bd_citys = angular.copy(bd_city_map);
$scope.params = {textType: 'all', org_name: 'ALL'};
$scope.onOfflineDescSelect = function (selectedItem) {
$scope.partner.offline_label = selectedItem.label;
$scope.partner.client_offline_desc = selectedItem.value;
};
function remove(arr, val) {
if (angular.isArray(arr)) {
for (var i = arr.length; i--;) {
@ -400,13 +438,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return arr;
}
$scope.loadOfflineDesc = function () {
$http.get('/static/data/client_offline_desc.json').then(function (resp) {
$scope.client_offline_select = resp.data;
})
};
$scope.loadOfflineDesc();
var industries = angular.copy($scope.industries);
$scope.industries = remove(industries, 331);
@ -538,7 +569,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
alert("Logo is necessary!");
return;
}
if ($scope.partner.partner_type == 'photo') {
if ($scope.partner.client_pay_type.indexOf('2')>=0) {
if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary');
return;
@ -557,20 +588,32 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
})
}
// if ($scope.partner.client_pay_type =='online' || $scope.partner.client_pay_type =='all') {
// if (!$scope.partner.online_website && !$scope.partner.online_public_account && !$scope.partner.online_mini_program && !$scope.partner.online_app) {
// alert('线上支付场景至少填写一种方式');
// return;
// }
// }
// if(!window.frames['merchant_detail'].merchant_location){
// alert("Please Locate Merchant's Location");
// return;
// }
if ($scope.params.client_pay_type == '') {
if ($scope.partner.client_pay_type.length==0) {
alert('请选择商户支付场景')
return;
}
if ($scope.partner.client_pay_desc.length==0) {
alert('请选择商户支付方式')
return;
}
if ($scope.partner.client_pay_type.indexOf('1') >= 0 && $scope.partner.client_pay_type.indexOf('2') >= 0) {
var fristDesc = $scope.partner.client_pay_desc[0];
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
if (parseInt(fristDesc) > 5 || parseInt(lastDesc) < 6) {
alert("请检查线上/线下支付场景是否已选择支付方式")
return;
}
}
if ($scope.partner.client_pay_desc.indexOf('8') >= 0) {
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
if (parseInt(lastDesc) < 10) {
alert("请检查线下支付是否已选择收银系统类型")
return;
}
}
$scope.partner.client_pay_type = $scope.partner.client_pay_type.join(',');
$scope.partner.client_pay_desc = $scope.partner.client_pay_desc.join(',');
$http.post('/sys/partners', $scope.partner).then(function (resp) {
commonDialog.alert({title: 'Success', content: 'Register new partner successfully', type: 'success'});
$scope.updateMerchantLocation();
@ -1130,18 +1173,48 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.timezones = timezone.configs();
$scope.partner = partner.data;
var origin_referrer_id = angular.copy($scope.partner.referrer_id);
$scope.partner.partner_type = $scope.partner.website ? 'website' : 'photo';
$scope.loadOfflineDesc = function () {
$http.get('/static/data/client_offline_desc.json').then(function (resp) {
$scope.client_offline_select = resp.data;
})
var resetClientPayDescByTpey = function (type) {
type = parseInt(type);
if (type == 1) {
while (parseInt($scope.partner.client_pay_desc[0]) < 6) {
$scope.partner.client_pay_desc.splice(0, 1);
}
}
if (type == 2) {
while (parseInt($scope.partner.client_pay_desc[$scope.partner.client_pay_desc.length-1]) > 5) {
$scope.partner.client_pay_desc.splice($scope.partner.client_pay_desc.length-1, 1);
}
}
};
$scope.loadOfflineDesc();
$scope.onOfflineDescSelect = function (selectedItem) {
$scope.partner.offline_label = selectedItem.label;
$scope.partner.client_offline_desc = selectedItem.value;
var compare = function (x, y) {
x = parseInt(x);
y = parseInt(y);
if (x < y) {
return -1;
} else if (x > y) {
return 1;
} else {
return 0;
}
}
$scope.toggleClientPayType = function (type) {
var $idx = $scope.partner.client_pay_type.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_type.splice($idx, 1);
resetClientPayDescByTpey(type);
} else {
$scope.partner.client_pay_type.push(type);
$scope.partner.client_pay_type.sort(compare);
}
};
$scope.toggleClientPayDesc = function (type) {
var $idx = $scope.partner.client_pay_desc.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_desc.splice($idx, 1);
} else {
$scope.partner.client_pay_desc.push(type);
$scope.partner.client_pay_desc.sort(compare);
}
};
$scope.listReferrers = function () {
@ -1239,7 +1312,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
alert('suburb can not contain two and more continuous space characters');
return;
}
if ($scope.partner.partner_type == 'photo') {
if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary');
return;
@ -1277,9 +1350,31 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
// alert("Please Locate Merchant Location!");
// return;
// }
if ($scope.params.client_pay_type == '') {
if ($scope.partner.client_pay_type.length == 0) {
alert('请选择商户支付场景')
return;
}
if ($scope.partner.client_pay_desc.length == 0) {
alert('请选择商户支付方式')
return;
}
if ($scope.partner.client_pay_type.indexOf('1') >= 0 && $scope.partner.client_pay_type.indexOf('2') >= 0) {
var fristDesc = $scope.partner.client_pay_desc[0];
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
if (parseInt(fristDesc) > 5 || parseInt(lastDesc) < 6) {
alert("请检查线上/线下支付场景是否已选择支付方式")
return;
}
}
if ($scope.partner.client_pay_desc.indexOf('8') >= 0) {
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
if (parseInt(lastDesc) < 10) {
alert("请检查线下支付是否已选择收银系统类型")
return;
}
}
$scope.partner.client_pay_type = $scope.partner.client_pay_type.join(',');
$scope.partner.client_pay_desc = $scope.partner.client_pay_desc.join(',');
$http.put('/sys/partners/' + $scope.partner.client_moniker, $scope.partner).then(function () {
if (content != '') {
commonDialog.alert({
@ -1588,26 +1683,16 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_gms_json').then(function (resp) {
$scope.alipay_gms_json = resp.data;
commonDialog.confirm({
title: 'Warning',
content: '是否使用该商户的现有信息进件?',
json:$scope.alipay_gms_json
title: 'Warning',
content: '是否使用该商户的现有信息进件?',
json: $scope.alipay_gms_json
}).then(function () {
if ($scope.partner.business_structure === "Company") {
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms', {representative_id: ""}).then(function () {
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms').then(function () {
commonDialog.alert({title: 'Success', content: 'Alipay进件成功', type: 'success'});
}, function (resp) {
commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'});
})
} else {
commonDialog.inputText({title: '请输入商户身份证或护照号码'}).then(function (text) {
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms', {representative_id: text}).then(function () {
commonDialog.alert({title: 'Success', content: '提示Alipay进件成功', type: 'success'});
}, function (resp) {
commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'});
})
});
}
})
});
})
};
$scope.queryAlipayGms = function () {
@ -1625,14 +1710,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
content: '是否使用该商户的现有信息进件?',
json:$scope.alipayOnline_gms_json
}).then(function () {
commonDialog.inputText({title: '请输入商户身份证或护照号码'}).then(function (text) {
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms', {representative_id: text}).then(function () {
commonDialog.alert({title: 'Success', content: '提示AlipayOnline进件成功', type: 'success'});
}, function (resp) {
commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'});
})
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms').then(function () {
commonDialog.alert({title: 'Success', content: '提示AlipayOnline进件成功', type: 'success'});
}, function (resp) {
commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'});
});
})
});
};
@ -2101,6 +2183,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}]);
app.controller('partnerSubCtrl', ['$scope', '$http', '$uibModal', function ($scope, $http, $uibModal) {
$scope.toShow = false;
$scope.init = {
child_each_refund : false,
sub_manage : false
}
$scope.newSubClient = function () {
$uibModal.open({
templateUrl: '/static/payment/partner/templates/add_sub_partner_dialog.html',
@ -2139,7 +2226,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.init.sub_manage = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/sub_manage', {allow: $scope.paymentInfo.sub_manage}).then(function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/sub_manage', {allow: $scope.partner.sub_manage}).then(function () {
//$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
@ -2150,6 +2237,25 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
};
$scope.switchChildEachRefund = function () {
if (!$scope.partner) {
return;
}
if (!$scope.init.child_each_refund) {
$scope.init.child_each_refund = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/child_each_refund', {allow: $scope.partner.child_each_refund}).then(function () {
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'Failed to change Sub Partners Manage status',
content: resp.data.message,
type: 'error'
})
})
};
$scope.showClient = function (sub_client) {
if ($scope.sub_client_id == sub_client.client_id) {
return;
@ -2404,13 +2510,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}]);
app.controller('surchargeAccountDetailCtrl', ['$scope', '$http', 'balance', 'partner', 'transactions', 'commonDialog', function ($scope, $http, balance, partner, transactions, commonDialog) {
$scope.surcharge = angular.copy(balance);
$scope.transactions = angular.copy(transactions.data);
$scope.surchargeDetailData = angular.copy(transactions.data);
$scope.partner = angular.copy(partner);
$scope.canAddDetail = false;
$scope.params = {};
$scope.getBalance = function () {
if ($scope.partner.surcharge_mode != undefined && $scope.partner.surcharge_mode == "distributed") {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/surcharge_account').then(function (resp) {
$scope.surcharge = resp.data;
@ -2421,7 +2526,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.getTransactions = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/account/transactions').then(function (resp) {
$scope.transactions = resp.data;
$scope.surchargeDetailData = resp.data;
});
}
@ -2638,6 +2743,52 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
$scope.partner.company_phone_c = 61;
$scope.partner.contact_phone_c = 61;
$scope.partner.client_pay_type = [];
$scope.partner.client_pay_desc = [];
var resetClientPayDescByTpey = function (type) {
type = parseInt(type);
if (type == 1) {
while (parseInt($scope.partner.client_pay_desc[0]) < 6) {
$scope.partner.client_pay_desc.splice(0, 1);
}
}
if (type == 2) {
while (parseInt($scope.partner.client_pay_desc[$scope.partner.client_pay_desc.length-1]) > 5) {
$scope.partner.client_pay_desc.splice($scope.partner.client_pay_desc.length-1, 1);
}
}
};
var compare = function (x, y) {
x = parseInt(x);
y = parseInt(y);
if (x < y) {
return -1;
} else if (x > y) {
return 1;
} else {
return 0;
}
}
$scope.toggleClientPayType = function (type) {
var $idx = $scope.partner.client_pay_type.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_type.splice($idx, 1);
resetClientPayDescByTpey(type);
} else {
$scope.partner.client_pay_type.push(type);
$scope.partner.client_pay_type.sort(compare);
}
};
$scope.toggleClientPayDesc = function (type) {
var $idx = $scope.partner.client_pay_desc.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_desc.splice($idx, 1);
} else {
$scope.partner.client_pay_desc.push(type);
$scope.partner.client_pay_desc.sort(compare);
}
};
$scope.business_structures = businessStructuresMap.configs();
$scope.industries = industryMap.configs();
@ -2776,7 +2927,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
alert("Logo is necessary!");
return;
}
if ($scope.partner.partner_type == 'photo') {
if ($scope.partner.client_pay_type.indexOf('2')>=0) {
if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary');
return;
@ -2790,9 +2941,31 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
// alert("Please Locate Merchant Location!");
// return;
// }
if ($scope.partner.client_pay_type == '') {
if ($scope.partner.client_pay_type.length==0) {
alert('请选择商户支付场景')
return;
}
if ($scope.partner.client_pay_desc.length==0) {
alert('请选择商户支付方式')
return;
}
if ($scope.partner.client_pay_type.indexOf('1') >= 0 && $scope.partner.client_pay_type.indexOf('2') >= 0) {
var fristDesc = $scope.partner.client_pay_desc[0];
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
if (parseInt(fristDesc) > 5 || parseInt(lastDesc) < 6) {
alert("请检查线上/线下支付场景是否已选择支付方式")
return;
}
}
if ($scope.partner.client_pay_desc.indexOf('8') >= 0) {
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
if (parseInt(lastDesc) < 10) {
alert("请检查线下支付是否已选择收银系统类型")
return;
}
}
$scope.partner.client_pay_type = $scope.partner.client_pay_type.join(',');
$scope.partner.client_pay_desc = $scope.partner.client_pay_desc.join(',');
$http.post('/sys/partners/' + clientMoniker + '/sub_clients', $scope.partner).then(function () {
$scope.updateMerchantLocation();
$scope.$close();
@ -3740,24 +3913,23 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
$scope.channelAndDayOfAnalysis(1);
}]);
app.controller('productCtrl', ['$scope', '$http', '$uibModal', 'commonDialog', '$state', 'Upload', 'industryMap', function ($scope, $http, $uibModal, commonDialog, $state, Upload, industryMap) {
app.controller('productCtrl', ['$scope', '$http', '$uibModal', 'commonDialog', '$state', 'Upload', 'wechatGoodMcc', function ($scope, $http, $uibModal, commonDialog, $state, Upload, wechatGoodMcc) {
$scope.importShow = 0;
$scope.pagination = {};
$scope.params = {text_type: 'all', search_text: null};
$scope.industries = industryMap.configs();
$scope.loadProducts = function (page) {
var params = angular.copy($scope.params);
if ($scope.params.industry == null || angular.equals({}, $scope.params.industry)) {
params.industry = '';
} else {
params.industry = $scope.params.industry.value;
}
params.page = page || $scope.pagination.page || 1;
$http.get('/client/product/' + $scope.partner.client_moniker + '/list', {params: params}).then(function (resp) {
$scope.products = resp.data.data;
$scope.pagination = resp.data.pagination;
$scope.wechatMccIndustries = wechatGoodMcc.configs();
$scope.loadProducts = function () {
$http.get('/sys/product/' + $scope.partner.client_moniker + '/list').then(function (resp) {
$scope.mcc_goods = resp.data;
});
};
$scope.updateMccInfo = function (mccInfo) {
mccInfo.client_moniker = $scope.partner.client_moniker;
$http.put('/sys/product/update', mccInfo).then(function (resp) {
$state.reload();
});
};
$scope.loadProducts();
/*$scope.importExcel = function (file) {
if (file != null) {
Upload.upload({
@ -3780,51 +3952,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
}
}*/
$scope.deleteProduct = function (product) {
$scope.product = angular.copy(product);
commonDialog.confirm({
title: 'Confirm',
content: 'This operation will delete the product, Are you sure?'
}).then(function () {
$http.post('/sys/product/' + product.commodity_id + '/delete').then(function () {
alert("Success!");
$state.reload();
});
})
};
$scope.addProduct = function () {
$uibModal.open({
templateUrl: '/static/payment/product/templates/add_product.html',
controller: 'AddProductDialogCtrl',
resolve: {
product: function () {
return {};
},
partner: function () {
return $scope.partner;
},
}
}).result.then(function () {
$scope.loadProducts(1);
})
};
$scope.editProduct = function (product) {
$uibModal.open({
templateUrl: '/static/payment/product/templates/add_product.html',
controller: 'AddProductDialogCtrl',
resolve: {
product: function () {
return product;
},
partner: function () {
return $scope.partner;
},
}
}).result.then(function () {
$scope.loadProducts(1);
})
};
$scope.loadProducts(1);
}]);
app.controller('AddProductDialogCtrl', ['$scope', '$http', '$uibModal', 'product', 'partner', '$state', 'industryMap', function ($scope, $http, $uibModal, product, partner, $state, industryMap) {
$scope.product = angular.copy(product);

@ -179,67 +179,6 @@
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="form-group"
ng-class="{'has-error':partnerForm.partner_type.$invalid && partnerForm.partner_type.$dirty}">
<label class="control-label col-sm-2" for="partner-type-select">* Photo/Website</label>
<div class="col-sm-8">
<select class="form-control" ng-model="partner.partner_type"
id="partner-type-select"
name="partner_type">
<option value="">Please Choose</option>
<option value="photo">Photo</option>
<option value="companyWebsite">Website</option>
</select>
<p class="small text-info">If the partner is a offline shop then a photo of shop is
required while an online store shall choose companyWebsite</p>
<p class="small text-info">
只要有可能产生线下交易商户静态码、POS就必须上传照片否则支付宝会禁止交易</p>
<div ng-messages="partnerForm.partner_type.$error"
ng-if="partnerForm.partner_type.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.partner_type == 'photo'">
<label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-4">
<div class="form-control-static"><em>1:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadShopPhoto($file)" accept="image/*">
<i class="fa fa-upload"></i> Upload Shop Photo1
</button>
</div>
<uib-progressbar value="shopPhotoProgress.value"
ng-if="shopPhotoProgress"></uib-progressbar>
<img ng-src="{{partner.company_photo}}" ng-if="partner.company_photo" class="thumbnail img-size col-sm-9">
</div>
<div class="col-sm-4">
<div class="form-control-static"><em>2:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadStorePhoto($file)" accept="image/*">
<i class="fa fa-upload"></i> Upload Shop Photo2
</button>
</div>
<uib-progressbar value="storePhotoProgress.value"
ng-if="storePhotoProgress"></uib-progressbar>
<img ng-src="{{partner.store_photo}}" ng-if="partner.store_photo" class="thumbnail img-size col-sm-9">
</div>
</div>
<div class="form-group" ng-if="partner.partner_type == 'companyWebsite'"
ng-class="{'has-error':partnerForm.company_website.$invalid && partnerForm.company_website.$dirty}">
<label class="control-label col-sm-2" for="company_website-input">* Website</label>
<div class="col-sm-8">
<input type="text" name="company_website" class="form-control"
ng-model="partner.company_website"
id="company_website-input" required maxlength="200">
<div ng-messages="partnerForm.company_website.$error"
ng-if="partnerForm.company_website.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 200
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.company_phone_p.$invalid && partnerForm.company_phone_p.$dirty}">
<label class="control-label col-sm-2" for="service-phone-p-input">* Service Phone</label>
@ -321,95 +260,120 @@
<div class="panel-heading">Merchant Payment Scenario</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_pay_type.$invalid && partnerForm.client_pay_type.$dirty}">
<label class="control-label col-sm-2" for="client-pay-type-select">*
<div class="form-group">
<label class="control-label col-sm-2">*
Merchant Payment Scenario Type</label>
<div class="col-sm-8">
<select class="form-control" ng-model="partner.client_pay_type"
id="client-pay-type-select"
name="client_pay_type">
<option value="">Please Choose</option>
<option value="all">All</option>
<option value="online">线上</option>
<option value="offline">线下</option>
</select>
<div ng-messages="partnerForm.client_pay_type.$error"
ng-if="partnerForm.client_pay_type.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('1')>=0}"
ng-click="toggleClientPayType('1')">
<i class="fa fa-mixcloud"></i>
线上</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('2')>=0}"
ng-click="toggleClientPayType('2')">
<i class="fa fa-shopping-basket"></i>
线下</button>
</div>
</div>
<!--<div ng-if="partner.client_pay_type=='online' || partner.client_pay_type=='all'">-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--Website</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_website">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--公众号名称</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_public_account">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--Mini Program Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_mini_program">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--APP Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_app">-->
<!--<p class="small text-info">-->
<!--<i class="fa fa-info"></i> 线上支付场景至少选择填一项</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div ng-if="partner.client_pay_type=='offline' || partner.client_pay_type=='all'">-->
<!--<div class="form-group"-->
<!--ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">-->
<!--<label class="control-label col-sm-2"-->
<!--for="client-offline-desc">*Offline Scene Of Merchants</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" id="client-offline-desc" required-->
<!--name="client_offline" readonly-->
<!--ng-model="partner.client_offline_desc | partner_offline_desc"-->
<!--multi-level-select-popup="client_offline_select"-->
<!--on-select="onOfflineDescSelect($selected)">-->
<!--<div ng-messages="partnerForm.client_offline.$error"-->
<!--ng-if="partnerForm.client_offline.$dirty">-->
<!--<p class="small text-danger" ng-message="required">Required-->
<!--Field</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="form-group"
ng-class="{'has-error':partnerForm.client_pay_desc.$invalid && partnerForm.client_pay_desc.$dirty}">
<label class="control-label col-sm-2" for="client-pay-desc-input">*
Merchant Payment Scenario Description</label>
ng-if="partner.client_pay_type.indexOf('1')>=0">
<label class="control-label col-sm-2">
*Online</label>
<div class="col-sm-8">
<textarea class="form-control" required
ng-model="partner.client_pay_desc"
name="client_pay_desc" id="client-pay-desc-input"
maxlength="200"></textarea>
<p class="small text-info">
<i class="fa fa-info"></i> 例如线下场景门店立牌、POS、收银系统选择品牌名称【ipos、银豹、aupos、其他】、无门店</p>
<div ng-messages="partnerForm.client_pay_desc.$error"
ng-if="partnerForm.client_pay_desc.$dirty">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('1')>=0}"
ng-click="toggleClientPayDesc('1')">
<i class="fa fa-desktop"></i>
PC网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('2')>=0}"
ng-click="toggleClientPayDesc('2')">
<i class="fa fa-mobile-phone"></i>
手机端网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('3')>=0}"
ng-click="toggleClientPayDesc('3')">
<i class="fa fa-mobile-phone"></i>
APP</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('4')>=0}"
ng-click="toggleClientPayDesc('4')">
<i class="fa fa-wechat"></i>
微信内、支付宝内网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('5')>=0}"
ng-click="toggleClientPayDesc('5')">
<i class="fa fa-wechat"></i>
小程序</button>
</div>
</div>
<div ng-if="partner.client_pay_type.indexOf('2')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">*Offline</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('6')>=0}"
ng-click="toggleClientPayDesc('6')">
<i class="fa fa-qrcode"></i>
二维码立牌</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('7')>=0}"
ng-click="toggleClientPayDesc('7')">
<i class="fa fa-user"></i>
RoyalPay POS</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('8')>=0}"
ng-click="toggleClientPayDesc('8')">
<i class="fa fa-laptop"></i>
收银系统</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('9')>=0}"
ng-click="toggleClientPayDesc('9')">
<i class="fa fa-shopping-cart"></i>
无人售货机</button>
</div>
</div>
</div>
<div ng-if="partner.client_pay_desc.indexOf('8')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">* POS</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('10')>=0}"
ng-click="toggleClientPayDesc('10')">
<i class="fa fa-laptop"></i>
ipos</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('11')>=0}"
ng-click="toggleClientPayDesc('11')">
<i class="fa fa-laptop"></i>
pospal</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('12')>=0}"
ng-click="toggleClientPayDesc('12')">
<i class="fa fa-laptop"></i>
aupos</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('13')>=0}"
ng-click="toggleClientPayDesc('13')">
<i class="fa fa-laptop"></i>
其他</button>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.client_pay_type.indexOf('1')>=0"
ng-class="{'has-error':partnerForm.company_website.$invalid && partnerForm.company_website.$dirty}">
<label class="control-label col-sm-2" for="company_website-input">*
Website</label>
<div class="col-sm-8">
<input type="text" name="company_website" class="form-control"
ng-model="partner.company_website"
id="company_website-input" required maxlength="200">
<div ng-messages="partnerForm.company_website.$error"
ng-if="partnerForm.company_website.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
@ -418,6 +382,37 @@
</div>
</div>
</div>
<div class="form-group" ng-if="partner.client_pay_type.indexOf('2')>=0">
<label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-4">
<div class="form-control-static"><em>1:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadShopPhoto($file)" accept="image/*">
<i class="fa fa-upload"></i> Upload Shop Photo1
</button>
</div>
<uib-progressbar value="shopPhotoProgress.value"
ng-if="shopPhotoProgress"></uib-progressbar>
<a target="_blank" ng-if="partner.company_photo" ng-href="{{partner.company_photo}}">
<img ng-src="{{partner.company_photo}}" ng-if="partner.company_photo"
class="thumbnail img-size col-sm-9">
</a>
</div>
<div class="col-sm-4">
<div class="form-control-static"><em>2:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadStorePhoto($file)" accept="image/*">
<i class="fa fa-upload"></i> Upload Shop Photo2
</button>
</div>
<uib-progressbar value="storePhotoProgress.value"
ng-if="storePhotoProgress"></uib-progressbar>
<a target="_blank" ng-if="partner.store_photo" ng-href="{{partner.store_photo}}">
<img ng-src="{{partner.store_photo}}" ng-if="partner.store_photo"
class="thumbnail img-size col-sm-9">
</a>
</div>
</div>
</div>
</div>
</div>

@ -315,7 +315,7 @@
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Counrty</label>
<label class="control-label col-sm-4">Country</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.country"></p>

@ -410,32 +410,6 @@
<p class="form-control-static" ng-bind="partner.sector"></p>
</div>
</div>
<div class="form-group" ng-if="partner.company_photo">
<label class="control-label col-sm-2">Shop Photo</label>
<div class="col-sm-3 col-xs-5"><em>1:</em>&nbsp;
<div>
<a class="thumbnail" target="_blank" ng-href="{{partner.company_photo}}">
<img ng-src="{{partner.company_photo}}" style="max-height: 100px">
</a>
</div>
</div>
<div class="col-sm-3 col-xs-5" ng-if="partner.store_photo"><em>2:</em>&nbsp;
<div>
<a class="thumbnail" target="_blank" ng-href="{{partner.store_photo}}">
<img ng-src="{{partner.store_photo}}" style="max-height: 100px">
</a>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.company_website">
<label class="control-label col-sm-2">Website</label>
<div class="col-sm-10">
<a class="form-control-static" target="_blank" ng-bind="partner.company_website"
href="{{partner.company_website}}"></a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Service Phone</label>
@ -533,68 +507,122 @@
<label class="control-label col-sm-2">
Merchant Payment Scenario Type</label>
<div class="col-sm-8">
<p class="form-control-static"
ng-bind="partner.client_pay_type">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('1')>=0}">
<i class="fa fa-mixcloud"></i>
线上</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('2')>=0}">
<i class="fa fa-shopping-basket"></i>
线下</button>
</div>
</div>
<div class="form-group"
ng-if="partner.client_pay_type.indexOf('1')>=0">
<label class="control-label col-sm-2">
Online</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('1')>=0}">
<i class="fa fa-desktop"></i>
PC网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('2')>=0}">
<i class="fa fa-mobile-phone"></i>
手机端网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('3')>=0}">
<i class="fa fa-mobile-phone"></i>
APP</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('4')>=0}">
<i class="fa fa-wechat"></i>
微信内、支付宝内网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('5')>=0}">
<i class="fa fa-wechat"></i>
小程序</button>
</div>
</div>
<div ng-if="partner.client_pay_type.indexOf('2')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">Offline</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('6')>=0}">
<i class="fa fa-qrcode"></i>
二维码立牌</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('7')>=0}">
<i class="fa fa-user"></i>
RoyalPay POS</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('8')>=0}">
<i class="fa fa-laptop"></i>
收银系统</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('9')>=0}">
<i class="fa fa-shopping-cart"></i>
无人售货机</button>
</div>
</div>
</div>
<div ng-if="partner.client_pay_desc.indexOf('8')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">* POS</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('10')>=0}">
<i class="fa fa-laptop"></i>
ipos</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('11')>=0}">
<i class="fa fa-laptop"></i>
pospal</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('12')>=0}">
<i class="fa fa-laptop"></i>
aupos</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('13')>=0}">
<i class="fa fa-laptop"></i>
其他</button>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.client_pay_type.indexOf('1')>=0">
<label class="control-label col-sm-2">Website</label>
<div class="col-sm-10" style="padding-top: 7px;">
<a class="form-control-static" target="_blank" ng-bind="partner.company_website"
href="{{partner.company_website}}"></a>
</div>
</div>
<div class="form-group" ng-if="partner.client_pay_type.indexOf('2')>=0">
<div class="form-group" ng-if="partner.company_photo">
<label class="control-label col-sm-2">Shop Photo</label>
<div class="col-sm-3 col-xs-5"><em>1:</em>&nbsp;
<div>
<a class="thumbnail" target="_blank" ng-href="{{partner.company_photo}}">
<img ng-src="{{partner.company_photo}}" style="max-height: 100px">
</a>
</div>
</div>
<div class="col-sm-3 col-xs-5" ng-if="partner.store_photo"><em>2:</em>&nbsp;
<div>
<a class="thumbnail" target="_blank" ng-href="{{partner.store_photo}}">
<img ng-src="{{partner.store_photo}}" style="max-height: 100px">
</a>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Merchant Payment Scenario Description</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.client_pay_desc"></p>
</div>
</div>
<!--<div ng-if="partner.client_pay_type=='online' || partner.client_pay_type=='all'">-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--Website</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static"-->
<!--ng-bind="partner.online_website">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--公众号名称</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static"-->
<!--ng-bind="partner.online_public_account">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--Mini Program Name</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static"-->
<!--ng-bind="partner.online_mini_program">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--APP Name</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static"-->
<!--ng-bind="partner.online_app">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div ng-if="partner.client_pay_type=='offline' || partner.client_pay_type=='all'">-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">Offline Scene Of Merchants</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static"-->
<!--ng-bind="partner.client_offline_desc | partner_offline_desc">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
</div>
<!--支付宝资料-->
<div class="panel panel-default">
<div class="panel-heading">Alipay Information &nbsp;<em class="small"><b>(Optional)</b></em>
@ -708,7 +736,7 @@
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Counrty</label>
<label class="control-label col-sm-4">Country</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.country"></p>

@ -253,69 +253,6 @@
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="form-group" ng-if="!partner.parent_client_id || ('00110'|withRole)"
ng-class="{'has-error':partnerForm.partner_type.$invalid && partnerForm.partner_type.$dirty}">
<label class="control-label col-sm-2" for="partner-type-select">* Photo/Website</label>
<div class="col-sm-8">
<select class="form-control" ng-model="partner.partner_type"
id="partner-type-select"
name="partner_type">
<option value="">Please Choose</option>
<option value="photo">Photo</option>
<option value="companyWebsite">Website</option>
</select>
<p class="small text-info">If the partner is a offline shop then a photo of shop is
required while an online store shall choose company website</p>
<p class="small text-info">
只要有可能产生线下交易商户静态码、POS就必须上传照片否则支付宝会禁止交易</p>
<div ng-messages="partnerForm.partner_type.$error"
ng-if="partnerForm.partner_type.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-if="partner.partner_type == 'photo' && (!partner.parent_client_id || ('00110'|withRole))">
<label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-5">
<div class="form-control-static"><em>1:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadShopPhoto($file)" accept="image/*">
<i class="fa fa-upload"></i> Upload Shop Photo1
</button>
</div>
<uib-progressbar value="shopPhotoProgress.value"
ng-if="shopPhotoProgress"></uib-progressbar>
<img ng-src="{{partner.company_photo}}" ng-if="partner.company_photo" class="thumbnail img-size col-sm-9">
</div>
<div class="col-sm-5">
<div class="form-control-static"><em>2:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadStorePhoto($file)" accept="image/*">
<i class="fa fa-upload"></i> Upload Shop Photo2
</button>
</div>
<uib-progressbar value="storePhotoProgress.value"
ng-if="storePhotoProgress"></uib-progressbar>
<img ng-src="{{partner.store_photo}}" ng-if="partner.store_photo" class="thumbnail img-size col-sm-9">
</div>
</div>
<div class="form-group"
ng-if="partner.partner_type == 'companyWebsite' && (!partner.parent_client_id || ('00110'|withRole))"
ng-class="{'has-error':partnerForm.company_website.$invalid && partnerForm.company_website.$dirty}">
<label class="control-label col-sm-2" for="company_website-input">* Website</label>
<div class="col-sm-8">
<input type="text" name="company_website" class="form-control"
ng-model="partner.company_website"
id="company_website-input" required maxlength="200">
<div ng-messages="partnerForm.company_website.$error"
ng-if="partnerForm.company_website.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 200
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.company_phone.$invalid && partnerForm.company_phone.$dirty}">
<label class="control-label col-sm-2" for="service-phone-input">* Service Phone</label>
@ -366,39 +303,120 @@
<div class="panel-heading">Merchant Payment Scenario</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_pay_type.$invalid && partnerForm.client_pay_type.$dirty}">
<label class="control-label col-sm-2" for="client-pay-type-select">*
<div class="form-group">
<label class="control-label col-sm-2">*
Merchant Payment Scenario Type</label>
<div class="col-sm-8">
<select class="form-control" ng-model="partner.client_pay_type"
id="client-pay-type-select"
name="client_pay_type">
<option value="">Please Choose</option>
<option value="all">All</option>
<option value="online">线上</option>
<option value="offline">线下</option>
</select>
<div ng-messages="partnerForm.client_pay_type.$error"
ng-if="partnerForm.client_pay_type.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('1')>=0}"
ng-click="toggleClientPayType('1')">
<i class="fa fa-mixcloud"></i>
线上</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('2')>=0}"
ng-click="toggleClientPayType('2')">
<i class="fa fa-shopping-basket"></i>
线下</button>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.client_pay_desc.$invalid && partnerForm.client_pay_desc.$dirty}">
<label class="control-label col-sm-2" for="client-pay-desc-input">*
Merchant Payment Scenario Description</label>
ng-if="partner.client_pay_type.indexOf('1')>=0">
<label class="control-label col-sm-2">
*Online Scene Of Merchants</label>
<div class="col-sm-8">
<textarea class="form-control" required
ng-model="partner.client_pay_desc"
name="client_pay_desc" id="client-pay-desc-input"
maxlength="200"></textarea>
<p class="small text-info">
<i class="fa fa-info"></i> 例如线下场景门店立牌、POS、收银系统选择品牌名称【ipos、银豹、aupos、其他】、无门店</p>
<div ng-messages="partnerForm.client_pay_desc.$error"
ng-if="partnerForm.client_pay_desc.$dirty">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('1')>=0}"
ng-click="toggleClientPayDesc('1')">
<i class="fa fa-desktop"></i>
PC网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('2')>=0}"
ng-click="toggleClientPayDesc('2')">
<i class="fa fa-mobile-phone"></i>
手机端网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('3')>=0}"
ng-click="toggleClientPayDesc('3')">
<i class="fa fa-mobile-phone"></i>
APP</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('4')>=0}"
ng-click="toggleClientPayDesc('4')">
<i class="fa fa-wechat"></i>
微信内、支付宝内网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('5')>=0}"
ng-click="toggleClientPayDesc('5')">
<i class="fa fa-wechat"></i>
小程序</button>
</div>
</div>
<div ng-if="partner.client_pay_type.indexOf('2')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">*Offline Scene Of Merchants</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('6')>=0}"
ng-click="toggleClientPayDesc('6')">
<i class="fa fa-qrcode"></i>
二维码立牌</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('7')>=0}"
ng-click="toggleClientPayDesc('7')">
<i class="fa fa-user"></i>
RoyalPay POS</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('8')>=0}"
ng-click="toggleClientPayDesc('8')">
<i class="fa fa-laptop"></i>
收银系统</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('9')>=0}"
ng-click="toggleClientPayDesc('9')">
<i class="fa fa-shopping-cart"></i>
无人售货机</button>
</div>
</div>
</div>
<div ng-if="partner.client_pay_desc.indexOf('8')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">* POS</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('10')>=0}"
ng-click="toggleClientPayDesc('10')">
<i class="fa fa-laptop"></i>
ipos</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('11')>=0}"
ng-click="toggleClientPayDesc('11')">
<i class="fa fa-laptop"></i>
pospal</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('12')>=0}"
ng-click="toggleClientPayDesc('12')">
<i class="fa fa-laptop"></i>
aupos</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('13')>=0}"
ng-click="toggleClientPayDesc('13')">
<i class="fa fa-laptop"></i>
其他</button>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.client_pay_type.indexOf('1')>=0"
ng-class="{'has-error':partnerForm.company_website.$invalid && partnerForm.company_website.$dirty}">
<label class="control-label col-sm-2" for="company_website-input">*
Website</label>
<div class="col-sm-8">
<input type="text" name="company_website" class="form-control"
ng-model="partner.company_website"
id="company_website-input" required maxlength="200">
<div ng-messages="partnerForm.company_website.$error"
ng-if="partnerForm.company_website.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
@ -407,63 +425,37 @@
</div>
</div>
</div>
<!--<div ng-if="partner.client_pay_type=='online' || partner.client_pay_type=='all'">-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--Website</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_website">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--公众号名称</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_public_account">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--Mini Program Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_mini_program">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--APP Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_app">-->
<!--<p class="small text-info">-->
<!--<i class="fa fa-info"></i> 线上支付场景至少选择填一项</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div ng-if="partner.client_pay_type=='offline' || partner.client_pay_type=='all'">-->
<!--<div class="form-group"-->
<!--ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">-->
<!--<label class="control-label col-sm-2"-->
<!--for="client-offline-desc">*Offline Scene Of Merchants</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" id="client-offline-desc" required-->
<!--name="client_offline" readonly-->
<!--ng-model="partner.client_offline_desc | partner_offline_desc"-->
<!--multi-level-select-popup="client_offline_select"-->
<!--on-select="onOfflineDescSelect($selected)">-->
<!--<div ng-messages="partnerForm.client_offline.$error"-->
<!--ng-if="partnerForm.client_offline.$dirty">-->
<!--<p class="small text-danger" ng-message="required">Required-->
<!--Field</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="form-group" ng-if="partner.client_pay_type.indexOf('2')>=0">
<label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-4">
<div class="form-control-static"><em>1:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadShopPhoto($file)" accept="image/*">
<i class="fa fa-upload"></i> Upload Shop Photo1
</button>
</div>
<uib-progressbar value="shopPhotoProgress.value"
ng-if="shopPhotoProgress"></uib-progressbar>
<a target="_blank" ng-if="partner.company_photo" ng-href="{{partner.company_photo}}">
<img ng-src="{{partner.company_photo}}" ng-if="partner.company_photo"
class="thumbnail img-size col-sm-9">
</a>
</div>
<div class="col-sm-4">
<div class="form-control-static"><em>2:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadStorePhoto($file)" accept="image/*">
<i class="fa fa-upload"></i> Upload Shop Photo2
</button>
</div>
<uib-progressbar value="storePhotoProgress.value"
ng-if="storePhotoProgress"></uib-progressbar>
<a target="_blank" ng-if="partner.store_photo" ng-href="{{partner.store_photo}}">
<img ng-src="{{partner.store_photo}}" ng-if="partner.store_photo"
class="thumbnail img-size col-sm-9">
</a>
</div>
</div>
</div>
</div>
</div>

@ -234,6 +234,102 @@
</div>
</div>
</div>
<div class="panel panel-default" ng-if="partner.client_pay_type">
<div class="panel-heading">Merchant Payment Scenario</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">
Merchant Payment Scenario Type</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('1')>=0}">
<i class="fa fa-mixcloud"></i>
线上</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_type.indexOf('2')>=0}">
<i class="fa fa-shopping-basket"></i>
线下</button>
</div>
</div>
<div class="form-group"
ng-if="partner.client_pay_type.indexOf('1')>=0">
<label class="control-label col-sm-2">
Online</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('1')>=0}">
<i class="fa fa-desktop"></i>
PC网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('2')>=0}">
<i class="fa fa-mobile-phone"></i>
手机端网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('3')>=0}">
<i class="fa fa-mobile-phone"></i>
APP</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('4')>=0}">
<i class="fa fa-wechat"></i>
微信内、支付宝内网站</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('5')>=0}">
<i class="fa fa-wechat"></i>
小程序</button>
</div>
</div>
<div ng-if="partner.client_pay_type.indexOf('2')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">Offline</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('6')>=0}">
<i class="fa fa-qrcode"></i>
二维码立牌</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('7')>=0}">
<i class="fa fa-user"></i>
RoyalPay POS</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('8')>=0}">
<i class="fa fa-laptop"></i>
收银系统</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('9')>=0}">
<i class="fa fa-shopping-cart"></i>
无人售货机</button>
</div>
</div>
</div>
<div ng-if="partner.client_pay_desc.indexOf('8')>=0">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">* POS</label>
<div class="col-sm-8">
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('10')>=0}">
<i class="fa fa-laptop"></i>
ipos</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('11')>=0}">
<i class="fa fa-laptop"></i>
pospal</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('12')>=0}">
<i class="fa fa-laptop"></i>
aupos</button>
<button class="btn btn-default"
ng-class="{active:partner.client_pay_desc.indexOf('13')>=0}">
<i class="fa fa-laptop"></i>
其他</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</uib-tab>
<uib-tab heading="Handle">

@ -48,23 +48,35 @@
}
</style>
<div class="panel panel-default" ng-if="('111'|withRole)">
<div class="panel-heading">配置子商户权限</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="panel-body" style="margin-bottom: 10px">
<button class="btn btn-primary" type="button" ng-click="newSubClient()">
<i class="fa fa-plus"></i> New Sub Partner
</button>
</div>
<div class="form-group" style="margin-left: 0;" ng-if="('10'|withRole) && partner.level2_client">
<label class="col-sm-4">允许子商户退款同级商户</label>
<div class="col-sm-6">
<input type="checkbox" ng-model="partner.child_each_refund" bs-switch
switch-change="switchChildEachRefund()">
</div>
</div>
<div class="form-group" style="margin-left: 0;margin-bottom: 0;" ng-if="('10'|withRole) && partner.parent_client_id==null">
<label class="col-sm-4">Sub Partners Manage </label>
<div class="panel panel-default" ng-if="'111'|withRole">
<div class="panel-body pull-right" ng-if="('10'|withRole)">
<div class="panel-body">
Sub Partners Manage <input type="checkbox" ng-model="paymentInfo.sub_manage" bs-switch switch-change="switchSubManage()">
<div class="col-sm-6">
<input type="checkbox" ng-model="partner.sub_manage" bs-switch
switch-change="switchSubManage()">
<p class="text-info"><i class="fa fa-info"></i> 开启后,父商户具有帮子商户新建账户、退款等管理权限</p>
</div>
</div>
</div>
<a>开启后,父商户具有帮子商户新建账户、退款等管理权限</a>
</div>
<div class="panel-body">
<button class="btn btn-primary" type="button" ng-click="newSubClient()">
<i class="fa fa-plus"></i> New Sub Partner
</button>
</div>
</div>
<div class="row">
<div class="col-sm-12 table-responsive">
<table class="table table-bordered table-striped table-hover">

@ -0,0 +1,45 @@
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<!--渠道方行业信息-->
<div class="box-body col-sm-6" ng-repeat="good in mcc_goods">
<ul class="list-group ui_desk">
<li class="list-group-item list-group-item-info"
style="height: 60px;text-align: center;display: block;">
<span>
<img ng-if="good.channel=='Wechat'" src="/static/images/wechatpay_sign_lg.png"
class="channel-icon-mid">
<img ng-if="good.channel=='Alipay'" src="/static/images/alipay_sign_lg.png"
class="channel-icon-mid">
<img ng-if="good.channel=='AlipayOnline'" src="/static/images/alipay_sign_lg.png"
class="channel-icon-mid">
<img ng-if="good.channel=='Bestpay'" src="/static/images/bestpay_sign_lg.png"
class="channel-icon-mid">
<img ng-if="good.channel=='jd'" src="/static/images/jd_sign_lg.png"
class="channel-icon-mid">
</span>
</li>
<li class="list-group-item list-group-item-text" style="height: 60px;">
商品
<select style="float: right;width: 50%;" ng-model="good.mc_code" id="wmi-select" name="wmi"
class="form-control"
ng-options="wmi.value as wmi.label for wmi in wechatMccIndustries" ng-change="updateMccInfo(good)">
<option value="">请选择</option>
</select>
</li>
<li class="list-group-item list-group-item-text">
创建时间
<span style="float: right" ng-bind="good.creation_date"></span>
</li>
<li class="list-group-item list-group-item-text">
操作人
<span style="float: right" ng-bind="good.creation_by"></span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>

@ -49,7 +49,7 @@
<td ng-bind="surcharge.tax_amount|currency:'AUD'"></td>
<td>
{{surcharge.remark}}
<a ng-href="/sys/clean_logs/{{surcharge.client_id}}/settlement_logs/{{surcharge.clearing_detail_id}}/export"
<a ng-href="/sys/surcharge_account/{{surcharge.client_id}}/settlement_logs/{{surcharge.clearing_detail_id}}/export"
target="_blank" title="Download">
<i class="fa fa-download"></i>
</a>

@ -51,7 +51,7 @@
<td ng-bind="surcharge.tax_amount|currency:'AUD'"></td>
<td ng-bind="surcharge.remark"></td>
<td>
<a ng-href="/sys/clean_logs/{{surcharge.client_id}}/settlement_logs/{{surcharge.clearing_detail_id}}/export"
<a ng-href="/sys/surcharge_account/{{surcharge.client_id}}/settlement_logs/{{surcharge.clearing_detail_id}}/export"
target="_blank" title="Download">
<i class="fa fa-download"></i>
</a>

@ -214,8 +214,8 @@ input:-ms-input-placeholder { /* Internet Explorer 10-11 */
}
.all .all-logo img {
width: 35px;
height: 40px;
width: 50px;
height: 50px;
}
.all .all-royalpay {

@ -112,3 +112,20 @@ $(function () {
});
});
//点击广告统计次数
function timesCount(imgUrl,linkUrl){
$.ajax({
data:JSON.stringify({imgUrl:imgUrl}),
contentType: 'application/json',
url:"/app/poster",
method:'PUT',
dataType:'text',
success: function (data) {
window.location.href = linkUrl;
},
error: function (data) {
window.location.href = linkUrl;
}
});
}

@ -17,25 +17,7 @@ $(function () {
if (window.disable_ws) {
setTimeout(checkStatus, 3000);
function checkStatus() {
$.ajax({
url: 'status',
method: 'get',
cache: false,
dataType: 'json',
success: function (status) {
if (status.result_code == 'PAY_SUCCESS') {
var concat = '?';
if (window.redirect.indexOf('?') > 0) {
concat = '&';
}
location.href = window.redirect + concat + 'time=' + status.time + '&nonce_str=' + status.nonce_str + '&sign=' + status.sign;
} else {
setTimeout(checkStatus, 3000);
}
}
})
}
} else {
var sock = new SockJS('/register');
@ -49,6 +31,27 @@ $(function () {
}
location.href = window.redirect + concat + 'time=' + json.time + '&nonce_str=' + json.nonce_str + '&sign=' + json.sign;
})
},function () {
setTimeout(checkStatus, 3000);
})
}
function checkStatus() {
$.ajax({
url: 'status',
method: 'get',
cache: false,
dataType: 'json',
success: function (status) {
if (status.result_code == 'PAY_SUCCESS') {
var concat = '?';
if (window.redirect.indexOf('?') > 0) {
concat = '&';
}
location.href = window.redirect + concat + 'time=' + status.time + '&nonce_str=' + status.nonce_str + '&sign=' + status.sign;
} else {
setTimeout(checkStatus, 3000);
}
}
})
}
});
Loading…
Cancel
Save