Skip to content

Commit

Permalink
🚨 修复 Qodana 报错
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Oct 2, 2023
1 parent 49c716f commit 491cdf9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/plugins/Sqlite/sql/insertData.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**
* @file plugins Sqlite sql insertData.ts
* @description Sqlite 插入数据 sql 语句
* @author BTMuli <bt-muli@outlook.com>
* @since Alpha v0.2.1
* @since Beta v0.3.3
*/

// utils
Expand Down Expand Up @@ -112,22 +111,22 @@ 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
*/
export function insertCharacterData(data: TGApp.App.Character.WikiBriefInfo): string {
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()}';
`;
}

Expand Down

0 comments on commit 491cdf9

Please sign in to comment.