Merge branch 'develop' into develop_client_config

# Conflicts:
#	src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/PartnerCardDashboardServiceImp.java
#	src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java
master
wangning 7 years ago
commit a74121cc62

@ -345,3 +345,19 @@ alter table act_app_list
ALTER TABLE `sys_clients_apply`
MODIFY COLUMN `bd_user` varchar(300) DEFAULT NULL COMMENT '所属BD用户';
ALTER TABLE `pmt_orders`
ADD COLUMN `surcharge_rate` decimal(10,5) NULL AFTER `customer_surcharge`;
ALTER TABLE `pmt_orders`
ADD COLUMN `custom_surcharge_rate` decimal(10,5) NULL AFTER `surcharge_rate`;
ALTER TABLE `pmt_transactions`
ADD COLUMN `input_amount` decimal(20,2) NULL AFTER `clearing_amount`;
ALTER TABLE `pmt_transactions`
ADD COLUMN `surcharge_cashback` decimal(10,4) default 0 after `royalpay_surcharge` comment '返现至营销账户';
ALTER TABLE sys_clients ADD store_photo VARCHAR(200) NULL;

@ -6,10 +6,12 @@ import au.com.royalpay.payment.manage.analysis.core.DashboardService;
import au.com.royalpay.payment.manage.analysis.core.PartnerCardDashboardService;
import au.com.royalpay.payment.manage.analysis.mappers.CustomerAndOrdersStatisticsMapper;
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.utils.PageListUtils;
@ -17,7 +19,6 @@ import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
@ -48,6 +49,8 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
@Resource
private ClientConfigService clientConfigService;
@Resource
private LogSettleMailMapper logSettleMailMapper;
@Resource
private PaymentApi paymentApi;
@Override
public JSONObject getCommonAnalysis(String client_moniker) {
@ -145,6 +148,17 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
params.put("client_id", client_id);
PageList<JSONObject> logs = transactionMapper.listSettlementLog(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
JSONObject result = PageListUtils.buildPageListResult(logs);
if (query.getPage()==1){
if (!logs.isEmpty() && logs.size()>0){
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("clearing_time"));
if (sendMailLog == null) {
result.put("padding",true);
}
if (sendMailLog!=null && sendMailLog.getIntValue("mail_status") != 1) {
result.put("padding",true);
}
}
}
return result;
}

@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* Created by yishuqian on 20/02/2017.
@ -78,5 +79,11 @@ public class PartnerCardDashboardController {
return cleanService.getCleanLogTransactions(detailId, manager);
}
@RequestMapping("/settlement_logs/{detailId}/analysis/{channel}")
public Map<String,JSONObject> getDayAndChannelOfAnalysisMap(@PathVariable int detailId,
@PathVariable String channel, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return cleanService.getDayAndChannelOfAnalysisMap(detailId,channel, manager);
}
}

@ -4,11 +4,13 @@ import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppQueryBean;
import au.com.royalpay.payment.manage.notice.beans.NoticeInfo;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
@ -125,4 +127,7 @@ public interface RetailAppService {
void changeSurchargeEnable(JSONObject device, UpdateSurchargeDTO updateSurchargeDTO);
JSONObject getInvoiceData(JSONObject device, AppQueryBean appQueryBean) throws Exception;
void getInvoiceFile(JSONObject device, AppQueryBean appQueryBean, HttpServletResponse httpResponse) throws Exception;
}

@ -13,6 +13,7 @@ import au.com.royalpay.payment.manage.fund.core.impls.XPlanFundConfigServiceImpl
import au.com.royalpay.payment.manage.mappers.log.AppMessageLogMapper;
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.LogSettleMailMapper;
import au.com.royalpay.payment.manage.mappers.notice.NoticePartnerMapper;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
@ -32,6 +33,7 @@ import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
import au.com.royalpay.payment.manage.signin.core.impls.SignInAccountServiceImpl;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
import au.com.royalpay.payment.tools.cms.RoyalPayCMSSupport;
import au.com.royalpay.payment.tools.device.DeviceSupport;
import au.com.royalpay.payment.tools.device.message.AppMessage;
@ -87,6 +89,7 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
/**
* Created by yishuqian on 28/03/2017.
@ -143,8 +146,12 @@ public class RetailAppServiceImp implements RetailAppService {
@Resource
private NoticePartnerMapper noticePartnerMapper;
@Resource
private TradeLogService tradeLogService;
@Resource
private AppActService appActService;
@Resource
private LogSettleMailMapper logSettleMailMapper;
@Resource
private ClientConfigService clientConfigService;
private Map<String, AppMsgSender> senderMap = new HashMap<>();
@ -255,6 +262,40 @@ public class RetailAppServiceImp implements RetailAppService {
merchantInfoProvider.changeSurchargeEnable(device,updateSurchargeDTO);
}
@Override
public JSONObject getInvoiceData(JSONObject device, AppQueryBean appQueryBean) throws Exception {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
int client_id = device.getIntValue("client_id") ;
JSONObject client = clientManager.getClientInfo(client_id);
String timezone = client.getString("timezone");
appQueryBean.setTimezone(timezone);
JSONObject params = appQueryBean.toParams();
setAllClientIds(params, client_id);
clientManager.validateClients(client_id, params);
params.put("client_id", client_id);
JSONObject analysis = transactionMapper.analysisTransFlow(params);
BigDecimal total_surcharge = analysis.getBigDecimal("total_surcharge").add(analysis.getBigDecimal("tax_amount"));
analysis.put("total_surcharge",total_surcharge);
return analysis;
}
@Override
public void getInvoiceFile(JSONObject device, AppQueryBean appQueryBean, HttpServletResponse httpResponse) throws Exception {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
int client_id = device.getIntValue("client_id") ;
//JSONObject client = clientManager.getClientInfo(client_id);
TradeLogQuery tradeLogQuery = new TradeLogQuery();
tradeLogQuery.setDatefrom(appQueryBean.getBegin());
tradeLogQuery.setDateto(appQueryBean.getEnd());
if (appQueryBean.getApp_client_ids()==null){
appQueryBean.setApp_client_ids(String.valueOf(client_id));
}
tradeLogQuery.setClient_ids(appQueryBean.getApp_client_ids().split(","));
tradeLogService.exportTransFlow(tradeLogQuery,device,httpResponse);
}
@Override
public void updateClient(JSONObject device, AppClientBean appClientBean) {
String clientType = device.getString("client_type");
@ -342,7 +383,19 @@ public class RetailAppServiceImp implements RetailAppService {
PageList<JSONObject> logs = clearingDetailMapper.listClientSettlementLog(params,
new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("report_date.desc")));
logs.forEach(log -> log.put("total_charge",log.getBigDecimal("total_charge").add(log.getBigDecimal("tax_amount"))));
return PageListUtils.buildPageListResult(logs);
JSONObject result = PageListUtils.buildPageListResult(logs);
if (appQueryBean.getPage()==1){
if (!logs.isEmpty() && logs.size()>0){
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("report_date"));
if (sendMailLog == null) {
result.put("padding",true);
}
if (sendMailLog!=null && sendMailLog.getIntValue("mail_status") != 1) {
result.put("padding",true);
}
}
}
return result;
}
@Override

@ -15,6 +15,7 @@ import au.com.royalpay.payment.manage.settlement.core.ManualSettleSupport;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
import au.com.royalpay.payment.manage.system.core.ClientContractService;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.device.advise.AppClientController;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
@ -44,6 +45,7 @@ import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import static au.com.royalpay.payment.tools.CommonConsts.RETAIL_DEVICE;
@ -450,4 +452,14 @@ public class RetailAppController {
public void changeQRCodePaySurCharge(@ModelAttribute(RETAIL_DEVICE) JSONObject device, @RequestBody UpdateSurchargeDTO updateSurchargeDTO) {
retailAppService.changeSurchargeEnable(device, updateSurchargeDTO);
}
@RequestMapping(value = "/invoice",method = RequestMethod.GET)
public JSONObject getInvoiceData(@ModelAttribute(RETAIL_DEVICE) JSONObject device,AppQueryBean appQueryBean) throws Exception {
return retailAppService.getInvoiceData(device,appQueryBean);
}
@RequestMapping(value = "/invoice/file",method = RequestMethod.GET)
public void getInvoiceFile(@ModelAttribute(RETAIL_DEVICE) JSONObject device,AppQueryBean appQueryBean,HttpServletResponse httpResponse) throws Exception {
retailAppService.getInvoiceFile(device,appQueryBean,httpResponse);
}
}

@ -11,6 +11,7 @@ import java.io.PrintWriter;
import java.io.Writer;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* Created by davep on 2016-08-29.
@ -31,6 +32,8 @@ public interface CleanService {
JSONObject getCleanLogTransactions(int detailId, JSONObject manager);
Map<String,JSONObject> getDayAndChannelOfAnalysisMap(int detailId, String channel,JSONObject manager);
JSONObject getCleanLogTransactions(int client_id, String detailId);
void settlementCsv(Date dt, HttpServletResponse resp) throws IOException;
@ -60,6 +63,8 @@ public interface CleanService {
JSONObject listClearingTransactions(int client_id, String clearingDetailId, JSONObject partner);
Map<String,JSONObject> channelAndDayOfAnalysis(int client_id, String clearingDetailId, String channel,JSONObject partner);
void exportListClearingTransactions(int client_id, String clearingDetailId, JSONObject partner, HttpServletResponse resp);
List<JSONObject> getSettlementMonthReport(int year, int monthOfYear);

@ -84,14 +84,9 @@ import java.math.RoundingMode;
import java.net.URISyntaxException;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Currency;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.Locale;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@ -264,6 +259,19 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
return cleanLog;
}
@Override
public Map<String,JSONObject> getDayAndChannelOfAnalysisMap(int detailId,String channel,JSONObject manager) {
JSONObject cleanLog = clearingDetailMapper.findByDetailId(detailId);
if (cleanLog == null) {
throw new NotFoundException();
}
JSONObject client = clientManager.getClientInfo(cleanLog.getIntValue("client_id"));
Assert.notNull(client, "Client ID invalid");
checkOrgPermission(manager, client);
return getDayAnalysisMap(String.valueOf(detailId),channel,client);
}
@Override
public JSONObject getCleanLogTransactions(int clientId, String clearingDetailId) {
return settlementSupport.listSettlementTransactionsForClient(clientId, clearingDetailId);
@ -645,7 +653,6 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
TimeZoneUtils.switchTimeZone(p, timezone_client, "transaction_time");
});
}
clearClient.put("report", transactions);
List<JSONObject> channels = clearingDetailAnalysisMapper.listReportChannels(clearClient.getString("clear_detail_id"));
JSONObject channelsObj = new JSONObject();
@ -657,6 +664,60 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
return clearClient;
}
@Override
public Map<String,JSONObject> channelAndDayOfAnalysis(int client_id, String clearingDetailId,String channel,JSONObject partner) {
JSONObject client = clientManager.getClientInfo(client_id);
Assert.notNull(client, "Client not exists");
int parent_client_id = client.getIntValue("parent_client_id");
if (client_id != partner.getIntValue("client_id") && parent_client_id != partner.getIntValue("client_id")) {
throw new ForbiddenException("No Permission");
}
return getDayAnalysisMap(clearingDetailId,channel,client);
}
private Map<String,JSONObject> getDayAnalysisMap(String clearingDetailId,String channel,JSONObject client){
List<JSONObject> transactions = transactionMapper.listTransactionsOfClearingOrder(Integer.parseInt(clearingDetailId),
new PageBounds(Order.formString("order_id.asc")));
String timezone_client = client.getString("timezone");
if(!channel.equals("null")){
transactions = transactions.stream().filter(t->t.getString("channel").equals(channel)).collect(Collectors.toList());
}
List<String> dateKeysList = new ArrayList<>();
dateKeysList.add("transaction_time");
if (timezone_client != null) {
transactions.parallelStream().forEach(p -> {
TimeZoneUtils.switchTimeZone(p, timezone_client, "transaction_time");
});
TimeZoneUtils.switchTimeZoneToString(transactions,timezone_client,TimeZoneUtils.PATTERN_DATE,dateKeysList);
}
Map<String,List<JSONObject>> dayTransactionsMap = transactions.stream().collect(Collectors.groupingBy(x -> x.getString("transaction_time").substring(0,10)));
Map<String,JSONObject> dayAnalysisMap = new TreeMap<>();
for (Map.Entry<String, List<JSONObject>> entry : dayTransactionsMap.entrySet()){
JSONObject analysis = new JSONObject();
List<JSONObject> transactionsOfDay = entry.getValue();
BigDecimal total_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("clearing_amount")).map(t-> t.getBigDecimal("clearing_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal total_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("clearing_amount")).map(t-> t.getBigDecimal("clearing_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal total_charge_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("total_surcharge")).map(t-> t.getBigDecimal("total_surcharge")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal total_charge_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("total_surcharge")).map(t-> t.getBigDecimal("total_surcharge")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal net_amount_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("settle_amount")).map(t-> t.getBigDecimal("settle_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal net_amount_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("settle_amount")).map(t-> t.getBigDecimal("settle_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal tax_amount_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("tax_amount")).map(t-> t.getBigDecimal("tax_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal tax_amount_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("tax_amount")).map(t-> t.getBigDecimal("tax_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal tax_amount = tax_amount_credit.subtract(tax_amount_debit);
analysis.put("total_credit",total_credit.setScale(2,BigDecimal.ROUND_HALF_UP));
analysis.put("total_debit",total_debit.setScale(2,BigDecimal.ROUND_HALF_UP));
analysis.put("net_amount",net_amount_credit.subtract(net_amount_debit).setScale(2,BigDecimal.ROUND_HALF_UP));
analysis.put("tax_amount",tax_amount.setScale(2,BigDecimal.ROUND_HALF_UP));
analysis.put("total_charge",total_charge_credit.subtract(total_charge_debit).add(tax_amount).setScale(2,BigDecimal.ROUND_HALF_UP));
analysis.put("gross_amount",total_credit.subtract(total_debit).setScale(2,BigDecimal.ROUND_HALF_UP));
dayAnalysisMap.put(entry.getKey(),analysis);
}
return dayAnalysisMap;
}
@Override
public void exportListClearingTransactions(int client_id, String clearingDetailId, JSONObject partner, HttpServletResponse resp) {
OutputStream ous = null;

@ -13,6 +13,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* Created by davep on 2016-08-29.
@ -38,6 +39,12 @@ public class CleanLogClientController {
return cleanService.listClearingTransactions(client_id, clearingDetailId, partner);
}
@RequestMapping("/{client_id}/settlement_logs/{clearingDetailId}/analysis/{channel}")
public Map<String,JSONObject> channelAndDayOfAnalysis(@PathVariable int client_id, @PathVariable String clearingDetailId,
@PathVariable String channel, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
return cleanService.channelAndDayOfAnalysis(client_id, clearingDetailId,channel,partner);
}
@PartnerMapping("/{client_id}/settlement_logs/{clearingDetailId}/export")
public void exportListClearingTransactions(@PathVariable int client_id, @PathVariable String clearingDetailId,
@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse resp) {

@ -37,7 +37,15 @@ public interface ClientRateMapper {
@Param("expiry_time") Date expiryTime, @Param("rate_value") Double rateValue,
@Param("clean_days") Integer cleanDays, @Param("rate_name") String rateName);
List<JSONObject> minExpiryTime(@Param("client_id")int client_id,@Param("rate_name") String rate_name);
List<JSONObject> latestConfig(@Param("client_id")int client_id,@Param("rate_name") String rate_name);
//Task
List<JSONObject> maxChannelExpiryTime(@Param("client_id")int client_id,@Param("rate_name")String rate_name);
List<JSONObject> getAllExpiry(@Param("expiry_date")Date expiry_date);
JSONObject latestChannelCleanDays(@Param("rate_name")String rate_name, @Param("client_id")int client_id);
}

@ -19,6 +19,7 @@ public class PartnerQuery {
private String searchText;
private String client_moniker;
private String state;
private String suburb;
private String short_name;
private String sub_merchant_id;
private String org_id;
@ -105,6 +106,9 @@ public class PartnerQuery {
if (StringUtils.isNotBlank(state)) {
param.put("state", state);
}
if (StringUtils.isNotBlank(suburb)) {
param.put("suburb", suburb);
}
if (StringUtils.isNotBlank(searchText)) {
param.put("search_text", searchText);
if (StringUtils.isNotBlank(textType)) {
@ -460,4 +464,12 @@ public class PartnerQuery {
public void setMerchant_id(String merchant_id) {
this.merchant_id = merchant_id;
}
public String getSuburb() {
return suburb;
}
public void setSuburb(String suburb) {
this.suburb = suburb;
}
}

@ -14,6 +14,7 @@ import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.device.core.DeviceManager;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
import au.com.royalpay.payment.manage.mappers.log.ClientsOperationLogMapper;
import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
@ -194,6 +195,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private OrgMapper orgMapper;
@Resource
private LogSettleMailMapper logSettleMailMapper;
@Resource
private CommoditiesMapper commoditiesMapper;
@Resource
private ActClientInvitationCodeMapper actClientInvitationCodeMapper;
@ -2410,6 +2413,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
PageList<JSONObject> logs = transactionMapper.listSettlementLog(params,
new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
JSONObject result = PageListUtils.buildPageListResult(logs);
if (query.getPage()==1){
if (!logs.isEmpty() && logs.size()>0){
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("clearing_time"));
if (sendMailLog == null) {
result.put("padding",true);
}
if (sendMailLog!=null && sendMailLog.getIntValue("mail_status") != 1) {
result.put("padding",true);
}
}
}
return result;
}

@ -30,6 +30,7 @@ public class WepayWechatApiImpl extends AbstractMpWechatClientApi implements MpW
registerTemplateId("settlement", "HqgkogBUWmfInrS5U84_9p-19LbM0apEuExHW4LF4bM");
registerTemplateId("settlement-check-code", "yaXEOjXFpuipk-DsdxYdd8PnD3bWAgDS5vTKJsrFdR4");
registerTemplateId("daily-green-channel", "vjeNnggHnnRHvBP80lkEEtPk8ouf7JnvrQYDCyxqx4g");
registerTemplateId("client-postpone", "5eNJ5ZTKWitC1TJClb2coymtNCmOC7d86h0zCrxmGig");
}
@Override

@ -0,0 +1,144 @@
package au.com.royalpay.payment.manage.task;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
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.beans.TemplateMessage;
import com.alibaba.fastjson.JSONObject;
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.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
/**
* Created by wangning on 2018/1/2.
*/
@Component
//@ConditionalOnProperty(value = "app.run-tasks", havingValue = "true")
public class PostponeClientTask {
Logger logger = LoggerFactory.getLogger(PostponeClientTask.class);
@Resource
private ClientRateMapper clientRateMapper;
@Resource
private MpWechatApiProvider mpWechatApiProvider;
@Resource
private ClientManager clientManager;
@Resource
private ClientAccountMapper clientAccountMapper;
@Resource
private ManagerMapper managerMapper;
// @Scheduled(cron = "0 30 8 * * ?")
public void checkGreenChannel() {
Date now = new Date();
Date tomorrow = DateUtils.addDays(now, 1);
Date yearTomorrow = DateUtils.addYears(tomorrow, 1);
String expireDate = DateFormatUtils.format(yearTomorrow, "yyyy-MM-dd");
List<JSONObject> expiryClient = clientRateMapper.getAllExpiry(now);
if(CollectionUtils.isEmpty(expiryClient)){
return;
}
Map<Integer, JSONObject> expiryClients = new HashMap<>();
expiryClient.forEach(p -> {
expiryClients.put(p.getInteger("client_id"), p);
});
expiryClients.values().forEach(p -> {
List<JSONObject> adminAccounts = clientAccountMapper.listAdminAccounts(p.getIntValue("client_id"));
List<JSONObject> clientRates = clientRateMapper.maxChannelExpiryTime(p.getIntValue("client_id"), null);
JSONObject wechatRate = clientRateMapper.latestChannelCleanDays("Wechat", p.getIntValue("client_id"));
int cleanDays = 1;
if (wechatRate.getInteger("clean_days") != null) {
cleanDays = wechatRate.getIntValue("clean_days");
} else {
cleanDays = wechatRate.getIntValue("c_clean_days");
}
int finalCleanDays = cleanDays;
clientRates.forEach(o -> {
o.remove("client_rate_id");
o.put("active_time", tomorrow);
o.put("manager_id", 0);
o.put("expiry_time", yearTomorrow);
o.put("create_time", now);
o.put("update_time", now);
o.put("clean_days", finalCleanDays);
o.put("manager_name", "System");
o.put("remark", "费率到期系统自动延期1年");
clientRateMapper.saveRate(o);
});
adminAccounts.forEach(o -> {
sendClientPostponeNotify(o, expireDate);
});
});
sendComplianceNotify(expiryClients, expireDate);
}
private void sendClientPostponeNotify(JSONObject account,String newExpireDate) {
JSONObject client = clientManager.getClientInfo(account.getIntValue("client_id"));
try {
MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(account.getString("wechat_openid"));
if (api != null) {
String templateId = api.getTemplateId("client-postpone");
if (templateId != null) {
TemplateMessage notice = initClientMessage(client,newExpireDate,account.getString("wechat_openid"),templateId);
api.sendTemplateMessage(notice);
}
}
} catch (Exception e) {
logger.error("Sending Notify failure", e);
}
}
private void sendComplianceNotify(Map<Integer, JSONObject> clients, String newExpireDate) {
StringBuffer sb = new StringBuffer();
clients.values().forEach(p -> {
sb.append(p.getString("client_moniker"));
sb.append("、");
});
sb.deleteCharAt(sb.length() - 1);
List<String> compliance = managerMapper.listOpenIdsOfCompliances();
compliance.forEach(p -> {
MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(p);
TemplateMessage notice = initComplianceMessage(sb.toString(), newExpireDate, p, api.getTemplateId("client-postpone"));
api.sendTemplateMessage(notice);
});
}
private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) {
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null);
notice.put("first", "您好您的合同费率已到期根据合同协议系统已自动为您延期1年。", "#ff0000");
notice.put("keyword1", client.getString("short_name")+"("+client.getString("client_moniker")+")", "#ff0000");
notice.put("keyword2", newExpiryDate, "#0000ff");
notice.put("remark", "如有疑问请联系RoyalPay", "#000000");
return notice;
}
private TemplateMessage initComplianceMessage(String clients, String newExpiryDate, String wechatOpenid, String templateId) {
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null);
notice.put("first", "以下商户据合同费率已经自动延期1年", "#ff0000");
notice.put("keyword1", clients, "#ff0000");
notice.put("keyword2", newExpiryDate, "#0000ff");
notice.put("remark", " ", "#000000");
return notice;
}
}

@ -12,6 +12,7 @@ import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.mappers.client.ClientCustomersMapper;
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.LogSettleMailMapper;
import au.com.royalpay.payment.manage.mappers.payment.AustracDataMapper;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.payment.RefundAuditionMapper;
@ -129,6 +130,8 @@ public class TradeLogServiceImpl implements TradeLogService {
private ManagerCustomerRelationAlipayMapper managerCustomerRelationAlipayMapper;
@Resource
private ClientCustomersMapper clientCustomersMapper;
@Resource
LogSettleMailMapper logSettleMailMapper;
@Resource
private OrgManager orgManager;
@ -818,6 +821,17 @@ public class TradeLogServiceImpl implements TradeLogService {
new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
JSONObject result = PageListUtils.buildPageListResult(logs);
result.put("analysis", transactionMapper.getClientAmountAnalysis(params));
if (query.getPage()==1){
if (!logs.isEmpty() && logs.size()>0){
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("clearing_time"));
if (sendMailLog == null) {
result.put("padding",true);
}
if (sendMailLog!=null && sendMailLog.getIntValue("mail_status") != 1) {
result.put("padding",true);
}
}
}
return result;
}

@ -8,14 +8,15 @@ 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.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* Created by Tayl0r on 2017/7/6.
@ -84,8 +85,6 @@ public class NoticeRefundReviewListener implements ApplicationListener<NewRefund
private TemplateMessage initMessage(NewRefundReviewEvent newRefundReviewEvent, String operatorName, JSONObject client, JSONObject review, String templateId, String wechatOpenid) {
String uri = "/api/payment/v1.0/refund/review/" + review.getString("review_id");
logger.debug("kiratest->>>>>"+review.getString("review_id"));
logger.debug("kiratest->>>>>"+review.toJSONString());
String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat") + "?target=" + uri;
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, loginUrl);
notice.put("first", operatorName + "提交了订单的退款申请,请审核", "#ff0000");
@ -99,8 +98,6 @@ public class NoticeRefundReviewListener implements ApplicationListener<NewRefund
private TemplateMessage initMessageToOperator(NewRefundReviewEvent newRefundReviewEvent, String operatorName, JSONObject client, JSONObject review, String templateId, String wechatOpenid) {
String uri = PlatformEnvironment.getEnv().concatUrl("/api/payment/v1.0/refund/review/check/" + review.getString("review_id"));
logger.debug("kiratestOperator->>>>>"+review.getString("review_id"));
logger.debug("kiratestOperator->>>>>"+review.toJSONString());
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, uri);
notice.put("first", operatorName + ",您的退款申请已提交请等待RoyalPay审核", "#ff0000");
notice.put("keyword1", review.getString("currency") + newRefundReviewEvent.getRefundOrder().getDoubleValue("amount"), "#ff0000");

@ -96,6 +96,10 @@
<bind name="short_name_pattern" value="'%'+short_name+'%'"/>
and c.short_name like #{short_name_pattern}
</if>
<if test="suburb!=null">
<bind name="suburb_pattern" value="'%'+suburb+'%'"/>
and c.suburb like #{suburb_pattern}
</if>
<if test="approving">
and ((c.approve_result=4 and c.open_status is null) or (c.approve_result=3 and c.open_status is null) or c.open_status=1 or c.open_status=2 or c.open_status=4)
</if>

@ -89,20 +89,36 @@
order by update_time desc
]]>
</select>
<select id="minExpiryTime" resultType="com.alibaba.fastjson.JSONObject">
SELECT * FROM
sys_client_rates
WHERE client_id = #{client_id}
AND active_time =
(
SELECT max(active_time) FROM sys_client_rates
WHERE client_id = #{client_id}
)
and rate_name in('Wechat','Alipay')
order by expiry_time desc
<select id="maxChannelExpiryTime" resultType="com.alibaba.fastjson.JSONObject">
select cr.* ,c.client_moniker from sys_client_rates cr
inner join sys_clients c on c.client_id = cr.client_id and c.is_valid = 1 and (c.approve_result = 1 or c.approve_result = 2)
where cr.client_id = #{client_id}
<if test="rate_name != null">
and cr.rate_name = #{rate_name}
</if>
group by cr.client_id, cr.rate_name
</select>
<select id="getAllExpiry" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT a.*
FROM
(SELECT
cr.client_id ,
cr.active_time ,
max(cr.expiry_time) expiry_time ,
cr.rate_name,
c.client_moniker
FROM
sys_client_rates cr
inner join sys_clients c on c.client_id = cr.client_id and c.is_valid = 1 and (c.approve_result = 1 or c.approve_result = 2)
GROUP BY
cr.client_id ,cr.rate_name
) a
WHERE
a.expiry_time < #{expiry_date}
]]>
</select>
<select id="latestConfig" resultType="com.alibaba.fastjson.JSONObject">
SELECT * FROM
sys_client_rates
@ -114,4 +130,13 @@
)
order by expiry_time desc
</select>
<select id="latestChannelCleanDays" resultType="com.alibaba.fastjson.JSONObject">
select cr.*,c.clean_days c_clean_days from sys_client_rates cr
inner join sys_clients c on c.client_id= cr.client_id and c.is_valid = 1 and (c.approve_result = 1 or c.approve_result = 2)
where cr.client_id = #{client_id}
and cr.rate_name = #{rate_name}
order by cr.expiry_time desc
limit 1
</select>
</mapper>

@ -14,87 +14,39 @@
<div class="box-body">
<ul class="nav nav-pills">
<li ng-class="{active:ctrl.channel==null}">
<a role="button" ng-click="ctrl.channel=null" title="All">
<a role="button" ng-click="ctrl.channel=null;channelAndDayOfAnalysis()" title="All">
<img src="/static/images/royalpay_sign.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Wechat'}" ng-if="report.channels.Wechat">
<a role="button" ng-click="ctrl.channel='Wechat'" title="Wechat">
<a role="button" ng-click="ctrl.channel='Wechat';channelAndDayOfAnalysis()" title="Wechat">
<img src="/static/images/wechatpay_sign_lg.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Alipay'}" ng-if="report.channels.Alipay">
<a role="button" ng-click="ctrl.channel='Alipay'" title="Alipay">
<a role="button" ng-click="ctrl.channel='Alipay';channelAndDayOfAnalysis()" title="Alipay">
<img src="/static/images/alipay_sign_lg.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='AlipayOnline'}" ng-if="report.channels.AlipayOnline">
<a role="button" ng-click="ctrl.channel='AlipayOnline'" title="AlipayOnline">
<a role="button" ng-click="ctrl.channel='AlipayOnline';channelAndDayOfAnalysis()" title="AlipayOnline">
<img src="/static/images/alipay_online.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Bestpay'}" ng-if="report.channels.Bestpay">
<a role="button" ng-click="ctrl.channel='Bestpay'" title="Bestpay">
<a role="button" ng-click="ctrl.channel='Bestpay';channelAndDayOfAnalysis()" title="Bestpay">
<img src="/static/images/bestpay_sign_lg.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='jd'}" ng-if="report.channels.jd">
<a role="button" ng-click="ctrl.channel='jd'" title="JD">
<a role="button" ng-click="ctrl.channel='jd';channelAndDayOfAnalysis()" title="JD">
<img src="/static/images/jd_sign_lg.png" class="channel-icon-lg">
</a>
</li>
</ul>
</div>
</div>
<div class="box box-warning" ng-if="ctrl.channel==null">
<div class="box-header">Analysis</div>
<div class="box-body">
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Rate</span>
<span class="col-xs-6" ng-bind="report.rate+'%'"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span class="col-xs-6" ng-bind="report.total_payment|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span class="col-xs-6" ng-bind="report.total_refund|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span class="col-xs-6" ng-bind="report.gross_amount|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span class="col-xs-6" ng-bind="report.total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span class="col-xs-6" ng-bind="report.wechat_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span class="col-xs-6" ng-bind="report.royalpay_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span class="col-xs-6" ng-bind="report.clearing_amount|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Tax Amount</span>
<span class="col-xs-6" ng-bind="report.tax_amount|currency:''"></span>
</div>
</div>
</div>
</div>
<div class="box box-warning" ng-if="ctrl.channel!=null">
<!--<div class="box box-warning" ng-if="ctrl.channel!=null">
<div class="box-header">Analysis</div>
<div class="box-body">
<div class="row">
@ -141,6 +93,144 @@
</div>
</div>
</div>
</div>-->
<div class="box box-warning">
<uib-tabset active="index">
<uib-tab index="0" heading="Analysis" ng-click="ctrl.day=''">
<div class="box-body">
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Rate</span>
<span ng-if="ctrl.channel==null"class="col-xs-6" ng-bind="report.rate+'%'"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].rate+'%'"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.total_payment|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_credit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.total_refund|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_debit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.gross_amount|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].gross_amount|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.total_charge|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.wechat_charge|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].third_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.royalpay_charge|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].royalpay_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.clearing_amount|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].gross_amount-report.channels[ctrl.channel].total_charge|currency:''"></span>
</div>
</div>
<div class="row" ng-if="ctrl.channel==null">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Tax Amount</span>
<span class="col-xs-6" ng-bind="report.tax_amount|currency:''"></span>
</div>
</div>
</div>
</uib-tab>
<!--<uib-tab heading="Analysis" ng-if="ctrl.channel!=null" ng-click="ctrl.day=''">
<div class="box-body">
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_credit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_debit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].gross_amount|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].third_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].royalpay_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span class="col-xs-6"
ng-bind="report.channels[ctrl.channel].gross_amount-report.channels[ctrl.channel].total_charge|currency:''"></span>
</div>
</div>
</div>
</uib-tab>-->
<uib-tab ng-repeat="(key,analysis) in channelAndDayMap" heading="{{key}}" ng-click="ctrl.day=key" ng-if="show">
<div class="box-body" >
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span class="col-xs-6" ng-bind="analysis.total_credit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span class="col-xs-6" ng-bind="analysis.total_debit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span class="col-xs-6" ng-bind="analysis.gross_amount|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span class="col-xs-6" ng-bind="analysis.total_charge|currency:''"></span>
</div>
<!-- <div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span class="col-xs-6" ng-bind="analysis.wechat_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span class="col-xs-6" ng-bind="analysis.royalpay_charge|currency:''"></span>
</div>-->
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span class="col-xs-6" ng-bind="analysis.net_amount|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!ctrl.channel">
<span class="col-xs-6 text-bold">Tax Amount</span>
<span class="col-xs-6" ng-bind="analysis.tax_amount|currency:''"></span>
</div>
</div>
</div>
</uib-tab>
</uib-tabset>
</div>
<div class="box box-default">
<div class="box-header">Credits</div>
@ -162,7 +252,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in report.report|propsFilter:{transaction_type:'Credit',channel:ctrl.channel}:true">
<tr ng-repeat="tr in report.report|propsFilter:{transaction_type:'Credit',channel:ctrl.channel,transaction_time:ctrl.day}:true">
<td>
<img class="channel-icon" ng-src="{{tr.channel|channel_image}}">{{tr.order_id}}
</td>
@ -200,7 +290,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in report.report|propsFilter:{transaction_type:'Debit',channel:ctrl.channel}:true">
<tr ng-repeat="tr in report.report|propsFilter:{transaction_type:'Debit',channel:ctrl.channel,transaction_time:ctrl.day}:true">
<td>
<img class="channel-icon" ng-src="{{tr.channel|channel_image}}">{{tr.order_id}}
</td>

@ -4,7 +4,7 @@
define(['../app','decimal'], function (app,Decimal) {
'use strict';
app.factory('clearingDetailService', ['$uibModal', function ($uibModal) {
function openDetail(url, is_partner) {
function openDetail(url, is_partner,client_id,detailId) {
$uibModal.open({
templateUrl: '/static/payment/tradelog/templates/partner_settlement_dialog.html',
controller: 'clearingDetailCtrl',
@ -12,7 +12,9 @@ define(['../app','decimal'], function (app,Decimal) {
detail: ['$http', function ($http) {
return $http.get(url);
}],
is_partner: is_partner
is_partner: is_partner,
client_id:client_id,
detailId:detailId
},
size: 'lg'
})
@ -20,16 +22,26 @@ define(['../app','decimal'], function (app,Decimal) {
return {
clientClearingDetail: function (client_id, detailId, is_partner) {
openDetail('/client/clean_logs/' + client_id + '/settlement_logs/' + detailId, is_partner);
openDetail('/client/clean_logs/' + client_id + '/settlement_logs/' + detailId, is_partner,client_id,detailId);
}
}
}]);
app.controller('clearingDetailCtrl', ['$scope', 'detail', 'is_partner', function ($scope, detail, is_partner) {
$scope.ctrl = {channel: null};
app.controller('clearingDetailCtrl', ['$scope', 'detail', 'is_partner','client_id','detailId','$http', function ($scope, detail, is_partner,client_id,detailId,$http) {
$scope.ctrl = {channel: null,day:null};
$scope.report = detail.data;
$scope.report.total_charge = Decimal.add($scope.report.total_charge,$scope.report.tax_amount).toFixed(2);
angular.forEach($scope.report.channels,function (e) {
e.total_charge = Decimal.add(e.total_charge,e.tax_amount).toFixed(2);
});
$scope.is_partner = is_partner;
$scope.channelAndDayOfAnalysis = function () {
$http.get('/client/clean_logs/' + client_id + '/settlement_logs/' + detailId+'/analysis/'+$scope.ctrl.channel).then(function (resp) {
$scope.channelAndDayMap = resp.data;
$scope.index = 0;
})
}
$scope.channelAndDayOfAnalysis();
}]);
app.filter('channel_image', function () {
return function (channel) {

@ -69,10 +69,20 @@ define(['angular','decimal'], function (angular,decimal) {
var params = angular.copy($scope.params);
if (params.datefrom) {
params.datefrom = $filter('date')(params.datefrom, 'yyyyMMdd');
}else {
alert("请选择开始时间");
return;
}
if (params.dateto) {
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
}else {
alert("请选择结束时间");
return;
}
/* if(getTime2Time()>30){
alert("开始时间与结束时间不得超过三十天");
return;
}*/
params.page = page || $scope.pagination.page || 1;
$http.get('/partner/invoice/trans_flow', {params: params}).then(function (resp) {
$scope.tradeLogs = resp.data.data;
@ -89,6 +99,15 @@ define(['angular','decimal'], function (angular,decimal) {
commonDialog.alert({title: 'Search failed', content: resp.data.message, type: 'error'});
});
};
/* var getTime2Time = function () {
var time = angular.copy($scope.params);
var from = time.datefrom = $filter('date')(time.datefrom, 'yyyy-MM-dd');
var to = time.dateto = $filter('date')(time.dateto, 'yyyy-MM-dd');
var longTime = new Date(to).getTime() - new Date(from).getTime() ;
var day = Math.floor(longTime/(24*60*60*1000));
return day;
};*/
$scope.export = function (type,page) {
var url='/partner/invoice/trans_flow/pdf';
var connectSymbol = '?';

@ -2470,27 +2470,41 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
params.limit = 10;
$http.get('/sys/partners/' + clientMoniker + '/lists_settlements', {params: params}).then(function (resp) {
$scope.settlementLogs = resp.data.data;
$scope.padding = resp.data.padding;
$scope.pagination = resp.data.pagination;
});
};
$scope.getClearingTransactions = function (client_id, detail_id) {
$uibModal.open({
templateUrl: '/static/analysis/templates/settlement_transactions.html',
controller: 'managerClearingDetailCtrl',
controller: 'managerSettlementDetailCtrl',
resolve: {
detail: ['$http', '$stateParams', function ($http) {
return $http.get('/analysis/partner_card/' + client_id + '/settlement_logs/' + detail_id);
}]
}],
detail_id:detail_id
},
size: 'lg'
});
};
$scope.chooseLast7Days();
}]);
app.controller('managerClearingDetailCtrl', ['$scope', 'detail', function ($scope, detail) {
app.controller('managerSettlementDetailCtrl', ['$scope', 'detail','detail_id','$http', function ($scope, detail,detail_id,$http) {
$scope.ctrl = {channel: null};
$scope.show = true;
$scope.report = detail.data;
$scope.report.total_charge = Decimal.add($scope.report.total_charge,$scope.report.tax_amount).toFixed(2);
angular.forEach($scope.report.channels,function (e) {
e.total_charge = Decimal.add(e.tax_amount,e.total_charge).toFixed(2);
});
$scope.channelAndDayOfAnalysis = function () {
$http.get('/analysis/partner_card/settlement_logs/' + detail_id+'/analysis/'+$scope.ctrl.channel).then(function (resp) {
$scope.channelAndDayMap = resp.data;
$scope.index = 0;
})
};
$scope.channelAndDayOfAnalysis(1);
}]);
app.controller('productCtrl', ['$scope', '$http', '$uibModal', 'commonDialog', '$state', 'Upload', 'industryMap', function ($scope, $http, $uibModal, commonDialog, $state, Upload, industryMap) {

@ -76,7 +76,12 @@
</thead>
<tbody>
<tr ng-repeat="log in settlementLogs">
<td ng-bind="log.clearing_time|limitTo:10"></td>
<td>
{{log.clearing_time|limitTo:10}}
&nbsp;<span ng-if="$index==0&&padding" class="text-red">
<i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i>
</span>
</td>
<td ng-bind="log.total"></td>
<td ng-bind="log.income"></td>
<td ng-bind="log.fee"></td>

@ -148,6 +148,16 @@
</select>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-xs-4 col-sm-4" for="sub-merchant-search">
Suburb</label>
<div class="col-xs-6">
<input type="text" class="form-control" id="suburb-search"
ng-enter="loadPartners(1)"
ng-model="params.suburb">
</div>
</div>
<!--Organization-->
<div class="form-group col-sm-6" ng-if="orgs">
<label class="control-label col-xs-4 col-sm-4" for="bd-select">Organization</label>

@ -86,6 +86,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$http.get('/client/trans_flow/settlement/log', {params: params}).then(function (resp) {
$scope.settlementLogs = resp.data.data;
$scope.pagination = resp.data.pagination;
$scope.padding = resp.data.padding;
$scope.analysis = resp.data.analysis;
});
};

@ -6,122 +6,172 @@
<div class="box-body">
<ul class="nav nav-pills">
<li ng-class="{active:ctrl.channel==null}">
<a role="button" ng-click="ctrl.channel=null" title="All">
<a role="button" ng-click="ctrl.channel=null;channelAndDayOfAnalysis()" title="All">
<img src="/static/images/royalpay_sign.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Wechat'}" ng-if="report.channels.Wechat">
<a role="button" ng-click="ctrl.channel='Wechat'" title="Wechat">
<a role="button" ng-click="ctrl.channel='Wechat';channelAndDayOfAnalysis()" title="Wechat">
<img src="/static/images/wechatpay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Alipay'}" ng-if="report.channels.Alipay">
<a role="button" ng-click="ctrl.channel='Alipay'" title="Alipay">
<a role="button" ng-click="ctrl.channel='Alipay';channelAndDayOfAnalysis()" title="Alipay">
<img src="/static/images/alipay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='AlipayOnline'}" ng-if="report.channels.AlipayOnline">
<a role="button" ng-click="ctrl.channel='AlipayOnline'" title="AlipayOnline">
<a role="button" ng-click="ctrl.channel='AlipayOnline';channelAndDayOfAnalysis()" title="AlipayOnline">
<img src="/static/images/alipay_online.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Bestpay'}" ng-if="report.channels.Bestpay">
<a role="button" ng-click="ctrl.channel='Bestpay'" title="Bestpay">
<a role="button" ng-click="ctrl.channel='Bestpay';channelAndDayOfAnalysis()" title="Bestpay">
<img src="/static/images/bestpay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='jd'}" ng-if="report.channels.jd">
<a role="button" ng-click="ctrl.channel='jd'" title="JD Pay">
<a role="button" ng-click="ctrl.channel='jd';channelAndDayOfAnalysis()" title="JD Pay">
<img src="/static/images/jd_sign_lg.png">
</a>
</li>
</ul>
</div>
</div>
<div class="box box-warning" ng-if="ctrl.channel==null">
<div class="box-header">Analysis</div>
<div class="box-body">
<div class="row">
<!--<div class="col-xs-6 col-sm-3">-->
<!--<span class="col-xs-6 text-bold">Rate</span>-->
<!--<span class="col-xs-6" ng-bind="report.rate+'%'"></span>-->
<!--</div>-->
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span class="col-xs-6" ng-bind="report.total_payment|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span class="col-xs-6" ng-bind="report.total_refund|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span class="col-xs-6" ng-bind="report.gross_amount|currency:''"></span>
</div>
<div class="box box-warning">
<uib-tabset active="index">
<uib-tab index="0" heading="Analysis" ng-click="ctrl.day=null">
<div class="box-body">
<div class="row">
<!--<div class="col-xs-6 col-sm-3">-->
<!--<span class="col-xs-6 text-bold">Rate</span>-->
<!--<span class="col-xs-6" ng-bind="report.rate+'%'"></span>-->
<!--</div>-->
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.total_payment|currency:''"></span>
<span ng-if="ctrl.channel!=null"class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_credit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.total_refund|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_debit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.gross_amount|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].gross_amount|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span class="col-xs-6" ng-bind="report.total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span class="col-xs-6" ng-bind="report.wechat_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span class="col-xs-6" ng-bind="report.royalpay_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span class="col-xs-6" ng-bind="report.clearing_amount|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Tax Amount</span>
<span class="col-xs-6" ng-bind="report.tax_amount|currency:''"></span>
</div>
</div>
</div>
</div>
<div class="box box-warning" ng-if="ctrl.channel!=null">
<div class="box-header">Analysis</div>
<div class="box-body">
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_credit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_debit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].gross_amount|currency:''"></span>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.total_charge|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.wechat_charge|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].third_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.royalpay_charge|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].royalpay_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.clearing_amount|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6"
ng-bind="report.channels[ctrl.channel].gross_amount-report.channels[ctrl.channel].total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!ctrl.channel">
<span class="col-xs-6 text-bold">Tax Amount</span>
<span class="col-xs-6" ng-bind="report.tax_amount|currency:''"></span>
</div>
</div>
</div>
</uib-tab>
<!-- <uib-tab heading="Analysis" ng-if="ctrl.channel!=null" ng-click="ctrl.day=''">
<div class="box-body">
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_credit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_debit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].gross_amount|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].third_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].royalpay_charge|currency:''"></span>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].third_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span class="col-xs-6" ng-bind="report.channels[ctrl.channel].royalpay_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span class="col-xs-6"
ng-bind="report.channels[ctrl.channel].gross_amount-report.channels[ctrl.channel].total_charge|currency:''"></span>
</div>
</div>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span class="col-xs-6"
ng-bind="report.channels[ctrl.channel].gross_amount-report.channels[ctrl.channel].total_charge|currency:''"></span>
</uib-tab>-->
<uib-tab ng-repeat="(key,analysis) in channelAndDayMap" heading="{{key}}" ng-click="ctrl.day=key">
<div class="box-body" >
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span class="col-xs-6" ng-bind="analysis.total_credit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span class="col-xs-6" ng-bind="analysis.total_debit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span class="col-xs-6" ng-bind="analysis.gross_amount|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span class="col-xs-6" ng-bind="analysis.total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span class="col-xs-6" ng-bind="analysis.wechat_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span class="col-xs-6" ng-bind="analysis.royalpay_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span class="col-xs-6" ng-bind="analysis.net_amount|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!ctrl.channel">
<span class="col-xs-6 text-bold">Tax Amount</span>
<span class="col-xs-6" ng-bind="analysis.tax_amount|currency:''"></span>
</div>
</div>
</div>
</div>
</div>
</uib-tab>
</uib-tabset>
</div>
<div class="box box-default">
<div class="box-header">Credits</div>
@ -144,7 +194,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in report.report|propsFilter:{transaction_type:'Credit',channel:ctrl.channel}:true">
<tr ng-repeat="tr in report.report|propsFilter:{transaction_type:'Credit',channel:ctrl.channel,transaction_time:ctrl.day}:true">
<td>
<img class="channel-icon" ng-src="{{tr.channel|channel_image}}">{{tr.order_id}}
</td>
@ -180,7 +230,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in report.report|propsFilter:{transaction_type:'Debit',channel:ctrl.channel}:true">
<tr ng-repeat="tr in report.report|propsFilter:{transaction_type:'Debit',channel:ctrl.channel,transaction_time:ctrl.day}:true">
<td ng-bind="tr.order_id"></td>
<td ng-bind="tr.transaction_time"></td>
<td ng-bind="tr.transaction_currency"></td>

@ -120,7 +120,10 @@
</thead>
<tbody>
<tr ng-repeat="log in settlementLogs">
<td ng-bind="log.clearing_time|limitTo:10"></td>
<td>
{{log.clearing_time|limitTo:10}}
&nbsp;<span ng-if="$index==0&&padding" class="text-red"><i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i></span>
</td>
<td ng-bind="log.total"></td>
<td ng-bind="log.income"></td>
<td ng-bind="log.fee"></td>

@ -10,6 +10,7 @@ import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
@ -55,7 +56,7 @@ public class CustomerImpressionImplTest {
// }
// }
@Test
@Ignore
public void excel() {
try {

@ -0,0 +1,25 @@
package au.com.royalpay.payment.manage.task;
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
@SpringBootTest
@ActiveProfiles({ "local", "alipay", "wechat", "jd", "bestpay" })
@RunWith(SpringRunner.class)
public class PostponeClientTaskTest {
@Resource
private ClientRateMapper clientRateMapper;
@Resource
private PostponeClientTask postponeClientTask;
@Test
public void checkGreenChannel() {
postponeClientTask.checkGreenChannel();
}
}
Loading…
Cancel
Save