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

This commit is contained in:
TsMask
2025-02-25 16:21:41 +08:00
26 changed files with 164 additions and 134 deletions

View File

@@ -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
}