|
@@ -46,28 +46,28 @@ func QueryBankBranChnumInfo(c *gin.Context) {
|
|
|
a.DoGetDataByPage(&m)
|
|
a.DoGetDataByPage(&m)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-type QueryAmtInByPaidReq struct {
|
|
|
|
|
|
|
+type GetAmtInByPaidUrlReq struct {
|
|
|
AccountId int `form:"accountid" binding:"required"` // 资金账户
|
|
AccountId int `form:"accountid" binding:"required"` // 资金账户
|
|
|
Exchticket string `form:"exchticket" binding:"required"` // 银行服务流水号
|
|
Exchticket string `form:"exchticket" binding:"required"` // 银行服务流水号
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// QueryAmtInByPaid 获取银行待支付地址
|
|
|
|
|
|
|
+// GetAmtInByPaidUrl 获取银行待支付地址
|
|
|
// @Summary 获取银行待支付地址
|
|
// @Summary 获取银行待支付地址
|
|
|
// @Produce json
|
|
// @Produce json
|
|
|
// @Security ApiKeyAuth
|
|
// @Security ApiKeyAuth
|
|
|
// @Param accountid query int true "资金账户"
|
|
// @Param accountid query int true "资金账户"
|
|
|
// @Param exchticket query string true "银行服务流水号"
|
|
// @Param exchticket query string true "银行服务流水号"
|
|
|
-// @Success 200 {object} models.Chillpayamtinrec
|
|
|
|
|
|
|
+// @Success 200 {object} string
|
|
|
// @Failure 500 {object} app.Response
|
|
// @Failure 500 {object} app.Response
|
|
|
-// @Router /Bank/QueryAmtInByPaid [get]
|
|
|
|
|
|
|
+// @Router /Bank/GetAmtInByPaidUrl [get]
|
|
|
// @Tags 银行
|
|
// @Tags 银行
|
|
|
-func QueryAmtInByPaid(c *gin.Context) {
|
|
|
|
|
|
|
+func GetAmtInByPaidUrl(c *gin.Context) {
|
|
|
appG := app.Gin{C: c}
|
|
appG := app.Gin{C: c}
|
|
|
|
|
|
|
|
// 获取请求参数
|
|
// 获取请求参数
|
|
|
- var req QueryAmtInByPaidReq
|
|
|
|
|
|
|
+ var req GetAmtInByPaidUrlReq
|
|
|
if err := appG.C.ShouldBindQuery(&req); err != nil {
|
|
if err := appG.C.ShouldBindQuery(&req); err != nil {
|
|
|
- logger.GetLogger().Errorf("QueryAmtInByPaid failed: %s", err.Error())
|
|
|
|
|
|
|
+ logger.GetLogger().Errorf("GetAmtInByPaidUrl failed: %s", err.Error())
|
|
|
appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
|
|
appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -75,18 +75,18 @@ func QueryAmtInByPaid(c *gin.Context) {
|
|
|
rec, err := models.GetAmtInByPaid(req.AccountId, req.Exchticket)
|
|
rec, err := models.GetAmtInByPaid(req.AccountId, req.Exchticket)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
// 查询失败
|
|
// 查询失败
|
|
|
- logger.GetLogger().Errorf("QueryAmtInByPaid failed: %s", err.Error())
|
|
|
|
|
|
|
+ logger.GetLogger().Errorf("GetAmtInByPaidUrl failed: %s", err.Error())
|
|
|
appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
|
|
appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if rec == nil {
|
|
if rec == nil {
|
|
|
// 查询失败
|
|
// 查询失败
|
|
|
err = errors.New("获取记录失败")
|
|
err = errors.New("获取记录失败")
|
|
|
- logger.GetLogger().Errorf("QueryAmtInByPaid failed: %s", err.Error())
|
|
|
|
|
|
|
+ logger.GetLogger().Errorf("GetAmtInByPaidUrl failed: %s", err.Error())
|
|
|
appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
|
|
appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 查询成功返回
|
|
// 查询成功返回
|
|
|
- appG.Response(http.StatusOK, e.SUCCESS, rec)
|
|
|
|
|
|
|
+ appG.Response(http.StatusOK, e.SUCCESS, rec.PAYMENTURL)
|
|
|
}
|
|
}
|