From e430d7804da45341762fdd2d8fb7b8d872345b25 Mon Sep 17 00:00:00 2001 From: "taylor.dang" Date: Fri, 17 Aug 2018 16:54:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=20dashboard=E4=BB=8A=E6=97=A5=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../payment/manage/analysis/beans/AnalysisBean.java | 9 +++++++++ .../payment/manage/analysis/web/DashboardController.java | 2 +- src/main/ui/static/boot/application-boot.js | 3 ++- src/main/ui/static/boot/index-boot.js | 3 ++- src/main/ui/static/boot/manager-boot.js | 3 ++- src/main/ui/static/dashboard/dashboard.js | 5 +++-- src/main/ui/static/lib/timezone/jstz-1.0.4.min.js | 2 ++ 7 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 src/main/ui/static/lib/timezone/jstz-1.0.4.min.js diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java b/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java index 5b92ba4af..dc67aed73 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java @@ -36,6 +36,7 @@ public class AnalysisBean { private String amount_from; private String amount_to; private String bd_name; + private String timezone; public JSONObject toParams(String timezone) { JSONObject params = new JSONObject(); if (timezone != null) { @@ -229,4 +230,12 @@ public class AnalysisBean { public void setBd_name(String bd_name) { this.bd_name = bd_name; } + + public String getTimezone() { + return timezone; + } + + public void setTimezone(String timezone) { + this.timezone = timezone; + } } diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java b/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java index 0daf33a47..439a252e3 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java @@ -31,7 +31,7 @@ public class DashboardController { @ManagerMapping("/common_analysis_1") public JSONObject commonAnalysis1(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { - JSONObject params = analysis.toParams(null); + JSONObject params = analysis.toParams(analysis.getTimezone()); orgManager.checkOrg(manager,params); return dashboardService.getCommonAnalysis1(params); } diff --git a/src/main/ui/static/boot/application-boot.js b/src/main/ui/static/boot/application-boot.js index 0bf1756bb..1824b7f6b 100644 --- a/src/main/ui/static/boot/application-boot.js +++ b/src/main/ui/static/boot/application-boot.js @@ -28,7 +28,8 @@ require.config({ dragdrop: 'static/lib/angular-plugins/angular-drag-and-drop-lists.min', echarts: 'static/lib/echarts/echarts.common.min', angularEcharts: 'static/commons/angular-echarts', - decimal:'static/lib/decimal/decimal.min' + decimal:'static/lib/decimal/decimal.min', + jstz: 'static/lib/timezone/jstz-1.0.4.min' }, shim: { 'angular': {deps: ['jquery'], exports: 'angular'}, diff --git a/src/main/ui/static/boot/index-boot.js b/src/main/ui/static/boot/index-boot.js index ebd3a9b18..3e683268c 100644 --- a/src/main/ui/static/boot/index-boot.js +++ b/src/main/ui/static/boot/index-boot.js @@ -28,7 +28,8 @@ require.config({ dragdrop: 'static/lib/angular-plugins/angular-drag-and-drop-lists.min', echarts: 'static/lib/echarts/echarts.common.min', angularEcharts: 'static/commons/angular-echarts', - decimal:'static/lib/decimal/decimal.min' + decimal:'static/lib/decimal/decimal.min', + jstz: 'static/lib/timezone/jstz-1.0.4.min' }, shim: { 'angular': {deps: ['jquery','decimal'], exports: 'angular'}, diff --git a/src/main/ui/static/boot/manager-boot.js b/src/main/ui/static/boot/manager-boot.js index 287160881..007f0d428 100644 --- a/src/main/ui/static/boot/manager-boot.js +++ b/src/main/ui/static/boot/manager-boot.js @@ -30,7 +30,8 @@ require.config({ ueditor: 'static/lib/ueditor/ueditor.all.min', ueditorConfig: 'static/lib/ueditor/ueditor.config', angularEcharts: 'static/commons/angular-echarts', - decimal: 'static/lib/decimal/decimal.min' + decimal: 'static/lib/decimal/decimal.min', + jstz: 'static/lib/timezone/jstz-1.0.4.min' }, shim: { 'angular': {deps: ['jquery', 'decimal'], exports: 'angular'}, diff --git a/src/main/ui/static/dashboard/dashboard.js b/src/main/ui/static/dashboard/dashboard.js index f25e4239d..e67fa4e6b 100644 --- a/src/main/ui/static/dashboard/dashboard.js +++ b/src/main/ui/static/dashboard/dashboard.js @@ -2,7 +2,7 @@ * Created by davep on 2016-07-27. */ -define(['angular', 'uiRouter', 'uiBootstrap', 'angularEcharts'], function (angular) { +define(['angular', 'uiRouter', 'jstz', 'uiBootstrap', 'angularEcharts'], function (angular) { 'use strict'; var colors = ['#00c0ef', '#00a65a', '#ff851b', '#f39c12', '#d81b60', '#605ca8', '#dd4b39', '#008080', '#8B008B', '#D2691E', '#708090']; var app = angular.module('dashboardApp', ['ui.router', 'ui.bootstrap', 'ngEcharts']); @@ -25,7 +25,8 @@ define(['angular', 'uiRouter', 'uiBootstrap', 'angularEcharts'], function (angul params: function () { return { begin: $filter('date')(new Date(), 'yyyyMMdd'), - end: $filter('date')(new Date(), 'yyyyMMdd') + end: $filter('date')(new Date(), 'yyyyMMdd'), + timezone: jstz.determine().name() } } }, diff --git a/src/main/ui/static/lib/timezone/jstz-1.0.4.min.js b/src/main/ui/static/lib/timezone/jstz-1.0.4.min.js new file mode 100644 index 000000000..96e3dd8ae --- /dev/null +++ b/src/main/ui/static/lib/timezone/jstz-1.0.4.min.js @@ -0,0 +1,2 @@ +/*! jstz - v1.0.4 - 2012-12-12 */ +(function(e){var t=function(){"use strict";var e="s",n=function(e){var t=-e.getTimezoneOffset();return t!==null?t:0},r=function(e,t,n){var r=new Date;return e!==undefined&&r.setFullYear(e),r.setDate(n),r.setMonth(t),r},i=function(e){return n(r(e,0,2))},s=function(e){return n(r(e,5,2))},o=function(e){var t=e.getMonth()>7?s(e.getFullYear()):i(e.getFullYear()),r=n(e);return t-r!==0},u=function(){var t=i(),n=s(),r=i()-s();return r<0?t+",1":r>0?n+",1,"+e:t+",0"},a=function(){var e=u();return new t.TimeZone(t.olson.timezones[e])};return{determine:a,date_is_dst:o}}();t.TimeZone=function(e){"use strict";var n=null,r=function(){return n},i=function(){var e=t.olson.ambiguity_list[n],r=e.length,i=0,s=e[0];for(;i Date: Fri, 17 Aug 2018 18:13:27 +0800 Subject: [PATCH 2/2] fix risk --- .../manage/mappers/risk/RiskAttentionMerchantsAMapper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskAttentionMerchantsAMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskAttentionMerchantsAMapper.java index 46f817c70..b62a39eca 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskAttentionMerchantsAMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskAttentionMerchantsAMapper.java @@ -1,5 +1,6 @@ package au.com.royalpay.payment.manage.mappers.risk; +import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect; import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper; import cn.yixblog.support.mybatis.autosql.annotations.AutoSql; import cn.yixblog.support.mybatis.autosql.annotations.SqlType; @@ -26,6 +27,7 @@ public interface RiskAttentionMerchantsAMapper { JSONObject findByClientMoniker(@Param("client_moniker") String client_moniker); @AutoSql(type = SqlType.SELECT) + @AdvanceSelect(addonWhereClause = "is_valid=1") PageList query(JSONObject params, PageBounds pagination); }