wupengfei 2 years ago
parent
commit
1638fbdca9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      application/api/controller/Timedtask.php

+ 2 - 2
application/api/controller/Timedtask.php

@@ -41,9 +41,9 @@ class Timedtask
     {
     {
         $month = date('m');
         $month = date('m');
         $clean_set = sysconf('integral_clean');
         $clean_set = sysconf('integral_clean');
-        if($month == 1 && $clean_set != date('Y-m-d'))
+        if($month == 11 && $clean_set != date('Y-m-d'))
         {
         {
-            Db::name('system_config')->where(['integral_clean'=>date('Y-m-d')]);
+            Db::name('system_config')->where(['value'=>'integral_clean'])->update(['integral_clean'=>date('Y-m-d')]);
             $user_list = Db::name('store_member')->field('id,integral')->where('integral','>',0)->select();
             $user_list = Db::name('store_member')->field('id,integral')->where('integral','>',0)->select();
             foreach ($user_list as $v) {
             foreach ($user_list as $v) {
                 update_user_integral($v['id'],$v['integral']*-1,10,'积分清零');
                 update_user_integral($v['id'],$v['integral']*-1,10,'积分清零');