admin
2021-04-19 eb7f3343af839a7c71f16e8ada2b25d5e2201c08
src/main/java/com/yeshi/buwan/controller/TestController.java
@@ -9,6 +9,8 @@
import com.yeshi.buwan.service.imp.SearchService;
import com.yeshi.buwan.service.inter.order.OrderService;
import com.yeshi.buwan.service.inter.vip.VIPService;
import com.yeshi.buwan.util.JsonUtilV2;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
@@ -76,5 +78,25 @@
        out.print(JsonUtil.loadTrueResult(result));
    }
//
//    @RequestMapping("checkPay")
//    public String checkPay(String loginUid,String id, PrintWriter out) {
//        OrderRecord record = orderService.getOrderRecord(id);
//        if (record == null || !record.getUid().equalsIgnoreCase(loginUid)) {
//            return JsonUtilV2.loadFalseJson("记录不存在/不是您的订单");
//        }
//
//        record = orderService.checkOrderPayState(id);
//        //未支付
//        if (record != null && record.getState() != OrderRecord.STATE_PAY) {
//            return JsonUtilV2.loadFalseJson(1, "支付未完成");
//        }
//
//        JSONObject data = new JSONObject();
//        data.put("money", record.getPayMoney() == null ? record.getMoney() : record.getPayMoney());
//
//        return JsonUtilV2.loadTrueJson(data.toString());
//    }
}