mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2025-12-14 08:06:23 +08:00
Update to v1.9
This commit is contained in:
15
README.md
15
README.md
@@ -19,6 +19,7 @@ This is a small local Arcaea server based on Python and Flask, which can simulat
|
||||
- 自定义世界模式 Customizable World Mode
|
||||
- 自定义歌曲下载 Customizable songs download
|
||||
- 单曲和曲包购买(没啥用) Single songs and song packs purchase(useless)
|
||||
- 奖励系统 Present system
|
||||
- 全角色立绘 All character drawings
|
||||
- 角色技能 Character skills
|
||||
- 自定义角色属性 Customizable characters attributes
|
||||
@@ -32,7 +33,6 @@ This is a small local Arcaea server based on Python and Flask, which can simulat
|
||||
- 角色数值 Character characteristic value
|
||||
- 数据同步的时间记录 The record of time for data synchronization
|
||||
- 服务器安全性保证 Server security assurance
|
||||
- 登录奖励 Login present
|
||||
|
||||
可能有问题 There may be problems:
|
||||
- Recent 30
|
||||
@@ -55,18 +55,13 @@ It is just so interesting. What it can do is under exploration.
|
||||
>
|
||||
> Tips: When updating, please keep the original database in case of data loss.
|
||||
|
||||
### Version 1.8.1
|
||||
- 适用于Arcaea 3.3.1版本 For Arcaea 3.3.1
|
||||
### Version 1.9
|
||||
- 适用于Arcaea 3.4.0版本 For Arcaea 3.4.0
|
||||
- 更新了歌曲数据库 Update the song database.
|
||||
- 新搭档**Luna & Mia**已解锁 Unlock the new character **Luna & Mia**.
|
||||
- 新增了奖励系统 Add the present system.
|
||||
- 修复了一些Bug Fix some bugs.
|
||||
|
||||
> 提醒:只是一次小更新,本次更新前后登录信息无法同步,需重新登录(我忘记给login表加主键了同步不了哈哈哈)
|
||||
> 已发现的问题:设置Favorite角色可能并不有效
|
||||
> 预告:登录奖励系统
|
||||
>
|
||||
> Tips: It is only a small update. The login information before and after this update can't be synchronized, so you need to log in again. (I forgot to add a primary key to the login table, so it can't be synchronized. lol)
|
||||
> Problem found: Setting the favorite character may be useless.
|
||||
> Preview: Login present system
|
||||
|
||||
## 运行环境与依赖 Running environment and requirements
|
||||
- Windows操作系统 Windows operating system
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -220,15 +220,15 @@ primary key(user_id, present_id)
|
||||
|
||||
|
||||
char = ['Hikari', 'Tairitsu', 'Kou', 'Sapphire', 'Lethe', '', 'Tairitsu(Axium)', 'Tairitsu(Grievous Lady)', 'Stella', 'Hikari & Fisica', 'Ilith', 'Eto', 'Luna', 'Shirabe', 'Hikari(Zero)', 'Hikari(Fracture)', 'Hikari(Summer)', 'Tairitsu(Summer)', 'Tairitsu & Trin',
|
||||
'Ayu', 'Eto & Luna', 'Yume', 'Seine & Hikari', 'Saya', 'Tairitsu & Chuni Penguin', 'Chuni Penguin', 'Haruna', 'Nono', 'MTA-XXX', 'MDA-21', 'Kanae', 'Hikari(Fantasia)', 'Tairitsu(Sonata)', 'Sia', 'DORO*C', 'Tairitsu(Tempest)', 'Brillante', 'Ilith(Summer)', 'Etude', 'Alice & Tenniel']
|
||||
'Ayu', 'Eto & Luna', 'Yume', 'Seine & Hikari', 'Saya', 'Tairitsu & Chuni Penguin', 'Chuni Penguin', 'Haruna', 'Nono', 'MTA-XXX', 'MDA-21', 'Kanae', 'Hikari(Fantasia)', 'Tairitsu(Sonata)', 'Sia', 'DORO*C', 'Tairitsu(Tempest)', 'Brillante', 'Ilith(Summer)', 'Etude', 'Alice & Tenniel', 'Luna & Mia']
|
||||
|
||||
skill_id = ['gauge_easy', '', '', '', 'note_mirror', '', '', 'gauge_hard', 'frag_plus_10_pack_stellights', 'gauge_easy|frag_plus_15_pst&prs', 'gauge_hard|fail_frag_minus_100', 'frag_plus_5_side_light', 'visual_hide_hp', 'frag_plus_5_side_conflict', 'challenge_fullcombo_0gauge', 'gauge_overflow', 'gauge_easy|note_mirror', 'note_mirror', 'visual_tomato_pack_tonesphere',
|
||||
'frag_rng_ayu', 'gaugestart_30|gaugegain_70', 'combo_100-frag_1', 'audio_gcemptyhit_pack_groovecoaster', 'gauge_saya', 'gauge_chuni', 'kantandeshou', 'gauge_haruna', 'frags_nono', 'gauge_pandora', 'gauge_regulus', 'omatsuri_daynight', '', '', 'sometimes(note_mirror|frag_plus_5)', 'scoreclear_aa|visual_scoregauge', 'gauge_tempest', 'gauge_hard', 'gauge_ilith_summer', '', 'note_mirror|visual_hide_far']
|
||||
'frag_rng_ayu', 'gaugestart_30|gaugegain_70', 'combo_100-frag_1', 'audio_gcemptyhit_pack_groovecoaster', 'gauge_saya', 'gauge_chuni', 'kantandeshou', 'gauge_haruna', 'frags_nono', 'gauge_pandora', 'gauge_regulus', 'omatsuri_daynight', '', '', 'sometimes(note_mirror|frag_plus_5)', 'scoreclear_aa|visual_scoregauge', 'gauge_tempest', 'gauge_hard', 'gauge_ilith_summer', '', 'note_mirror|visual_hide_far', 'frags_ongeki']
|
||||
|
||||
skill_id_uncap = ['', '', 'frags_kou', '', 'visual_ink', '', '', '', '', '', '', '', '', 'shirabe_entry_fee',
|
||||
'', '', '', '', '', '', '', 'frags_yume', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']
|
||||
'', '', '', '', '', '', '', 'frags_yume', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']
|
||||
|
||||
for i in range(0, 40):
|
||||
for i in range(0, 41):
|
||||
if i in [0, 1, 2, 4, 13, 26, 27, 28, 29, 36, 21]:
|
||||
sql = 'insert into character values('+str(
|
||||
i)+',"'+char[i]+'''",30,25000,25000,90,90,90,"'''+skill_id[i]+'''",0,0,"'''+skill_id_uncap[i]+'''",0,'',1,1)'''
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "core",
|
||||
"_id": "5fd01460a6e343038b057d28",
|
||||
"_id": "5fdab049a6e343038b0582d4",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -15,12 +15,12 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "shiawase",
|
||||
"_id": "5fd01461a6e343038b057d65",
|
||||
"_id": "5fdab049a6e343038b058314",
|
||||
"is_available": true
|
||||
}, {
|
||||
"type": "character",
|
||||
"id": "kou",
|
||||
"_id": "5fd01461a6e343038b057d64",
|
||||
"_id": "5fdab049a6e343038b058313",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -32,12 +32,12 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "dynamix",
|
||||
"_id": "5fd01461a6e343038b057d6f",
|
||||
"_id": "5fdab049a6e343038b05831c",
|
||||
"is_available": true
|
||||
}, {
|
||||
"type": "character",
|
||||
"id": "sapphire",
|
||||
"_id": "5fd01461a6e343038b057d6e",
|
||||
"_id": "5fdab049a6e343038b05831b",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -49,12 +49,12 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "mirai",
|
||||
"_id": "5fd01461a6e343038b057d69",
|
||||
"_id": "5fdab049a6e343038b058318",
|
||||
"is_available": true
|
||||
}, {
|
||||
"type": "character",
|
||||
"id": "lethe",
|
||||
"_id": "5fd01461a6e343038b057d68",
|
||||
"_id": "5fdab049a6e343038b058317",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -66,7 +66,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "yugamu",
|
||||
"_id": "5fd01460a6e343038b057d29",
|
||||
"_id": "5fdab049a6e343038b0582d5",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -78,7 +78,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "lanota",
|
||||
"_id": "5fd01460a6e343038b057d40",
|
||||
"_id": "5fdab049a6e343038b058305",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -90,7 +90,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "nijuusei",
|
||||
"_id": "5fd01460a6e343038b057d2a",
|
||||
"_id": "5fdab049a6e343038b0582d6",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -102,7 +102,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "rei",
|
||||
"_id": "5fd01460a6e343038b057d4d",
|
||||
"_id": "5fdab049a6e343038b0582fb",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -114,7 +114,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "tonesphere",
|
||||
"_id": "5fd01460a6e343038b057d42",
|
||||
"_id": "5fdab049a6e343038b058307",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -126,7 +126,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "groovecoaster",
|
||||
"_id": "5fd01460a6e343038b057d5b",
|
||||
"_id": "5fdab049a6e343038b0582f1",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -138,7 +138,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "zettai",
|
||||
"_id": "5fd01460a6e343038b057d4f",
|
||||
"_id": "5fdab049a6e343038b0582fd",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -150,7 +150,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "chunithm",
|
||||
"_id": "5fd01460a6e343038b057d39",
|
||||
"_id": "5fdab049a6e343038b0582e5",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 300,
|
||||
@@ -160,7 +160,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "prelude",
|
||||
"_id": "5fd01460a6e343038b057d5c",
|
||||
"_id": "5fdab049a6e343038b0582f2",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 400,
|
||||
@@ -170,7 +170,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "omatsuri",
|
||||
"_id": "5fd01460a6e343038b057d50",
|
||||
"_id": "5fdab049a6e343038b0582fe",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -180,7 +180,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "vs",
|
||||
"_id": "5fd01460a6e343038b057d3c",
|
||||
"_id": "5fdab049a6e343038b0582e8",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 500,
|
||||
@@ -190,7 +190,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "extend",
|
||||
"_id": "5fd01460a6e343038b057d5f",
|
||||
"_id": "5fdab049a6e343038b0582f5",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 700,
|
||||
@@ -200,7 +200,7 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "alice",
|
||||
"_id": "5fd01460a6e343038b057d55",
|
||||
"_id": "5fdab049a6e343038b058303",
|
||||
"is_available": true
|
||||
}],
|
||||
"orig_price": 500,
|
||||
@@ -210,9 +210,19 @@
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "alice_append_1",
|
||||
"_id": "5fd01460a6e343038b057d33",
|
||||
"_id": "5fdab049a6e343038b0582df",
|
||||
"is_available": true
|
||||
}],
|
||||
"orig_price": 300,
|
||||
"price": 300
|
||||
}, {
|
||||
"name": "ongeki",
|
||||
"items": [{
|
||||
"type": "pack",
|
||||
"id": "ongeki",
|
||||
"_id": "5fdab049a6e343038b0582eb",
|
||||
"is_available": true
|
||||
}],
|
||||
"orig_price": 400,
|
||||
"price": 400
|
||||
}]
|
||||
@@ -12,7 +12,7 @@
|
||||
"items": [{
|
||||
"id": "dataerror",
|
||||
"type": "single",
|
||||
"_id": "5fc8306209787401bb857d0f",
|
||||
"_id": "5fdab049a6e343038b0582ec",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -24,7 +24,7 @@
|
||||
"items": [{
|
||||
"id": "yourvoiceso",
|
||||
"type": "single",
|
||||
"_id": "5fc8306209787401bb857cf7",
|
||||
"_id": "5fdab049a6e343038b0582f8",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -36,7 +36,7 @@
|
||||
"items": [{
|
||||
"id": "crosssoul",
|
||||
"type": "single",
|
||||
"_id": "5fc8306209787401bb857d03",
|
||||
"_id": "5fdab049a6e343038b058304",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -48,7 +48,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "impurebird",
|
||||
"_id": "5fc8306209787401bb857d04",
|
||||
"_id": "5fdab049a6e343038b0582e0",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -60,7 +60,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "auxesia",
|
||||
"_id": "5fc8306209787401bb857d10",
|
||||
"_id": "5fdab049a6e343038b0582ed",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -72,7 +72,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "modelista",
|
||||
"_id": "5fc8306209787401bb857cf8",
|
||||
"_id": "5fdab049a6e343038b0582f9",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -84,7 +84,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "yozakurafubuki",
|
||||
"_id": "5fc8306209787401bb857d05",
|
||||
"_id": "5fdab049a6e343038b0582e1",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -96,7 +96,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "surrender",
|
||||
"_id": "5fc8306209787401bb857d11",
|
||||
"_id": "5fdab049a6e343038b0582ee",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -108,7 +108,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "metallicpunisher",
|
||||
"_id": "5fc8306209787401bb857cf9",
|
||||
"_id": "5fdab049a6e343038b0582fa",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -118,7 +118,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "carminescythe",
|
||||
"_id": "5fc8306209787401bb857d06",
|
||||
"_id": "5fdab049a6e343038b0582e2",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -128,7 +128,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "bethere",
|
||||
"_id": "5fc8306209787401bb857d12",
|
||||
"_id": "5fdab049a6e343038b0582ef",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -140,7 +140,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "callmyname",
|
||||
"_id": "5fc8306209787401bb857d27",
|
||||
"_id": "5fdab049a6e343038b058306",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -152,7 +152,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "fallensquare",
|
||||
"_id": "5fc8306209787401bb857d1e",
|
||||
"_id": "5fdab049a6e343038b0582d7",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -164,7 +164,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "dropdead",
|
||||
"_id": "5fc8306209787401bb857d07",
|
||||
"_id": "5fdab049a6e343038b0582e3",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -176,7 +176,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "alexandrite",
|
||||
"_id": "5fc8306209787401bb857d13",
|
||||
"_id": "5fdab049a6e343038b0582f0",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -188,7 +188,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "astraltale",
|
||||
"_id": "5fc8306209787401bb857cfb",
|
||||
"_id": "5fdab049a6e343038b0582fc",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -200,7 +200,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "phantasia",
|
||||
"_id": "5fc8306209787401bb857d1f",
|
||||
"_id": "5fdab049a6e343038b0582d8",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -210,7 +210,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "empireofwinter",
|
||||
"_id": "5fc8306209787401bb857d08",
|
||||
"_id": "5fdab049a6e343038b0582e4",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -220,7 +220,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "libertas",
|
||||
"_id": "5fc8306209787401bb857d29",
|
||||
"_id": "5fdab049a6e343038b058308",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -232,7 +232,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "dottodot",
|
||||
"_id": "5fc8306209787401bb857d20",
|
||||
"_id": "5fdab049a6e343038b0582d9",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -244,7 +244,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "dreadnought",
|
||||
"_id": "5fc8306209787401bb857d2a",
|
||||
"_id": "5fdab049a6e343038b058309",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -256,7 +256,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "mirzam",
|
||||
"_id": "5fc8306209787401bb857d21",
|
||||
"_id": "5fdab049a6e343038b0582da",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -268,7 +268,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "heavenlycaress",
|
||||
"_id": "5fc8306209787401bb857d0a",
|
||||
"_id": "5fdab049a6e343038b0582e6",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -278,7 +278,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "filament",
|
||||
"_id": "5fc8306209787401bb857d16",
|
||||
"_id": "5fdab049a6e343038b0582f3",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -288,7 +288,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "avantraze",
|
||||
"_id": "5fc8306209787401bb857d2b",
|
||||
"_id": "5fdab049a6e343038b05830a",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -298,7 +298,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "battlenoone",
|
||||
"_id": "5fc8306209787401bb857cfe",
|
||||
"_id": "5fdab049a6e343038b0582ff",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -308,7 +308,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "saikyostronger",
|
||||
"_id": "5fc8306209787401bb857d22",
|
||||
"_id": "5fdab049a6e343038b0582db",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -318,7 +318,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "izana",
|
||||
"_id": "5fc8306209787401bb857d0b",
|
||||
"_id": "5fdab049a6e343038b0582e7",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -328,7 +328,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "einherjar",
|
||||
"_id": "5fc8306209787401bb857d17",
|
||||
"_id": "5fdab049a6e343038b0582f4",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -338,7 +338,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "laqryma",
|
||||
"_id": "5fc8306209787401bb857d2c",
|
||||
"_id": "5fdab049a6e343038b05830b",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -348,7 +348,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "amygdata",
|
||||
"_id": "5fc8306209787401bb857cff",
|
||||
"_id": "5fdab049a6e343038b058300",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -358,7 +358,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "altale",
|
||||
"_id": "5fc8306209787401bb857d23",
|
||||
"_id": "5fdab049a6e343038b0582dc",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -368,7 +368,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "feelssoright",
|
||||
"_id": "5fc8306209787401bb857d2d",
|
||||
"_id": "5fdab049a6e343038b05830c",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -378,7 +378,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "scarletcage",
|
||||
"_id": "5fc8306209787401bb857d00",
|
||||
"_id": "5fdab049a6e343038b058301",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -388,7 +388,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "teriqma",
|
||||
"_id": "5fc8306209787401bb857d24",
|
||||
"_id": "5fdab049a6e343038b0582dd",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -398,7 +398,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "mahoroba",
|
||||
"_id": "5fc8306209787401bb857d0d",
|
||||
"_id": "5fdab049a6e343038b0582e9",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -408,7 +408,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "badtek",
|
||||
"_id": "5fc8306209787401bb857d2e",
|
||||
"_id": "5fdab049a6e343038b05830d",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -418,7 +418,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "maliciousmischance",
|
||||
"_id": "5fc8306209787401bb857d19",
|
||||
"_id": "5fdab049a6e343038b058302",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -428,7 +428,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "buchigireberserker",
|
||||
"_id": "5fc8306209787401bb857d25",
|
||||
"_id": "5fdab049a6e343038b0582de",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -438,7 +438,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "galaxyfriends",
|
||||
"_id": "5fc8306209787401bb857d0e",
|
||||
"_id": "5fdab049a6e343038b0582ea",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
@@ -448,7 +448,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "xeraphinite",
|
||||
"_id": "5fc8306209787401bb857d1a",
|
||||
"_id": "5fdab049a6e343038b0582f7",
|
||||
"is_available": true
|
||||
}],
|
||||
"orig_price": 100,
|
||||
@@ -458,7 +458,7 @@
|
||||
"items": [{
|
||||
"type": "single",
|
||||
"id": "xanatos",
|
||||
"_id": "5fc8306209787401bb857d2f",
|
||||
"_id": "5fdab049a6e343038b05830e",
|
||||
"is_available": true
|
||||
}],
|
||||
"price": 100,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import sqlite3
|
||||
import time
|
||||
import json
|
||||
|
||||
|
||||
def int2b(x):
|
||||
@@ -128,13 +130,15 @@ def get_user_present(c, user_id):
|
||||
'''select * from present where present_id in (select present_id from user_present where user_id=:a)''', {'a': user_id})
|
||||
x = c.fetchall()
|
||||
re = []
|
||||
now = int(time.time() * 1000)
|
||||
if x:
|
||||
for i in x:
|
||||
re.append({'expire_ts': i[1],
|
||||
'description': i[3],
|
||||
'present_id': i[0],
|
||||
'items': i[2]
|
||||
})
|
||||
if now <= int(i[1]):
|
||||
re.append({'expire_ts': i[1],
|
||||
'description': i[3],
|
||||
'present_id': i[0],
|
||||
'items': json.loads(i[2])
|
||||
})
|
||||
|
||||
return re
|
||||
|
||||
@@ -151,6 +155,25 @@ def claim_user_present(user_id, present_id):
|
||||
flag = True
|
||||
c.execute('''delete from user_present where user_id=:a and present_id=:b''',
|
||||
{'a': user_id, 'b': present_id})
|
||||
c.execute('''select * from present where present_id=:b''',
|
||||
{'b': present_id})
|
||||
x = c.fetchone()
|
||||
now = int(time.time() * 1000)
|
||||
if now <= int(x[1]):
|
||||
# 处理memory
|
||||
items = json.loads(x[2])
|
||||
for i in items:
|
||||
if i['id'] == 'memory':
|
||||
c.execute('''select ticket from user where user_id=:a''', {
|
||||
'a': user_id})
|
||||
ticket = int(c.fetchone()[0])
|
||||
ticket += int(i['amount'])
|
||||
c.execute('''update user set ticket=:b where user_id=:a''', {
|
||||
'a': user_id, 'b': ticket})
|
||||
|
||||
else:
|
||||
# 过期
|
||||
flag = False
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -104,14 +104,26 @@ def get_user_friend(c, user_id):
|
||||
c.execute('''select * from user where user_id = :x''', {'x': i[0]})
|
||||
y = c.fetchone()
|
||||
if y is not None:
|
||||
character = y[6]
|
||||
is_char_uncapped = int2b(y[8])
|
||||
is_char_uncapped_override = int2b(y[9])
|
||||
if y[23] != -1:
|
||||
character = y[23]
|
||||
c.execute('''select is_uncapped, is_uncapped_override from user_char where user_id=:a and character_id=:b''', {
|
||||
'a': i[0], 'b': character})
|
||||
z = c.fetchone()
|
||||
if z:
|
||||
is_char_uncapped = int2b(z[0])
|
||||
is_char_uncapped_override = int2b(z[1])
|
||||
|
||||
s.append({
|
||||
"is_mutual": is_mutual,
|
||||
"is_char_uncapped_override": int2b(y[9]),
|
||||
"is_char_uncapped": int2b(y[8]),
|
||||
"is_char_uncapped_override": is_char_uncapped_override,
|
||||
"is_char_uncapped": is_char_uncapped,
|
||||
"is_skill_sealed": int2b(y[7]),
|
||||
"rating": y[5],
|
||||
"join_date": int(y[3]),
|
||||
"character": y[6],
|
||||
"character": character,
|
||||
"recent_score": get_recent_score(c, i[0]),
|
||||
"name": y[1],
|
||||
"user_id": i[0]
|
||||
|
||||
37
latest version/templates/web/allpresent.html
Normal file
37
latest version/templates/web/allpresent.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block header %}
|
||||
<h1>{% block title %}All presents{% endblock %}</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if posts %}<br />
|
||||
{% for present in posts %}
|
||||
|
||||
<div class="char-present">
|
||||
<span>Id: </span>
|
||||
<span class="name">{{present['present_id']}}</span>
|
||||
<br />
|
||||
|
||||
<span>Expire time: </span>
|
||||
<span class="char-num">{{present['expire_ts']}}</span>
|
||||
<br />
|
||||
|
||||
<span>Description: </span>
|
||||
<span class="char-num">{{present['description']}}</span>
|
||||
<br />
|
||||
|
||||
<span>Items: </span>
|
||||
<span class="char-num" style='white-space:pre'>{{present['items']}}</span>
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
{% if not loop.last %}
|
||||
<br />
|
||||
<hr />
|
||||
<br />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
39
latest version/templates/web/changepresent.html
Normal file
39
latest version/templates/web/changepresent.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block header %}
|
||||
<h1>{% block title %}Change the presents{% endblock %}</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/web/changepresent/addpresent" method="post">
|
||||
<div class="title">Add the present</div>
|
||||
<label for="present_id">ID of the present</label>
|
||||
<input name="present_id" id="present_id" required>
|
||||
<label for="description">Description of the present</label>
|
||||
<input name="description" id="description" required>
|
||||
|
||||
<label for="expire_ts">Expire time</label>
|
||||
<input type="datetime-local" name="expire_ts" id="expire_ts" required>
|
||||
<br />
|
||||
<div>Items:</div>
|
||||
<label for="fragment">Fragments</label>
|
||||
<input name="fragment" id="fragment">
|
||||
<label for="ticket">Memories</label>
|
||||
<input name="ticket" id="ticket">
|
||||
|
||||
<div class="content">两种奖励只能有一个,另一个请留空。如果都填写,以记忆源点优先。</div>
|
||||
<div class="content">There can only be one of the two kinds of present. Please leave the other one blank. If you
|
||||
fill both, the memories will be given priority.</div>
|
||||
<div class="content">时间填写是一个HTML5控件</div>
|
||||
<div class="content">Time filling is an HTML5 control.</div>
|
||||
<input type="submit" value="Add">
|
||||
</form>
|
||||
<br />
|
||||
<hr />
|
||||
<form action="/web/changepresent/deletepresent" method="post">
|
||||
<div class="title">Delete the present</div>
|
||||
<label for="present_id">ID of the present</label>
|
||||
<input name="present_id" id="present_id" required>
|
||||
|
||||
<input type="submit" value="Delete">
|
||||
</form>
|
||||
{% endblock %}
|
||||
32
latest version/templates/web/deliverpresent.html
Normal file
32
latest version/templates/web/deliverpresent.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block header %}
|
||||
<h1>{% block title %}Deliver presents{% endblock %}</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/web/deliverpresent" method="post">
|
||||
<div class="title">Deliver to the user</div>
|
||||
<label for="name">Arcaea Username</label>
|
||||
<input name="name" id="name">
|
||||
or<br />
|
||||
<label for="user_code">Arcaea User Code</label>
|
||||
<input name="user_code" id="user_code">
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<label for="present_id">ID of the present</label>
|
||||
<input name="present_id" id="present_id" required>
|
||||
|
||||
<br />
|
||||
<input type="submit" value="Edit">
|
||||
</form>
|
||||
<br />
|
||||
<hr />
|
||||
<form action="/web/deliverpresent" method="post">
|
||||
<div class="title">Deliver to all the users</div>
|
||||
<label for="present_id">ID of the present</label>
|
||||
<input name="present_id" id="present_id" required>
|
||||
|
||||
<input type="submit" value="Edit all">
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -16,6 +16,7 @@
|
||||
<a href="{{ url_for('index.all_song') }}">铺面信息查询 All songs</a></br></br>
|
||||
<a href="{{ url_for('index.all_character') }}">角色信息查询 All characters</a></br></br>
|
||||
<a href="{{ url_for('index.all_item') }}">购买信息查询 All items</a></br></br>
|
||||
<a href="{{ url_for('index.all_present') }}">奖励信息查询 All presents</a></br></br>
|
||||
<a href="{{ url_for('index.single_chart_top') }}">单个铺面排行榜查询 Single song chart tops</a>
|
||||
<hr>
|
||||
<h1>系统方面 System</h1>
|
||||
@@ -25,7 +26,9 @@
|
||||
<a href="{{ url_for('index.change_character') }}">角色修改 Change the characters</a></br></br>
|
||||
<a href="{{ url_for('index.change_item') }}">购买信息修改 Change the items</a></br></br>
|
||||
<a href="{{ url_for('index.change_user') }}">用户信息修改 Change user information</a></br></br>
|
||||
<a href="{{ url_for('index.change_user_purchase') }}">用户购买信息修改 Change user purchase information</a>
|
||||
<a href="{{ url_for('index.change_user_purchase') }}">用户购买信息修改 Change user purchase information</a></br></br>
|
||||
<a href="{{ url_for('index.change_present') }}">奖励修改 Change the presents</a></br></br>
|
||||
<a href="{{ url_for('index.deliver_present') }}">奖励分发 Deliver the presents</a>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -9,6 +9,7 @@ import web.system
|
||||
import time
|
||||
import server.arcscore
|
||||
import os
|
||||
import json
|
||||
|
||||
UPLOAD_FOLDER = 'database'
|
||||
ALLOWED_EXTENSIONS = {'db'}
|
||||
@@ -402,7 +403,7 @@ def all_character():
|
||||
def change_character():
|
||||
# 修改角色数据
|
||||
skill_ids = ['No_skill', 'gauge_easy', 'note_mirror', 'gauge_hard', 'frag_plus_10_pack_stellights', 'gauge_easy|frag_plus_15_pst&prs', 'gauge_hard|fail_frag_minus_100', 'frag_plus_5_side_light', 'visual_hide_hp', 'frag_plus_5_side_conflict', 'challenge_fullcombo_0gauge', 'gauge_overflow', 'gauge_easy|note_mirror', 'note_mirror', 'visual_tomato_pack_tonesphere',
|
||||
'frag_rng_ayu', 'gaugestart_30|gaugegain_70', 'combo_100-frag_1', 'audio_gcemptyhit_pack_groovecoaster', 'gauge_saya', 'gauge_chuni', 'kantandeshou', 'gauge_haruna', 'frags_nono', 'gauge_pandora', 'gauge_regulus', 'omatsuri_daynight', 'sometimes(note_mirror|frag_plus_5)', 'scoreclear_aa|visual_scoregauge', 'gauge_tempest', 'gauge_hard', 'gauge_ilith_summer', 'frags_kou', 'visual_ink', 'shirabe_entry_fee', 'frags_yume', 'note_mirror|visual_hide_far']
|
||||
'frag_rng_ayu', 'gaugestart_30|gaugegain_70', 'combo_100-frag_1', 'audio_gcemptyhit_pack_groovecoaster', 'gauge_saya', 'gauge_chuni', 'kantandeshou', 'gauge_haruna', 'frags_nono', 'gauge_pandora', 'gauge_regulus', 'omatsuri_daynight', 'sometimes(note_mirror|frag_plus_5)', 'scoreclear_aa|visual_scoregauge', 'gauge_tempest', 'gauge_hard', 'gauge_ilith_summer', 'frags_kou', 'visual_ink', 'shirabe_entry_fee', 'frags_yume', 'note_mirror|visual_hide_far', 'frags_ongeki']
|
||||
return render_template('web/changechar.html', skill_ids=skill_ids)
|
||||
|
||||
|
||||
@@ -824,3 +825,164 @@ def update_user_save():
|
||||
flash(error)
|
||||
|
||||
return render_template('web/updateusersave.html')
|
||||
|
||||
|
||||
@bp.route('/allpresent', methods=['GET'])
|
||||
@login_required
|
||||
def all_present():
|
||||
# 所有奖励数据
|
||||
|
||||
conn = sqlite3.connect('./database/arcaea_database.db')
|
||||
c = conn.cursor()
|
||||
c.execute('''select * from present''')
|
||||
x = c.fetchall()
|
||||
error = None
|
||||
if x:
|
||||
posts = []
|
||||
for i in x:
|
||||
items = json.loads(i[2])
|
||||
items_string = ''
|
||||
for j in items:
|
||||
items_string = items_string + '\n' + \
|
||||
str(j['id']) + ': ' + str(j['amount'])
|
||||
|
||||
posts.append({'present_id': i[0],
|
||||
'expire_ts': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(int(i[1])//1000)),
|
||||
'items': items_string,
|
||||
'description': i[3]
|
||||
})
|
||||
else:
|
||||
error = '没有奖励数据 No present data.'
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
if error:
|
||||
flash(error)
|
||||
return render_template('web/allpresent.html')
|
||||
else:
|
||||
return render_template('web/allpresent.html', posts=posts)
|
||||
|
||||
|
||||
@bp.route('/changepresent', methods=['GET'])
|
||||
@login_required
|
||||
def change_present():
|
||||
# 修改奖励数据
|
||||
return render_template('web/changepresent.html')
|
||||
|
||||
|
||||
@bp.route('/changepresent/addpresent', methods=['POST'])
|
||||
@login_required
|
||||
def add_present():
|
||||
# 添加奖励数据
|
||||
present_id = request.form['present_id']
|
||||
expire_ts = request.form['expire_ts']
|
||||
description = request.form['description']
|
||||
fragment = request.form['fragment']
|
||||
ticket = request.form['ticket']
|
||||
try:
|
||||
if ticket:
|
||||
ticket = int(ticket)
|
||||
if fragment:
|
||||
fragment = int(fragment)
|
||||
expire_ts = int(time.mktime(time.strptime(
|
||||
expire_ts, "%Y-%m-%dT%H:%M"))) * 1000
|
||||
except:
|
||||
flash('数据错误 Wrong data.')
|
||||
return redirect(url_for('index.change_present'))
|
||||
|
||||
if len(present_id) >= 256:
|
||||
present_id = present_id[:200]
|
||||
if len(description) >= 256:
|
||||
description = description[:200]
|
||||
|
||||
items = []
|
||||
if ticket:
|
||||
items.append({'type': 'memory', 'id': 'memory', 'amount': ticket})
|
||||
if fragment:
|
||||
items.append(
|
||||
{'type': 'fragment', 'id': 'fragment', 'amount': fragment})
|
||||
if items == []:
|
||||
flash('奖励为空 No items.')
|
||||
return redirect(url_for('index.change_present'))
|
||||
|
||||
message = web.system.add_one_present(
|
||||
present_id, expire_ts, description, json.dumps(items))
|
||||
|
||||
if message:
|
||||
flash(message)
|
||||
|
||||
return redirect(url_for('index.change_present'))
|
||||
|
||||
|
||||
@bp.route('/changepresent/deletepresent', methods=['POST'])
|
||||
@login_required
|
||||
def delete_present():
|
||||
# 删除奖励数据
|
||||
present_id = request.form['present_id']
|
||||
message = web.system.delete_one_present(present_id)
|
||||
|
||||
if message:
|
||||
flash(message)
|
||||
|
||||
return redirect(url_for('index.change_present'))
|
||||
|
||||
|
||||
@bp.route('/deliverpresent', methods=['GET', 'POST'])
|
||||
@login_required
|
||||
def deliver_present():
|
||||
# 分发奖励
|
||||
|
||||
if request.method == 'GET':
|
||||
return render_template('web/deliverpresent.html')
|
||||
|
||||
error = None
|
||||
flag = True
|
||||
name = None
|
||||
user_code = None
|
||||
present_id = request.form['present_id']
|
||||
|
||||
conn = sqlite3.connect('./database/arcaea_database.db')
|
||||
c = conn.cursor()
|
||||
if not web.system.is_present_available(c, present_id):
|
||||
flash("奖励不存在 The present does not exist.")
|
||||
conn.commit()
|
||||
conn.close()
|
||||
return render_template('web/deliverpresent.html')
|
||||
|
||||
# 全修改
|
||||
if 'name' not in request.form and 'user_code' not in request.form:
|
||||
flag = False
|
||||
web.system.deliver_all_user_present(c, present_id)
|
||||
flash("全部用户奖励分发成功 Successfully deliver the present to all users.")
|
||||
else:
|
||||
name = request.form['name']
|
||||
user_code = request.form['user_code']
|
||||
|
||||
# 指定修改f
|
||||
if name or user_code:
|
||||
if user_code:
|
||||
c.execute('''select user_id from user where user_code=:a''', {
|
||||
'a': user_code})
|
||||
else:
|
||||
c.execute(
|
||||
'''select user_id from user where name=:a''', {'a': name})
|
||||
|
||||
user_id = c.fetchone()
|
||||
if user_id:
|
||||
user_id = user_id[0]
|
||||
web.system.deliver_one_user_present(c, present_id, user_id)
|
||||
flash("用户奖励分发成功 Successfully deliver the present to the user.")
|
||||
|
||||
else:
|
||||
error = '玩家不存在 The player does not exist.'
|
||||
|
||||
else:
|
||||
if flag:
|
||||
error = '输入为空 Null Input.'
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
if error:
|
||||
flash(error)
|
||||
|
||||
return render_template('web/deliverpresent.html')
|
||||
|
||||
@@ -301,3 +301,80 @@ def update_all_save(c):
|
||||
update_one_save(c, i[0])
|
||||
|
||||
return
|
||||
|
||||
|
||||
def add_one_present(present_id, expire_ts, description, items):
|
||||
# 添加一个奖励
|
||||
|
||||
message = None
|
||||
conn = sqlite3.connect('./database/arcaea_database.db')
|
||||
c = conn.cursor()
|
||||
c.execute(
|
||||
'''select exists(select * from present where present_id=:a)''', {'a': present_id})
|
||||
if c.fetchone() == (0,):
|
||||
c.execute('''insert into present values(:a,:b,:c,:d)''', {
|
||||
'a': present_id, 'b': expire_ts, 'c': items, 'd': description})
|
||||
message = '添加成功 Successfully add it.'
|
||||
else:
|
||||
message = '奖励已存在 The present exists.'
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
return message
|
||||
|
||||
|
||||
def delete_one_present(present_id):
|
||||
# 删除一个奖励
|
||||
|
||||
message = None
|
||||
conn = sqlite3.connect('./database/arcaea_database.db')
|
||||
c = conn.cursor()
|
||||
c.execute(
|
||||
'''select exists(select * from present where present_id=:a)''', {'a': present_id})
|
||||
if c.fetchone() == (1,):
|
||||
c.execute('''delete from present where present_id = :a''',
|
||||
{'a': present_id})
|
||||
c.execute('''delete from user_present where present_id =:a''', {
|
||||
'a': present_id})
|
||||
message = '删除成功 Successfully delete it.'
|
||||
else:
|
||||
message = '奖励不存在 The present does not exist.'
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
return message
|
||||
|
||||
|
||||
def is_present_available(c, present_id):
|
||||
# 判断present_id是否有效
|
||||
c.execute(
|
||||
'''select exists(select * from present where present_id = :a)''', {'a': present_id})
|
||||
|
||||
if c.fetchone() == (1,):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def deliver_one_user_present(c, present_id, user_id):
|
||||
# 为指定玩家添加奖励,重复添加不会提示
|
||||
c.execute('''select exists(select * from user_present where user_id=:a and present_id=:b)''',
|
||||
{'a': user_id, 'b': present_id})
|
||||
if c.fetchone() == (0,):
|
||||
c.execute('''insert into user_present values(:a,:b)''',
|
||||
{'a': user_id, 'b': present_id})
|
||||
return
|
||||
|
||||
|
||||
def deliver_all_user_present(c, present_id):
|
||||
# 为所有玩家添加奖励
|
||||
c.execute('''select user_id from user''')
|
||||
x = c.fetchall()
|
||||
if x:
|
||||
c.execute('''delete from user_present where present_id=:b''',
|
||||
{'b': present_id})
|
||||
for i in x:
|
||||
c.execute('''insert into user_present values(:a,:b)''',
|
||||
{'a': i[0], 'b': present_id})
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user