0){ if($row['cash_type'] == 1){ Db::name('xilufitness_coach_account')->where(['coach_id' => $row['coach_id']])->setInc('account',$row['cash_price']); Db::name('xilufitness_coach_account')->where(['coach_id' => $row['coach_id']])->setInc('total_account',$row['cash_price']); } if($row['cash_type'] == 2){ Db::name('xilufitness_coach_account')->where(['coach_id' => $row['coach_id']])->setDec('account',$row['cash_price']); if($row['is_type'] == 4){ //提现 Db::name('xilufitness_coach_account')->where(['coach_id' => $row['coach_id']])->setInc('withdraw_account',$row['cash_price']); } } } }); } public function getCreatetimeTxtAttr($value,$data){ $value = $value ? $value : $data['createtime']; return !empty($value) && is_numeric($value) ? date('m.d H:i',$value) : $value; } }