You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 regels
832 B

  1. <?php
  2. header("Access-Control-Allow-Origin:*");
  3. $post = $_POST['order_id'];
  4. $num = explode(",",$post);
  5. $time = date("Y-m-d H:i:s",time());
  6. foreach($num as $v){
  7. $sql = "select ORDER_PAY_STATUS from order_main where ID = $v";
  8. $result=$pdo->query($sql);
  9. $arr = $result->fetchAll(PDO::FETCH_ASSOC);
  10. if($arr[0]['ORDER_PAY_STATUS'] == 1){
  11. $sql = "update order_commission set APPLY_TIME = '$time' where ORDER_ID = $v";
  12. $result=$pdo->exec($sql);
  13. $sql = "update order_main set ORDER_PAY_STATUS = 0 where ID = $v";
  14. $result=$pdo->exec($sql);
  15. }
  16. }
  17. $code = 0;
  18. $info = 'success';
  19. $massge = '成功';
  20. $json['code'] = $code;
  21. $json['info'] = $info;
  22. $json['massge'] = $massge;
  23. echo json_encode($json);
  24. ?>