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

master
yixian 6 years ago
commit 2b6f6b88e1

@ -154,6 +154,7 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
//T1 ok //T1 ok
JSONObject dayInfo = new JSONObject(); JSONObject dayInfo = new JSONObject();
dayInfo.put("platformGetSettleFee", BigDecimal.ZERO);
String endStr = DateFormatUtils.format(date, "yyyy/MM/dd"); String endStr = DateFormatUtils.format(date, "yyyy/MM/dd");
JSONObject maxDays = estimateAnalysisMapper.findMaxCleanDays(endStr); JSONObject maxDays = estimateAnalysisMapper.findMaxCleanDays(endStr);
String end_date = maxDays.getString("date_str"); String end_date = maxDays.getString("date_str");
@ -172,9 +173,10 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService {
} }
List<JSONObject> alipayOnlineSettleLogs = platformSettlementMapper.findBySettleDate(new Date(estimateAnalysisMapper.findLastCleanDays(end_date, 1).getDate("date_str").getTime()), "AlipayOnline"); List<JSONObject> alipayOnlineSettleLogs = platformSettlementMapper.findBySettleDate(new Date(estimateAnalysisMapper.findLastCleanDays(end_date, 1).getDate("date_str").getTime()), "AlipayOnline");
logger.info(" Estimate alipayOnlineSettleLogs is :{}", alipayOnlineSettleLogs.toString());
for (JSONObject logs : alipayOnlineSettleLogs) { for (JSONObject logs : alipayOnlineSettleLogs) {
dayInfo.put("aliOnlineSettleFee_" + logs.getString("merchants"), logs.getBigDecimal("settlement_fee")); dayInfo.put("aliOnlineSettleFee_" + logs.getString("merchants"), logs.getBigDecimal("settlement_fee"));
dayInfo.put("platformGetSettleFee",dayInfo.getBigDecimal("platformGetSettleFee").add(dayInfo.getBigDecimal("aliOnlineSettleFee_" + logs.getString("merchants")))); dayInfo.put("platformGetSettleFee", dayInfo.getBigDecimal("platformGetSettleFee").add(dayInfo.getBigDecimal("aliOnlineSettleFee_" + logs.getString("merchants"))));
} }
cleanDays.clear(); cleanDays.clear();

@ -457,12 +457,13 @@ public class RetailAppServiceImp implements RetailAppService {
@Override @Override
public JSONObject getCouponCusCouponLog(String client_moniker, AppQueryBean appQueryBean) { public JSONObject getCouponCusCouponLog(String client_moniker, AppQueryBean appQueryBean) {
String keyword = "CTRIP_";
JSONObject client = clientMapper.findClientByMoniker(client_moniker); JSONObject client = clientMapper.findClientByMoniker(client_moniker);
if (client == null) { if (client == null) {
throw new BadRequestException("Partner not exists"); throw new BadRequestException("Partner not exists");
} }
PageList<JSONObject> cusCouponLogs = couponAccuessLogMapper.getCouponAccuessLog( PageList<JSONObject> cusCouponLogs = couponAccuessLogMapper.getCouponAccuessLog(
client.getIntValue("client_id"), new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("creation_date.desc"))); client.getIntValue("client_id"), keyword, new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("creation_date.desc")));
HashMap<String, JSONObject> couponMap = new HashMap<>(); HashMap<String, JSONObject> couponMap = new HashMap<>();
for(JSONObject cusCouponLog : cusCouponLogs) { for(JSONObject cusCouponLog : cusCouponLogs) {
cusCouponLog.put("client_moniker", client_moniker); cusCouponLog.put("client_moniker", client_moniker);
@ -487,7 +488,7 @@ public class RetailAppServiceImp implements RetailAppService {
Date date = new Date(); Date date = new Date();
couponAccuessLog.put("client_id", client_id); couponAccuessLog.put("client_id", client_id);
couponAccuessLog.put("order_id", "非平台订单"); couponAccuessLog.put("order_id", "非平台订单");
couponAccuessLog.put("coupon_id", coupon_id); couponAccuessLog.put("coupon_id", "CTRIP_"+coupon_id);
couponAccuessLog.put("customer_openid", "非平台订单"); couponAccuessLog.put("customer_openid", "非平台订单");
couponAccuessLog.put("coupon_deal_amount", 0); couponAccuessLog.put("coupon_deal_amount", 0);
couponAccuessLog.put("currency", "AUD"); couponAccuessLog.put("currency", "AUD");
@ -775,33 +776,6 @@ public class RetailAppServiceImp implements RetailAppService {
TimeZoneUtils.switchTimeZone(orders, query.getTimezone(), "create_time", "transaction_time", "confirm_time"); TimeZoneUtils.switchTimeZone(orders, query.getTimezone(), "create_time", "transaction_time", "confirm_time");
ArrayList<String> date_contains = new ArrayList<>(); ArrayList<String> date_contains = new ArrayList<>();
for (JSONObject order : orders) { for (JSONObject order : orders) {
String customer_id = order.getString("customer_id");
if (StringUtils.isEmpty(customer_id)) {
continue;
}
switch (order.getString("channel")) {
case "Alipay":
JSONObject alipayUser = managerCustomerRelationAlipayMapper.findCustomerByUserId(customer_id);
if (alipayUser != null) {
order.put("nickname", alipayUser.getString("nickname"));
order.put("headimg", alipayUser.getString("headimg"));
}
break;
case "Wechat":
JSONObject weUser = new JSONObject();
if (customer_id.startsWith("olH")) {
weUser = customerMapper.findCustomerGlobalpayByOpenId(customer_id);
} else {
weUser = customerMapper.findCustomerByOpenId(customer_id);
}
if (weUser != null && !weUser.isEmpty()) {
order.put("nickname", weUser.getString("nickname"));
order.put("headimg", weUser.getString("headimg"));
}
break;
default:
break;
}
Calendar calendar = (Calendar) order.get("transaction_time"); Calendar calendar = (Calendar) order.get("transaction_time");
String trade_date = DateFormatUtils.format(calendar, "yyyy-MM-dd", calendar.getTimeZone()); String trade_date = DateFormatUtils.format(calendar, "yyyy-MM-dd", calendar.getTimeZone());
String trade_time = DateFormatUtils.format(calendar, "HH:mm:ss", calendar.getTimeZone()); String trade_time = DateFormatUtils.format(calendar, "HH:mm:ss", calendar.getTimeZone());
@ -831,6 +805,33 @@ public class RetailAppServiceImp implements RetailAppService {
order.put("date_total", analysis); order.put("date_total", analysis);
date_contains.add(trade_date); date_contains.add(trade_date);
} }
String customer_id = order.getString("customer_id");
if (StringUtils.isEmpty(customer_id)) {
continue;
}
switch (order.getString("channel")) {
case "Alipay":
JSONObject alipayUser = managerCustomerRelationAlipayMapper.findCustomerByUserId(customer_id);
if (alipayUser != null) {
order.put("nickname", alipayUser.getString("nickname"));
order.put("headimg", alipayUser.getString("headimg"));
}
break;
case "Wechat":
JSONObject weUser = new JSONObject();
if (customer_id.startsWith("olH")) {
weUser = customerMapper.findCustomerGlobalpayByOpenId(customer_id);
} else {
weUser = customerMapper.findCustomerByOpenId(customer_id);
}
if (weUser != null && !weUser.isEmpty()) {
order.put("nickname", weUser.getString("nickname"));
order.put("headimg", weUser.getString("headimg"));
}
break;
default:
break;
}
} }
return PageListUtils.buildPageListResult(orders); return PageListUtils.buildPageListResult(orders);
} }

@ -40,7 +40,7 @@ public class AliforexcelServiceImpl implements AliforexcelService {
sheet.setDefaultColumnWidth((short) 25); sheet.setDefaultColumnWidth((short) 25);
int rowNum = 0; int rowNum = 0;
Row row = sheet.createRow(rowNum); Row row = sheet.createRow(rowNum);
String[] title = {"Company name", "Store name", "Partner Code","Industry","Store address","Business hours","Contact information","Video link (optional)","Store description","Tags"}; String[] title = {"Company name", "Store name", "Partner Code","Industry","Store address","Business hours","Contact information","Video link (optional)","Store description","Tags","Logo","Company Photo"};
for (int i = 0; i < title.length; i++) { for (int i = 0; i < title.length; i++) {
row.createCell(i, Cell.CELL_TYPE_STRING).setCellValue(title[i]); row.createCell(i, Cell.CELL_TYPE_STRING).setCellValue(title[i]);
} }
@ -60,6 +60,8 @@ public class AliforexcelServiceImpl implements AliforexcelService {
row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("")); row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(partner.getString(""));
row.createCell(8, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("merchant_introduction")); row.createCell(8, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("merchant_introduction"));
row.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("")); row.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(partner.getString(""));
row.createCell(10, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("logo_url"));
row.createCell(11, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("company_photo"));
} }
wb.write(ous); wb.write(ous);
ous.flush(); ous.flush();

@ -1,30 +1,28 @@
package au.com.royalpay.payment.manage.dev.core.impl; package au.com.royalpay.payment.manage.dev.core.impl;
import au.com.royalpay.payment.manage.dev.core.HfClearAmountService;
import au.com.royalpay.payment.manage.dev.core.HfUpdateService; import au.com.royalpay.payment.manage.dev.core.HfUpdateService;
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.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.env.PlatformEnvironment; import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.gson.JsonArray;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List; import java.util.List;
import javax.annotation.Resource;
@Service @Service
public class HfUpdateImpl implements HfUpdateService { public class HfUpdateImpl implements HfUpdateService {
@Resource @Resource
private ClientMapper clientMapper; private ClientMapper clientMapper;
@Resource @Resource
private MpWechatApiProvider mpWechatApiProvider; private MpWechatApiProvider mpWechatApiProvider;
@Resource
private ClientConfigMapper clientConfigMapper;
@Override @Override
public String updateStatus() { public String updateStatus() {
@ -32,8 +30,14 @@ public class HfUpdateImpl implements HfUpdateService {
clientIds.forEach(dbResult -> { clientIds.forEach(dbResult -> {
String longUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/hf_gateway/partners/" + dbResult.getString("client_moniker") + "/jump/pc"); String longUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/hf_gateway/partners/" + dbResult.getString("client_moniker") + "/jump/pc");
MpWechatApi api = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi api = mpWechatApiProvider.getNewPaymentApi();
dbResult.put("hf_pay_url", api.registerShortUrl(longUrl)); String url = api.registerShortUrl(longUrl);
dbResult.put("hf_pay_url", url);
JSONObject config = new JSONObject();
config.put("client_id",dbResult.getString("client_id"));
config.put("hf_pay_url", url);
clientConfigMapper.update(config);
clientMapper.update(dbResult); clientMapper.update(dbResult);
}); });
return "ok"; return "ok";
} }

@ -31,8 +31,6 @@ public interface CleanService {
JSONObject getClearDetails(Date dt, String managerId); JSONObject getClearDetails(Date dt, String managerId);
JSONObject getClearDetailsLimit20(Date dt, String managerId);
JSONObject getCleanLogTransactions(int detailId, JSONObject manager); JSONObject getCleanLogTransactions(int detailId, JSONObject manager);
Map<String,JSONObject> getDayAndChannelOfAnalysisMap(int detailId, String channel,JSONObject manager); Map<String,JSONObject> getDayAndChannelOfAnalysisMap(int detailId, String channel,JSONObject manager);

@ -4,7 +4,11 @@ import au.com.royalpay.payment.core.PaymentApi;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException; import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.tasksupport.SettlementSupport; import au.com.royalpay.payment.core.tasksupport.SettlementSupport;
import au.com.royalpay.payment.manage.management.clearing.core.CleanService; import au.com.royalpay.payment.manage.management.clearing.core.CleanService;
import au.com.royalpay.payment.manage.mappers.log.*; import au.com.royalpay.payment.manage.mappers.log.ClearingDetailAnalysisMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingLogMapper;
import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
import au.com.royalpay.payment.manage.mappers.log.ValidationLogMapper;
import au.com.royalpay.payment.manage.mappers.payment.TaskManualSettleMapper; import au.com.royalpay.payment.manage.mappers.payment.TaskManualSettleMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper; import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.system.CalendarMapper; import au.com.royalpay.payment.manage.mappers.system.CalendarMapper;
@ -25,6 +29,7 @@ import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage; import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage;
import au.com.royalpay.payment.tools.defines.TradeType; import au.com.royalpay.payment.tools.defines.TradeType;
import au.com.royalpay.payment.tools.env.PlatformEnvironment; import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException; import au.com.royalpay.payment.tools.exceptions.NotFoundException;
@ -33,12 +38,14 @@ import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.tasksupport.TaskFinishNotifyEvent; import au.com.royalpay.payment.tools.tasksupport.TaskFinishNotifyEvent;
import au.com.royalpay.payment.tools.utils.PageListUtils; import au.com.royalpay.payment.tools.utils.PageListUtils;
import au.com.royalpay.payment.tools.utils.TimeZoneUtils; import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order; import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList; import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVPrinter; import org.apache.commons.csv.CSVPrinter;
@ -47,7 +54,12 @@ import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.Days; import org.joda.time.Days;
@ -65,20 +77,37 @@ import org.springframework.util.CollectionUtils;
import org.thymeleaf.context.Context; import org.thymeleaf.context.Context;
import org.thymeleaf.spring4.SpringTemplateEngine; import org.thymeleaf.spring4.SpringTemplateEngine;
import javax.annotation.Resource; import java.io.BufferedWriter;
import javax.servlet.http.HttpServletResponse; import java.io.ByteArrayOutputStream;
import java.io.*; import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.util.*; import java.util.ArrayList;
import java.util.Calendar;
import java.util.Currency;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.TreeMap;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.checkOrgPermission; import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.checkOrgPermission;
/** /**
@ -125,6 +154,8 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
private SpringTemplateEngine thymeleaf; private SpringTemplateEngine thymeleaf;
@Resource @Resource
private ClientConfigService clientConfigService; private ClientConfigService clientConfigService;
@Resource
private SysConfigManager sysConfigManager;
@Value("${app.settlement.email-to}") @Value("${app.settlement.email-to}")
private String settlementEmailTo; private String settlementEmailTo;
@ -248,69 +279,6 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
return total; return total;
} }
@Override
public JSONObject getClearDetailsLimit20(Date settleDate, String managerId) {
List<JSONObject> logs = clearingLogMapper.findByDate(settleDate);
if (logs.isEmpty()) {
throw new NotFoundException();
}
JSONObject total = new JSONObject();
total.put("settle_date", settleDate);
total.put("total_credit", 0);
total.put("total_debit", 0);
total.put("gross_amount", 0);
total.put("wechat_charge", 0);
total.put("royalpay_charge", 0);
total.put("net_amount", 0);
total.put("total_charge", 0);
total.put("tax_amount", 0);
total.put("charge_cashback", 0);
List<JSONObject> details = new ArrayList<>();
List<JSONObject> totalList = new ArrayList<>();
int clearingId = 0;
for (JSONObject log : logs) {
addBigDecimal(total, log, "total_credit");
addBigDecimal(total, log, "total_debit");
addBigDecimal(total, log, "gross_amount");
addBigDecimal(total, log, "wechat_charge");
addBigDecimal(total, log, "royalpay_charge");
addBigDecimal(total, log, "net_amount");
addBigDecimal(total, log, "total_charge");
addBigDecimal(total, log, "charge_cashback");
addBigDecimal(total, log, "tax_amount");
clearingId = log.getIntValue("clearing_id");
List<JSONObject> logDetails = clearingDetailMapper.listReportsOfSettlementLimit20(clearingId);
details.addAll(logDetails);
List<String> banks = logDetails.stream().map(detail -> detail.getString("settle_bank")).distinct().collect(Collectors.toList());
List<JSONObject> bankStatistics = banks.stream().map(bank -> {
JSONObject data = new JSONObject();
data.put("bank", bank);
data.put("total_settle", logDetails.stream()
.filter(detail -> bank.equals(detail.getString("settle_bank")))
.map(detail -> detail.getBigDecimal("clearing_amount"))
.reduce(BigDecimal::add)
);
data.put("clients", logDetails.stream()
.filter(detail -> bank.equals(detail.getString("settle_bank")))
.count());
return data;
}).collect(Collectors.toList());
//bankStatistics.put()
log.put("bank_statistics", bankStatistics);
log.put("editable", DateUtils.isSameDay(log.getDate("settle_date"), new Date()) && log.getBooleanValue("editable"));
log.put("channel_analysis", clearingDetailAnalysisMapper.analysisChannelReport(clearingId));
}
totalList = clearingDetailMapper.listRepostTotal(clearingId);
total.put("totalList", totalList);
total.put("logs", logs);
total.put("details", details);
List<JSONObject> channels = clearingDetailAnalysisMapper.analysisChannelReportDaily(settleDate);
total.put("channel_analysis", channels);
return total;
}
private void addBigDecimal(JSONObject total, JSONObject log, String key) { private void addBigDecimal(JSONObject total, JSONObject log, String key) {
total.put(key, total.getBigDecimal(key).add(log.getBigDecimal(key))); total.put(key, total.getBigDecimal(key).add(log.getBigDecimal(key)));
} }
@ -1004,11 +972,6 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
String title = "Royalpay Settlement File " + DateFormatUtils.format(date, "yyyyMMdd"); String title = "Royalpay Settlement File " + DateFormatUtils.format(date, "yyyyMMdd");
JSONObject model = new JSONObject(); JSONObject model = new JSONObject();
model.put("date", DateFormatUtils.format(date, "dd-MM-yyyy")); model.put("date", DateFormatUtils.format(date, "dd-MM-yyyy"));
// todo themeleaf
// final String content = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine,
// "mail/settlement_mail.vm", "utf-8", model);
String fileName1 = "Merchant_Settlement_Info_xlsx_" + DateFormatUtils.format(date, "yyyyMMdd"); String fileName1 = "Merchant_Settlement_Info_xlsx_" + DateFormatUtils.format(date, "yyyyMMdd");
List<JSONObject> attachList = new ArrayList<>(); List<JSONObject> attachList = new ArrayList<>();
JSONObject attach1 = new JSONObject(); JSONObject attach1 = new JSONObject();
@ -1052,9 +1015,8 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
// 测试用地址 // 测试用地址
// String mailId = mailService.sendEmail(title, "164851225@qq.com", "1029811920@qq.com", content, // String mailId = mailService.sendEmail(title, "164851225@qq.com", "1029811920@qq.com", content,
// attachList); // attachList);
String mailId = mailService.sendEmail(title, "diana.baldi@flexewallet.com,steven.stamboultgis@novatti.com,fazal.cader@flexewallet.com", JSONObject config = sysConfigManager.getSysConfig();
"locky@royalpay.com.au,leo.huang@royalpay.com.au,eason.qian@royalpay.com.au,astro.dai@royalpay.com.au,settlement@royalpay.com.au,settlements@flexewallet.com", String mailId = mailService.sendEmail(title, config.getString("settle_mail_to"),config.getString("settle_mail_cc"), content, attachList);
content, attachList);
if (settleMail == null) { if (settleMail == null) {
JSONObject settleMailRecord = new JSONObject(); JSONObject settleMailRecord = new JSONObject();

@ -42,16 +42,6 @@ public class SettlementDevController {
} }
@RequestMapping("/reports/{date}") @RequestMapping("/reports/{date}")
public JSONObject settleReportLimit20(@PathVariable String date,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
try {
Date dt = dateFormat.parse(date);
return cleanService.getClearDetailsLimit20(dt, manager.getString("manager_id"));
} catch (ParseException e) {
throw new BadRequestException("error.payment.valid.invalid_date_format");
}
}
@RequestMapping("/reports/{date}/all")
public JSONObject settleReport(@PathVariable String date, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public JSONObject settleReport(@PathVariable String date, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
try { try {
Date dt = dateFormat.parse(date); Date dt = dateFormat.parse(date);

@ -29,8 +29,6 @@ public interface ClearingDetailMapper {
List<JSONObject> listReportsOfSettlement(@Param("clearing_id") int clearingId); List<JSONObject> listReportsOfSettlement(@Param("clearing_id") int clearingId);
List<JSONObject> listReportsOfSettlementLimit20(@Param("clearing_id") int clearingId);
JSONObject listReportsOfSettleCleanDay(@Param("clearing_id") int clearingId, @Param("client_ids") List<String> client_ids); JSONObject listReportsOfSettleCleanDay(@Param("clearing_id") int clearingId, @Param("client_ids") List<String> client_ids);
PageList<JSONObject> listReportsOfSettlementLogs(JSONObject params, PageBounds pagination); PageList<JSONObject> listReportsOfSettlementLogs(JSONObject params, PageBounds pagination);
@ -50,7 +48,4 @@ public interface ClearingDetailMapper {
@AutoSql(type = SqlType.DELETE) @AutoSql(type = SqlType.DELETE)
void deleteSettleLogs(@Param("clearing_id") int clearingId); void deleteSettleLogs(@Param("clearing_id") int clearingId);
List<JSONObject> listRepostTotal(@Param("clearing_id") int clearingId);
} }

@ -29,6 +29,5 @@ public interface CouponAccuessLogMapper {
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
List<JSONObject> findCouponByOrderId(@Param("order_id") String order_id); List<JSONObject> findCouponByOrderId(@Param("order_id") String order_id);
@AutoSql(type = SqlType.SELECT) PageList<JSONObject> getCouponAccuessLog(@Param("client_id")int client_id, @Param("keyword")String keyword, PageBounds pageBounds);
PageList<JSONObject> getCouponAccuessLog(@Param("client_id")int client_id, PageBounds pageBounds);
} }

@ -414,7 +414,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
//HF支付链接二维码 //HF支付链接二维码
if (client.getString("hf_pay_url") != null) { if (client.getString("hf_pay_url") != null) {
client.put("hfQrcodeUrl", QRCodeUtils.qrcodeImageCode(client.getString("hf_pay_url"), 200, false)); String hfQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/hf_gateway/partners/" + client.getString("client_moniker") + "/jump/app");
client.put("hfQrcodeUrl", QRCodeUtils.qrcodeImageCode(hfQrcodeUrl, 250, true));
} }
return client; return client;
} }
@ -3758,6 +3759,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_link", allow)); clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_link", allow));
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_hf", allow));
} }
@ -3777,7 +3779,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
ctx.setVariable("name", client.getString("contact_person")); ctx.setVariable("name", client.getString("contact_person"));
ctx.setVariable("order_id", order.getString("order_id")); ctx.setVariable("order_id", order.getString("order_id"));
ctx.setVariable("amount", order.getString("total_amount")); ctx.setVariable("amount", order.getString("total_amount"));
ctx.setVariable("time", order.getString("create_time")); ctx.setVariable("currency", order.getString("currency"));
String create_time = "";
if (client.getString("timezone") != null) {
create_time = DateFormatUtils.format(order.getDate("create_time"),
"yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone(client.getString("timezone")));
} else {
create_time = DateFormatUtils.format(order.getDate("create_time"), "yyyy-MM-dd HH:mm:ss");
}
ctx.setVariable("time", create_time);
final String content = thymeleaf.process( "mail/hf_email_notice", ctx); final String content = thymeleaf.process( "mail/hf_email_notice", ctx);
final String mailTo = client.getString("contact_email"); final String mailTo = client.getString("contact_email");
if (StringUtils.isEmpty(mailTo)) { if (StringUtils.isEmpty(mailTo)) {

@ -25,37 +25,7 @@
INNER JOIN sys_clients c ON c.client_id = d.client_id AND c.is_valid=1 INNER JOIN sys_clients c ON c.client_id = d.client_id AND c.is_valid=1
WHERE d.clearing_id = #{clearing_id} WHERE d.clearing_id = #{clearing_id}
</select> </select>
<select id="listReportsOfSettlementLimit20" resultType="com.alibaba.fastjson.JSONObject">
(SELECT
d.*,DATE_FORMAT(d.report_date,'%y-%m-%d')clear_date,DATE_FORMAT(d.settle_date_from,'%m-%d')settle_from,DATE_FORMAT(d.settle_date_to,'%m-%d')settle_to,
c.client_id as cid,
c.client_moniker,
c.parent_client_id
FROM log_clearing_detail d
INNER JOIN sys_clients c ON c.client_id = d.client_id AND c.is_valid=1
WHERE d.clearing_id = #{clearing_id} and clear_days='1' limit 20
) UNION All
( SELECT
d.*,DATE_FORMAT(d.report_date,'%y-%m-%d')clear_date,DATE_FORMAT(d.settle_date_from,'%m-%d')settle_from,DATE_FORMAT(d.settle_date_to,'%m-%d')settle_to,
c.client_id as cid,
c.client_moniker,
c.parent_client_id
FROM log_clearing_detail d
INNER JOIN sys_clients c ON c.client_id = d.client_id AND c.is_valid=1
WHERE d.clearing_id = #{clearing_id} and clear_days='2' limit 20
)
UNION All
( SELECT
d.*,DATE_FORMAT(d.report_date,'%y-%m-%d')clear_date,DATE_FORMAT(d.settle_date_from,'%m-%d')settle_from,DATE_FORMAT(d.settle_date_to,'%m-%d')settle_to,
c.client_id as cid,
c.client_moniker,
c.parent_client_id
FROM log_clearing_detail d
INNER JOIN sys_clients c ON c.client_id = d.client_id AND c.is_valid=1
WHERE d.clearing_id = #{clearing_id} and clear_days='3' limit 20
)
</select>
<select id="listReportsOfSettleCleanDay" resultType="com.alibaba.fastjson.JSONObject"> <select id="listReportsOfSettleCleanDay" resultType="com.alibaba.fastjson.JSONObject">
SELECT SUM(d.clearing_amount) total_amount SELECT SUM(d.clearing_amount) total_amount
FROM log_clearing_detail d FROM log_clearing_detail d
@ -107,11 +77,4 @@
<if test="end!=null">and report_date &lt;= #{end}</if> <if test="end!=null">and report_date &lt;= #{end}</if>
</where> </where>
</select> </select>
<select id="listRepostTotal" resultType="com.alibaba.fastjson.JSONObject">
select count(*) as clients,SUM(clearing_amount) as total_settle,settle_bank as bank,clear_days from log_clearing_detail where clearing_id=#{clearing_id}
GROUP BY
clear_days
</select>
</mapper> </mapper>

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.log.CouponAccuessLogMapper">
<select id="getCouponAccuessLog" resultType="com.alibaba.fastjson.JSONObject">
SELECT
accuess_id,client_id,customer_openid,order_id,
TRIM(LEADING #{keyword} FROM coupon_id) coupon_id,
coupon_deal_amount,min_pay_amount,currency,creation_date,
last_update_date,is_valid,transaction_id,transaction_refund_id,refund_id
FROM cus_coupon_accuess_log
WHERE locate(#{keyword},coupon_id) = 1 AND client_id = #{client_id}
</select>
</mapper>

@ -172,7 +172,7 @@
</select> </select>
<select id="passPartners" resultType="com.alibaba.fastjson.JSONObject"> <select id="passPartners" resultType="com.alibaba.fastjson.JSONObject">
SELECT SELECT
company_name,short_name,client_moniker,ali_sub_merchant_id,alipayindustry,address,suburb,state,postcode,business_hours,company_phone,merchant_introduction company_name,short_name,client_moniker,ali_sub_merchant_id,alipayindustry,address,suburb,state,postcode,business_hours,company_phone,merchant_introduction,logo_url,company_photo
from sys_clients from sys_clients
<where> <where>
(approve_result=1 or (approve_result=2 and (source=1 or source=2))) (approve_result=1 or (approve_result=2 and (source=1 or source=2)))

@ -15,8 +15,9 @@
<div style="border: 1px #EAEAEA solid;margin-bottom: 5.5%;font-size: 12px;"> <div style="border: 1px #EAEAEA solid;margin-bottom: 5.5%;font-size: 12px;">
<p style="margin-left: 3%;">RoyalPay到账提醒</p> <p style="margin-left: 3%;">RoyalPay到账提醒</p>
<ul> <ul>
<li style="margin-bottom: 6px;">支付渠道:<span style="color: #EE6723;">汇付</span></li>
<li style="margin-bottom: 6px;">订单编号:<span style="color: #EE6723;" th:text="${order_id}"></span></li> <li style="margin-bottom: 6px;">订单编号:<span style="color: #EE6723;" th:text="${order_id}"></span></li>
<li style="margin-bottom: 6px;">收款金额:<span style="color: #EE6723;" th:text="${amount}"></span></li> <li style="margin-bottom: 6px;">收款金额:<span style="color: #EE6723;" th:text="${currency}"></span>&nbsp;<span style="color: #EE6723;" th:text="${amount}"></span></li>
<li style="margin-bottom: 6px;">到账时间:<span style="color: #EE6723;" th:text="${time}"></span></li> <li style="margin-bottom: 6px;">到账时间:<span style="color: #EE6723;" th:text="${time}"></span></li>
</ul> </ul>
</div> </div>

@ -243,8 +243,6 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
}]); }]);
app.controller('settlementDetailCtrl', ['$scope', '$stateParams', '$http', '$uibModal', '$filter', '$state', 'detail', 'commonDialog', app.controller('settlementDetailCtrl', ['$scope', '$stateParams', '$http', '$uibModal', '$filter', '$state', 'detail', 'commonDialog',
function ($scope, $stateParams, $http, $uibModal, $filter, $state, detail, commonDialog) { function ($scope, $stateParams, $http, $uibModal, $filter, $state, detail, commonDialog) {
$scope.allButton = false;
$scope.limitButton = true;
$scope.detail = detail.data; $scope.detail = detail.data;
$scope.hasSentMail = false; $scope.hasSentMail = false;
$scope.sendNotice = false; $scope.sendNotice = false;
@ -252,11 +250,8 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
$scope.analysisFilter = {}; $scope.analysisFilter = {};
$scope.currentAnalysis = $scope.detail; $scope.currentAnalysis = $scope.detail;
$scope.pageCtrl = {visible:{}}; $scope.pageCtrl = {visible:{}};
var t1Amount =0;
var t2Amount =0;
var t3Amount =0;
function getAnalysisTemplate() { function getAnalysisTemplate() {
return [ return [
{settleDays: 1, clients: 0, settleAmount: 0, settles: []}, {settleDays: 1, clients: 0, settleAmount: 0, settles: []},
{settleDays: 2, clients: 0, settleAmount: 0, settles: []}, {settleDays: 2, clients: 0, settleAmount: 0, settles: []},
@ -271,45 +266,35 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
}; };
angular.forEach($scope.detail.logs, function (batch) { angular.forEach($scope.detail.logs, function (batch) {
$scope.batchAnalysis[batch.clearing_id + ''] = getAnalysisTemplate(); $scope.batchAnalysis[batch.clearing_id + ''] = getAnalysisTemplate();
}); });
$scope.allClearing = function() {
$http.get('/sys/settlement/reports/' + $stateParams.date + '/all').then(function (resp) {
angular.forEach($scope.settleAnalysis, function (list) {
list.settles.splice(0, list.settles.length);
list.clients = 0;
list.settleAmount = 0;
});
angular.forEach(resp.data.details, function (settleItem) { $scope.endIndexMap = {};
var settleDays = settleItem.clear_days; $scope.initEndIndex = 20;
attachAnalysis($scope.settleAnalysis[Math.min(settleDays - 1, 2)]);
attachAnalysis($scope.batchAnalysis[settleItem.clearing_id + ''][Math.min(settleDays - 1, 2)]);
function attachAnalysis(analysisItem) { $scope.more = function(key) {
analysisItem.settles.push(settleItem);
analysisItem.clients++;
analysisItem.settleAmount = Decimal.add(analysisItem.settleAmount, settleItem.clearing_amount).toFixed(2, Decimal.ROUND_FLOOR);
}
});
$scope.allButton = true;
$scope.limitButton = false;
});
};
$scope.packup = function() { var endIndex = $scope.endIndexMap[key] + $scope.initEndIndex;
angular.forEach($scope.settleAnalysis, function (list) { $scope.endIndexMap[key] = endIndex;
list.settles.splice(20, list.settles.length); if (endIndex > $scope.clientsMap[key].clients) {
list.clients = 20; $scope.endIndexMap[key] = $scope.clientsMap[key].clients;
}); }
$scope.settleAnalysis[0].settleAmount = t1Amount;
$scope.settleAnalysis[1].settleAmount = t2Amount; };
$scope.settleAnalysis[2].settleAmount = t3Amount;
$scope.allButton = false;
$scope.limitButton = true;
$scope.packup = function(key) {
$scope.endIndexMap[key] = $scope.initEndIndex;
var length = $scope.clientsMap[key].clients;
if (length <= $scope.initEndIndex)
$scope.endIndexMap[key] = length;
}; };
$scope.displayAll = function (key) {
var length = $scope.clientsMap[key].clients;
$scope.endIndexMap[key] = length;
};
angular.forEach($scope.detail.details, function (settleItem) { angular.forEach($scope.detail.details, function (settleItem) {
var settleDays = settleItem.clear_days; var settleDays = settleItem.clear_days;
attachAnalysis($scope.settleAnalysis[Math.min(settleDays - 1, 2)]); attachAnalysis($scope.settleAnalysis[Math.min(settleDays - 1, 2)]);
@ -322,9 +307,16 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
} }
}); });
t1Amount = $scope.settleAnalysis[0].settleAmount; $scope.clientsMap = $scope.settleAnalysis;
t2Amount = $scope.settleAnalysis[1].settleAmount;
t3Amount = $scope.settleAnalysis[2].settleAmount; for (var key in $scope.clientsMap) {
$scope.endIndexMap[key] = $scope.initEndIndex;
var length = $scope.clientsMap[key].clients;
if (length <= $scope.initEndIndex)
$scope.endIndexMap[key] = length;
}
var nowStr = $filter('date')(new Date(), "yyyy-MM-dd"); var nowStr = $filter('date')(new Date(), "yyyy-MM-dd");
$scope.datePattern = $stateParams.date; $scope.datePattern = $stateParams.date;
if ($scope.datePattern == nowStr) { if ($scope.datePattern == nowStr) {

@ -169,21 +169,14 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="box ">
<div class="box-header" ><span >Total Amount:</span></div>
<div style="padding-left: 2%" ng-repeat="clearingTotal in detail.totalList" >
<span ng-bind="'T+' + clearingTotal.clear_days"></span>
<span ng-bind="'Clients:' + clearingTotal.clients"></span> &nbsp Amounts:
<span ng-bind="+clearingTotal.total_settle |currency:''"></span>
</div>
</div>
<div class="box box-success settle-result-box" <div class="box box-success settle-result-box"
ng-repeat="group in batchAnalysis[analysisFilter.clearing_id==null?'All':analysisFilter.clearing_id+'']"> ng-repeat=" (key, group) in batchAnalysis[analysisFilter.clearing_id==null?'All':analysisFilter.clearing_id+'']">
<div class="box-header" ng-click="pageCtrl.visible[group.settleDays]=!pageCtrl.visible[group.settleDays]"> <div class="box-header" ng-click="pageCtrl.visible[group.settleDays]=!pageCtrl.visible[group.settleDays]">
T+{{group.settleDays}}: Clients:{{group.clients}} T+{{group.settleDays}}: Clients:{{group.clients}}
Amount:{{group.settleAmount|currency:''}} Amount:{{group.settleAmount|currency:''}}
<span class="pull-right">Click to hide</span> <span class="pull-right" ng-if="pageCtrl.visible[group.settleDays]">Click to show</span>
<span class="pull-right" ng-if="!pageCtrl.visible[group.settleDays]">Click to hide</span>
</div> </div>
<div class="box-body table-responsive" ng-hide="pageCtrl.visible[group.settleDays]"> <div class="box-body table-responsive" ng-hide="pageCtrl.visible[group.settleDays]">
<table class="table table-bordered table-striped table-hover settle-result-table"> <table class="table table-bordered table-striped table-hover settle-result-table">
@ -201,7 +194,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="settleItem in group.settles"> <tr ng-repeat="settleItem in group.settles.slice(0, endIndexMap[key])">
<td> <td>
<img ng-src="/static/images/bank/{{settleItem.settle_bank|uppercase}}.png" class="bank-logo" title="{{settleItem.settle_bank}}"> <img ng-src="/static/images/bank/{{settleItem.settle_bank|uppercase}}.png" class="bank-logo" title="{{settleItem.settle_bank}}">
<span ng-bind="settleItem.client_moniker"></span> <span ng-bind="settleItem.client_moniker"></span>
@ -225,13 +218,22 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<a style="cursor: pointer" class="list-group-item col-sm-12 col-xs-12 text-center" > <a ng-if="group.clients > initEndIndex" class="list-group-item col-sm-12 col-xs-12 text-center" style="width: 49.5%;border: 0;" >
<span class="small-box-footer cursor" ng-click="allClearing()" ng-hide="allButton"> <span style="cursor: pointer;" class="small-box-footer cursor" ng-click="more(key)" ng-if="endIndexMap[key]< group.clients">
全部 <i class="fa fa-arrow-circle-down"></i> 更多 <i class="fa fa-arrow-circle-down"></i>
</span> </span>
<span class="small-box-footer cursor pull-right" ng-click="packup()" ng-hide="limitButton">
收起 <i class="fa fa-arrow-circle-up"></i> </a>
<a ng-if="endIndexMap[key]< group.clients" class="list-group-item col-sm-12 col-xs-12 text-center" style="width: 1%;color: #ddd;border: 0;font-size: 30px;padding: 0">|</a>
<a class="list-group-item col-sm-12 col-xs-12 text-center" style="width: 49.5%;border: 0;">
<span style="cursor: pointer;" class="small-box-footer cursor" ng-click="displayAll(key)" ng-if="endIndexMap[key]< group.clients">
全部 <i class="fa fa-arrow-circle-down"></i>
</span> </span>
<span style="cursor: pointer;" class="small-box-footer cursor pull-right"
ng-click="packup(key)"
ng-if="endIndexMap[key] > initEndIndex">
收起 <i class="fa fa-arrow-circle-up"></i>
</span>
</a> </a>
</div> </div>
</div> </div>

@ -8,7 +8,8 @@ define(['../app'], function (app) {
{"label": "SA", "value": "SA"}, {"label": "SA", "value": "SA"},
{"label": "TAS", "value": "TAS"}, {"label": "TAS", "value": "TAS"},
{"label": "VIC","value": "VIC"}, {"label": "VIC","value": "VIC"},
{"label": "WA", "value": "WA"} {"label": "WA", "value": "WA"},
{"label": "其他(Other)", "value": "其他(Other)"}
]; ];
app.factory('stateMap', function () { app.factory('stateMap', function () {
return { return {

@ -22,6 +22,7 @@
text-align: center; text-align: center;
} }
.head-bar img{ .head-bar img{
width: 396px;
height: 38px; height: 38px;
top: 60px; top: 60px;
margin-top: 40px; margin-top: 40px;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -1195,6 +1195,16 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}]); }]);
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', '$sce', function ($scope, $http, $state, commonDialog,$uibModal, $sce) { app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', '$sce', function ($scope, $http, $state, commonDialog,$uibModal, $sce) {
$scope.refresh = false; $scope.refresh = false;
$scope.copyHfLink = function() {
var e=document.getElementById("cpbt");
e.select();
var successful = document.execCommand("Copy");
if (successful) {
commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'});
}else {
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'});
}
};
$scope.loadPartnerPaymentInfo = function () { $scope.loadPartnerPaymentInfo = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) { $http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {
$scope.paymentInfo = resp.data; $scope.paymentInfo = resp.data;

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

@ -102,8 +102,11 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">HF Pay Link</label> <label class="control-label col-sm-2">HF Pay Link</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static">{{partner.hf_pay_url}} <a href={{partner.hf_pay_url}} target="_Blank">
<span id="intro"> <span class="form-control-static">{{partner.hf_pay_url}}
<!-- <span id="intro">
<a href=""><i id="carousel_id" class="glyphicon glyphicon-info-sign" ng-mouseover="toFirst();toShow()"></i></a> <a href=""><i id="carousel_id" class="glyphicon glyphicon-info-sign" ng-mouseover="toFirst();toShow()"></i></a>
<div class="pos" ng-show="show"> <div class="pos" ng-show="show">
<i class="tocancle glyphicon glyphicon-remove" ng-click="toHide()"></i> <i class="tocancle glyphicon glyphicon-remove" ng-click="toHide()"></i>
@ -116,17 +119,21 @@
</uib-slide> </uib-slide>
</uib-carousel> </uib-carousel>
</div> </div>
</span> </span>-->
</p> </span>
</a>
<i class="fa fa-clipboard margin-r-5" style="cursor: pointer" ng-click="clientCopyHfLink()"></i>
<input style="opacity: 0" id="c-cpbt" value={{partner.hf_pay_url}} readonly>
</div> </div>
<div class="form-group" >
<label class="col-sm-2 control-label">HF Pay QR Code</label>
<img ng-src="{{partner.hfQrcodeUrl}}" class="img-responsive">
<div>
&nbsp;&nbsp;<span style="padding-left: 18.5%;font-size:9px;">仅支持微信客户端扫描</span>
</div> </div>
</div> <div class="form-group">
<label class="col-sm-2 control-label">HF Pay QR Code</label>
<img ng-src="{{partner.hfQrcodeUrl}}" class="img-responsive" />
<div>
<span style="padding-left: 19.5%;font-size:9px;">仅支持微信客户端扫描</span>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

@ -328,14 +328,16 @@
<label class="col-sm-2 control-label">HF Pay Link</label> <label class="col-sm-2 control-label">HF Pay Link</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_link" bs-switch switch-change="toggleHfLink('hf')"> <input type="checkbox" ng-model="paymentInfo.enable_link" bs-switch switch-change="toggleHfLink('hf')">
&nbsp;&nbsp;<span ng-if="paymentInfo.enable_link">{{paymentInfo.hf_pay_url}}</span> &nbsp;&nbsp;<a href={{paymentInfo.hf_pay_url}} target="_Blank"><span ng-if="paymentInfo.enable_link">{{paymentInfo.hf_pay_url}}</span></a>
<i class="fa fa-clipboard margin-r-5" style="cursor: pointer" ng-click="copyHfLink()"></i>
<input style="opacity: 0" id="cpbt" value={{paymentInfo.hf_pay_url}} readonly>
</div> </div>
</div> </div>
<div class="form-group" ng-if="paymentInfo.enable_link"> <div class="form-group" ng-if="paymentInfo.enable_link">
<label class="col-sm-2 control-label">HF Pay QR Code</label> <label class="col-sm-2 control-label">HF Pay QR Code</label>
<img ng-src="{{paymentInfo.hfQrcodeUrl}}" class="img-responsive"> <img ng-src="{{paymentInfo.hfQrcodeUrl}}" class="img-responsive" />
<div> <div>
&nbsp;&nbsp;<span style="padding-left: 18.5%;font-size:9px;" ng-if="paymentInfo.enable_link">仅支持微信客户端扫描</span> &nbsp;&nbsp;<span style="padding-left: 19.2%;font-size:9px;" ng-if="paymentInfo.enable_link">仅支持微信客户端扫描</span>
</div> </div>
</div> </div>
<div class="form-group" ng-if="paymentInfo.enable_hf"> <div class="form-group" ng-if="paymentInfo.enable_hf">

@ -150,12 +150,12 @@ select {
.main-middle { .main-middle {
width: 2px; width: 2px;
height: 306px; height: 400px;
border: 1px dashed #EBEBEB; border: 1px dashed #EBEBEB;
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
vertical-align: top; vertical-align: top;
margin: 47px 40px 0 0; margin: 10px 40px 0 0;
} }
.main-right { .main-right {
vertical-align: top; vertical-align: top;

@ -29,7 +29,6 @@ select.bind("change", function () {
}); });
var bankList = [ var bankList = [
{label:'招商银行',value:'CMB'}, {label:'招商银行',value:'CMB'},
{label:'中国工商银行',value:'ICBC'},
{label:'中国农业银行',value:'ABC'}, {label:'中国农业银行',value:'ABC'},
{label:'中国建设银行',value:'CCB'}, {label:'中国建设银行',value:'CCB'},
{label:'中国银行',value:'BOC'}, {label:'中国银行',value:'BOC'},
@ -46,11 +45,8 @@ var bankList = [
{label:'北京农商银行',value:'BJRCB'}, {label:'北京农商银行',value:'BJRCB'},
{label:'南京银行',value:'NJCB'}, {label:'南京银行',value:'NJCB'},
{label:'中国光大银行',value:'CEB'}, {label:'中国光大银行',value:'CEB'},
{label:'浙商银行',value:'CZB'},
{label:'兴业银行',value:'CIB'},
{label:'杭州银行',value:'HZB'},
{label:'平安银行',value:'PAB'}, {label:'平安银行',value:'PAB'},
{label:'上海银行',value:'SHB'}, {label:'上海银行',value:'SHB'}
]; ];
var productList = [ var productList = [
{label:'护肤品',value:'100003'}, {label:'护肤品',value:'100003'},
@ -97,6 +93,23 @@ var productList = [
{label:'进口食品',value:'100044'}, {label:'进口食品',value:'100044'},
{label:'休闲食品',value:'100045'}, {label:'休闲食品',value:'100045'},
{label:'营养品',value:'100046'}, {label:'营养品',value:'100046'},
{label:'地方特产',value:'100047'} {label:'地方特产',value:'100047'},
{label:'游戏点卡',value:'200003'},
{label:'游戏周边',value:'200004'},
{label:'网页游戏',value:'200005'},
{label:'手机游戏',value:'200006'},
{label:'电脑杀毒软件',value:'200007'},
{label:'电脑安装软件',value:'200008'},
{label:'虚拟服务租赁',value:'200009'},
{label:'物理服务器租赁',value:'200010'},
{label:'国际线路租赁',value:'200011'},
{label:'域名',value:'200012'},
{label:'网页设计',value:'200013'},
{label:'软件设计',value:'200014'},
{label:'留学学费',value:'300003'},
{label:'出国夏令营费用',value:'300004'},
{label:'机票',value:'400003'},
{label:'酒店',value:'400004'},
{label:'当地旅游费用',value:'400005'}
]; ];

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

@ -6,6 +6,9 @@
.pagehead.Alipay{ .pagehead.Alipay{
background-color: #108ee9; background-color: #108ee9;
} }
.pagehead.AlipayOnline{
background-color: #108ee9;
}
.pagehead img { .pagehead img {
width: 40px; width: 40px;
height: 40px; height: 40px;

Loading…
Cancel
Save