Browse Source

中奖榜显示昨天的。邀请新人奖励发到money

lizhen_gitee 2 months ago
parent
commit
6f494d8690
2 changed files with 4 additions and 4 deletions
  1. 2 2
      application/api/controller/Active.php
  2. 2 2
      application/api/controller/User.php

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

@@ -234,12 +234,12 @@ class Active extends Api
 
     //中奖榜
     public function active_finish_result(){
-        $qi = date('Ymd');
+        $qi = date('Ymd',time()-86400);
 //        $qi = '20241225';
         $sql = Db::name('active_user_number')->field('user_id,sum(gold) as sum_gold')->where('createdate',$qi)->where('status',1)->group('user_id')->buildSql();
 
         $list = Db::Table($sql)->alias('a')->field('user.avatar,user.nickname,a.user_id,a.sum_gold')->join('user','a.user_id = user.id','LEFT')->order('a.sum_gold desc')->select();
-        $qi_text = '第'.$qi.'期 '. $this->get_week();
+        $qi_text = '第'.$qi.'期 '. $this->get_week(date('N',strtotime($qi)));
 
         $result = [
             'qi'   => $qi_text,

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

@@ -231,7 +231,7 @@ class User extends Api
         if(isset($data['intro_uid'])){
             $intro_gold = config('site.new_user_intro_gold');
             if($intro_gold > 0){
-                $rs_wallet = model('wallet')->lockChangeAccountRemain($data['intro_uid'], 0,'gold',$intro_gold,34,'邀请'.$this->auth->username.'注册奖励');
+                $rs_wallet = model('wallet')->lockChangeAccountRemain($data['intro_uid'], 0,'money',$intro_gold,34,'邀请'.$this->auth->username.'注册奖励');
                 if($rs_wallet['status'] === false){
                     Db::rollback();
                     $this->error('邀请新人奖励赠送失败');
@@ -363,7 +363,7 @@ class User extends Api
         if(isset($data['intro_uid'])){
             $intro_gold = config('site.new_user_intro_gold');
             if($intro_gold > 0){
-                $rs_wallet = model('wallet')->lockChangeAccountRemain($data['intro_uid'], 0,'gold',$intro_gold,34,'邀请'.$this->auth->username.'注册奖励');
+                $rs_wallet = model('wallet')->lockChangeAccountRemain($data['intro_uid'], 0,'money',$intro_gold,34,'邀请'.$this->auth->username.'注册奖励');
                 if($rs_wallet['status'] === false){
                     Db::rollback();
                     $this->error('邀请新人奖励赠送失败');