Просмотр исходного кода

// test 屏蔽退款 短信回调

release_toaliyun_real
xhxu 3 лет назад
Родитель
Сommit
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)){//退款回调
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)){

}


+ 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.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);


+ 11
- 11
mallinkCallback/src/main/java/com/iformall/controller/callback/WxPayController.java Просмотреть файл

@@ -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;


Загрузка…
Отмена
Сохранить