|
@@ -73,18 +73,21 @@ class Cron
|
|
|
//$where['score_status'] = 1;
|
|
|
$order = Dever::db('journal/order')->state($where);
|
|
|
|
|
|
- print_r($order);die;
|
|
|
if($order) {
|
|
|
$user = array();
|
|
|
foreach ($order as $k => $v) {
|
|
|
- $key = $v['uid'] . '_' . $v['code'];
|
|
|
- if (!isset($user[$key])) {
|
|
|
- $user[$key] = $v;
|
|
|
- } else {
|
|
|
- Dever::db('journal/order')->update(array('where_id' => $v['id'], 'state' => 2));
|
|
|
+ if ($v['type'] == 2) {
|
|
|
+ $key = $v['uid'] . '_' . $v['code'];
|
|
|
+ if (!isset($user[$key])) {
|
|
|
+ $user[$key] = $v;
|
|
|
+ } else {
|
|
|
+ Dever::db('journal/order')->update(array('where_id' => $v['id'], 'state' => 2));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ return 'ok';
|
|
|
}
|
|
|
|
|
|
# 重新计算排行榜
|