@@ -9,13 +9,16 @@ class Cron
# 增加积分
public function score_api()
{
- $data = Dever::load('score/action_log')->getDataByDate();
+ $where['time'] = Dever::maketime('2019-04-24 20:00:00');
+ $where['score_type'] = 1;
+ $data = Dever::db('score/action_log')->getDataByDate($where);
if ($data) {
foreach ($data as $k => $v) {
Dever::load('score/lib/core.oper?log_id='.$v['id']);
}
+ return $data;
@@ -149,11 +149,11 @@ return array
# 匹配的正则或函数 选填项
'option' => array
(
- 'uid' => 'yes',
+ 'time' => array('yes-cdate', '>='),
),
'type' => 'all',
'order' => array('id' => 'desc'),
- 'col' => 'uid,config_id,score|config_id',
+ 'col' => 'id',
)
);
@@ -92,6 +92,8 @@ class Core
return;
Dever::db('score/action_log')->update(array('where_id' => $log['id'], 'score_type' => 2, 'score' => $num));
+ } else {
+ Dever::db('score/action_log')->update(array('where_id' => $log['id'], 'score_type' => 2, 'score' => $num));
$update = array();