Преглед изворни кода

// test 屏蔽退款 短信回调

release_toaliyun_real
xhxu пре 3 година
родитељ
комит
1cce6ce114
3 измењених фајлова са 49 додато и 49 уклоњено
  1. +32
    -32
      mallinkCallback/src/main/java/com/iformall/controller/callback/TtPayController.java
  2. +6
    -6
      mallinkCallback/src/main/java/com/iformall/controller/callback/WxMsgCallbackController.java
  3. +11
    -11
      mallinkCallback/src/main/java/com/iformall/controller/callback/WxPayController.java

+ 32
- 32
mallinkCallback/src/main/java/com/iformall/controller/callback/TtPayController.java Прегледај датотеку

@@ -194,38 +194,38 @@ public class TtPayController extends BaseController {
} }
} }
}else if("refund".equals(type)){//退款回调 }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)){ }else if("settle".equals(type)){


} }


+ 6
- 6
mallinkCallback/src/main/java/com/iformall/controller/callback/WxMsgCallbackController.java Прегледај датотеку

@@ -76,12 +76,12 @@ public class WxMsgCallbackController extends BaseController {
logger.debug("[" + getIpAddr() + "] WxMsgCallbackController::receivemsgAliyun"); logger.debug("[" + getIpAddr() + "] WxMsgCallbackController::receivemsgAliyun");
logger.info(param.toString()); logger.info(param.toString());
try { 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){ }catch(Exception e){
logger.error("aliyun 短信回调ERROR",e); logger.error("aliyun 短信回调ERROR",e);


+ 11
- 11
mallinkCallback/src/main/java/com/iformall/controller/callback/WxPayController.java Прегледај датотеку

@@ -130,17 +130,17 @@ public class WxPayController extends BaseController {
try { try {
xml = IOUtils.toString(request.getInputStream(), Charset.forName("UTF-8")); xml = IOUtils.toString(request.getInputStream(), Charset.forName("UTF-8"));
logger.info(xml); 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()); logger.info("refund wxpay, notify success, req : " + xml + ", resp: " + response.toString());
return response; return response;


Loading…
Откажи
Сачувај