$object->admin_id, 'type' => $object->type, 'createdate' => UserCollectUpdateService::instance()->getCreateDate($object->type)->data, ]; } /** * @param $object * @return array */ public function mkParamsForUpdate(UserCollectObject $object) { $update = $object->toArray(); unset($update['admin_id']); unset($update['type']); $update['updatetime'] = time(); return $update; } /** * @param $object * @return array */ public function mkParamsForInsert(UserCollectObject $object) { return [ 'admin_id' => $object->admin_id, 'type' => $object->type, 'createdate' => UserCollectUpdateService::instance()->getCreateDate($object->type)->data, 'updatetime' => time(), 'increase' => (int)$object->increase, 'increase_m' => (int)$object->increase_m, 'increase_f' => (int)$object->increase_f, 'increase_fllow' => (int)$object->increase_fllow, 'unfollow_num' => (int)$object->unfollow_num, 'net_follow_num' => (int)$object->net_follow_num, 'guide_follow_num' => (int)$object->guide_follow_num, 'increase_recharge' => (int)$object->increase_recharge, 'day_recharge_user_money' => (float)$object->day_recharge_user_money, 'day_recharge_user_count' => (int)$object->day_recharge_user_count, ]; } }