|
|
@@ -788,19 +788,21 @@ class PensionTasks extends Command
|
|
788
|
788
|
->whereIn('type', [1, 2])
|
|
789
|
789
|
->select()
|
|
790
|
790
|
->toArray();
|
|
791
|
|
- foreach ($user_pv_list as $user_pv) {
|
|
792
|
|
- // 修改pv
|
|
793
|
|
- Db::name('user')
|
|
794
|
|
- ->where('uid', $user_pv['uid'])
|
|
795
|
|
- ->inc('pv', (float)$user_pv['pv'])
|
|
796
|
|
- ->update();
|
|
797
|
|
- Db::name('user_pv_log')
|
|
798
|
|
- ->where('status', -1)
|
|
799
|
|
- ->where('id', $user_pv['id'])
|
|
800
|
|
- ->update([
|
|
801
|
|
- 'status' => 1,
|
|
802
|
|
- 'settlement_time' => date('Y-m-d H:i:s')
|
|
803
|
|
- ]);
|
|
|
791
|
+ if($user_pv_list) {
|
|
|
792
|
+ foreach ($user_pv_list as $user_pv) {
|
|
|
793
|
+ // 修改pv
|
|
|
794
|
+ Db::name('user')
|
|
|
795
|
+ ->where('uid', $user_pv['uid'])
|
|
|
796
|
+ ->inc('pv', (float)$user_pv['pv'])
|
|
|
797
|
+ ->update();
|
|
|
798
|
+ Db::name('user_pv_log')
|
|
|
799
|
+ ->where('status', -1)
|
|
|
800
|
+ ->where('id', $user_pv['id'])
|
|
|
801
|
+ ->update([
|
|
|
802
|
+ 'status' => 1,
|
|
|
803
|
+ 'settlement_time' => date('Y-m-d H:i:s')
|
|
|
804
|
+ ]);
|
|
|
805
|
+ }
|
|
804
|
806
|
}
|
|
805
|
807
|
|
|
806
|
808
|
|