Merge remote-tracking branch 'origin/main' into multi-tenant

This commit is contained in:
TsMask committed 2025-02-25 16:21:41 +08:00
commit e2199e00a1
26 files changed
+164 -134

No files matched your search

@@ -208,8 +208,10 @@ func (r *NeInfo) UpdateState(id, status string) int64 {
tx := datasource.DB("").Model(&model.NeInfo{})
// 构建查询条件
tx = tx.Where("id = ?", id)
tx.UpdateColumn("status", status)
tx.UpdateColumn("update_time", time.Now().UnixMilli())
// 执行更新
if err := tx.UpdateColumn("status", status).Error; err != nil {
if err := tx.Error; err != nil {
logger.Errorf("update err => %v", err.Error())
return 0
}