| | |
| | | ctx.Ok() |
| | | } |
| | | |
| | | // Delete |
| | | //// Delete |
| | | //// |
| | | //// @Tags ServiceContract |
| | | //// @Summary 删除服务合同 |
| | | //// @Produce application/json |
| | | //// @Param object body request.DeleteServiceContract true "查询参数" |
| | | //// @Success 200 {object} contextx.Response{} |
| | | //// @Router /api/serviceContract/delete [delete] |
| | | //func (s *ServiceContractApi) Delete(c *gin.Context) { |
| | | // var params request.DeleteServiceContract |
| | | // ctx, ok := contextx.NewContext(c, ¶ms) |
| | | // if !ok { |
| | | // return |
| | | // } |
| | | // |
| | | // @Tags ServiceContract |
| | | // @Summary 删除服务合同 |
| | | // @Produce application/json |
| | | // @Param object body request.DeleteServiceContract true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | | // @Router /api/serviceContract/delete [delete] |
| | | func (s *ServiceContractApi) Delete(c *gin.Context) { |
| | | var params request.DeleteServiceContract |
| | | // errCode := serviceContractService.DeleteServiceContract(params.Ids) |
| | | // if errCode != ecode.OK { |
| | | // ctx.Fail(errCode) |
| | | // return |
| | | // } |
| | | // |
| | | // ctx.Ok() |
| | | //} |
| | | |
| | | // BatchDelete |
| | | // @Tags ServiceContract |
| | | // @Summary 批量删除服务合同 |
| | | // @Produce application/json |
| | | // @Param object body request.CommonIds true "参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | | // @Router /api/serviceContract/delete [delete] |
| | | func (s *ServiceContractApi) BatchDelete(c *gin.Context) { |
| | | var params request.CommonIds |
| | | ctx, ok := contextx.NewContext(c, ¶ms) |
| | | if !ok { |
| | | return |
| | | } |
| | | |
| | | errCode := serviceContractService.DeleteServiceContract(params.Ids) |
| | | errCode := serviceContractService.BatchDeleteServiceContract(params.Ids) |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |