<?php

/**
 * Notes:投注相关
 * User: wsc
 * Time: 2020/3/10 19:25
 * Class Gamble
 */
use \GatewayWorker\Lib\Gateway;
require_once "./GatewayWorker/Function/Init.php";
class ActivityCrazyWorker extends Init {
    /**
     * 金币老虎机上报领奖
     * @param $client_id string
     * @param $data array
     */
    public function treasureReward($client_id,$data){
        $uid   = intval($data['uid']);
        $coins = intval($data['bet']);
        $res  = oo::commonOprModel('activitynew')->treasureSlotReward($uid,$coins, false);
        $return = json_encode([
            'cmd'            => ocmd::$send['Activity_treasureReward'],
            'data'           => $res,
            'httpIdentifier' => $data['httpIdentifier'],
        ],JSON_NUMERIC_CHECK);
        Gateway::sendToClient($client_id,$this->encryp($return));
    }
}
