Commit 665158fa authored by wwccw0591's avatar wwccw0591

upd

parent 7748b87a
...@@ -314,7 +314,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -314,7 +314,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
* Time: 下午 3:37 * Time: 下午 3:37
*/ */
public function updateStatGoods(){ public function updateStatGoods(){
file_put_contents($this->baseDir . \Our\PathConst::goodsStatTime, '1545632401');
$beginTime = file_get_contents($this->baseDir . \Our\PathConst::goodsStatTime, TIMESTAMP); $beginTime = file_get_contents($this->baseDir . \Our\PathConst::goodsStatTime, TIMESTAMP);
$beginTime = $beginTime ? $beginTime : ApiConst::zero; $beginTime = $beginTime ? $beginTime : ApiConst::zero;
$endTime = TIMESTAMP; $endTime = TIMESTAMP;
...@@ -369,9 +368,13 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -369,9 +368,13 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
} }
} }
} }
echo "\n";
if($result) { //商品报表更新成功 if($result) { //商品报表更新成功
file_put_contents($this->baseDir . \Our\PathConst::goodsStatTime, $endTime); file_put_contents($this->baseDir . \Our\PathConst::goodsStatTime, $endTime);
echo "upd goods succ";
} else {
echo "upd goods fail";
} }
return $result; return $result;
} }
...@@ -420,8 +423,12 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -420,8 +423,12 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
} }
} }
if(!$result) { if(!$result) {
echo "\n";
echo 'upd sell fail';
$statGoodsDao->db->doRollback(); $statGoodsDao->db->doRollback();
} else { //商品报表更新成功 } else { //商品报表更新成功
echo "\n";
echo 'upd sell succ';
$statGoodsDao->db->doCommit(); $statGoodsDao->db->doCommit();
file_put_contents($this->baseDir . \Our\PathConst::goodsSellStatTime, $endTime); file_put_contents($this->baseDir . \Our\PathConst::goodsSellStatTime, $endTime);
} }
......
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