Finish task #43916.

This commit is contained in:
zhouxin
2021-11-12 14:06:44 +08:00
parent 89802252fc
commit e57d1d1cc7
5 changed files with 23 additions and 27 deletions

View File

@@ -741,7 +741,7 @@ class programModel extends model
->checkIF($program->begin != '', 'begin', 'date')
->checkIF($program->end != '', 'end', 'date')
->checkIF($program->end != '', 'end', 'gt', $program->begin)
->check('name', 'unique', "id!=$programID and deleted='0' and `type`='program'")
->checkIF(!empty($program->name), 'name', 'unique', "id!=$programID and `type`='program' and `parent` = $program->parent")
->where('id')->eq($programID)
->limit(1)
->exec();