From ad33e29b3d6931172c15760e17260041818e021c Mon Sep 17 00:00:00 2001 From: yixian Date: Mon, 25 Dec 2017 20:39:38 +0800 Subject: [PATCH 1/3] cashier --- .../templates/cashier_aggregate_payment.js | 71 +------------------ 1 file changed, 1 insertion(+), 70 deletions(-) diff --git a/src/main/ui/static/templates/cashier_aggregate_payment.js b/src/main/ui/static/templates/cashier_aggregate_payment.js index 0b4a22d61..78c904f00 100644 --- a/src/main/ui/static/templates/cashier_aggregate_payment.js +++ b/src/main/ui/static/templates/cashier_aggregate_payment.js @@ -1,75 +1,6 @@ /** * 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 () { 'use strict'; var dataCache = {price: '0', coupons: [], coupon_groups: {}}; @@ -227,7 +158,7 @@ $(function () { return; } 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) { data.description = dataCache.remark; }else { From a68caef0fb10d7a9a04d9478c0b61bd442f32964 Mon Sep 17 00:00:00 2001 From: Tayl0r <519104047@qq.com> Date: Mon, 25 Dec 2017 20:57:14 +0800 Subject: [PATCH 2/3] merchant login from qrcode --- .../royalpay/payment/manage/signin/web/SignInController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/signin/web/SignInController.java b/src/main/java/au/com/royalpay/payment/manage/signin/web/SignInController.java index 59c92772c..4bab11773 100644 --- a/src/main/java/au/com/royalpay/payment/manage/signin/web/SignInController.java +++ b/src/main/java/au/com/royalpay/payment/manage/signin/web/SignInController.java @@ -318,11 +318,12 @@ public class SignInController { public void verifyQRCode(@PathVariable String codeId, @RequestHeader("User-Agent") String ua, HttpServletResponse response) throws IOException { if (ua.toLowerCase().contains("micromessenger")) { response.sendRedirect("/global/userstatus/partner_signin_qrcode/" + codeId); + return; } if (ua.toLowerCase().contains("royalpayclient")) { 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"); } } From 71d62c4a2035b365c4c41f3ab53668bf488406e3 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Mon, 25 Dec 2017 21:02:57 +0800 Subject: [PATCH 3/3] update --- src/db/modify.sql | 3 +++ .../com/royalpay/payment/manage/task/RedPackTaskManager.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/db/modify.sql b/src/db/modify.sql index cef6741b5..a6db278f9 100644 --- a/src/db/modify.sql +++ b/src/db/modify.sql @@ -105,6 +105,9 @@ ALTER TABLE `commodities` ALTER TABLE `sys_accounts` MODIFY COLUMN `creator` varchar(50) NOT NULL COMMENT '开户者'; +ALTER TABLE `sys_clients_audit_process` + MODIFY COLUMN `operator_id` varchar(50) NOT NULL ; + diff --git a/src/main/java/au/com/royalpay/payment/manage/task/RedPackTaskManager.java b/src/main/java/au/com/royalpay/payment/manage/task/RedPackTaskManager.java index 2d022a230..4731a0081 100644 --- a/src/main/java/au/com/royalpay/payment/manage/task/RedPackTaskManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/task/RedPackTaskManager.java @@ -31,6 +31,8 @@ public class RedPackTaskManager { @Scheduled(cron = "0 0/10 * * * ?") public void updateAlipayRedPackStatus() { + + logger.info("kira---------redpack Check"); redpackService.updateAlipayRedPacketsStatus("3"); }