|
|
@@ -36,14 +36,14 @@ try {
|
|
|
//循环找到最近天数的起始日期
|
|
|
$count = 0;
|
|
|
$recent_date = AddOrSubDate($start_date, -$traceback_days);
|
|
|
- while (($count < $traceback_days) and ($recent_date >= 20140101)) {
|
|
|
+ do {
|
|
|
$filter = array(
|
|
|
'code' => array($code, '=s'),
|
|
|
'date' => array($start_date, 'date_between', $recent_date),
|
|
|
);
|
|
|
$count = Index_day_k::getList($filter, 1);
|
|
|
$recent_date = AddOrSubDate($recent_date, -1);
|
|
|
- }
|
|
|
+ }while(($count < $traceback_days) and ($recent_date >= AddOrSubDate(GLOBAL_BEGIN_DATE, -1)));
|
|
|
|
|
|
//获取列表
|
|
|
$stock_info = Index_day_k::getListOrderByDate($filter, 0, 0, 0, $order);
|