func (this *ServiceOperationController) Post() { sid, _ := this.GetInt64("sid", 0) id, _ := this.GetInt64("id", 0) operation := entity.Operation{} operation.Id = id operation.Sid = sid operation.Start = this.GetString("start") operation.Restart = this.GetString("restart") operation.Stop = this.GetString("stop") if id == 0 { operation.Save() } else { operation.Update() } redirectUrl := fmt.Sprintf("templatesdetail?serviceId=%d", sid) this.Redirect(redirectUrl, 301) //this.Get() }