feat:完善信息,增加需求指派功能
This commit is contained in:
@ -291,6 +291,19 @@ func (*Manage) Agent(c *gin.Context) {
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Manage) AgentSelect(c *gin.Context) {
|
||||
form := &struct {
|
||||
api.TenantIDStringForm
|
||||
Keyword string `json:"keyword" form:"keyword"`
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewAgent()(api.GetSession()(c).(*session.Admin)).Select(form.Convert(), form.Keyword)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Manage) AgentDetail(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
|
@ -355,6 +355,19 @@ func (*Technology) DemandDelete(c *gin.Context) {
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Technology) DemandAssign(c *gin.Context) {
|
||||
form := &struct {
|
||||
api.IDStringForm
|
||||
AgentID string `json:"agent_id" form:"agent_id" binding:"required"`
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology.NewDemand()(api.GetSession()(c).(*session.Admin)).Assign(form.Convert(), (&api.IDStringForm{ID: form.AgentID}).Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Technology) Project(c *gin.Context) {
|
||||
form := &struct {
|
||||
api.TenantIDStringForm
|
||||
|
Reference in New Issue
Block a user