diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index 8245ab78b..b7d41a676 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -1777,9 +1777,19 @@ public class RetailAppServiceImp implements RetailAppService { getActs.put("publish_date", DateFormatUtils.format(getActs.getDate("publish_time"),"yyyy/MM/dd HH:mm:ss")); String reference = getActs.getString("reference"); JSONObject referenceObj = JSONObject.parseObject(reference); - getActs.put("ad_type", referenceObj.getString("ad_type")); - getActs.put("expire_date", referenceObj.getString("expire_date")); - getActs.put("duration_time", referenceObj.getString("duration_time")); + if (reference != null) { + if (referenceObj.getString("ad_type") != null) { + getActs.put("ad_type", referenceObj.getString("ad_type")); + } + if (referenceObj.getString("expire_date") != null) { + getActs.put("expire_date", referenceObj.getString("expire_date")); + } + if (referenceObj.getString("duration_time") != null) { + getActs.put("duration_time", referenceObj.getString("duration_time")); + } + }else { + getActs.put("message", "mess : (ad_type && expire_date && duration_time) not set"); + } getActs.remove("reference"); getActs.remove("page_desc"); getActs.remove("page_keywords"); diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/act/ActChairtyMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/act/ActChairtyMapper.xml index addc41843..26ec3bbbf 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/act/ActChairtyMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/act/ActChairtyMapper.xml @@ -6,7 +6,7 @@ from act_charity left JOIN pmt_transactions on act_charity.client_id = pmt_transactions.client_id and pmt_transactions.transaction_type='Credit' and pmt_transactions.transaction_time>=act_charity.active_time - and pmt_transactions.transaction_time<'2018-09-01' and pmt_transactions.transaction_time>='2018-07-09' + and pmt_transactions.transaction_time<'2018-10-31' and pmt_transactions.transaction_time>='2018-07-09' and pmt_transactions.channel != 'Settlement' GROUP BY act_charity.client_id order by count_ordernum desc @@ -14,7 +14,7 @@ select count(DISTINCT order_id) as count_ordernum,date_format(pmt_transactions.transaction_time,'%Y-%m-%d') as orderdate,client_moniker,ifnull(sum(pmt_transactions.clearing_amount),0) as sum_ordernum from act_charity inner JOIN pmt_transactions ON act_charity.client_id = pmt_transactions.client_id and pmt_transactions.transaction_type='Credit' and pmt_transactions.transaction_time>=#{begin} and pmt_transactions.transaction_time<=#{end} and pmt_transactions.transaction_time>=act_charity.active_time and pmt_transactions.channel != 'Settlement' - and pmt_transactions.transaction_time<'2018-09-01' and pmt_transactions.transaction_time>='2018-07-09' + and pmt_transactions.transaction_time<'2018-10-31' and pmt_transactions.transaction_time>='2018-07-09' group by date_format(pmt_transactions.transaction_time,'%Y-%m-%d') @@ -22,7 +22,7 @@ \ No newline at end of file diff --git a/src/main/ui/static/cms/cms.js b/src/main/ui/static/cms/cms.js index 09a9e5eae..3ab730034 100644 --- a/src/main/ui/static/cms/cms.js +++ b/src/main/ui/static/cms/cms.js @@ -120,7 +120,11 @@ define(['angular', 'uiRouter', 'static/commons/angular-ueditor'], function (angu app.controller('cmsArticleEditCtrl', ['$scope', '$http', '$state', '$stateParams', 'commonDialog', 'article', function ($scope, $http, $state, $stateParams, commonDialog, article) { $scope.article = article.data; - $scope.reference = JSON.parse($scope.article.reference); + if ($scope.article.reference) { + $scope.reference = JSON.parse($scope.article.reference); + }else { + $scope.reference = {}; + } $scope.saveArticle = function () { $scope.article.reference =$scope.reference;