From a2c3128cb06d78b217af40507c344458eec32f8b Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Fri, 13 Jul 2018 13:40:32 +0800 Subject: [PATCH] add log --- .../customers/web/EncourageMoneyController.java | 15 ++++++++++++++- 1 file changed, 14 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 e9d1fe4aa..967889aa9 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 @@ -5,10 +5,17 @@ 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; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; @@ -19,6 +26,7 @@ import javax.annotation.Resource; @Controller @RequestMapping("/act/encourage_money") public class EncourageMoneyController { + Logger logger = LoggerFactory.getLogger(getClass()); @Resource private EncourageService encourageService; @@ -38,17 +46,22 @@ public class EncourageMoneyController { @WechatMapping(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")); }