Commit 34cdc655 authored by shajiaiming's avatar shajiaiming

fix

parent 5547b969
......@@ -172,6 +172,7 @@ func LiveStatus(c *gin.Context) {
live_service := live_info_service.LiveInfo{
ApplyId: uint32(apply_id),
OrderSn: order_sn,
Status: models.PEDDING_PAYMENT,
PageNum: util.GetPage(c),
PageSize: util.GetLimit(c),
}
......@@ -180,11 +181,11 @@ func LiveStatus(c *gin.Context) {
handler.SendResponse(c, errno.InternalServerError, nil)
return
}
//
//if 0 == len(live) {
// handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
// return
//}
if 0 == len(live) {
handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
return
}
handler.SendResponse(c, nil, live[0])
}
......@@ -202,6 +203,7 @@ func VerifyStatus(c *gin.Context) {
live_service := live_info_service.LiveInfo{
OrderSn: info.OrderSn,
Status: models.PEDDING_PAYMENT,
PageNum: util.GetPage(c),
PageSize: util.GetLimit(c),
}
......@@ -211,17 +213,17 @@ func VerifyStatus(c *gin.Context) {
return
}
//if 0 == len(live) {
// handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
// return
//}
if 0 == len(live) {
handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
return
}
if live[0].Status != models.PEDDING_PAYMENT {
if live[0].Status != uint8(models.PEDDING_PAYMENT) {
handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil)
return
}
if info.LiveStatus != models.LIVEED {
if info.LiveStatus != uint8(models.LIVEED) {
handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil)
return
}
......@@ -252,6 +254,7 @@ func NotifyUrl(c *gin.Context) {
live_service := live_info_service.LiveInfo{
OrderSn: info.OrderSn,
Status: models.PEDDING_PAYMENT,
PageNum: util.GetPage(c),
PageSize: util.GetLimit(c),
}
......@@ -261,13 +264,8 @@ func NotifyUrl(c *gin.Context) {
return
}
//if 0 == len(live) {
// handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
// return
//}
if live[0].Status != models.PEDDING_PAYMENT {
handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil)
if 0 == len(live) {
handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
return
}
......@@ -310,10 +308,10 @@ func GetLiveCharge(c *gin.Context) {
return
}
//if len(charge) == 0 {
// handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
// return
//}
if len(charge) == 0 {
handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
return
}
data := make(map[string]interface{})
data["uint"] = charge[0].Unit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment