docs.go 18.3 KB
Newer Older
wangp's avatar
wangp committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag
package docs

import (
	"bytes"
	"encoding/json"
	"strings"
	"text/template"

	"github.com/swaggo/swag"
)

var doc = `{
    "schemes": {{ marshal .Schemes }},
    "swagger": "2.0",
    "info": {
        "description": "{{.Description}}",
        "title": "{{.Title}}",
        "contact": {},
        "version": "{{.Version}}"
    },
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
26
        "/api/v1/pay/cashier_notice": {
wangp's avatar
wangp committed
27
            "post": {
28
                "description": "拉卡拉统一支付回调(收银台)",
wangp's avatar
wangp committed
29 30 31 32 33 34 35
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
36
                    "拉卡拉统一支付回调"
wangp's avatar
wangp committed
37
                ],
38
                "summary": "拉卡拉统一支付回调(收银台)",
wangp's avatar
wangp committed
39 40 41 42 43 44 45
                "parameters": [
                    {
                        "description": "参数",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
46
                            "$ref": "#/definitions/models.CashierNoticeInput"
wangp's avatar
wangp committed
47 48 49 50
                        }
                    },
                    {
                        "type": "string",
wangp's avatar
wangp committed
51
                        "description": "语言类型 zh-CN简体中文 en-US英文 ja-JP日文 默认中文",
wangp's avatar
wangp committed
52 53 54 55 56 57 58 59 60 61
                        "name": "language",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": ""
                    }
                }
            }
wangp's avatar
wangp committed
62
        },
63
        "/api/v1/pay/order_state": {
wangp's avatar
wangp committed
64
            "post": {
65
                "description": "拉卡拉支付查询",
wangp's avatar
wangp committed
66 67 68 69 70 71 72
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
73
                    "拉卡拉支付查询"
wangp's avatar
wangp committed
74
                ],
75
                "summary": "拉卡拉支付查询",
wangp's avatar
wangp committed
76 77 78 79 80 81 82
                "parameters": [
                    {
                        "description": "参数",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
83
                            "$ref": "#/definitions/models.OrderStateInput"
wangp's avatar
wangp committed
84 85 86 87
                        }
                    },
                    {
                        "type": "string",
wangp's avatar
wangp committed
88
                        "description": "语言类型 zh-CN简体中文 en-US英文 ja-JP日文 默认中文",
wangp's avatar
wangp committed
89 90 91 92 93 94 95 96 97 98 99
                        "name": "language",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": ""
                    }
                }
            }
        },
100
        "/api/v1/pay/scan_notice": {
wangp's avatar
wangp committed
101
            "post": {
102
                "description": "拉卡拉统一支付回调(聚合扫码)",
wangp's avatar
wangp committed
103 104 105 106 107 108 109 110 111
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "拉卡拉统一支付回调"
                ],
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
                "summary": "拉卡拉统一支付回调(聚合扫码)",
                "parameters": [
                    {
                        "description": "参数",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.ScanNoticeInput"
                        }
                    },
                    {
                        "type": "string",
                        "description": "语言类型 zh-CN简体中文 en-US英文 ja-JP日文 默认中文",
                        "name": "language",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": ""
                    }
                }
            }
        },
        "/api/v1/pay/unified_order": {
            "post": {
                "description": "拉卡拉统一支付",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "拉卡拉统一支付"
                ],
                "summary": "拉卡拉统一支付",
wangp's avatar
wangp committed
150 151 152 153 154 155 156
                "parameters": [
                    {
                        "description": "参数",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
                            "$ref": "#/definitions/models.PlaceAnOrderParamInput"
                        }
                    },
                    {
                        "type": "string",
                        "description": "语言类型 zh-CN简体中文 en-US英文 ja-JP日文 默认中文",
                        "name": "language",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": ""
                    }
                }
            }
        },
        "/api/v1/pay/unified_refund": {
            "post": {
                "description": "拉卡拉退款",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "拉卡拉退款"
                ],
                "summary": "拉卡拉退款",
                "parameters": [
                    {
                        "description": "参数",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.RefundParamInput"
wangp's avatar
wangp committed
195 196 197 198
                        }
                    },
                    {
                        "type": "string",
wangp's avatar
wangp committed
199
                        "description": "语言类型 zh-CN简体中文 en-US英文 ja-JP日文 默认中文",
wangp's avatar
wangp committed
200 201 202 203 204 205 206 207 208 209
                        "name": "language",
                        "in": "header"
                    }
                ],
                "responses": {
                    "200": {
                        "description": ""
                    }
                }
            }
wangp's avatar
wangp committed
210 211 212
        }
    },
    "definitions": {
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
        "models.CashierNoticeInput": {
            "type": "object",
            "properties": {
                "channel_id": {
                    "description": "渠道号",
                    "type": "string"
                },
                "merchant_no": {
                    "description": "结算商户号",
                    "type": "string"
                },
                "order_create_time": {
                    "description": "订单创建时间",
                    "type": "string"
                },
                "order_efficient_time": {
                    "description": "订单有效时间",
                    "type": "string"
                },
                "order_info": {
                    "description": "订单描述",
                    "type": "string"
                },
                "order_status": {
                    "description": "订单状态",
                    "type": "string"
                },
                "order_trade_info": {
                    "type": "object"
                },
                "out_order_no": {
                    "description": "商户订单号",
                    "type": "string"
                },
                "pay_order_no": {
                    "description": "支付订单号",
                    "type": "string"
                },
                "split_info": {
                    "type": "object"
                },
                "term_no": {
                    "description": "结算终端号",
                    "type": "string"
                },
                "total_amount": {
                    "description": "订单金额,单位:分",
                    "type": "integer"
                },
                "trans_merchant_no": {
                    "description": "交易商户号",
                    "type": "string"
                },
                "trans_term_no": {
                    "description": "交易终端号",
                    "type": "string"
                }
            }
        },
        "models.OrderStateInput": {
            "type": "object",
            "properties": {
                "order_id": {
                    "description": "订单号",
                    "type": "string"
                }
            }
        },
wangp's avatar
wangp committed
281 282 283 284
        "models.PlaceAnOrderParamInput": {
            "type": "object",
            "properties": {
                "app_id": {
285
                    "description": "wxAppId source code 2 小程序支付时必传、同时小程序支付必须关联了商户号支付",
wangp's avatar
wangp committed
286 287 288
                    "type": "string"
                },
                "attach_info": {
289 290 291 292 293
                    "description": "附加信息",
                    "type": "string"
                },
                "auth_codes": {
                    "description": "LAKALA签约协议号列表",
wangp's avatar
wangp committed
294 295 296
                    "type": "string"
                },
                "customer": {
297
                    "description": "顾客信息",
wangp's avatar
wangp committed
298 299 300
                    "type": "string"
                },
                "dynamic_id": {
301
                    "description": "顾客手机条码的内容",
wangp's avatar
wangp committed
302 303 304
                    "type": "string"
                },
                "goods_des": {
305
                    "description": "商品描述",
wangp's avatar
wangp committed
306 307 308
                    "type": "string"
                },
                "goods_detail": {
309
                    "description": "商品详情",
wangp's avatar
wangp committed
310 311 312
                    "type": "string"
                },
                "goods_price": {
313
                    "description": "商品金额,个位为分",
wangp's avatar
wangp committed
314 315 316
                    "type": "number"
                },
                "is_serve": {
317
                    "description": "0直连模式  1服务商模式",
wangp's avatar
wangp committed
318 319 320
                    "type": "integer"
                },
                "notice_url": {
321
                    "description": "客户端回调的url",
wangp's avatar
wangp committed
322 323 324
                    "type": "string"
                },
                "open_id": {
325
                    "description": "此参数 支付类型是 JS API 的时候 必传",
wangp's avatar
wangp committed
326 327 328
                    "type": "string"
                },
                "operator": {
329
                    "description": "操作员",
wangp's avatar
wangp committed
330 331 332
                    "type": "string"
                },
                "pay_type": {
333
                    "description": "支付渠道 1:微信 2:支付宝 3:拉卡拉 4:收钱吧",
wangp's avatar
wangp committed
334 335 336
                    "type": "integer"
                },
                "platform_info": {
337
                    "description": "平台信息",
wangp's avatar
wangp committed
338 339 340
                    "type": "string"
                },
                "platform_type": {
341
                    "description": "平台类型 1:saas 2:shop 3:shop mobile 4:收银台 6:bk_shop 7:bk_shop_mobile",
wangp's avatar
wangp committed
342 343 344
                    "type": "integer"
                },
                "quit_url": {
345
                    "description": "返回按钮 可用于用户付款中途退出并返回到该参数指定的商户网站地址, 支付方式为 支付宝手机网站时 必传(尽量传)",
wangp's avatar
wangp committed
346 347 348
                    "type": "string"
                },
                "return_url": {
349
                    "description": "用户在完成支付后,会根据商户在请求支付API中传入的前台回跳地址return_url自动跳转return_url地址页面(必传)",
wangp's avatar
wangp committed
350 351 352
                    "type": "string"
                },
                "source_code": {
353
                    "description": "支付方式 1:微信Native 2:微信小程序 3:微信内支付 4:h5 跳微信 5:支付宝(web)-扫码或登录支付宝账户 6:alipay(mobile) 7:alipay(app) 9:B2C 10:bk支付宝web 11:bk 支付宝手机 15:快捷支付(银行卡) 16:微信小程序-必康自营 17:微信JASPI-必康自营",
wangp's avatar
wangp committed
354 355 356
                    "type": "integer"
                },
                "store_sn": {
357
                    "description": "商户门店编号",
wangp's avatar
wangp committed
358 359 360
                    "type": "string"
                },
                "sub_mchid": {
361
                    "description": "通过进件接口申请的支付商户号、这是由微信生成并下发的",
wangp's avatar
wangp committed
362 363 364
                    "type": "string"
                },
                "wap_name": {
365
                    "description": "WAP网站名称, 支付方式为微信MWEB时 必传",
wangp's avatar
wangp committed
366 367 368
                    "type": "string"
                },
                "wap_url": {
369
                    "description": "WAP网站URL地址, 支付方式为微信MWEB时 必传",
wangp's avatar
wangp committed
370 371 372 373
                    "type": "string"
                }
            }
        },
wangp's avatar
wangp committed
374 375 376
        "models.RefundParamInput": {
            "type": "object",
            "properties": {
377 378
                "refund_amount": {
                    "description": "退款金额,个位为分",
wangp's avatar
wangp committed
379 380
                    "type": "number"
                },
381 382 383 384 385 386
                "refund_no": {
                    "description": "退款号:原对账单流水号",
                    "type": "string"
                },
                "refund_reason": {
                    "description": "退款原因",
wangp's avatar
wangp committed
387 388 389 390
                    "type": "string"
                }
            }
        },
391
        "models.ScanNoticeInput": {
wangp's avatar
wangp committed
392 393
            "type": "object",
            "properties": {
394 395
                "acc_activity_id": {
                    "description": "活动ID",
wangp's avatar
wangp committed
396
                    "type": "string"
wangp's avatar
wangp committed
397
                },
398 399
                "acc_discount_amount": {
                    "description": "账户端优惠金额",
wangp's avatar
wangp committed
400 401
                    "type": "string"
                },
402 403
                "acc_mdiscount_amount": {
                    "description": "商户侧优惠金额(账户端)",
wangp's avatar
wangp committed
404 405
                    "type": "string"
                },
406 407
                "acc_other_discount_amount": {
                    "description": "账户端其它优惠金额(待上线)",
wangp's avatar
wangp committed
408 409
                    "type": "string"
                },
410 411
                "acc_settle_amount": {
                    "description": "账户端结算金额",
wangp's avatar
wangp committed
412 413
                    "type": "string"
                },
414 415
                "acc_trade_no": {
                    "description": "账户端交易订单号",
wangp's avatar
wangp committed
416 417
                    "type": "string"
                },
418 419 420
                "account_type": {
                    "description": "钱包类型",
                    "type": "string"
wangp's avatar
wangp committed
421
                },
422 423
                "bank_type": {
                    "description": "付款银行",
wangp's avatar
wangp committed
424 425
                    "type": "string"
                },
426 427
                "card_type": {
                    "description": "银行卡类型",
wangp's avatar
wangp committed
428 429
                    "type": "string"
                },
430 431
                "hb_fq_pay_info": {
                    "description": "花呗分期支付信息(未上线)",
wangp's avatar
wangp committed
432
                    "type": "object"
wangp's avatar
wangp committed
433
                },
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459
                "log_no": {
                    "description": "拉卡拉对账单流水号",
                    "type": "string"
                },
                "merchant_no": {
                    "description": "商户号",
                    "type": "string"
                },
                "out_trade_no": {
                    "description": "商户交易流水号",
                    "type": "string"
                },
                "payer_amount": {
                    "description": "付款人实付金额",
                    "type": "string"
                },
                "remark": {
                    "description": "备注",
                    "type": "string"
                },
                "settle_merchant_no": {
                    "description": "结算商户号",
                    "type": "string"
                },
                "settle_term_no": {
                    "description": "结算终端号",
wangp's avatar
wangp committed
460
                    "type": "string"
wangp's avatar
wangp committed
461 462
                },
                "total_amount": {
463 464
                    "description": "订单金额",
                    "type": "string"
wangp's avatar
wangp committed
465
                },
466 467
                "trade_no": {
                    "description": "拉卡拉交易流水号",
wangp's avatar
wangp committed
468 469
                    "type": "string"
                },
470 471 472 473 474 475 476 477 478 479 480 481 482 483
                "trade_status": {
                    "description": "交易状态",
                    "type": "string"
                },
                "trade_time": {
                    "description": "交易完成时间",
                    "type": "string"
                },
                "user_id1": {
                    "description": "用户标识1",
                    "type": "string"
                },
                "user_id2": {
                    "description": "用户标识2",
wangp's avatar
wangp committed
484 485 486
                    "type": "string"
                }
            }
wangp's avatar
wangp committed
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
        }
    },
    "securityDefinitions": {
        "ApiKeyAuth": {
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    }
}`

type swaggerInfo struct {
	Version     string
	Host        string
	BasePath    string
	Schemes     []string
	Title       string
	Description string
}

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{
	Version:     "1.0",
	Host:        "",
	BasePath:    "",
	Schemes:     []string{},
	Title:       "谛宝多多平台",
	Description: "采购订单项目",
}

type s struct{}

func (s *s) ReadDoc() string {
	sInfo := SwaggerInfo
	sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)

	t, err := template.New("swagger_info").Funcs(template.FuncMap{
		"marshal": func(v interface{}) string {
			a, _ := json.Marshal(v)
			return string(a)
		},
	}).Parse(doc)
	if err != nil {
		return doc
	}

	var tpl bytes.Buffer
	if err := t.Execute(&tpl, sInfo); err != nil {
		return doc
	}

	return tpl.String()
}

func init() {
	swag.Register(swag.Name, &s{})
}