|
|
@ -46,12 +46,15 @@ class BehaviorLogController extends ThinkController
|
|
|
|
$startTime = strtotime($startDate);
|
|
|
|
$startTime = strtotime($startDate);
|
|
|
|
$endTime = strtotime($endDate) + 86399;
|
|
|
|
$endTime = strtotime($endDate) + 86399;
|
|
|
|
$map['create_time'] = array('BETWEEN', [$startTime, $endTime]);
|
|
|
|
$map['create_time'] = array('BETWEEN', [$startTime, $endTime]);
|
|
|
|
if (I('promote_id')) {
|
|
|
|
if ($promoteId = I('promote_id')) {
|
|
|
|
if ($promoteId == 0) {
|
|
|
|
if ($promoteId == 0) {
|
|
|
|
$map['promote_id'] = 0;
|
|
|
|
$map['promote_id'] = 0;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$promoteMap['chain'] = ['like', "%/$promoteId/%"];
|
|
|
|
$promoteMap['chain'] = ['like', "%/$promoteId/%"];
|
|
|
|
$promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true);
|
|
|
|
$promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true);
|
|
|
|
|
|
|
|
if(empty($promoteIds)) {
|
|
|
|
|
|
|
|
$promoteIds[] = $promoteIds;
|
|
|
|
|
|
|
|
}
|
|
|
|
$map['promote_id'] = ['in', $promoteIds];
|
|
|
|
$map['promote_id'] = ['in', $promoteIds];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|