* fix bug.

This commit is contained in:
wangyidong
2021-04-12 14:47:50 +08:00
parent e47df9246c
commit d6cbac7df4
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -261,7 +261,7 @@ class programModel extends model
->checkIF($program->begin != '', 'begin', 'date')
->checkIF($program->end != '', 'end', 'date')
->checkIF($program->end != '', 'end', 'gt', $program->begin)
->checkIF(!empty($program->name), 'name', 'unique')
->checkIF(!empty($program->name), 'name', 'unique', "`type`='program'")
->exec();
if(!dao::isError())
@@ -351,7 +351,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'")
->check('name', 'unique', "id!=$programID and deleted='0' and `type`='program'")
->where('id')->eq($programID)
->limit(1)
->exec();