zhangqian
2024-04-26 cd057a6eb60902fc380e4de16ece38a2ae83d5a0
controllers/worker_controller.go
@@ -77,7 +77,7 @@
      util.ResponseFormat(c, code.RequestParamError, "名称为空")
      return
   }
   err = models.NewWorkerSearch().Create(&params)
   err = models.NewWorkerSearch().Save(&params)
   if err != nil {
      util.ResponseFormat(c, code.RequestParamError, "更新失败")
      return
@@ -101,7 +101,7 @@
      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
@@ -114,9 +114,9 @@
//   @Tags      员工管理/员工信息
//   @Summary   删除人员信息
//   @Produce   application/json
//   @Param      object   body      request.GetWorkerList   true   "参数"
//   @Param      id   path      string         true   "id"
//   @Param        Authorization   header string true "token"
//   @Success   200      {object}   util.ResponseList{data=[]models.Worker}      "成功"
//   @Success   200      {object}   util.Response      "成功"
//   @Router      /api-jl/v1/worker/deleteWorkerInfo/{id} [delete]
func (slf WorkerController) DeleteWorkerInfo(c *gin.Context) {
   id := c.Param("id")