Commit db1233f9 authored by testshenbd's avatar testshenbd

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into master_dev

parents 1b548800 b656e013
...@@ -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;
} }
...@@ -383,7 +386,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -383,7 +386,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
* Time: 下午 6:19 * Time: 下午 6:19
*/ */
public function updateStatGoodsSell(){ public function updateStatGoodsSell(){
file_put_contents($this->baseDir . \Our\PathConst::goodsSellStatTime, '');
$beginTime = file_get_contents($this->baseDir . \Our\PathConst::goodsSellStatTime, TIMESTAMP); $beginTime = file_get_contents($this->baseDir . \Our\PathConst::goodsSellStatTime, TIMESTAMP);
$beginTime = $beginTime ? $beginTime : ApiConst::zero; $beginTime = $beginTime ? $beginTime : ApiConst::zero;
$endTime = TIMESTAMP; $endTime = TIMESTAMP;
...@@ -420,8 +422,12 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -420,8 +422,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