| @@ -194,38 +194,38 @@ public class TtPayController extends BaseController { | |||
| } | |||
| } | |||
| }else if("refund".equals(type)){//退款回调 | |||
| // String cp_refundno,status; | |||
| // Integer refund_amount; | |||
| // if(is2_0){ | |||
| // cp_refundno = (String) pMap.get("out_refund_no"); | |||
| // status = (String) pMap.get("status"); | |||
| // refund_amount = (Integer) pMap.get("refund_total_amount"); | |||
| // }else{ | |||
| // cp_refundno = (String) pMap.get("cp_refundno"); | |||
| // status = (String) pMap.get("status"); | |||
| // refund_amount = (Integer) pMap.get("refund_amount"); | |||
| // } | |||
| // | |||
| // Map<String,String> map = new HashMap<>(); | |||
| // map.put("appid",appid); | |||
| // map.put("cp_refundno",cp_refundno); | |||
| // map.put("status",status); | |||
| // map.put("refund_amount",refund_amount.toString()); | |||
| //// wxRefundOrderService.notify(map, EnumPayWay.PAY_WAY_TT); | |||
| // | |||
| // String jsonMsg = JSON.toJSONString(map); | |||
| // | |||
| // FmInsideNotifyRefundSuccessMsg refundSuccessMsg = new FmInsideNotifyRefundSuccessMsg(); | |||
| // refundSuccessMsg.setMsgType(EnumMsgRecordType.INSIDE_NOTIFY_REFUND_SUCCESS.getCode()); | |||
| // refundSuccessMsg.setDelayTimeLevel(3); | |||
| // refundSuccessMsg.setPayWay(EnumPayWay.PAY_WAY_TT.getCode()); | |||
| // refundSuccessMsg.setJsonMsg(jsonMsg); | |||
| // | |||
| // // response = wxRefundOrderService.notify(paramMap, EnumPayWay.PAY_WAY_WEAPP); | |||
| // mqBaseProducer.sendMessage(refundSuccessMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| // | |||
| // resultMap.put("err_no",0); | |||
| // resultMap.put("err_tips","success"); | |||
| String cp_refundno,status; | |||
| Integer refund_amount; | |||
| if(is2_0){ | |||
| cp_refundno = (String) pMap.get("out_refund_no"); | |||
| status = (String) pMap.get("status"); | |||
| refund_amount = (Integer) pMap.get("refund_total_amount"); | |||
| }else{ | |||
| cp_refundno = (String) pMap.get("cp_refundno"); | |||
| status = (String) pMap.get("status"); | |||
| refund_amount = (Integer) pMap.get("refund_amount"); | |||
| } | |||
| Map<String,String> map = new HashMap<>(); | |||
| map.put("appid",appid); | |||
| map.put("cp_refundno",cp_refundno); | |||
| map.put("status",status); | |||
| map.put("refund_amount",refund_amount.toString()); | |||
| // wxRefundOrderService.notify(map, EnumPayWay.PAY_WAY_TT); | |||
| String jsonMsg = JSON.toJSONString(map); | |||
| FmInsideNotifyRefundSuccessMsg refundSuccessMsg = new FmInsideNotifyRefundSuccessMsg(); | |||
| refundSuccessMsg.setMsgType(EnumMsgRecordType.INSIDE_NOTIFY_REFUND_SUCCESS.getCode()); | |||
| refundSuccessMsg.setDelayTimeLevel(3); | |||
| refundSuccessMsg.setPayWay(EnumPayWay.PAY_WAY_TT.getCode()); | |||
| refundSuccessMsg.setJsonMsg(jsonMsg); | |||
| // response = wxRefundOrderService.notify(paramMap, EnumPayWay.PAY_WAY_WEAPP); | |||
| mqBaseProducer.sendMessage(refundSuccessMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| resultMap.put("err_no",0); | |||
| resultMap.put("err_tips","success"); | |||
| }else if("settle".equals(type)){ | |||
| } | |||
| @@ -69,20 +69,20 @@ public class TtWebController extends BaseController { | |||
| return resultMap; | |||
| } | |||
| // String header = request.getHeader("X-Douyin-Signature"); | |||
| // String sha1gen = SHA1.gen(appInfo.getSecret(), JSON.toJSONString(parameterMap)); | |||
| // //发邮件 | |||
| // String[] receivers = fmExceptionEmails.split(","); | |||
| // StringBuilder sb = new StringBuilder(); | |||
| // sb.append(DateUtils.date2String(new Date())); | |||
| // sb.append("\n"); | |||
| // sb.append("抖音开放平台通知{}"+JSON.toJSONString(parameterMap)); | |||
| // sb.append("\n"); | |||
| // sb.append("sha1gen{}"+sha1gen); | |||
| // sb.append("\n"); | |||
| // sb.append("header{}"+header); | |||
| // //发送邮件 | |||
| // mailService.sendSimpleMail(receivers, "抖音开放平台通知", sb.toString()); | |||
| String header = request.getHeader("X-Douyin-Signature"); | |||
| String sha1gen = SHA1.gen(appInfo.getSecret(), JSON.toJSONString(parameterMap)); | |||
| //发邮件 | |||
| String[] receivers = fmExceptionEmails.split(","); | |||
| StringBuilder sb = new StringBuilder(); | |||
| sb.append(DateUtils.date2String(new Date())); | |||
| sb.append("\n"); | |||
| sb.append("抖音开放平台通知{}"+JSON.toJSONString(parameterMap)); | |||
| sb.append("\n"); | |||
| sb.append("sha1gen{}"+sha1gen); | |||
| sb.append("\n"); | |||
| sb.append("header{}"+header); | |||
| //发送邮件 | |||
| mailService.sendSimpleMail(receivers, "抖音开放平台通知", sb.toString()); | |||
| if("life_goods_audit".equals(event)){ | |||
| @@ -76,12 +76,12 @@ public class WxMsgCallbackController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgCallbackController::receivemsgAliyun"); | |||
| logger.info(param.toString()); | |||
| try { | |||
| // if(param != null && param.size() > 0){ | |||
| // for (Map<String, String> p:param) { | |||
| // //解析param数据插入数据库中 | |||
| // wxMsgCallbackService.receivemsgAliyun(p); | |||
| // } | |||
| // } | |||
| if(param != null && param.size() > 0){ | |||
| for (Map<String, String> p:param) { | |||
| //解析param数据插入数据库中 | |||
| wxMsgCallbackService.receivemsgAliyun(p); | |||
| } | |||
| } | |||
| }catch(Exception e){ | |||
| logger.error("aliyun 短信回调ERROR",e); | |||
| @@ -130,17 +130,17 @@ public class WxPayController extends BaseController { | |||
| try { | |||
| xml = IOUtils.toString(request.getInputStream(), Charset.forName("UTF-8")); | |||
| logger.info(xml); | |||
| // paramMap = WxPayment.xmlToMap(xml); | |||
| // String jsonMsg = JSON.toJSONString(paramMap); | |||
| // | |||
| // FmInsideNotifyRefundSuccessMsg refundSuccessMsg = new FmInsideNotifyRefundSuccessMsg(); | |||
| // refundSuccessMsg.setMsgType(EnumMsgRecordType.INSIDE_NOTIFY_REFUND_SUCCESS.getCode()); | |||
| // refundSuccessMsg.setDelayTimeLevel(3); | |||
| // refundSuccessMsg.setPayWay(EnumPayWay.PAY_WAY_WECHAT.getCode()); | |||
| // refundSuccessMsg.setJsonMsg(jsonMsg); | |||
| // | |||
| // // response = wxRefundOrderService.notify(paramMap, EnumPayWay.PAY_WAY_WEAPP); | |||
| // mqBaseProducer.sendMessage(refundSuccessMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| paramMap = WxPayment.xmlToMap(xml); | |||
| String jsonMsg = JSON.toJSONString(paramMap); | |||
| FmInsideNotifyRefundSuccessMsg refundSuccessMsg = new FmInsideNotifyRefundSuccessMsg(); | |||
| refundSuccessMsg.setMsgType(EnumMsgRecordType.INSIDE_NOTIFY_REFUND_SUCCESS.getCode()); | |||
| refundSuccessMsg.setDelayTimeLevel(3); | |||
| refundSuccessMsg.setPayWay(EnumPayWay.PAY_WAY_WECHAT.getCode()); | |||
| refundSuccessMsg.setJsonMsg(jsonMsg); | |||
| // response = wxRefundOrderService.notify(paramMap, EnumPayWay.PAY_WAY_WEAPP); | |||
| mqBaseProducer.sendMessage(refundSuccessMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| logger.info("refund wxpay, notify success, req : " + xml + ", resp: " + response.toString()); | |||
| return response; | |||