swap dbpool.Update where fields loc

This commit is contained in:
aozhiwei 2024-04-12 16:14:50 +08:00
parent d3a46df616
commit c04159e349
7 changed files with 28 additions and 28 deletions

View File

@ -41,13 +41,13 @@ func (this *friend) DeleteSoft(accountId1 string, accountId2 string,
f5.GetJsStyleDb().Update( f5.GetJsStyleDb().Update(
constant.FRIEND_DB, constant.FRIEND_DB,
"t_friend_relationship", "t_friend_relationship",
[][]string{
{"deleted", q5.ToString(1)},
{"del_time", q5.ToString(f5.GetApp().GetNowSeconds())},
},
[][]string{ [][]string{
{"account_id1", accountId1}, {"account_id1", accountId1},
{"account_id2", accountId2}, {"account_id2", accountId2},
}, },
[][]string{
{"deleted", q5.ToString(1)},
{"del_time", q5.ToString(f5.GetApp().GetNowSeconds())},
},
cb) cb)
} }

View File

@ -42,14 +42,14 @@ func (this *friendApply) SetStatus(senderId string, targetId string, status int3
f5.GetJsStyleDb().Update( f5.GetJsStyleDb().Update(
constant.FRIEND_DB, constant.FRIEND_DB,
"t_friend_apply", "t_friend_apply",
[][]string{
{"status", q5.ToString(status)},
{"modifytime", q5.ToString(f5.GetApp().GetNowSeconds())},
},
[][]string{ [][]string{
{"sender_id", senderId}, {"sender_id", senderId},
{"target_id", targetId}, {"target_id", targetId},
}, },
[][]string{
{"status", q5.ToString(status)},
{"modifytime", q5.ToString(f5.GetApp().GetNowSeconds())},
},
func (err error, lastInsertId int64, rowsAffected int64) { func (err error, lastInsertId int64, rowsAffected int64) {
}) })

View File

@ -41,12 +41,12 @@ func (this *friendBlack) DeleteSoft(senderId string, targetId string,
f5.GetJsStyleDb().Update( f5.GetJsStyleDb().Update(
constant.FRIEND_DB, constant.FRIEND_DB,
"t_friend_blacklist", "t_friend_blacklist",
[][]string{
{"deleted", q5.ToString(1)},
},
[][]string{ [][]string{
{"account_id", senderId}, {"account_id", senderId},
{"block_id", targetId}, {"block_id", targetId},
}, },
[][]string{
{"deleted", q5.ToString(1)},
},
cb) cb)
} }

View File

@ -35,11 +35,11 @@ func (this *guild) DeleteSoft(guildId string,
constant.FRIEND_DB, constant.FRIEND_DB,
"t_guild", "t_guild",
[][]string{ [][]string{
{"!guild_name", q5.ToString("CONCAT(\"!\", `guild_name`)")}, {"guild_id", guildId},
{"deleted", "1"},
}, },
[][]string{ [][]string{
{"guild_id", guildId}, {"!guild_name", q5.ToString("CONCAT(\"!\", `guild_name`)")},
{"deleted", "1"},
}, },
cb) cb)
} }
@ -49,9 +49,9 @@ func (this *guild) UpdateKv(guildId string, fields [][]string,
f5.GetJsStyleDb().Update( f5.GetJsStyleDb().Update(
constant.FRIEND_DB, constant.FRIEND_DB,
"t_guild", "t_guild",
fields,
[][]string{ [][]string{
{"guild_id", guildId}, {"guild_id", guildId},
}, },
fields,
cb) cb)
} }

View File

@ -42,14 +42,14 @@ func (this *guildApply) SetStatus(guildId string, accountId string, status int32
f5.GetJsStyleDb().Update( f5.GetJsStyleDb().Update(
constant.FRIEND_DB, constant.FRIEND_DB,
"t_guild_apply", "t_guild_apply",
[][]string{
{"status", q5.ToString(status)},
{"modifytime", q5.ToString(f5.GetApp().GetNowSeconds())},
},
[][]string{ [][]string{
{"account_id", accountId}, {"account_id", accountId},
{"guild_id", guildId}, {"guild_id", guildId},
}, },
[][]string{
{"status", q5.ToString(status)},
{"modifytime", q5.ToString(f5.GetApp().GetNowSeconds())},
},
cb) cb)
} }
@ -59,10 +59,10 @@ func (this *guildApply) Clear(guildId string,
constant.FRIEND_DB, constant.FRIEND_DB,
"t_guild_apply", "t_guild_apply",
[][]string{ [][]string{
{"deleted", "1"}, {"guild_id", guildId},
}, },
[][]string{ [][]string{
{"guild_id", guildId}, {"deleted", "1"},
}, },
func (err error, lastInsertId int64, rowsAffected int64) { func (err error, lastInsertId int64, rowsAffected int64) {
}) })

View File

@ -43,13 +43,13 @@ func (this *guildMember) DeleteSoft(guildId string, memberId string,
f5.GetJsStyleDb().Update( f5.GetJsStyleDb().Update(
constant.FRIEND_DB, constant.FRIEND_DB,
"t_guild_member", "t_guild_member",
[][]string{
{"deleted", "1"},
},
[][]string{ [][]string{
{"guild_id", guildId}, {"guild_id", guildId},
{"member_id", memberId}, {"member_id", memberId},
}, },
[][]string{
{"deleted", "1"},
},
cb) cb)
} }
@ -58,12 +58,12 @@ func (this *guildMember) SetJob(guildId string, memberId string, guildJob int32,
f5.GetJsStyleDb().Update( f5.GetJsStyleDb().Update(
constant.FRIEND_DB, constant.FRIEND_DB,
"t_guild_member", "t_guild_member",
[][]string{
{"guild_job", q5.ToString(guildJob)},
},
[][]string{ [][]string{
{"guild_id", guildId}, {"guild_id", guildId},
{"member_id", memberId}, {"member_id", memberId},
}, },
[][]string{
{"guild_job", q5.ToString(guildJob)},
},
cb) cb)
} }

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit b1c82ecb4f71788941b276dc2169c192532edc3a Subproject commit 7ebe70aba4a34b3025a7877572328aded27bb76e