push
This commit is contained in:
parent
f22fd34b1a
commit
78cad38e15
@ -28,15 +28,11 @@ if __name__ == "__main__":
|
|||||||
default="00000000000000000000",
|
default="00000000000000000000",
|
||||||
)
|
)
|
||||||
parser.add_argument("--message", "-m", type=str, help="Revision message")
|
parser.add_argument("--message", "-m", type=str, help="Revision message")
|
||||||
<<<<<<< Updated upstream
|
|
||||||
parser.add_argument("action", type=str, help="create, upgrade, downgrade, create-owner, migrate, create-revision, create-autorevision")
|
|
||||||
=======
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"action",
|
"action",
|
||||||
type=str,
|
type=str,
|
||||||
help="create, upgrade, create-owner, migrate, create-revision",
|
help="create, upgrade, downgrade, create-owner, migrate, create-revision, create-autorevision",
|
||||||
)
|
)
|
||||||
>>>>>>> Stashed changes
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
cfg = CoreConfig()
|
cfg = CoreConfig()
|
||||||
|
@ -189,9 +189,11 @@ class ChuniBase:
|
|||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"type": 1,
|
"type": 1,
|
||||||
"message": f"Welcome to {self.core_cfg.server.name} network!"
|
"message": (
|
||||||
|
f"Welcome to {self.core_cfg.server.name} network!"
|
||||||
if not self.game_cfg.server.news_msg
|
if not self.game_cfg.server.news_msg
|
||||||
else self.game_cfg.server.news_msg,
|
else self.game_cfg.server.news_msg
|
||||||
|
),
|
||||||
"startDate": "2017-12-05 07:00:00.0",
|
"startDate": "2017-12-05 07:00:00.0",
|
||||||
"endDate": "2099-12-31 00:00:00.0",
|
"endDate": "2099-12-31 00:00:00.0",
|
||||||
}
|
}
|
||||||
@ -982,18 +984,6 @@ class ChuniBase:
|
|||||||
for rp in upsert["userRecentPlayerList"]:
|
for rp in upsert["userRecentPlayerList"]:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
for rating_type in {"userRatingBaseList", "userRatingBaseHotList", "userRatingBaseNextList"}:
|
|
||||||
if rating_type not in upsert:
|
|
||||||
continue
|
|
||||||
|
|
||||||
await self.data.profile.put_profile_rating(
|
|
||||||
user_id,
|
|
||||||
self.version,
|
|
||||||
rating_type,
|
|
||||||
upsert[rating_type],
|
|
||||||
)
|
|
||||||
=======
|
|
||||||
# added in LUMINOUS
|
# added in LUMINOUS
|
||||||
if "userCMissionList" in upsert:
|
if "userCMissionList" in upsert:
|
||||||
for cmission in upsert["userCMissionList"]:
|
for cmission in upsert["userCMissionList"]:
|
||||||
@ -1020,7 +1010,6 @@ class ChuniBase:
|
|||||||
False if net_battle["isRankUpChallengeFailed"] == "false" else True
|
False if net_battle["isRankUpChallengeFailed"] == "false" else True
|
||||||
)
|
)
|
||||||
await self.data.profile.put_net_battle(user_id, net_battle)
|
await self.data.profile.put_net_battle(user_id, net_battle)
|
||||||
>>>>>>> Stashed changes
|
|
||||||
|
|
||||||
return {"returnCode": "1"}
|
return {"returnCode": "1"}
|
||||||
|
|
||||||
|
@ -1,13 +1,4 @@
|
|||||||
from typing import Dict, List, Optional
|
from typing import Dict, List, Optional
|
||||||
<<<<<<< Updated upstream
|
|
||||||
from sqlalchemy import Table, Column, UniqueConstraint, and_
|
|
||||||
from sqlalchemy.types import Integer, String, Boolean, JSON, BigInteger
|
|
||||||
from sqlalchemy.schema import ForeignKey
|
|
||||||
from sqlalchemy.engine import Row
|
|
||||||
from sqlalchemy.sql import select, delete
|
|
||||||
from sqlalchemy.dialects.mysql import insert
|
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
|
|
||||||
from core.data.schema import BaseData, metadata
|
from core.data.schema import BaseData, metadata
|
||||||
from sqlalchemy import Column, Table, UniqueConstraint, and_
|
from sqlalchemy import Column, Table, UniqueConstraint, and_
|
||||||
@ -401,7 +392,6 @@ team = Table(
|
|||||||
mysql_charset="utf8mb4",
|
mysql_charset="utf8mb4",
|
||||||
)
|
)
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
rating = Table(
|
rating = Table(
|
||||||
"chuni_profile_rating",
|
"chuni_profile_rating",
|
||||||
metadata,
|
metadata,
|
||||||
@ -418,8 +408,12 @@ rating = Table(
|
|||||||
Column("difficultId", Integer),
|
Column("difficultId", Integer),
|
||||||
Column("romVersionCode", Integer),
|
Column("romVersionCode", Integer),
|
||||||
Column("score", Integer),
|
Column("score", Integer),
|
||||||
UniqueConstraint("user", "version", "type", "index", name="chuni_profile_rating_best_uk"),
|
UniqueConstraint(
|
||||||
=======
|
"user", "version", "type", "index", name="chuni_profile_rating_best_uk"
|
||||||
|
),
|
||||||
|
mysql_charset="utf8mb4",
|
||||||
|
)
|
||||||
|
|
||||||
net_battle = Table(
|
net_battle = Table(
|
||||||
"chuni_profile_net_battle",
|
"chuni_profile_net_battle",
|
||||||
metadata,
|
metadata,
|
||||||
@ -430,7 +424,6 @@ net_battle = Table(
|
|||||||
Column("battleIconId", Integer),
|
Column("battleIconId", Integer),
|
||||||
Column("battleIconNum", Integer),
|
Column("battleIconNum", Integer),
|
||||||
Column("avatarEffectPoint", Integer),
|
Column("avatarEffectPoint", Integer),
|
||||||
>>>>>>> Stashed changes
|
|
||||||
mysql_charset="utf8mb4",
|
mysql_charset="utf8mb4",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -766,10 +759,7 @@ class ChuniProfileData(BaseData):
|
|||||||
total_play_count = 0
|
total_play_count = 0
|
||||||
for row in playcount_sql:
|
for row in playcount_sql:
|
||||||
total_play_count += row[0]
|
total_play_count += row[0]
|
||||||
<<<<<<< Updated upstream
|
return {"total_play_count": total_play_count}
|
||||||
return {
|
|
||||||
"total_play_count": total_play_count
|
|
||||||
}
|
|
||||||
|
|
||||||
async def put_profile_rating(
|
async def put_profile_rating(
|
||||||
self,
|
self,
|
||||||
@ -793,8 +783,7 @@ class ChuniProfileData(BaseData):
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
=======
|
return result.lastrowid
|
||||||
return {"total_play_count": total_play_count}
|
|
||||||
|
|
||||||
async def get_net_battle(self, aime_id: int) -> Optional[Row]:
|
async def get_net_battle(self, aime_id: int) -> Optional[Row]:
|
||||||
sql = select(net_battle).where(net_battle.c.user == aime_id)
|
sql = select(net_battle).where(net_battle.c.user == aime_id)
|
||||||
@ -815,5 +804,4 @@ class ChuniProfileData(BaseData):
|
|||||||
result = await self.execute(conflict)
|
result = await self.execute(conflict)
|
||||||
if result is None:
|
if result is None:
|
||||||
return None
|
return None
|
||||||
>>>>>>> Stashed changes
|
|
||||||
return result.lastrowid
|
return result.lastrowid
|
||||||
|
@ -262,7 +262,9 @@ rating = Table(
|
|||||||
Column("difficultId", Integer),
|
Column("difficultId", Integer),
|
||||||
Column("romVersionCode", Integer),
|
Column("romVersionCode", Integer),
|
||||||
Column("score", Integer),
|
Column("score", Integer),
|
||||||
UniqueConstraint("user", "version", "type", "index", name="ongeki_profile_rating_best_uk"),
|
UniqueConstraint(
|
||||||
|
"user", "version", "type", "index", name="ongeki_profile_rating_best_uk"
|
||||||
|
),
|
||||||
mysql_charset="utf8mb4",
|
mysql_charset="utf8mb4",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -550,7 +552,6 @@ class OngekiProfileData(BaseData):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return result.rowcount
|
return result.rowcount
|
||||||
<<<<<<< Updated upstream
|
|
||||||
|
|
||||||
async def put_profile_rating(
|
async def put_profile_rating(
|
||||||
self,
|
self,
|
||||||
@ -575,5 +576,3 @@ class OngekiProfileData(BaseData):
|
|||||||
return
|
return
|
||||||
|
|
||||||
return result.lastrowid
|
return result.lastrowid
|
||||||
=======
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
|
Loading…
Reference in New Issue
Block a user