Commit 2c227164 authored by hujun's avatar hujun

2

parent c36f601d
......@@ -45,15 +45,8 @@ class Remark extends Basic
$u_phone_follow = new UPhoneFollowPp();
$last_month = date("Y-m-d", strtotime("-1 month"));
if (!empty($this->params['start_date']) && empty($this->params['end_date'])) {
if (strtotime($last_month) > strtotime($this->params['start_date'])) {
$where['create_time'] = [ '> time', $last_month . ' 00:00:00' ];
} else {
$where['create_time'] = [ '> time', $this->params['start_date'] . ' 00:00:00' ];
}
} else {
$where['create_time'] = [ '> time', $last_month . ' 00:00:00' ];
$where['create_time'] = [ '> time', $this->params['start_date'] . ' 00:00:00' ];
}
if (!empty($this->params['end_date']) && empty($this->params['start_date'])) {
......@@ -61,12 +54,7 @@ class Remark extends Basic
}
if (!empty($this->params['end_date']) && !empty($this->params['start_date'])) {
if (strtotime($last_month) > strtotime($this->params['start_date'])) {
$start_date = $last_month;
} else {
$start_date = $this->params['start_date'];
}
$where['create_time'] = [ 'between', [ $start_date . ' 00:00:00', $this->params['end_date'] . ' 23:59:59' ] ];
$where['create_time'] = [ 'between', [ $this->params['start_date'] . ' 00:00:00', $this->params['end_date'] . ' 23:59:59' ] ];
}
if (!empty($this->params['content'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment