新增领域父类

This commit is contained in:
chengxl
2025-05-29 16:09:29 +08:00
parent 034a363fdd
commit e75b57d1da

View File

@@ -2314,12 +2314,10 @@ class Reviewer extends Base
$aAdd[] = ['major_id' => $value,'user_id' => $iUserId,'ctime' => time(),'state' => 0]; $aAdd[] = ['major_id' => $value,'user_id' => $iUserId,'ctime' => time(),'state' => 0];
} }
$result = Db::name('major_to_user')->insertAll($aAdd); $result = Db::name('major_to_user')->insertAll($aAdd);
echo Db::getLastSql();
} }
if(!empty($aDelete)){//修改状态为1 if(!empty($aDelete)){//修改状态为1
$aWhere = ['user_id' => $iUserId,'state' => 0,'major_id' => ['in',$aDelete]]; $aWhere = ['user_id' => $iUserId,'state' => 0,'major_id' => ['in',$aDelete]];
$result = Db::name('major_to_user')->where($aWhere)->limit(count($aDelete))->update(['state' => 1,'ctime' => time()]); $result = Db::name('major_to_user')->where($aWhere)->limit(count($aDelete))->update(['state' => 1,'ctime' => time()]);
echo Db::getLastSql();
} }
Db::commit(); Db::commit();
return json_encode(['status' => 1,'msg' => "Reviewer's field has been successfully modified"]); return json_encode(['status' => 1,'msg' => "Reviewer's field has been successfully modified"]);