chuweiqiang 1 yıl önce
ebeveyn
işleme
016d0205b0

+ 0 - 3
application/admin/controller/books/Books.php

@@ -139,9 +139,6 @@ class Books extends Backend
                 $validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
                 $this->model->validateFailException()->validate($validate);
             }
-            $params['free_start_time'] = date("Y-m-d H:i:s");
-            $params['free_end_time'] = $params["effective_time"];
-            $params['status'] = 1;
             $result = $this->model->allowField(true)->save($params);
             Db::commit();
         } catch (ValidateException|PDOException|Exception $e) {

+ 3 - 0
application/admin/controller/books/Certificate.php

@@ -128,6 +128,9 @@ class Certificate extends Backend
                 $validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
                 $this->model->validateFailException()->validate($validate);
             }
+            $params['free_start_time'] = date("Y-m-d H:i:s");
+            $params['free_end_time'] = $params["effective_time"];
+            $params['status'] = 1;
             $result = $this->model->allowField(true)->save($params);
             Db::commit();
         } catch (ValidateException|PDOException|Exception $e) {