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

master
yuan 7 years ago
commit 57ebbea75b

@ -185,3 +185,25 @@ CREATE TABLE `financial_agent_commission_detail` (
alter table financial_partner_commission add column commission_type smallint(1) DEFAULT 1 COMMENT '提成类型 1:渠道计算法 2:总交易额比例 3:收益比例';
alter table financial_partner_commission_detail add column commission_type smallint(1) DEFAULT 1 COMMENT '提成类型 1:渠道计算法 2:总交易额比例 3:收益比例';
INSERT INTO `royalpay_production`.`sys_configs`(`config_key` , `config_value`)
VALUES
(
'android_version_content' ,
'近期更新:\n\n1、修复了付款二维码的保存可能会失败的错误\n2、新增多种渠道订单及清算\n3、修复清算记录显示错误'
);
INSERT INTO `royalpay_production`.`sys_configs`(`config_key` , `config_value`)
VALUES
(
'android_version' ,
'2.8.1'
);
INSERT INTO `royalpay_production`.`sys_configs`(`config_key` , `config_value`)
VALUES
(
'android_update' ,
'true'
);

@ -777,6 +777,7 @@ public class RetailAppServiceImp implements RetailAppService {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
JSONObject res = noticeManage.getNoticeById(noticeId);
res.remove("status");
Document doc = Jsoup.parse(res.getString("content"));
String father = "<div style=\"padding:0 10px\"></div>";
String html = doc.body().children().wrap(father).html();
@ -953,9 +954,9 @@ public class RetailAppServiceImp implements RetailAppService {
String version = device.getString("version");
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
String newAppVersion = PlatformEnvironment.getEnv().getNewVersion();
Boolean isUpdate = PlatformEnvironment.getEnv().isAppUpdate();
String updateContent = PlatformEnvironment.getEnv().getAppUpdateContent();
String newAppVersion = PlatformEnvironment.getEnv().getNewVersion(clientType);
Boolean isUpdate = PlatformEnvironment.getEnv().isAppUpdate(clientType);
String updateContent = PlatformEnvironment.getEnv().getAppUpdateContent(clientType);
int update_type = 0;// 0:不更新 1更新 2强制更新
if (newAppVersion.compareToIgnoreCase(version) > 0) {
update_type = 1;

@ -6,6 +6,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
@ -32,4 +33,6 @@ public interface CashbackService {
JSONObject analysisCashback(JSONObject params);
void drawDeposits(BigDecimal drawAmount, int clientId, JSONObject operator);
void saveSurchargeDiscountCashback(int clientId, String clientMoniker, String transactionOrderId, BigDecimal cashbackAmount, Date date, String remark);
}

@ -1,11 +1,14 @@
package au.com.royalpay.payment.manage.cashback.core.impl;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import au.com.royalpay.payment.core.PmtCashbackService;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
@ -111,7 +114,25 @@ public class CashbackServiceImp implements CashbackService {
@Override
public void drawDeposits(BigDecimal drawAmount, int clientId, JSONObject operator) {
pmtCashbackService.drawDeposits(drawAmount,clientId,operator);
pmtCashbackService.drawDeposits(drawAmount, clientId, operator);
}
@Override
public void saveSurchargeDiscountCashback(int clientId, String clientMoniker, String transactionOrderId, BigDecimal cashbackAmount, Date date, String remark) {
if (!cashbackRecordsMapper.findBySurchargeDiscountLog(clientId, date).isEmpty()) {
return;
}
String cashback_id = 'R' + clientMoniker + "-" + DateFormatUtils.format(date, "yyyyMMddHHmmssSSS") + "-" + RandomStringUtils.random(3, true, false).toUpperCase();
//营销账户
JSONObject cashback = new JSONObject();
cashback.put("cashback_id", cashback_id);
cashback.put("client_id", clientId);
cashback.put("cashback_amount", cashbackAmount);
cashback.put("order_id", transactionOrderId);
cashback.put("cashback_type", 2);
cashback.put("remark", remark);
cashback.put("create_time", date);
cashbackRecordsMapper.save(cashback);
}
}

@ -3,7 +3,9 @@ package au.com.royalpay.payment.manage.management.clearing.core;
import au.com.royalpay.payment.manage.management.clearing.beans.SettleDelayConfig;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
/**
@ -20,4 +22,6 @@ public interface SettleDelayConfigurer {
PageList<JSONObject> getClientRank(JSONObject params);
@Transactional
void addCashback(Date date);
}

@ -1,39 +1,41 @@
package au.com.royalpay.payment.manage.management.clearing.core.impl;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
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 au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
import au.com.royalpay.payment.manage.cashback.core.CashbackService;
import au.com.royalpay.payment.manage.management.clearing.beans.SettleDelayConfig;
import au.com.royalpay.payment.manage.management.clearing.core.SettleDelayConfigurer;
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.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientSettleDelayConfMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.lock.Locker;
import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils;
import au.com.royalpay.payment.tools.utils.PageListUtils;
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.apache.commons.lang3.time.DateUtils;
import org.joda.time.DateTime;
import org.joda.time.DateTimeConstants;
import org.joda.time.LocalDate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Create by yixian at 2017-09-08 15:06
@ -50,6 +52,12 @@ public class SettleDelayConfigurerImpl implements SettleDelayConfigurer {
private TransactionMapper transactionMapper;
@Resource
private ClearingLogMapper clearingLogMapper;
@Resource
private ClearingDetailMapper clearingDetailMapper;
@Resource
private Locker locker;
@Resource
private RetailAppService retailAppService;
private Logger logger = LoggerFactory.getLogger(getClass());
@Override
@ -147,9 +155,9 @@ public class SettleDelayConfigurerImpl implements SettleDelayConfigurer {
DateTime dt = new DateTime(jsonObject.getDate("create_time"));
int weekOfYear = dt.getWeekOfWeekyear();
JSONObject cashBackMapElement = cashBackMap.get(weekOfYear);
if(cashBackMapElement!=null){
cashBackMapElement.put("cashback_amount",cashBackMapElement.getBigDecimal("cashback_amount").add(jsonObject.getBigDecimal("cashback_amount")));
}else {
if (cashBackMapElement != null) {
cashBackMapElement.put("cashback_amount", cashBackMapElement.getBigDecimal("cashback_amount").add(jsonObject.getBigDecimal("cashback_amount")));
} else {
cashBackMap.put(weekOfYear, jsonObject);
}
}
@ -159,7 +167,7 @@ public class SettleDelayConfigurerImpl implements SettleDelayConfigurer {
JSONObject sunday = weekendAnalysisMap.get(resultEntry.getInteger("weekend") + 1);
Date saturday = null;
try {
saturday = sf.parse(String.valueOf(resultEntry.getInteger("weekend")));
saturday = sf.parse(String.valueOf(resultEntry.getInteger("weekend")));
} catch (ParseException e) {
logger.info("获取延迟清算金额时 日期转换错误");
}
@ -167,11 +175,11 @@ public class SettleDelayConfigurerImpl implements SettleDelayConfigurer {
if (resultEntry.getBigDecimal("settle_amount") == null) {
continue;
}
resultEntry.put("weekend",resultEntry.getIntValue("weekend")+2);
resultEntry.put("weekend", resultEntry.getIntValue("weekend") + 2);
resultEntry.put("settle_amount", resultEntry.getBigDecimal("settle_amount").add(sunday.getBigDecimal("settle_amount")));
resultEntry.put("transaction_amount", resultEntry.getBigDecimal("transaction_amount").add(sunday.getBigDecimal("transaction_amount")));
if (cashBackMap.containsKey(new DateTime(saturday).getWeekOfWeekyear()+1)) {
resultEntry.put("cashback", cashBackMap.get(new DateTime(saturday).getWeekOfWeekyear()+1).getBigDecimal("cashback_amount"));
if (cashBackMap.containsKey(new DateTime(saturday).getWeekOfWeekyear() + 1)) {
resultEntry.put("cashback", cashBackMap.get(new DateTime(saturday).getWeekOfWeekyear() + 1).getBigDecimal("cashback_amount"));
} else {
resultEntry.put("cashback", 0);
}
@ -190,4 +198,75 @@ public class SettleDelayConfigurerImpl implements SettleDelayConfigurer {
public PageList<JSONObject> getClientRank(JSONObject params) {
return cashbackService.getSettleDelayRank(params, new PageBounds(params.getIntValue("page"), params.getIntValue("limit")));
}
@Override
@Transactional
public void addCashback(Date date) {
String key = "settle_delay_cashback";
if (!locker.lock(key, 600_000)) {
return;
}
try {
date = DateUtils.truncate(date, Calendar.DATE);
LocalDate processDate = LocalDate.fromDateFields(date);
if (processDate.getDayOfWeek() != DateTimeConstants.TUESDAY) {
throw new BadRequestException("Not tuesday");
}
LocalDate sunday = processDate.minusDays(processDate.getDayOfWeek());
LocalDate saturday = sunday.minusDays(1);
List<JSONObject> clientAttends = clientSettleDelayConfMapper.listClients(new JSONObject(), new PageBounds());
for (JSONObject attend : clientAttends) {
Date monday = DateUtils.addDays(date, -1);
if (attend.getDate("from_date").after(monday) || attend.getDate("to_date").before(monday)) {
continue;
}
int clientId = attend.getIntValue("client_id");
JSONObject client = clientManager.getClientInfo(clientId);
if (client == null) {
continue;
}
String clientMoniker = client.getString("client_moniker");
JSONObject clearing = clearingDetailMapper.listReport(date, clientId);
if (clearing == null) {
continue;
}
int detailId = clearing.getIntValue("clear_detail_id");
List<JSONObject> settleTrans = transactionMapper.listSettlementTransactions(detailId);
Assert.notEmpty(settleTrans, "No Settle History");
String transactionOrderId = settleTrans.get(0).getString("order_id");
List<JSONObject> transactions = transactionMapper.listTransactionsOfClearingOrder(detailId, new PageBounds());
BigDecimal totalSurcharge = BigDecimal.ZERO;
for (JSONObject transaction : transactions) {
Date day = transaction.getDate("transaction_time");
LocalDate transactionDate = LocalDate.fromDateFields(day);
if (transactionDate.equals(sunday) || transactionDate.equals(saturday)) {
continue;
}
BigDecimal surcharge = transaction.getBigDecimal("clearing_amount").subtract(transaction.getBigDecimal("settle_amount"));
if ("Debit".equals(transaction.getString("transaction_type"))) {
surcharge = surcharge.multiply(BigDecimal.valueOf(-1));
}
totalSurcharge = totalSurcharge.add(surcharge);
}
BigDecimal cashbackAmount = CurrencyAmountUtils.scale(totalSurcharge.multiply(attend.getBigDecimal("surcharge_discount")).divide(CommonConsts.HUNDRED, 2, BigDecimal.ROUND_HALF_UP), PlatformEnvironment.getEnv().getForeignCurrency());
String remark = "Surcharge cashback for " + saturday.toString("dd/MMM/yyyy", Locale.ENGLISH) + " ~ " + sunday.toString("dd/MMM/yyyy", Locale.ENGLISH);
if (cashbackAmount.compareTo(BigDecimal.ZERO) > 0) {
cashbackService.saveSurchargeDiscountCashback(clientId, clientMoniker, transactionOrderId, cashbackAmount, date, remark);
try {
if (!PlatformEnvironment.getEnv().isDebug()) {
JSONObject order = new JSONObject();
order.put("order_id", transactionOrderId);
order.put("client_id", clientId);
retailAppService.sendCashbackMessage(cashbackAmount.toPlainString(), order);// app message
}
} catch (Exception e) {
logger.error("发送App消息失败", e);
}
}
}
} finally {
locker.unlock(key);
}
}
}

@ -0,0 +1,26 @@
package au.com.royalpay.payment.manage.management.clearing.handlers;
import au.com.royalpay.payment.core.events.SettleNotifySendingEvent;
import au.com.royalpay.payment.manage.management.clearing.core.SettleDelayConfigurer;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Calendar;
import java.util.Date;
/**
* Create by yixian at 2017-12-25 13:48
*/
@Service
public class SendWeekendDelayCashbackSaver implements ApplicationListener<SettleNotifySendingEvent> {
@Resource
private SettleDelayConfigurer settleDelayConfigurer;
@Override
public void onApplicationEvent(SettleNotifySendingEvent event) {
Date eventTime = new Date(event.getEventTime());
settleDelayConfigurer.addCashback(DateUtils.truncate(eventTime, Calendar.DATE));
}
}

@ -4,12 +4,19 @@ import au.com.royalpay.payment.manage.management.sysconfig.core.ClearDateManager
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import javax.annotation.Resource;
/**
* Created by yixian on 2017-01-06.
*/
@ -40,4 +47,9 @@ public class SysConfigController {
public void updateMonthClearDays(@PathVariable String monthPattern, @RequestBody List<String> days) {
clearDateManager.setMonthClearDays(monthPattern, days);
}
public static void main(String[] args) {
System.out.println("asd".equals(null));
}
}

@ -96,6 +96,3 @@ app.foreign-currency=AUD
app.ofei.md5-key=Khjx6wejblaJzmG0JBWFlPFKAUxhFIXQ
app.ofei.pwd=aomi@8888
app.ofei.sp-code=A1407200
android.message.secret=2b96d9bc6169c9554218aab1
android.message.appkey=3f33a10d0a7d4ac94d8f2431

@ -92,7 +92,7 @@
Service WeChat Account:<br>
<img src="https://mpay.royalpay.com.au/static/images/customer_service.jpg"
style="width: 60px"><br>
Level 2, 50 Bridge Street, Sydney NSW 2000<br>
Level 14, 383 Kent Street, Sydney NSW 2000<br>
<br>
Level 11, 15 William Street, Melbourne VIC 3000
</p>

@ -13,7 +13,7 @@
<p style="margin: initial;">Representative of AFS Licensee 448066</p>
<p style="margin: initial;">------------------------------</p>
<p style="margin: initial;">Lv.11,15 William Street Melbourne 3000 </p>
<p style="margin: initial;">Lv.7, 50 Bridge Street, Sydney, NSW 2000 </p>
<p style="margin: initial;">Lv.14, 383 Kent Street, Sydney, NSW 2000 </p>
<p style="margin: initial;">P: 1300 1077 50</p>
<p style="margin: initial;">E: settlement@royalpay.com.au</p>
<p style="margin: initial;">www.royalpay.com.au</p>

@ -151,8 +151,6 @@
<div class="weui-cell__ft weui-flex__item"
th:text="${thisweekData.order_count}"></div>
</div>
#end
</div>
</div>
</div>
@ -167,12 +165,12 @@
<div class="weui-cell__ft">
<span style="color: green"
th:if="${report.transaction_report.sydney.thisweek.compare.direction>0}"
th:text="'↑'+${$report.transaction_report.sydney.thisweek.compare.value}"></span>
th:text="'↑'+${report.transaction_report.sydney.thisweek.compare.value}"></span>
<span style="color: red"
th:if="${report.transaction_report.sydney.thisweek.compare.direction<0}"
th:text="'↓'+${$report.transaction_report.sydney.thisweek.compare.value}"></span>
th:text="'↓'+${report.transaction_report.sydney.thisweek.compare.value}"></span>
<span th:if="${report.transaction_report.sydney.thisweek.compare.direction==0}"
th:text="${$report.transaction_report.sydney.thisweek.compare.value}"></span>
th:text="${report.transaction_report.sydney.thisweek.compare.value}"></span>
</div>
</div>
</div>
@ -226,51 +224,6 @@
</div>
</div>
<div class="weui-panel">
<div class="weui-panel__hd">新增商户情况(Melbourne)</div>
<div class="weui-panel__bd">
<div class="weui-media-box weui-media-box_small-appmsg">
<div class="weui-cells">
<div class="weui-cell"
th:each="dt : ${report.new_client_report.melbourne.daily.data}">
<div class="weui-cell__bd weui-cell_primary"
th:text="${dt.datelist}"></div>
<div class="weui-cell__ft" th:text="${dt.num}"></div>
</div>
</div>
</div>
</div>
<div class="weui-panel__ft">
<div class="weui-cell">
<div class="weui-cell__bd weui-cell_primary">新增总数</div>
<div class="weui-cell__ft"
th:text="${report.new_client_report.melbourne.daily.total}"></div>
</div>
</div>
</div>
<div class="weui-panel">
<div class="weui-panel__hd">新增商户情况(Sydney)</div>
<div class="weui-panel__bd">
<div class="weui-media-box weui-media-box_small-appmsg">
<div class="weui-cells">
<div class="weui-cell"
th:each="dt : ${report.new_client_report.sydney.daily.data}">
<div class="weui-cell__bd weui-cell_primary"
th:text="${dt.datelist}"></div>
<div class="weui-cell__ft" th:text="${dt.num}"></div>
</div>
</div>
</div>
</div>
<div class="weui-panel__ft">
<div class="weui-cell">
<div class="weui-cell__bd weui-cell_primary">新增总数</div>
<div class="weui-cell__ft"
th:text="${report.new_client_report.sydney.daily.total}"></div>
</div>
</div>
</div>
<div class="weui-panel">
<div class="weui-panel__hd">商家自主申请情况</div>
<div class="weui-panel__bd">

@ -564,8 +564,8 @@
<div class="col-md-4 footer-item">
CONTACT US
<hr>
Level 2<br>
50 Bridge Street<br>
Level 14<br>
383 Kent Street<br>
Sydney NSW 2000<br>
<br>
Level 11<br>

@ -123,8 +123,8 @@
<div class="col-md-4 footer-item">
CONTACT US
<hr>
Level 2<br>
50 Bridge Street<br>
Level 14<br>
383 Kent Street<br>
Sydney NSW 2000<br>
<br>
Level 11<br>

@ -1084,8 +1084,8 @@
<div class="col-md-4 footer-item">
CONTACT US
<hr>
Level 2<br>
50 Bridge Street<br>
Level 14<br>
383 Kent Street<br>
Sydney NSW 2000<br>
<br>
Level 11<br>

@ -13,8 +13,11 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
$httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache';
$httpProvider.defaults.headers.get['Pragma'] = 'no-cache';
}]);
app.controller('managerIndexCtrl', ['$scope', '$rootScope', '$http', '$log', '$timeout', '$interval', '$uibModal','$filter', 'myLoginLogView', 'commonDialog',
function ($scope, $rootScope, $http, $log, $timeout, $interval, $uibModal,$filter, myLoginLogView, commonDialog) {
app.controller('managerIndexCtrl', ['$scope', '$rootScope', '$http', '$log', '$timeout', '$interval', '$uibModal', '$filter', 'myLoginLogView', 'commonDialog',
function ($scope, $rootScope, $http, $log, $timeout, $interval, $uibModal, $filter, myLoginLogView, commonDialog) {
$http.get('/sysconfig/base').then(function (resp) {
$rootScope.sysParams = resp.data;
});
var stompClient = null;
$scope.loadCurrentUser = function () {
$http.get('/global/userstatus/current_manager').then(function (resp) {
@ -31,9 +34,9 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
// $scope.loadPartnerApplyNotice();
// }
if ($rootScope.currentUser.wx_openid == null) {
if($filter('withRole')('100')){
if ($filter('withRole')('100')) {
$scope.managerBindWechat('static');
}else {
} else {
$scope.managerBindWechat(true);
}
@ -103,7 +106,7 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
$scope.hideSideBar = !$scope.hideSideBar;
};
$scope.showQrCode = function (data,backdrop) {
$scope.showQrCode = function (data, backdrop) {
return $uibModal.open({
template: '<div style="width: 100%;padding: 10px;">请使用微信扫描<br><div style="width:100%" qrcode="url"></div><p class="text-center"><img class="img-circle img-bordered" style="width: 45px" ng-show="{{wx_headimg}}" ng-src="{{wx_headimg}}">{{wx_nickname}}</p></div>',
controller: ['$scope', 'data', function ($scope, data) {
@ -117,8 +120,8 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
return data;
}
},
keyboard:false,
backdrop:backdrop
keyboard: false,
backdrop: backdrop
})
};
@ -166,10 +169,10 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
$scope.managerBindWechat = function (backdrop) {
$http.post('/system/manager_wechat_binds').then(function (resp) {
$scope.checkCode = resp.data.bind_id;
if(resp.data.wx_nickname){
if (resp.data.wx_nickname) {
backdrop = true;
}
$scope.checkModal = $scope.showQrCode(resp.data,backdrop);
$scope.checkModal = $scope.showQrCode(resp.data, backdrop);
// $scope.showQrCode(resp.data.url);
})
}

@ -45,6 +45,7 @@ define(['angular', 'uiRouter'], function (angular) {
$scope.sysconfig = resp.data;
$scope.sysconfig.refund_audit = resp.data.refund_audit=='true';
$scope.sysconfig.app_update = resp.data.app_update=='true';
$scope.sysconfig.android_update = resp.data.android_update=='true';
})
};
$scope.loadSysConfigs();

@ -90,6 +90,29 @@
<textarea id="app_version_content" placeholder="更新内容" class="form-control" ng-model="sysconfig.app_version_content"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="android_version">Android Version</label>
<div class="col-sm-4">
<input id="android_version" class="form-control" ng-model="sysconfig.android_version">
</div>
<div class="col-sm-3">
<div class="checkbox-inline check-box">
<label>
<input id="android_update" type="checkbox" ng-model="sysconfig.android_update">
强制更新
</label>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="android_version_content"></label>
<div class="col-sm-7">
<textarea id="android_version_content" placeholder="更新内容" class="form-control" ng-model="sysconfig.android_version_content"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="clearing_day_id">Max Customer Surcharge Rate</label>
<div class="col-sm-7">

@ -23,7 +23,7 @@ import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
* Created by wangning on 05/01/2018.
*/
@SpringBootTest
@ActiveProfiles({"local","alipay","wechat","jd","bestpay"})
@ActiveProfiles({"production","alipay","wechat","jd","bestpay"})
@RunWith(SpringRunner.class)
public class CustomerImpressionImplTest {
@Resource

@ -0,0 +1,60 @@
package au.com.royalpay.payment.manage.management.clearing.core;
import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
import au.com.royalpay.payment.manage.cashback.core.CashbackService;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientSettleDelayConfMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.joda.time.DateTime;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.test.annotation.Commit;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.*;
/**
* Create by yixian at 2018-01-15 16:03
*/
@ActiveProfiles("proxy")
@TestPropertySource(properties = "app.debug=false")
@Commit
public class SettleDelayCashbackForNewYearDay {
@Resource
private ClientManager clientManager;
@Resource
private TransactionMapper transactionMapper;
@Resource
private CashbackService cashbackService;
@Resource
private RetailAppService retailAppService;
@Resource
private ClientSettleDelayConfMapper clientSettleDelayConfMapper;
private Logger logger = LoggerFactory.getLogger(getClass());
@Test
@Transactional
public void addCashback() throws ParseException {
}
private void processCashback(Date date, List<JSONObject> cashbackNotices, String clientMoniker, int clientId, List<JSONObject> transactions) {
}
}

@ -0,0 +1,33 @@
package au.com.royalpay.payment.manage.management.clearing.core;
import org.joda.time.DateTime;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.Commit;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
import static org.junit.Assert.*;
/**
* Create by yixian at 2018-01-15 15:59
*/
@SpringBootTest
@RunWith(SpringRunner.class)
@ActiveProfiles("proxy")
@TestPropertySource(properties = "app.debug=false")
@Commit
public class SettleDelayConfigurerTest {
@Resource
private SettleDelayConfigurer settleDelayConfigurer;
@Test
public void addCashback() {
settleDelayConfigurer.addCashback(DateTime.parse("2018-01-09").toDate());
}
}
Loading…
Cancel
Save