Merge remote-tracking branch 'origin/master'

master
yuan 7 years ago
commit 1a8a4ab94b

@ -105,6 +105,9 @@ ALTER TABLE `commodities`
ALTER TABLE `sys_accounts` ALTER TABLE `sys_accounts`
MODIFY COLUMN `creator` varchar(50) NOT NULL COMMENT '开户者'; MODIFY COLUMN `creator` varchar(50) NOT NULL COMMENT '开户者';
ALTER TABLE `sys_clients_audit_process`
MODIFY COLUMN `operator_id` varchar(50) NOT NULL ;

@ -318,11 +318,12 @@ public class SignInController {
public void verifyQRCode(@PathVariable String codeId, @RequestHeader("User-Agent") String ua, HttpServletResponse response) throws IOException { public void verifyQRCode(@PathVariable String codeId, @RequestHeader("User-Agent") String ua, HttpServletResponse response) throws IOException {
if (ua.toLowerCase().contains("micromessenger")) { if (ua.toLowerCase().contains("micromessenger")) {
response.sendRedirect("/global/userstatus/partner_signin_qrcode/" + codeId); response.sendRedirect("/global/userstatus/partner_signin_qrcode/" + codeId);
return;
} }
if (ua.toLowerCase().contains("royalpayclient")) { if (ua.toLowerCase().contains("royalpayclient")) {
response.sendRedirect("/api/v1.0/retail/app/partner_signin_app_qrcode/" + codeId); response.sendRedirect("/api/v1.0/retail/app/partner_signin_app_qrcode/" + codeId);
return;
} }
System.err.println("The Wrong Browser's UA is :" + ua);
throw new ForbiddenException("error.not_support_browser"); throw new ForbiddenException("error.not_support_browser");
} }
} }

@ -31,6 +31,8 @@ public class RedPackTaskManager {
@Scheduled(cron = "0 0/10 * * * ?") @Scheduled(cron = "0 0/10 * * * ?")
public void updateAlipayRedPackStatus() { public void updateAlipayRedPackStatus() {
logger.info("kira---------redpack Check");
redpackService.updateAlipayRedPacketsStatus("3"); redpackService.updateAlipayRedPacketsStatus("3");
} }

@ -1,75 +1,6 @@
/** /**
* Created by yixian on 2017-05-08 * Created by yixian on 2017-05-08
*/ */
function CashCoupon(id, minPay, cash, title, autoUse, group) {
this.getGroup = function () {
return group;
};
this.handleDiscount = function (price, originPrice, discounts, useCoupons) {
if (autoUse || useCoupons.indexOf(id) >= 0) {
var rate = 1;
if (window.currency == 'CNY') {
rate = parseFloat(window.exchange_rate);
}
var comparePrice = Decimal.mul(originPrice, rate).toFixed(2, Decimal.ROUND_FLOOR);
if (new Decimal(comparePrice).gte(Decimal.mul(minPay, rate).toFixed(2, Decimal.ROUND_FLOOR))) {
var nPrice = Decimal.sub(price, Decimal.mul(cash, rate).toFixed(2, Decimal.ROUND_FLOOR)).toFixed(2, Decimal.ROUND_FLOOR);
discounts.push({title: '满减', amount: Decimal.sub(price, nPrice).toFixed(2, Decimal.ROUND_FLOOR)});
return nPrice;
}
}
return new Decimal(price).toFixed(2, Decimal.ROUND_FLOOR);
}
}
function DiscountCoupon(id, minPay, percentage, title, autoUse, group) {
this.getGroup = function () {
return group;
};
this.handleDiscount = function (price, originPrice, discounts, useCoupons) {
if (autoUse || useCoupons.indexOf(id) >= 0) {
var rate = 1;
if (window.currency == 'CNY') {
rate = parseFloat(window.exchange_rate);
}
var comparePrice = Decimal.mul(originPrice, rate).toFixed(2, Decimal.ROUND_FLOOR);
if (new Decimal(comparePrice).gte(new Decimal(minPay))) {
var nPrice = Decimal.mul(price, percentage).mul(0.01).toFixed(2, Decimal.ROUND_FLOOR);
discounts.push({title: '折扣', amount: Decimal.sub(price, nPrice).toFixed(2, Decimal.ROUND_FLOOR)});
return nPrice;
}
}
return new Decimal(price).toFixed(2, Decimal.ROUND_FLOOR);
}
}
function BalanceCoupon(id, minPay, balance, title, autoUse, group) {
this.getGroup = function () {
return group;
};
this.handleDiscount = function (price, originPrice, discounts, useCoupons) {
if (autoUse || useCoupons.indexOf(id) >= 0) {
var rate = 1;
if (window.currency == 'CNY') {
rate = parseFloat(window.exchange_rate);
}
var comparePrice = Decimal.mul(originPrice, rate).toFixed(2, Decimal.ROUND_FLOOR);
if (new Decimal(comparePrice).gte(new Decimal(minPay))) {
var result = Decimal.sub(price, Decimal.mul(balance, rate));
var nPrice = Decimal.max(result, 0).toFixed(2, Decimal.ROUND_FLOOR);
var discountAmount = Decimal.sub(price, nPrice).toFixed(2, Decimal.ROUND_FLOOR);
if (discountAmount > 0) {
discounts.push({title: '抵扣', amount: discountAmount});
}
return nPrice;
}
}
return new Decimal(price).toFixed(2, Decimal.ROUND_FLOOR);
}
}
window.coupons = [];
$(function () { $(function () {
'use strict'; 'use strict';
var dataCache = {price: '0', coupons: [], coupon_groups: {}}; var dataCache = {price: '0', coupons: [], coupon_groups: {}};
@ -227,7 +158,7 @@ $(function () {
return; return;
} }
dataCache.paying = true; dataCache.paying = true;
var data = {amount: dataCache.price + '', original_number: true, currency: window.currency,device_id: window.cashier_phone}; var data = {price: dataCache.price + '', original_number: true, currency: window.currency,device_id: window.cashier_phone};
if (dataCache.remark) { if (dataCache.remark) {
data.description = dataCache.remark; data.description = dataCache.remark;
}else { }else {

Loading…
Cancel
Save