{'status'}==1){ if($distribution->{'nbn_money'}>0 && $distribution->{'to_address'}){ //需要清分的账户进行转换 if($distribution->{'nbn_money'}-$distribution->{'service_money'}>0){ if($distribution->{'type'}==9){ $sysAddress=CommonServer::creatServer()->getConfigValue('common_address'); $sysPrivate=CommonServer::creatServer()->getConfigValue('common_private'); }else{ $sysAddress=CommonServer::creatServer()->getConfigValue('sys_address'); $sysPrivate=CommonServer::creatServer()->getConfigValue('sys_private'); } $broadcastId= BroadcastServer::addBroadcast(1,$distribution->{'nbn_money'}-$distribution->{'service_money'},$sysAddress,$sysPrivate,$distribution->{'to_address'},0,$distribution->{'id'},$distribution->{'type'}); if($broadcastId){ $distribution->update(['broadcast_id' => $broadcastId]); } } } } } /** * 更新到数据库前触发 */ public function updating() { } /** * 更新到数据库后触发 */ public function updated() { } /** * 保存到数据库前触发(插入/更新之前,无论插入还是更新都会触发) */ public function saving() { } /** * 保存到数据库后触发(插入/更新之后,无论插入还是更新都会触发) */ public function saved() { } /** * 从数据库删除记录前触发 */ public function deleting() { } /** * 从数据库删除记录后触发 */ public function deleted() { } /** * 恢复软删除记录前触发 */ public function restoring() { } /** * 恢复软删除记录后触发 */ public function restored() { } }