本文整理匯總了PHP中UserService::get_by_uuid方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserService::get_by_uuid方法的具體用法?PHP UserService::get_by_uuid怎麽用?PHP UserService::get_by_uuid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserService
的用法示例。
在下文中一共展示了UserService::get_by_uuid方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: get_exchange_record_all
public function get_exchange_record_all($next_id, $count)
{
$exch_list = $this->exch_table->get_all($next_id, $count);
$userSer = new UserService(NULL);
foreach ($exch_list as $exch) {
$user = $userSer->get_by_uuid($exch->user->uuid);
$exch->user = $user;
}
return $exch_list;
}
示例2: ykfile
* @author: han
* 登陸
*/
require_once ykfile("source/score_service.php");
require_once ykfile("source/modules/score_module.php");
//獲取所有的參數值
$json_params = json_decode(file_get_contents("php://input"));
$mobile = $json_params->mobile;
$password = $json_params->password;
// 根據手機號碼和密碼查詢數據
$userService = new UserService(@$user_id);
$user_info = $userService->get_by_mobile_pass($mobile, $password);
if ($user_info != NULL) {
$scoSer = new ScoreService();
$rule_list = $scoSer->apply_rule($user_info, GET_SCORE, ScoreModule::point_signin);
$message = "";
foreach ($rule_list as $rule) {
$msg = $rule->title . " + " . $rule->amount;
$message[] = $msg;
}
$user_info = $userService->get_by_uuid($user_info->uuid);
unset($_SESSION['current_user']);
// 成功登陸 幹掉session中關於前一個用戶信息
$_SESSION['current_user'] = serialize($user_info);
// 裝載新的用戶信息
$json_array = array("status" => "0", "message" => $message, "profile" => $user_info);
echo json_encode($json_array);
} else {
$json_array = array("status" => "1", "message" => "親,登錄失敗!");
echo json_encode($json_array);
}
示例3: ykfile
require_once ykfile('source/score_service.php');
require_once ykfile('source/user_service.php');
$user_id = $_GET['user_id'];
$act_id = $_GET['act_id'];
$type = $_GET['type'];
$usrv = new UserService($user_id);
$ret = $usrv->add_favor($act_id, $user_id, $type);
if ($ret == ACTIVITY_IS_ALREADY) {
$message = "親,您已經收藏過!";
$status = 1;
$message_array = "";
} else {
if ($ret) {
// 添加成功
// 給積分
$user_info = $usrv->get_by_uuid($user_id);
$scoSer = new ScoreService();
$message = "";
if ($type == 0) {
$score_point = ScoreModule::point_like;
$message = "喜歡+1";
} else {
$score_point = ScoreModule::point_collect;
$message = "收藏+1";
}
$rule_list = $scoSer->apply_rule($user_info, GET_SCORE, $score_point);
$message_array = "";
if ($rule_list) {
foreach ($rule_list as $rule) {
$msg = $rule->title . " + " . $rule->amount;
$message_array[] = $msg;
示例4: UserService
$userService = new UserService(@$appoint->user->uuid);
$status = ERR_INTERNAL;
$message = "內部錯誤";
$user_id = $appoint->user->uuid;
// 先查詢 當同一個手機和同一個活動id 查詢得到數據時 告訴他 你已經預約了
if (!empty($user_id)) {
// 已經登陸
if ($userService->select_appoint_userId($appoint->activity->id, $user_id)) {
$status = 1;
$message = "您已經報過名了,請到個人中心查看!";
echo json_encode(array("status" => $status, "message" => $message));
} else {
if ($userService->insert_appoint($appoint, $code)) {
$status = 0;
$message = "預約成功";
$user_info = $userService->get_by_uuid($appoint->user->uuid);
$scoSer = new ScoreService();
$rule_list = $scoSer->apply_rule($user_info, GET_SCORE, ScoreModule::point_appoint);
if ($rule_list) {
$message_array = "";
foreach ($rule_list as $rule) {
$msg = $rule->title . " + " . $rule->amount;
$message_array[] = $msg;
}
}
echo json_encode(array("status" => $status, "message" => $message, "message_array" => $message_array));
}
}
} else {
//未登陸 先查詢 當同一個手機和同一個活動id 查詢得到數據時 告訴他 你已經預約了
if ($userService->select_appoint_actId($appoint->activity->id, $appoint->mobile)) {