liujiandao
2024-04-10 546403e4d2c1674f17e1f7e0a70ba7577cf72c23
controllers/yield_register_controller.go
@@ -123,3 +123,25 @@
   }
   util.ResponseFormat(c, code.Success, register)
}
// DeleteYieldRegister
//
//   @Tags      生产管理/产量登记表
//   @Summary   删除产量登记表记录
//   @Produce   application/json
//   @Param      number   path      string         true   "number"
//   @Success   200   {object}   util.Response   "成功"
//   @Router      /api-jl/v1/system/deleteYieldRegister/{number} [delete]
func (slf YieldRegisterController) DeleteYieldRegister(c *gin.Context) {
   number := c.Param("number")
   if number == "" {
      util.ResponseFormat(c, code.RequestParamError, "无效的编码")
      return
   }
   err := models.NewYieldRegisterSearch().SetNumber(number).Delete()
   if err != nil {
      util.ResponseFormat(c, code.RequestParamError, "删除失败")
      return
   }
   util.ResponseFormat(c, code.Success, "删除成功")
}