fix
wangpengfei
2023-08-03 b90ad3946fdf84ccf9ad4d5d2e493e0e6c00b96a
api/v1/serviceContract.go
@@ -7,7 +7,6 @@
   "aps_crm/pkg/contextx"
   "aps_crm/pkg/ecode"
   "github.com/gin-gonic/gin"
   "strconv"
)
type ServiceContractApi struct{}
@@ -47,17 +46,17 @@
//   @Tags      ServiceContract
//   @Summary   删除服务合同
//   @Produce   application/json
//   @Param      id   path      int   true   "查询参数"
//   @Param      object   body      request.DeleteserviceContract true   "查询参数"
//   @Success   200   {object}   contextx.Response{}
//   @Router      /api/serviceContract/delete/{id} [delete]
//   @Router      /api/serviceContract/delete [delete]
func (s *ServiceContractApi) Delete(c *gin.Context) {
   ctx, ok := contextx.NewContext(c, nil)
   var params request.DeleteserviceContract
   ctx, ok := contextx.NewContext(c, &params)
   if !ok {
      return
   }
   id, _ := strconv.Atoi(c.Param("id"))
   errCode := serviceContractService.DeleteServiceContract(id)
   errCode := serviceContractService.DeleteServiceContract(params.Ids)
   if errCode != ecode.OK {
      ctx.Fail(errCode)
      return
@@ -174,4 +173,4 @@
      List:  serviceContracts,
      Count: int(total),
   })
}
}