Ver Fonte

删除修改

shish há 2 anos atrás
pai
commit
5d10a9a77f
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      app-ghs/controllers/ModifyController.php

+ 6 - 0
app-ghs/controllers/ModifyController.php

@@ -48,6 +48,12 @@ class ModifyController extends BaseController
         if (!empty($data)) {
             $arr = json_decode($data, true);
             if (!empty($arr)) {
+                $list = ModifyClass::getAllByCondition(['mainId' => $this->mainId], 'addTime asc', '*', null, true);
+                if (count($list) >= 15) {
+                    if ($list[0]) {
+                        $list[0]->delete();
+                    }
+                }
                 $mData = [
                     'name' => $modifyName,
                     'mainId' => $this->mainId,