コード例 #1
0
 function __construct($code, $type = 'after')
 {
     $this->stockCode = $code;
     $this->rightType = Refer::isSockCode($code) ? $type : 'normal';
     $this->dataVersion = Config::get('Day.Version');
     $this->dataFile = DATA_PATH . 'day/' . $this->dataVersion . '/' . $this->rightType . '/' . $this->stockCode . '.txt';
 }
コード例 #2
0
 public static function updateTmpDay()
 {
     self::$log->debugLog("Begin Update Tmp Day");
     //读取Tmp文件中股票信息
     $list = self::$tmp->getTmpContent('day.duty.failed');
     $list = explode('|', $list);
     //print_r($list);
     //echo self::$tmp->getTmpContent('day.duty.failed');
     self::$tmp->newTmpFile('day.duty.failed');
     $rights = array('before', 'normal', 'after');
     foreach ($list as $itemS) {
         //echo $item['code'];
         $tt = explode(':', $itemS);
         if (empty($tt) || empty($tt[0])) {
             continue;
         }
         $item = array('code' => $tt[0], 'name' => $tt[1], 'spell' => $tt[2]);
         if (Refer::isSockCode($item['code'])) {
             foreach ($rights as $type) {
                 self::resetSingleDay($item, $type);
             }
         } else {
             self::resetSingleDay($item, 'normal');
         }
     }
     self::$log->debugLog("Finish Update Tmp Day");
 }