feat:完善项目信息
This commit is contained in:
@ -18,8 +18,7 @@ func (*Activity) Applys(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Title, form.Page, form.PageSize)
|
||||
data, err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise)).Instance(form.Title, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
@ -39,11 +38,10 @@ func (*Activity) ApplyLaunch(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Launch(&activity.ApplyLaunchParams{
|
||||
Mode: form.Mode, MaxNUmber: form.MaxNumber, Title: form.Title, Amount: form.Amount, Content: form.Content,
|
||||
BeginAt: form.BeginAt, FinishAt: form.FinishAt, JoinDeadline: form.JoinDeadline,
|
||||
})
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise)).Launch(&activity.ApplyLaunchParams{
|
||||
Mode: form.Mode, MaxNUmber: form.MaxNumber, Title: form.Title, Amount: form.Amount, Content: form.Content,
|
||||
BeginAt: form.BeginAt, FinishAt: form.FinishAt, JoinDeadline: form.JoinDeadline,
|
||||
})
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
@ -54,8 +52,7 @@ func (*Activity) ApplyRevoke(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Revoke(form.Convert())
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise)).Revoke(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
@ -66,8 +63,7 @@ func (*Activity) ApplyDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise)).Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
@ -81,8 +77,7 @@ func (*Activity) Joins(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := activity.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Joins(form.Title, form.Status, form.Page, form.PageSize)
|
||||
data, err := activity.NewInstance()(api.GetSession()(c).(*session.Enterprise)).Joins(form.Title, form.Status, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
@ -93,7 +88,6 @@ func (*Activity) JoinDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := activity.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
JoinDelete(form.Convert())
|
||||
err := activity.NewInstance()(api.GetSession()(c).(*session.Enterprise)).JoinDelete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
Reference in New Issue
Block a user