xiaoyu 2 years ago
parent
commit
8519610bcb
1 changed files with 10 additions and 0 deletions
  1. 10 0
      mchsrv/control/merchant_order.php

+ 10 - 0
mchsrv/control/merchant_order.php

@@ -427,11 +427,21 @@ class merchant_orderControl extends mbMerchantControl
         return Model('refill_detail')->where($cond)->select();
     }
 
+    private function is_timestamp($timestamp) {
+        if(strtotime(date('m-d-Y H:i:s',$timestamp)) === $timestamp) {
+            return $timestamp;
+        } else return false;
+    }
+
     public function create_taskOp()
     {
         if(empty($_GET['time_type']) || empty($_GET['start_time']) || empty($_GET['end_time'])) {
             return self::outerr(errcode::ErrInputParam, "参数错误.");
         }
+        if(!$this->is_timestamp($_GET['start_time']) || !$this->is_timestamp($_GET['end_time'])) {
+            return self::outerr(errcode::ErrInputParam, "时间戳类型错误.");
+        }
+
 
         $task_title_create = function ($start, $end, $time_type){
             $start = date('Y-m-d H:i:s', $start);