@@ -63,9 +63,9 @@ class OrderRateByDay extends Command {
*/
public function updateData($idate, $rate, $date){
#当前月
- $month = date('Y-m');
+ $month = date('Y-m', strtotime($date));
#当月1号
- $month_first = date('Y-m-1');
+ $month_first = date('Y-m-01', strtotime($date));
$data = array();
#如果是昨天的数据(或昨天是当月一号)直接插入
if($idate == $date || $date == $month_first){