market_draw_h52

This commit is contained in:
dengbw
2023-05-06 11:29:46 +08:00
committed by lccsw
parent 1275aee2f6
commit 649e5967f4
3 changed files with 17 additions and 8 deletions
+9 -1
View File
@@ -143,6 +143,14 @@ class Draw extends CI_Controller
$count = $this->mdSyliveOrder->count($whereOrder); $count = $this->mdSyliveOrder->count($whereOrder);
$list = $result = []; $list = $result = [];
if ($count) {//判断抽奖名单 if ($count) {//判断抽奖名单
$defaultHead = 'https://qs.haodian.cn/web/images/project/H5-ShiYu/default-head.png';
if ($re['organizationId']) {//修改默认头像为机构logo
$this->load->model('market/Market_sylive_organization_model', 'mdSyliveOrganization');
$reOrg = $this->mdSyliveOrganization->get(['organizationId' => $re['organizationId']]);
if ($reOrg['logo']) {
$defaultHead = build_qiniu_image_url($reOrg['logo']);
}
}
//随机数据 //随机数据
$res = $this->db->query($sqlOrder)->result_array(); $res = $this->db->query($sqlOrder)->result_array();
if ($res) { if ($res) {
@@ -155,7 +163,7 @@ class Draw extends CI_Controller
if ($map_user[$v['userId']]) { if ($map_user[$v['userId']]) {
$headimg = $map_user[$v['userId']]; $headimg = $map_user[$v['userId']];
} else { } else {
$headimg = 'https://qs.haodian.cn/web/images/project/H5-ShiYu/default-head.png'; $headimg = $defaultHead;
} }
$list[] = ['headimg' => $headimg, 'name' => $name, 'tel' => $tel, 'id' => intval($v['id']), $list[] = ['headimg' => $headimg, 'name' => $name, 'tel' => $tel, 'id' => intval($v['id']),
'uname' => $v['uname'], 'mobile' => $v['mobile']]; 'uname' => $v['uname'], 'mobile' => $v['mobile']];
@@ -286,8 +286,8 @@ class groupsOrder extends BaseController
$done = 0; $done = 0;
for ($_row = 2; $_row <= $rowCnt; $_row++) { //读取内容 for ($_row = 2; $_row <= $rowCnt; $_row++) { //读取内容
$itemId = $itemPrice = $totalPrice = $cfUserId = $bizId = $levelId1 = $levelId2 = $levelId3 = $userId = $cfUserId = 0; $itemId = $itemPrice = $totalPrice = $cfUserId = $bizId = $levelId1 = $levelId2 = $levelId3 = $userId = $cfUserId = 0;
$sid = create_order_no('350200', 'market'); $sid = $objWorksheet->getCell('A' . $_row)->getValue();
$mobile = $objWorksheet->getCell('B' . $_row)->getValue(); $mobile = $objWorksheet->getCell('C' . $_row)->getValue();
$itemTitle = $objWorksheet->getCell('D' . $_row)->getValue(); $itemTitle = $objWorksheet->getCell('D' . $_row)->getValue();
if ($mobile) { if ($mobile) {
$where = ['mobile' => $mobile, "activityId" => $activityId]; $where = ['mobile' => $mobile, "activityId" => $activityId];
@@ -301,11 +301,11 @@ class groupsOrder extends BaseController
} }
$re_order = $this->mdSyliveOrder->get($where); $re_order = $this->mdSyliveOrder->get($where);
if (!$re_order) { if (!$re_order) {
$uname = $objWorksheet->getCell('A' . $_row)->getValue(); $uname = $objWorksheet->getCell('B' . $_row)->getValue();
$totalPrice = $objWorksheet->getCell('C' . $_row)->getValue(); $totalPrice = $objWorksheet->getCell('E' . $_row)->getValue();
$createTime = $objWorksheet->getCell('E' . $_row)->getValue(); $createTime = $objWorksheet->getCell('F' . $_row)->getValue();
$bizName = $objWorksheet->getCell('F' . $_row)->getValue(); $bizName = $objWorksheet->getCell('G' . $_row)->getValue();
$cfMobile = $objWorksheet->getCell('H' . $_row)->getValue(); $cfMobile = $objWorksheet->getCell('I' . $_row)->getValue();
if ($cfMobile) { if ($cfMobile) {
$re_user = $this->mdSyliveUser->get(['mobile' => $cfMobile, 'organizationId>' => 0, 'status<>' => -1]); $re_user = $this->mdSyliveUser->get(['mobile' => $cfMobile, 'organizationId>' => 0, 'status<>' => -1]);
if ($re_user['userId']) { if ($re_user['userId']) {
@@ -335,6 +335,7 @@ class groupsOrder extends BaseController
if ($re_order['userId']) { if ($re_order['userId']) {
$userId = $re_order['userId']; $userId = $re_order['userId'];
} }
!$sid && $sid = create_order_no('350200', 'market');
!$createTime && $createTime = "0000-00-00 00:00:00"; !$createTime && $createTime = "0000-00-00 00:00:00";
$addData = [ $addData = [
'itemId' => $itemId, 'itemId' => $itemId,
Binary file not shown.