|
@@ -44,4 +44,25 @@ class commandControl extends BaseCronControl
|
|
|
account_helper::order_cancel($order_sn,$member_id,true);
|
|
|
}
|
|
|
}
|
|
|
+ public function init_commentsOp()
|
|
|
+ {
|
|
|
+ $mod = Model('goods');
|
|
|
+ $i = 0;
|
|
|
+ while (true)
|
|
|
+ {
|
|
|
+ $start = $i * 1000;
|
|
|
+ $items = Model()->table('evaluate_goods')->field('geval_commonid,geval_goodsid')->order('geval_id asc')->limit("{$start},1000")->select();
|
|
|
+ if(empty($items)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $i++;
|
|
|
+
|
|
|
+ foreach ($items as $item)
|
|
|
+ {
|
|
|
+ $cid = intval($item['geval_commonid']);
|
|
|
+ if($cid <= 0) continue;
|
|
|
+ $mod->editGoodsCommon(['comments' => array('exp', "comments+1")],['goods_commonid' => $cid]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|