From 491cdf9af6983615d8cc8439be15d795a0f98ee9 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Mon, 2 Oct 2023 23:02:14 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20=E4=BF=AE=E5=A4=8D=20Qodana=20?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/Sqlite/sql/insertData.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/plugins/Sqlite/sql/insertData.ts b/src/plugins/Sqlite/sql/insertData.ts index d7dbc566..d51a3425 100644 --- a/src/plugins/Sqlite/sql/insertData.ts +++ b/src/plugins/Sqlite/sql/insertData.ts @@ -1,8 +1,7 @@ /** * @file plugins Sqlite sql insertData.ts * @description Sqlite 插入数据 sql 语句 - * @author BTMuli - * @since Alpha v0.2.1 + * @since Beta v0.3.3 */ // utils @@ -112,7 +111,7 @@ export function insertNameCardData(data: TGApp.App.NameCard.Item): string { /** * @description 插入角色数据 - * @since Alpha v0.2.0 + * @since Beta v0.3.3 * @param {TGApp.User.Character.Item} data 角色数据 * @returns {string} sql */ @@ -120,14 +119,14 @@ export function insertCharacterData(data: TGApp.App.Character.WikiBriefInfo): st return ` INSERT INTO AppCharacters (id, name, star, element, weapon, nameCard, birthday, updated) VALUES (${data.id}, '${data.name}', ${data.star}, '${data.element}', '${data.weapon}', - '${data.nameCard}', '${data.birthday}', datetime('now', 'localtime')) + '${data.nameCard}', '${data.birthday.toString()}', datetime('now', 'localtime')) ON CONFLICT(id) DO UPDATE SET name = '${data.name}', star = ${data.star}, element = '${data.element}', weapon = '${data.weapon}', nameCard = '${data.nameCard}', - birthday = '${data.birthday}'; + birthday = '${data.birthday.toString()}'; `; }