From 2ef48835b7a8e14eddf098a82aa462fa5b061394 Mon Sep 17 00:00:00 2001
From: luoyang14z7 <704328506@qq.com>
Date: Fri, 13 Jul 2018 14:04:28 +0800
Subject: [PATCH 1/6] fix : ActChairty
---
.../ui/static/actchairty/templates/act_chairty_merchants.html | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/main/ui/static/actchairty/templates/act_chairty_merchants.html b/src/main/ui/static/actchairty/templates/act_chairty_merchants.html
index b08680a38..e092d5222 100644
--- a/src/main/ui/static/actchairty/templates/act_chairty_merchants.html
+++ b/src/main/ui/static/actchairty/templates/act_chairty_merchants.html
@@ -74,6 +74,9 @@
next-text="›"
first-text="«"
last-text="»">
+
+
Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}
+
From ed032015bc7f755cc0992becf065cef2207bee24 Mon Sep 17 00:00:00 2001
From: kira <164851225@qq.com>
Date: Fri, 13 Jul 2018 14:52:21 +0800
Subject: [PATCH 2/6] update
---
.../payment/manage/customers/web/EncourageMoneyController.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java b/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java
index 907c34b6a..626f73529 100644
--- a/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java
+++ b/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
@@ -23,7 +24,7 @@ import javax.annotation.Resource;
/**
* Created by yixian on 2017-04-28.
*/
-@Controller
+@RestController
@RequestMapping("/act/encourage_money")
public class EncourageMoneyController {
Logger logger = LoggerFactory.getLogger(getClass());
From b69737a554b11c9a3d711ffde71fe773180539a6 Mon Sep 17 00:00:00 2001
From: kira <164851225@qq.com>
Date: Fri, 13 Jul 2018 15:03:47 +0800
Subject: [PATCH 3/6] update
---
.../web/EncourageMoneyController.java | 40 +++++--------------
1 file changed, 11 insertions(+), 29 deletions(-)
diff --git a/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java b/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java
index 626f73529..e122427a8 100644
--- a/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java
+++ b/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java
@@ -3,7 +3,6 @@ package au.com.royalpay.payment.manage.customers.web;
import au.com.royalpay.payment.manage.customers.core.EncourageService;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.WxOauthType;
-import au.com.royalpay.payment.tools.permission.alipay.AlipayMapping;
import au.com.royalpay.payment.tools.permission.wechat.WechatMapping;
import com.alibaba.fastjson.JSONObject;
@@ -11,7 +10,6 @@ import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -45,48 +43,32 @@ public class EncourageMoneyController {
return encourageService.takeEncourageMoney(orderId, user_id);
}
-
- @RequestMapping(value = "/orders/{orderId}/wechat", method = RequestMethod.GET)
- public JSONObject takeEncourageMoneyWeChat(@PathVariable String orderId, @ModelAttribute(CommonConsts.WECHATINFO) JSONObject wxUser) {
- logger.info("kiratest---wechat");
- if (wxUser == null) {
- return new JSONObject();
- }
- logger.info(wxUser.toJSONString());
- return encourageService.takeEncourageMoney(orderId, wxUser.getString("openid"));
- }
-
- @AlipayMapping(value = "/orders/{orderId}/alipay", method = RequestMethod.GET)
- public JSONObject takeEncourageMoneyAlipay(@PathVariable String orderId, @ModelAttribute(CommonConsts.ALIUSER) JSONObject alipayInfo) {
- logger.info("kiratest---alipay");
-
- if (alipayInfo == null) {
- return new JSONObject();
- }
- logger.info(alipayInfo.toJSONString());
- return encourageService.takeEncourageMoney(orderId, alipayInfo.getString("user_id"));
- }
-
@RequestMapping(value = "/orders/{orderId}/crit", method = RequestMethod.PUT)
public JSONObject takeEncourageMoneyCrit(@PathVariable String orderId) {
return encourageService.doubleEncourageMoney(orderId);
}
- @WechatMapping(value = "/my", method = RequestMethod.GET, oauthType = WxOauthType.USERINFO)
- public ModelAndView encourageLogs(@ModelAttribute(CommonConsts.WECHATINFO) JSONObject wxUser) {
+ @RequestMapping(value = "/my", method = RequestMethod.GET)
+ public ModelAndView encourageLogs(@ModelAttribute(CommonConsts.WECHATINFO) JSONObject wxUser,@ModelAttribute(CommonConsts.ALIUSER) JSONObject aliuser) {
ModelAndView mav = new ModelAndView("activity/encourage_money/my");
mav.addObject("wxUser", wxUser);
- JSONObject balanceStatus = encourageService.getBalanceStatus(wxUser.getString("openid"));
+ String user_id = "";
+ if(wxUser==null){
+ user_id = aliuser.getString("user_id");
+ }else {
+ user_id = wxUser.getString("openid");
+ }
+ JSONObject balanceStatus = encourageService.getBalanceStatus(user_id);
mav.addObject("balance_status", balanceStatus);
return mav;
}
- @WechatMapping(value = "/desc",method = RequestMethod.GET)
+ @RequestMapping(value = "/desc",method = RequestMethod.GET)
public ModelAndView descPage(){
return new ModelAndView("activity/encourage_money/desc");
}
- @WechatMapping(value = "/merchants",method = RequestMethod.GET)
+ @RequestMapping(value = "/merchants",method = RequestMethod.GET)
public ModelAndView merchantsPage(){
return new ModelAndView("activity/encourage_money/merchants");
}
From 45629cb0de99c6f88484ec9d3290e715ab9efd97 Mon Sep 17 00:00:00 2001
From: luoyang14z7 <704328506@qq.com>
Date: Fri, 13 Jul 2018 16:53:35 +0800
Subject: [PATCH 4/6] fix : ActChairty
---
src/main/ui/static/actchairty/act_chairty.js | 7 +++++--
.../static/actchairty/templates/act_chairty_merchants.html | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/main/ui/static/actchairty/act_chairty.js b/src/main/ui/static/actchairty/act_chairty.js
index 4cd8fc7ef..3a2c64283 100644
--- a/src/main/ui/static/actchairty/act_chairty.js
+++ b/src/main/ui/static/actchairty/act_chairty.js
@@ -23,21 +23,24 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
$http.get('/actchairty/clients', {params: params}).then(function (resp) {
$scope.clients = resp.data.data;
$scope.pagination = resp.data.pagination;
+
})
};
$scope.loadClients();
$scope.new_conf = {};
$scope.ctrl = {dateInput: false};
$scope.submitClient = function () {
- $scope.errmsg = null;
+ var client_moniker = $scope.new_conf.client_moniker;
+ $scope.msg = null;
var conf = {
date: $filter('date')($scope.new_conf.date, 'yyyy-MM-dd'),
};
$http.put('/actchairty/clients/' + $scope.new_conf.client_moniker, conf).then(function () {
$scope.new_conf = {};
$scope.loadClients();
+ $scope.msg = "商户创建成功!商户ID:"+ client_moniker + " 参加时间:" + conf.date;
}, function (resp) {
- $scope.errmsg = resp.data.message;
+ $scope.msg = resp.data.message;
});
};
}]);
diff --git a/src/main/ui/static/actchairty/templates/act_chairty_merchants.html b/src/main/ui/static/actchairty/templates/act_chairty_merchants.html
index e092d5222..dd6f2f8b9 100644
--- a/src/main/ui/static/actchairty/templates/act_chairty_merchants.html
+++ b/src/main/ui/static/actchairty/templates/act_chairty_merchants.html
@@ -23,7 +23,7 @@