feat: complete SOP execution workflow

This commit is contained in:
Eric 1549169735@qq.com
2026-08-09 00:29:26 +08:00
parent e32025d2ca
commit c5ab886b70
63 changed files with 1229 additions and 215 deletions

View File

@@ -113,10 +113,7 @@ func (h *Handler) Update(c *gin.Context) {
return
}
err = h.db.Transaction(func(tx *gorm.DB) error {
if err := tx.Model(&membership).Updates(map[string]interface{}{"role_id": role.ID, "status": input.Status}).Error; err != nil {
return err
}
return tx.Model(&model.User{}).Where("id = ?", membership.UserID).Update("status", input.Status).Error
return tx.Model(&membership).Updates(map[string]interface{}{"role_id": role.ID, "status": input.Status}).Error
})
if err != nil {
response.Error(c, http.StatusInternalServerError, "UPDATE_FAILED", "更新成员失败")