$portalTagModel = new PortalTagModel();
$setsum= new SetModel();
Db::startTrans();
try{
$set=SetModel::get(1);
if($set->ic<=0){
die();
}else{
$data=[status=>1];
$w=[];$w[id]=1;$w[ic]=[gt,0];
$portalTagModel->insert($data);
$state=$setsum->where($w)->setDec(ic,1);
if($state==0){Db::rollback();}
Db::commit();
print_r("完成");
die();
}
} catch (\Exception $e) {
Db::rollback();
}
die();