zhangqian
2023-08-05 f04def67f695e69591ccdd73bb339c6f402b477c
api/v1/serviceType.go
@@ -13,8 +13,8 @@
type ServiceTypeApi struct{}
// Add
// @Tags      服务类型管理
// @Summary   添加服务类型
// @Tags      服务方式管理
// @Summary   添加服务方式
// @Produce   application/json
// @Param      object   body      request.AddServiceType   true   "查询参数"
// @Success   200      {object}   contextx.Response{}
@@ -36,8 +36,8 @@
}
// Delete
// @Tags      服务类型管理
// @Summary   删除服务类型
// @Tags      服务方式管理
// @Summary   删除服务方式
// @Produce   application/json
// @Param      id   path      int   true   "查询参数"
// @Success   200   {object}   contextx.Response{}
@@ -59,8 +59,8 @@
}
// Update
// @Tags      服务类型管理
// @Summary   更新服务类型
// @Tags      服务方式管理
// @Summary   更新服务方式
// @Produce   application/json
// @Param      object   body      request.UpdateServiceType   true   "查询参数"
// @Success   200      {object}   contextx.Response{}
@@ -71,6 +71,10 @@
   if !ok {
      return
   }
    if params.Id == 0 {
        ctx.Fail(ecode.ParamsErr)
    }
    params.ServiceType.Id = params.Id
   errCode := service.NewServiceTypeService().UpdateServiceType(&params.ServiceType)
   if errCode != ecode.OK {
@@ -82,8 +86,8 @@
}
// List
// @Tags      服务类型管理
// @Summary   获取服务类型列表
// @Tags      服务方式管理
// @Summary   获取服务方式列表
// @Produce   application/json
// @Success   200   {object}   response.ListResponse{data=[]model.ServiceType}
// @Router      /api/serviceType/list [get]