This commit is contained in:
liaoyk 2024-08-16 16:43:29 +08:00
commit b67a61be9a
1 changed files with 7 additions and 1 deletions

View File

@ -83,6 +83,7 @@ function self_query($path, $post)
} }
// 从post参数中获取pay_mode等参数实时消费接口中使用包括infoquery takemeal takemealok posonline // 从post参数中获取pay_mode等参数实时消费接口中使用包括infoquery takemeal takemealok posonline
// 检查用户是否存在并返回用户信息
function pos_check_user() function pos_check_user()
{ {
global $post, $db, $company_id; global $post, $db, $company_id;
@ -132,6 +133,7 @@ function pos_check_user()
); );
response_pos($post['api'], $arr); response_pos($post['api'], $arr);
} }
// 返回用户信息
return $uInfo; return $uInfo;
} }
@ -177,6 +179,7 @@ if ($qs == 'heartbeat' || $qs == 'addperson' || $qs == 'delperson') { //心跳
// tb_user_face和tb_user表关联获取对应信息 // tb_user_face和tb_user表关联获取对应信息
// user user_face // user user_face
// 只取face_code face_path
$data = $db->get_all("select a.* from tb_user_face a, tb_user b where a.user_id=b.id and b.company_id = '{$company_id}'"); $data = $db->get_all("select a.* from tb_user_face a, tb_user b where a.user_id=b.id and b.company_id = '{$company_id}'");
$faceInfo = array(); $faceInfo = array();
// 提取上一步得到的关联信息并添加到faceInfo数组中判断此文件是否存在于服务器后台目录存在则将item信息存进dict数据中key是user_idvalue是item // 提取上一步得到的关联信息并添加到faceInfo数组中判断此文件是否存在于服务器后台目录存在则将item信息存进dict数据中key是user_idvalue是item
@ -211,6 +214,7 @@ if ($qs == 'heartbeat' || $qs == 'addperson' || $qs == 'delperson') { //心跳
$userList_s[$key]['facepath'] = $info1['path'] . ''; $userList_s[$key]['facepath'] = $info1['path'] . '';
$info1 = $cardInfo[$uid]; $info1 = $cardInfo[$uid];
// 从cardInfo中仅获取cardno
$userList_s[$key]['cardno'] = $info1['cardno'] . ''; $userList_s[$key]['cardno'] = $info1['cardno'] . '';
} }
@ -527,6 +531,7 @@ else if ($qs == 'real') {
response_pos($api, $arr); response_pos($api, $arr);
} }
// 取餐接口,获取对应取餐码的取餐信息,需要字段
$s = self_query("/api/order/take", array('take_code' => $order['take_food_code'], 'dining_hall_id' => $dining_hall_id, 'channelid' => $channel_id)); $s = self_query("/api/order/take", array('take_code' => $order['take_food_code'], 'dining_hall_id' => $dining_hall_id, 'channelid' => $channel_id));
$rs = json_decode($s, true); $rs = json_decode($s, true);
@ -546,6 +551,7 @@ else if ($qs == 'real') {
response_pos($api, $arr); response_pos($api, $arr);
} }
//
$takeInfo = $rs['data']['list'][0]; $takeInfo = $rs['data']['list'][0];
$detail = array(); $detail = array();