DengBiao 1年前
コミット
c8ba778798
3個のファイルの変更28行の追加0行の削除
  1. +21
    -0
      app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go
  2. +4
    -0
      app/customer/hdl/hdl_self_support_for_school_order.go
  3. +3
    -0
      app/enum/enum_central_kitchen_for_school_package_ord.go

+ 21
- 0
app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go ファイルの表示

@@ -1112,6 +1112,10 @@ func SelfSupportForSchoolOrdList(c *gin.Context) {
"name": enum.SelfSupportForSchoolOrdOrderStatus.String(enum.SelfSupportForSchoolOrdOrderStatusForRefund),
"value": enum.SelfSupportForSchoolOrdOrderStatusForRefund,
},
{
"name": enum.SelfSupportForSchoolOrdOrderStatus.String(enum.SelfSupportForSchoolOrdOrderStatusForCancel),
"value": enum.SelfSupportForSchoolOrdOrderStatusForCancel,
},
},
}, nil)
return
@@ -1563,6 +1567,18 @@ func SelfSupportForSchoolArrearsOrdDebtCancel(c *gin.Context) {
return
}

selfSupportForSchoolOrdDb := db.SelfSupportForSchoolOrd{}
selfSupportForSchoolOrdDb.Set(req.OutOrderNo)
ord, err := selfSupportForSchoolOrdDb.GetSelfSupportForSchoolOrd()
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
if ord == nil {
e.OutErr(c, e.ERR_NO_DATA, "未查询到对应订单记录")
return
}

err, resp := svc.CurlAlipayPlanetEcocampusApiDebtCancel(md2.CurlAlipayPlanetEcocampusApiDebtCancel{
OutOrderNo: req.OutOrderNo,
MerchantCode: req.MerchantCode,
@@ -1571,6 +1587,11 @@ func SelfSupportForSchoolArrearsOrdDebtCancel(c *gin.Context) {
e.OutErr(c, e.ERR, err.Error())
return
}

//TODO::修改订单状态为“已撤销”
ord.OrderStatus = enum.SelfSupportForSchoolOrdOrderStatusForRefund
selfSupportForSchoolOrdDb.SelfSupportForSchoolOrdUpdate(ord, "order_status")

e.OutSuc(c, resp, nil)
return
}


+ 4
- 0
app/customer/hdl/hdl_self_support_for_school_order.go ファイルの表示

@@ -49,6 +49,10 @@ func SelfSupportForSchoolOrderList(c *gin.Context) {
"name": enum.SelfSupportForSchoolOrdOrderStatus.String(enum.SelfSupportForSchoolOrdOrderStatusForRefund),
"value": enum.SelfSupportForSchoolOrdOrderStatusForRefund,
},
{
"name": enum.SelfSupportForSchoolOrdOrderStatus.String(enum.SelfSupportForSchoolOrdOrderStatusForCancel),
"value": enum.SelfSupportForSchoolOrdOrderStatusForCancel,
},
},
}, nil)
return


+ 3
- 0
app/enum/enum_central_kitchen_for_school_package_ord.go ファイルの表示

@@ -6,6 +6,7 @@ const (
SelfSupportForSchoolOrdOrderStatusForWait = 1
SelfSupportForSchoolOrdOrderStatusForSuccess = 2
SelfSupportForSchoolOrdOrderStatusForRefund = 3
SelfSupportForSchoolOrdOrderStatusForCancel = 4
)

func (gt SelfSupportForSchoolOrdOrderStatus) String() string {
@@ -16,6 +17,8 @@ func (gt SelfSupportForSchoolOrdOrderStatus) String() string {
return "支付成功"
case SelfSupportForSchoolOrdOrderStatusForRefund:
return "已退款"
case SelfSupportForSchoolOrdOrderStatusForCancel:
return "已撤销"
default:
return "未知"
}


読み込み中…
キャンセル
保存