|
@@ -20,6 +20,7 @@ import com.kmall.common.utils.wechat.wxglobal.WechatGlobalUtil;
|
|
|
import com.kmall.common.utils.wechat.wxglobal.dto.WechatGlobalRefundApiResult;
|
|
|
import net.sf.json.JSONObject;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.log4j.Logger;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -39,6 +40,7 @@ import java.util.Objects;
|
|
|
@RestController
|
|
|
@RequestMapping("order")
|
|
|
public class OrderController {
|
|
|
+ private Logger logger = Logger.getLogger(OrderController.class);
|
|
|
@Autowired
|
|
|
private OrderService orderService;
|
|
|
@Autowired
|
|
@@ -385,6 +387,9 @@ public class OrderController {
|
|
|
private String wxRefund(OrderEntity orderInfo,Double totalActualPrice){
|
|
|
WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getMerchOrderSn().toString(), totalActualPrice,
|
|
|
orderInfo.getActualPrice().doubleValue());
|
|
|
+ System.out.println("result:"+result);
|
|
|
+ System.out.println("resultCode:"+result.getResult_code());
|
|
|
+ System.out.println("success:"+WechatUtil.WXTradeState.SUCCESS.getCode());
|
|
|
if (result.getResult_code().equals(WechatUtil.WXTradeState.SUCCESS.getCode())) {
|
|
|
orderService.refund(orderInfo, result);
|
|
|
} else {
|