market_statistics_1106

This commit is contained in:
dengbw
2022-11-06 19:08:57 +08:00
parent 21b9b27787
commit b9aab9d9af
2 changed files with 7 additions and 3 deletions
+3
View File
@@ -64,6 +64,7 @@ class Goods extends BaseController
$price = $this->input_param('price');
$stock = $this->input_param('stock');
$sort = $this->input_param('sort');
$dateRange = $this->input_param('dateRange');
if (!$activityId) {
$this->return_json('参数错误');
}
@@ -72,6 +73,8 @@ class Goods extends BaseController
}
$addDate = ['activityId' => $activityId, 'title' => $title, 'price' => $price, 'stock' => $stock, 'sort' => $sort
, 'descrip' => $descrip, 'c_time' => time()];
$dateRange[0] && $addDate['timeStart'] = $dateRange[0];
$dateRange[1] && $addDate['timeEnd'] = $dateRange[1];
$imgs = [];
if ($banner) {
$banner = [];
+4 -3
View File
@@ -294,10 +294,11 @@ class Statistics extends BaseController
$res = $this->mdSyliveActivityUser->select_groupby('userId', $where, $sort_order, $page, $limit, $filed);
foreach ($res as $v) {
$userId = intval($v['userId']);
$re_user = $this->mdSyliveUser->get(['userId' => $userId, 'status>=' => 0]);
$consultantName = $re_user['uname'] ? $re_user['uname'] : $re_user['nickname'];
$re_org = $this->mdSyliveOrganization->get(['organizationId' => $v['bizId'], 'status>=' => 0]);
$re_org && $consultantName .= "({$re_org['organizationName']})";
$organizationName = $re_org['organizationName'] ? $re_org['organizationName'] : '-';
$re_user = $this->mdSyliveUser->get(['userId' => $userId, 'status>=' => 0]);
$uname = $re_user['uname'] ? $re_user['uname'] : $re_user['nickname'];
$consultantName = $organizationName . ' ' . $uname;
$livePV = $watchDuration = 0;
if ($channelId) {
$res_watch = $this->mdSyliveActivityKpidata->db->select('b.unionid')