fix
wangpengfei
2023-08-01 842a1a88687dfe3893cc765b3886055f0535deb3
api/v1/client.go
@@ -7,7 +7,6 @@
   "aps_crm/pkg/contextx"
   "aps_crm/pkg/ecode"
   "github.com/gin-gonic/gin"
   "strconv"
)
type ClientApi struct{}
@@ -120,17 +119,17 @@
//   @Tags      Client
//   @Summary   删除客户
//   @Produce   application/json
//   @Param      id   path      int   true   "客户ID"
//   @Param      object   body      request.DeleteClient true   "查询参数"
//   @Success   200   {object}   contextx.Response{}
//   @Router      /api/client/delete/{id} [delete]
//   @Router      /api/client/delete [delete]
func (cli *ClientApi) Delete(c *gin.Context) {
   ctx, ok := contextx.NewContext(c, nil)
   var params request.DeleteClient
   ctx, ok := contextx.NewContext(c, &params)
   if !ok {
      return
   }
   id, _ := strconv.Atoi(c.Param("id"))
   errCode := clientService.DeleteClient(id)
   errCode := clientService.DeleteClient(params.Ids)
   if errCode != ecode.OK {
      ctx.Fail(errCode)
      return