| | |
| | | util.ResponseFormat(c, code.RequestParamError, "名称为空") |
| | | return |
| | | } |
| | | err = models.NewWorkerSearch().Create(¶ms) |
| | | err = models.NewWorkerSearch().Save(¶ms) |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "更新失败") |
| | | return |
| | |
| | | util.ResponseFormat(c, code.RequestParamError, "参数解析失败,数据类型错误") |
| | | return |
| | | } |
| | | workers, total, err := models.NewWorkerSearch().SetPage(params.Page, params.PageSize).Find() |
| | | workers, total, err := models.NewWorkerSearch().SetPage(params.Page, params.PageSize).SetOrder("updated_at desc").Find() |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "查询失败") |
| | | return |
| | |
| | | // @Tags 员工管理/员工信息 |
| | | // @Summary 删除人员信息 |
| | | // @Produce application/json |
| | | // @Param number path string true "id" |
| | | // @Param id path string true "id" |
| | | // @Param Authorization header string true "token" |
| | | // @Success 200 {object} util.Response "成功" |
| | | // @Router /api-jl/v1/worker/deleteWorkerInfo/{id} [delete] |