本文整理汇总了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)) {