feat:完善项目管理
This commit is contained in:
@ -235,3 +235,50 @@ func (*Manage) ResearchVisit(c *gin.Context) {
|
||||
Visit(form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Manage) AgentCompany(c *gin.Context) {
|
||||
form := &struct {
|
||||
Name string `json:"name" form:"name"`
|
||||
api.PageForm
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
Company(form.Name, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Manage) AgentCompanyAdd(c *gin.Context) {
|
||||
form := &struct {
|
||||
Name string `json:"name" form:"name"`
|
||||
Industrys []string `json:"industrys" form:"industrys"`
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
Form(0, form.Name, form.Industrys)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Manage) AgentCompanyEdit(c *gin.Context) {
|
||||
form := &struct {
|
||||
api.IDStringForm
|
||||
Name string `json:"name" form:"name"`
|
||||
Industrys []string `json:"industrys" form:"industrys"`
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
Form(form.Convert(), form.Name, form.Industrys)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Manage) AgentCompanyDelete(c *gin.Context) {
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user