Commit 97d4cdcd authored by zhz's avatar zhz

autoevaluate

parent 479665a0
...@@ -40,7 +40,8 @@ class GoodsController extends \Our\Controller_AbstractIndex { ...@@ -40,7 +40,8 @@ class GoodsController extends \Our\Controller_AbstractIndex {
} }
public function testAction(){ public function testAction(){
//$info = $this->goodsService->recommend(); //$info = $this->goodsService->recommend();
\Business\Goods\GoodsCommonServiceModel::getInstance()->saleGoods(); //\Business\Goods\GoodsCommonServiceModel::getInstance()->saleGoods();
\Business\Goods\EvaluationServiceModel::getInstance()->autoEvaluate();
} }
public function getAttrsAction(){ public function getAttrsAction(){
......
...@@ -53,7 +53,7 @@ class OrderConst { ...@@ -53,7 +53,7 @@ class OrderConst {
const waitBuyerConfirmRecieve='等待用户确认收货'; const waitBuyerConfirmRecieve='等待用户确认收货';
const defaultComment = '好评!'; const defaultComment = '好评!';
const beyondTimeDefaultComment = '此用户没有填写评价';//超期评价
} }
?> ?>
\ No newline at end of file
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* 自动评价 * 自动评价
* 执行时间:一小时执行一次 * 执行时间:十分钟执行一次
*/ */
define("APPLICATION_PATH", realpath(dirname(__FILE__) . '/../../../')); //指向public的上一级 define("APPLICATION_PATH", realpath(dirname(__FILE__) . '/../../../')); //指向public的上一级
...@@ -39,10 +39,7 @@ class cliOrderEvaluate extends basecli ...@@ -39,10 +39,7 @@ class cliOrderEvaluate extends basecli
} }
} }
protected function autoEvaluate(){ protected function autoEvaluate(){
$orderService=\Business\Order\OrderServiceModel::getInstance(\Our\DbNameConst::masterDBConnectName); \Business\Goods\EvaluationServiceModel::getInstance()->autoEvaluate();
$orderService->changeOrderStatus();
$messageService=\Business\Message\MessageServiceModel::getInstance(\Our\DbNameConst::masterDBConnectName);
$messageService->addMessageCenterToDb();
} }
protected function _runCli() protected function _runCli()
{ {
...@@ -62,9 +59,9 @@ class cliOrderEvaluate extends basecli ...@@ -62,9 +59,9 @@ class cliOrderEvaluate extends basecli
if( file_exists( $this->lockFileName ) ) if( file_exists( $this->lockFileName ) )
{ {
$stat = stat($this->lockFileName); $stat = stat($this->lockFileName);
if( (TIMESTAMP - $stat['mtime']) > 5400 ) if( (TIMESTAMP - $stat['mtime']) > 1800 )
{ {
echo "文件被锁超过5400秒,被强制删除"; echo "文件被锁超过1800秒,被强制删除";
@unlink($this->lockFileName); @unlink($this->lockFileName);
} }
else else
......
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