|
- <?php
- header("Access-Control-Allow-Origin:*");
- $post = $_POST['order_id'];
- $num = explode(",",$post);
- $time = date("Y-m-d H:i:s",time());
-
- foreach($num as $v){
- $sql = "select ORDER_PAY_STATUS from order_main where ID = $v";
- $result=$pdo->query($sql);
- $arr = $result->fetchAll(PDO::FETCH_ASSOC);
- if($arr[0]['ORDER_PAY_STATUS'] == 1){
- $sql = "update order_commission set APPLY_TIME = '$time' where ORDER_ID = $v";
- $result=$pdo->exec($sql);
-
- $sql = "update order_main set ORDER_PAY_STATUS = 0 where ID = $v";
- $result=$pdo->exec($sql);
- }
- }
-
-
- $code = 0;
- $info = 'success';
- $massge = '成功';
-
-
- $json['code'] = $code;
- $json['info'] = $info;
- $json['massge'] = $massge;
-
- echo json_encode($json);
- ?>
|