Commit 34cdc655 authored by shajiaiming's avatar shajiaiming

fix

parent 5547b969
...@@ -172,6 +172,7 @@ func LiveStatus(c *gin.Context) { ...@@ -172,6 +172,7 @@ func LiveStatus(c *gin.Context) {
live_service := live_info_service.LiveInfo{ live_service := live_info_service.LiveInfo{
ApplyId: uint32(apply_id), ApplyId: uint32(apply_id),
OrderSn: order_sn, OrderSn: order_sn,
Status: models.PEDDING_PAYMENT,
PageNum: util.GetPage(c), PageNum: util.GetPage(c),
PageSize: util.GetLimit(c), PageSize: util.GetLimit(c),
} }
...@@ -180,11 +181,11 @@ func LiveStatus(c *gin.Context) { ...@@ -180,11 +181,11 @@ func LiveStatus(c *gin.Context) {
handler.SendResponse(c, errno.InternalServerError, nil) handler.SendResponse(c, errno.InternalServerError, nil)
return return
} }
//
//if 0 == len(live) { if 0 == len(live) {
// handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil) handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
// return return
//} }
handler.SendResponse(c, nil, live[0]) handler.SendResponse(c, nil, live[0])
} }
...@@ -202,6 +203,7 @@ func VerifyStatus(c *gin.Context) { ...@@ -202,6 +203,7 @@ func VerifyStatus(c *gin.Context) {
live_service := live_info_service.LiveInfo{ live_service := live_info_service.LiveInfo{
OrderSn: info.OrderSn, OrderSn: info.OrderSn,
Status: models.PEDDING_PAYMENT,
PageNum: util.GetPage(c), PageNum: util.GetPage(c),
PageSize: util.GetLimit(c), PageSize: util.GetLimit(c),
} }
...@@ -211,17 +213,17 @@ func VerifyStatus(c *gin.Context) { ...@@ -211,17 +213,17 @@ func VerifyStatus(c *gin.Context) {
return return
} }
//if 0 == len(live) { if 0 == len(live) {
// handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil) handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
// return return
//} }
if live[0].Status != models.PEDDING_PAYMENT { if live[0].Status != uint8(models.PEDDING_PAYMENT) {
handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil) handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil)
return return
} }
if info.LiveStatus != models.LIVEED { if info.LiveStatus != uint8(models.LIVEED) {
handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil) handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil)
return return
} }
...@@ -252,6 +254,7 @@ func NotifyUrl(c *gin.Context) { ...@@ -252,6 +254,7 @@ func NotifyUrl(c *gin.Context) {
live_service := live_info_service.LiveInfo{ live_service := live_info_service.LiveInfo{
OrderSn: info.OrderSn, OrderSn: info.OrderSn,
Status: models.PEDDING_PAYMENT,
PageNum: util.GetPage(c), PageNum: util.GetPage(c),
PageSize: util.GetLimit(c), PageSize: util.GetLimit(c),
} }
...@@ -261,13 +264,8 @@ func NotifyUrl(c *gin.Context) { ...@@ -261,13 +264,8 @@ func NotifyUrl(c *gin.Context) {
return return
} }
//if 0 == len(live) { if 0 == len(live) {
// handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil) handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
// return
//}
if live[0].Status != models.PEDDING_PAYMENT {
handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil)
return return
} }
...@@ -310,10 +308,10 @@ func GetLiveCharge(c *gin.Context) { ...@@ -310,10 +308,10 @@ func GetLiveCharge(c *gin.Context) {
return return
} }
//if len(charge) == 0 { if len(charge) == 0 {
// handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil) handler.SendResponse(c, errno.ErrLiveChargeNotFound, nil)
// return return
//} }
data := make(map[string]interface{}) data := make(map[string]interface{})
data["uint"] = charge[0].Unit 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