Browse Source

玩家反馈

cyzhao 3 years ago
parent
commit
2516953ead
2 changed files with 36 additions and 1 deletions
  1. 5 0
      Gameserver/Amfphp/base/CmdCode.php
  2. 31 1
      Gameserver/Amfphp/process/UserProc.php

+ 5 - 0
Gameserver/Amfphp/base/CmdCode.php

@@ -154,6 +154,11 @@ class CmdCode {
      * 6014 初始化火山引擎
      */
     const cmd_user_stat_initvolc = 6014;
+    
+    /**
+     * 6015 收集玩家意见和bug
+     */
+    const cmd_user_ctxBack = 6015;
     // </editor-fold>
     //
     // <editor-fold defaultstate="collapsed" desc="好友操作码 - 61xx">

+ 31 - 1
Gameserver/Amfphp/process/UserProc.php

@@ -45,11 +45,41 @@ class UserProc {
 
             case CmdCode::cmd_user_stat_initvolc:                               # 6014 初始化火山引擎所需数据
                 return self::InitVolcData();
+            case CmdCode::cmd_user_ctxBack:                                     # 6015 收集玩家反馈
+                return self::UserCtxBack();                   
             default:
                 Err(ErrCode::cmd_err);
         }
     }
-
+    
+    /**
+     * 6015 收集玩家反馈
+     */
+    public static function UserCtxBack() {
+        $userID = req()->uid;
+        $zoneid = req()->zoneid;
+        list($ctx,$type,$phoneId) = req()->paras;   
+            
+        $ret = self::insertUserCtxBack($userID, $zoneid, $ctx, $phoneId,$type);  
+        return Resp::ok();
+    }
+    
+    /**
+     * 收集玩家反馈
+     * @param type $userID
+     * @param type $zoneid
+     * @param type $ctx
+     * @param type $phoneId
+     * @return type
+     */
+    static function insertUserCtxBack($userID,$zoneid,$ctx,$phoneId,$type) {
+        $paydb = daoInst();              
+        $sql = "INSERT INTO `tab_userCtxBack` (tid,uid,zoneid,ctx,phoneId,type) VALUES (null,'%s',%d,'%s','%s','%s')";
+        $query = sprintf($sql,$userID,$zoneid,$ctx,$phoneId,$type);     
+        $result = $paydb->exec($query);          
+        return $result;
+    }
+    
     /**
      * 6014 初始化火山引擎所需数据
      */