feat(base): 重置数据库序列并优化查询语句

- 在 base 模块初始化时添加重置所有序列的函数
- 修改多个模块中的查询语句,使用 Where(key, value) 替代 Where("key = ?", value)
- 优化部分代码结构,提高可读性和维护性
This commit is contained in:
2025-07-11 03:36:42 +08:00
parent 123543156b
commit d71b1dd169
13 changed files with 65 additions and 33 deletions

View File

@@ -22,7 +22,7 @@ func init() {
g.Log().Debug(ctx, "module task init start ...")
cool.FillInitData(ctx, "task", taskInfo)
result, err := cool.DBM(taskInfo).Where("status = ?", 1).All()
result, err := cool.DBM(taskInfo).Where("status", 1).All()
if err != nil {
panic(err)
}