|
@@ -6,8 +6,6 @@ class OptionalChestModel extends CI_Model
|
|
{
|
|
{
|
|
$tb = otable::optionalChestConfig();
|
|
$tb = otable::optionalChestConfig();
|
|
|
|
|
|
- $jsonData = [];
|
|
|
|
-
|
|
|
|
// 校验
|
|
// 校验
|
|
foreach ($data as $item) {
|
|
foreach ($data as $item) {
|
|
if (empty($item['id'])) {
|
|
if (empty($item['id'])) {
|
|
@@ -33,7 +31,6 @@ class OptionalChestModel extends CI_Model
|
|
return array(1, "$prefix 奖励不能配置为自选宝箱");
|
|
return array(1, "$prefix 奖励不能配置为自选宝箱");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- $jsonData[$item['id']] = $item;
|
|
|
|
|
|
|
|
$item['reward'] = json_encode($item['reward'], JSON_NUMERIC_CHECK);
|
|
$item['reward'] = json_encode($item['reward'], JSON_NUMERIC_CHECK);
|
|
$sql = funs::db_upsertSQL($tb, $item);
|
|
$sql = funs::db_upsertSQL($tb, $item);
|
|
@@ -43,6 +40,14 @@ class OptionalChestModel extends CI_Model
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ $list = oo::commonOprDb('games')->getAll("SELECT * from {$tb} WHERE 1");
|
|
|
|
+
|
|
|
|
+ $jsonData = [];
|
|
|
|
+ foreach ($list as $item) {
|
|
|
|
+ $item['reward'] = json_decode($item['reward'], true);
|
|
|
|
+ $jsonData[$item['id']] = $item;
|
|
|
|
+ }
|
|
|
|
+
|
|
self::updateCache($jsonData);
|
|
self::updateCache($jsonData);
|
|
|
|
|
|
$filename = 'OptionalChestConf' . time() . '.json';
|
|
$filename = 'OptionalChestConf' . time() . '.json';
|