<?php

class TreasureModel extends CI_Model
{

    /**
     * 更新金币老虎机 prd系数
     */
    public static function SavePrdConf(int $gid, array $data)
    {

        $upload = json_encode(['prdConf' => $data], JSON_NUMERIC_CHECK);

        $tb = otable::treasureProGroups();
        $sql = "UPDATE {$tb} SET `extend`='{$upload}' WHERE `id`={$gid}";
        $rs = oo::commonOprDb('games')->query($sql);

        oo::commonOprRedis('games')->delete(okeys::treasureSlotGroupConf());

        return $rs ? $rs : 0;
    }
}