fix
wangpengfei
2023-08-15 dd39909b3d8172856313ea7b2e19d1d7a039a582
api/v1/client.go
@@ -201,3 +201,27 @@
      Count: int(total),
   })
}
// CheckName
//
//   @Tags      Client
//   @Summary   检查客户名称是否重复
//   @Produce   application/json
//   @Param      object   body      request.CheckClientName   true   "参数"
//   @Success   200      {object}   contextx.Response{}
//   @Router      /api/client/checkName [post]
func (cli *ClientApi) CheckName(c *gin.Context) {
   var params request.CheckClientName
   ctx, ok := contextx.NewContext(c, &params)
   if !ok {
      return
   }
   errCode := clientService.CheckName(params.Name)
   if errCode != ecode.OK {
      ctx.Fail(errCode)
      return
   }
   ctx.Ok()
}