| | |
| | | type ServiceTypeApi struct{} |
| | | |
| | | // Add |
| | | // @Tags 服务类型管理 |
| | | // @Summary 添加服务类型 |
| | | // @Tags 服务方式管理 |
| | | // @Summary 添加服务方式 |
| | | // @Produce application/json |
| | | // @Param object body request.AddServiceType true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | |
| | | } |
| | | |
| | | // Delete |
| | | // @Tags 服务类型管理 |
| | | // @Summary 删除服务类型 |
| | | // @Tags 服务方式管理 |
| | | // @Summary 删除服务方式 |
| | | // @Produce application/json |
| | | // @Param id path int true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | |
| | | } |
| | | |
| | | // Update |
| | | // @Tags 服务类型管理 |
| | | // @Summary 更新服务类型 |
| | | // @Tags 服务方式管理 |
| | | // @Summary 更新服务方式 |
| | | // @Produce application/json |
| | | // @Param object body request.UpdateServiceType true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | |
| | | if !ok { |
| | | return |
| | | } |
| | | if params.Id == 0 { |
| | | ctx.Fail(ecode.ParamsErr) |
| | | } |
| | | params.ServiceType.Id = params.Id |
| | | |
| | | errCode := service.NewServiceTypeService().UpdateServiceType(¶ms.ServiceType) |
| | | if errCode != ecode.OK { |
| | |
| | | } |
| | | |
| | | // List |
| | | // @Tags 服务类型管理 |
| | | // @Summary 获取服务类型列表 |
| | | // @Tags 服务方式管理 |
| | | // @Summary 获取服务方式列表 |
| | | // @Produce application/json |
| | | // @Success 200 {object} response.ListResponse{data=[]model.ServiceType} |
| | | // @Router /api/serviceType/list [get] |