## **活力优选【小程序】**
*****
```
// 商家积分默认时间到账操作
function defaultGet($day=7){
$time = time();
$order = \think\Db::name('point_change')->where("status=0 and create_time<$time-86400*$day")->field('id')->select();
if($order){
$orderA = array_chunk(array_column($order,'id'),300);
foreach ($orderA as $v){
$orderS = implode(',',$v);
\think\Db::name('point_change')->where("id in ($orderS)")->update(['status'=>1,'update_time'=>time()]);
}
return json(['code'=>200,'msg'=>'积分默认到账执行完成']);
}else{
return json(['code'=>201,'msg'=>'未找到要执行的积分']);
}
}
```