shish 2 лет назад
Родитель
Сommit
5d10a9a77f
1 измененных файлов с 6 добавлено и 0 удалено
  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,