dengbiao pirms 7 mēnešiem
vecāks
revīzija
ff4fad6220
5 mainītis faili ar 66 papildinājumiem un 4 dzēšanām
  1. +21
    -0
      app/customer/hdl/hdl_self_support_for_school_order.go
  2. +5
    -0
      app/customer/md/md_curl_smart_pay.go
  3. +5
    -0
      app/customer/md/md_order.go
  4. +30
    -0
      app/customer/svc/svc_curl_smart_pay.go
  5. +5
    -4
      app/router/customer_router.go

+ 21
- 0
app/customer/hdl/hdl_self_support_for_school_order.go Parādīt failu

@@ -136,3 +136,24 @@ func SelfSupportForSchoolOrderDebtRepay(c *gin.Context) {
e.OutSuc(c, resp, nil)
return
}

func AlipayPlanetEcocampusApiFtokenQuery(c *gin.Context) {
var req md.AlipayPlanetEcocampusApiFtokenQueryReq
err := c.ShouldBindJSON(&req)
if err != nil {
err = validate.HandleValidateErr(err)
err1 := err.(e.E)
e.OutErr(c, err1.Code, err1.Error())
return
}
err, resp := svc2.CurlAlipayPlanetEcocampusApiFtokenQuery(md.CurlAlipayPlanetEcocampusApiFtokenQueryReq{
OutOrderNo: req.OutOrderNo,
CpMerchantId: req.CpMerchantId,
})
if err != nil {
e.OutErr(c, e.ERR, err.Error())
return
}
e.OutSuc(c, resp, nil)
return
}

+ 5
- 0
app/customer/md/md_curl_smart_pay.go Parādīt failu

@@ -78,6 +78,11 @@ type CurlAlipayTradeRefundReq struct {
RefundReason string `json:"refund_reason" label:"退款原因"`
}

type CurlAlipayPlanetEcocampusApiFtokenQueryReq struct {
OutOrderNo string `json:"out_order_no" label:"商户订单号"`
CpMerchantId string `json:"cp_merchant_id" label:"商户编号"`
}

type CurlAlipayTradeRefundQueryReq struct {
Config struct {
PayAliAppId string `json:"pay_ali_app_id" label:"支付宝开放平台-第三方应用-appid"`


+ 5
- 0
app/customer/md/md_order.go Parādīt failu

@@ -97,6 +97,11 @@ type SelfSupportForSchoolOrderDebtRepayReq struct {
MerchantCode string `json:"merchant_code" `
}

type AlipayPlanetEcocampusApiFtokenQueryReq struct {
OutOrderNo string `json:"out_order_no"`
CpMerchantId string `json:"cp_merchant_id" `
}

type NursingHomeOrderListReq struct {
UserIdentityId int `json:"user_identity_id" label:"用户身份id"`
Limit int `json:"limit"`


+ 30
- 0
app/customer/svc/svc_curl_smart_pay.go Parādīt failu

@@ -946,3 +946,33 @@ func CurlAlipayPlanetEcocampusApiRosterSingleConsumeLimitSync(args md.CurlAlipay
}
return nil, result.Data
}

func CurlAlipayPlanetEcocampusApiFtokenQuery(args md.CurlAlipayPlanetEcocampusApiFtokenQueryReq) (err error, resp interface{}) {
url := cfg.SmartCanteenPay + "/alipay/bPass/alipayPlanetEcocampusApiFtokenQuery"
utils.FilePutContents("CurlAlipayPlanetEcocampusApiFtokenQuery", utils.SerializeStr(map[string]interface{}{
"args": args,
}))
bytes, err := utils.CurlPost(url, utils.Serialize(args), nil)
if err != nil {
return
}
var result struct {
Code int `json:"code"`
Msg string `json:"msg"`
Data interface{} `json:"data"`
}
utils.FilePutContents("CurlAlipayPlanetEcocampusApiFtokenQuery", utils.SerializeStr(result))
err = json.Unmarshal(bytes, &result)
if err != nil {
return
}
if result.Code != 0 {
if result.Msg != "" {
err = errors.New(result.Msg)
return
}
err = errors.New("请求智慧餐厅支付 异常/失败")
return
}
return nil, result.Data
}

+ 5
- 4
app/router/customer_router.go Parādīt failu

@@ -104,10 +104,11 @@ func rNursingHomeOrder(r *gin.RouterGroup) {
}

func rSelfSupportForSchoolOrder(r *gin.RouterGroup) {
r.Use(mw.Auth) //检测登录状态
r.POST("/list", hdl.SelfSupportForSchoolOrderList) // 自营学校-订单列表
r.POST("/arrearsList", hdl.SelfSupportForSchoolOrderArrearsList) // 自营学校-欠费订单列表
r.POST("/debtRepay", hdl.SelfSupportForSchoolOrderDebtRepay) // 自营学校-支付欠款订单
r.Use(mw.Auth) //检测登录状态
r.POST("/list", hdl.SelfSupportForSchoolOrderList) // 自营学校-订单列表
r.POST("/arrearsList", hdl.SelfSupportForSchoolOrderArrearsList) // 自营学校-欠费订单列表
r.POST("/debtRepay", hdl.SelfSupportForSchoolOrderDebtRepay) // 自营学校-支付欠款订单
r.POST("/alipayPlanetEcocampusApiFtokenQuery", hdl.AlipayPlanetEcocampusApiFtokenQuery) // 自营学校-刷脸照片查看获取ftoken
}

func rSelfSupportForSchool(r *gin.RouterGroup) { //自营学校


Notiek ielāde…
Atcelt
Saglabāt