Commit b951d479 authored by wwccw0591's avatar wwccw0591

upd

parent b656e013
...@@ -326,6 +326,8 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -326,6 +326,8 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$storeDao = \DAO\StoreModel::getInstance(); $storeDao = \DAO\StoreModel::getInstance();
$statGoodsDao = \DAO\StatGoodsModel::getInstance(DbNameConst::masterDBConnectName); $statGoodsDao = \DAO\StatGoodsModel::getInstance(DbNameConst::masterDBConnectName);
$store_tmp = array(); $store_tmp = array();
$count = $statGoodsDao->getCountByWhere('1=1');
if($count > 0) {
if($datas = $goodsDao->getList($where, $field)) { //更新商品报表 if($datas = $goodsDao->getList($where, $field)) { //更新商品报表
echo 'in:'.count($datas); echo 'in:'.count($datas);
foreach ($datas as $key=>$val) { foreach ($datas as $key=>$val) {
...@@ -346,6 +348,9 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -346,6 +348,9 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
} }
} }
} }
} else {
file_put_contents($this->baseDir . \Our\PathConst::goodsSellStatTime, '0');
}
$where = 'goods_id not in (select sg.goods_id from han_stat_goods sg)'; $where = 'goods_id not in (select sg.goods_id from han_stat_goods sg)';
if($datas = $goodsDao->getList($where, $field)) { //插入高品报表 if($datas = $goodsDao->getList($where, $field)) { //插入高品报表
......
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