jiangshuai
2023-09-20 de66fdb29ff38924a235d366a73642c60a509ce6
controllers/operation_type.go
@@ -17,12 +17,12 @@
type OperationTypeController struct{}
// Add
// @Tags      作业类型
// @Tags      业务类型
// @Summary   添加作业类型
// @Produce   application/json
// @Param     object  body  request.AddOperationType true  "作业类型信息"
// @Success   200 {object} util.Response "成功"
// @Router    /api-wms/v1/warehouse/operationType [post]
// @Router    /api-wms/v1/operationType/operationType [post]
func (slf OperationTypeController) Add(c *gin.Context) {
   var reqParams request.AddOperationType
   var params models.OperationType
@@ -49,13 +49,13 @@
}
// Update
// @Tags      作业类型
// @Tags      业务类型
// @Summary   编辑作业类型
// @Produce   application/json
// @Param     object  body request.UpdateOperationType true  "作业类型信息"
// @Param     id  path string true  "作业类型id"
// @Success   200 {object} util.Response "成功"
// @Router    /api-wms/v1/warehouse/operationType/{id} [put]
// @Router    /api-wms/v1/operationType/operationType/{id} [put]
func (slf OperationTypeController) Update(c *gin.Context) {
   id := cast.ToUint(c.Param("id"))
   if id == 0 {
@@ -102,12 +102,12 @@
}
// List
// @Tags      作业类型
// @Tags      业务类型
// @Summary   查询作业类型列表
// @Produce   application/json
// @Param     object  query    request.GetOperationTypeList true  "查询参数"
// @Success   200   {object}  util.ResponseList{data=[]models.OperationType}  "成功"
// @Router    /api-wms/v1/warehouse/operationType [get]
// @Router    /api-wms/v1/operationType/operationType [get]
func (slf OperationTypeController) List(c *gin.Context) {
   var params request.GetOperationTypeList
   if err := c.ShouldBindQuery(&params); err != nil {
@@ -124,12 +124,12 @@
}
// Delete
// @Tags      作业类型
// @Tags      业务类型
// @Summary   删除作业类型
// @Produce   application/json
// @Param     id  path string true  "作业类型id"
// @Success   200 {object} util.Response "成功"
// @Router    /api-wms/v1/warehouse/operationType/{id} [delete]
// @Router    /api-wms/v1/operationType/operationType/{id} [delete]
func (slf OperationTypeController) Delete(c *gin.Context) {
   id := cast.ToUint(c.Param("id"))
   if id == 0 {