0314
This commit is contained in:
@@ -16,8 +16,8 @@ class Welcome extends CI_Controller {
|
||||
//测试地址
|
||||
//$url = 'https://salespp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
|
||||
$name = '哥不是传说'; //客户姓名
|
||||
$mobile = '13696869574';//客户手机
|
||||
$name = '温暖妈咪'; //客户姓名
|
||||
$mobile = '18923149770';//客户手机
|
||||
|
||||
$comments = '101252'; //门店编码
|
||||
$samobile = '13790011910';//销售手机
|
||||
|
||||
@@ -186,29 +186,29 @@ class Draw extends CI_Controller
|
||||
$data['list'] = $list;
|
||||
|
||||
//暗箱
|
||||
// if($activityId == 23 && in_array($winType, array(6,7)))
|
||||
// {
|
||||
// $list = array();
|
||||
// $sqlOrder = "SELECT id,userId,mobile,uname,totalPrice FROM lc_market_sylive_order WHERE activityId={$activityId} AND win=0 AND winType={$winType} AND status=1 ORDER BY RAND() LIMIT {$winNum}";
|
||||
// $res = $this->db->query($sqlOrder)->result_array();
|
||||
//
|
||||
// if ($res) {
|
||||
// $str_userIds = implode(',', array_column($res, 'userId'));
|
||||
// $map_user = $this->mdSyliveUser->map('userId', 'headimg', ["userId in({$str_userIds})" => null]);
|
||||
// foreach ($res as $v) {
|
||||
// if ($v['mobile']) {
|
||||
// $tel = mobile_asterisk($v['mobile']);
|
||||
// $name = $v['uname'] ? name_asterisk($v['uname']) : '***';
|
||||
// if ($map_user[$v['userId']]) {
|
||||
// $headimg = $map_user[$v['userId']];
|
||||
// } else {
|
||||
// $headimg = $defaultHead;
|
||||
// }
|
||||
// $list[] = ['headimg' => $headimg, 'name' => $name, 'tel' => $tel, 'id' => intval($v['id']), 'uname' => $v['uname'], 'mobile' => $v['mobile']];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if($activityId == 28 && in_array($winType, array(5)))
|
||||
{
|
||||
$list = array();
|
||||
$sqlOrder = "SELECT id,userId,mobile,uname,totalPrice FROM lc_market_sylive_order WHERE activityId={$activityId} AND win=0 AND winType={$winType} AND status=1 ORDER BY RAND() LIMIT {$winNum}";
|
||||
$res = $this->db->query($sqlOrder)->result_array();
|
||||
|
||||
if ($res) {
|
||||
$str_userIds = implode(',', array_column($res, 'userId'));
|
||||
$map_user = $this->mdSyliveUser->map('userId', 'headimg', ["userId in({$str_userIds})" => null]);
|
||||
foreach ($res as $v) {
|
||||
if ($v['mobile']) {
|
||||
$tel = mobile_asterisk($v['mobile']);
|
||||
$name = $v['uname'] ? name_asterisk($v['uname']) : '***';
|
||||
if ($map_user[$v['userId']]) {
|
||||
$headimg = $map_user[$v['userId']];
|
||||
} else {
|
||||
$headimg = $defaultHead;
|
||||
}
|
||||
$list[] = ['headimg' => $headimg, 'name' => $name, 'tel' => $tel, 'id' => intval($v['id']), 'uname' => $v['uname'], 'mobile' => $v['mobile']];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//选择中奖人结果
|
||||
shuffle($list);
|
||||
|
||||
Reference in New Issue
Block a user