Commit 5547b969 authored by shajiaiming's avatar shajiaiming

fix

parent b1963938
...@@ -180,11 +180,11 @@ func LiveStatus(c *gin.Context) { ...@@ -180,11 +180,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])
} }
...@@ -211,10 +211,10 @@ func VerifyStatus(c *gin.Context) { ...@@ -211,10 +211,10 @@ 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 != models.PEDDING_PAYMENT {
handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil) handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil)
...@@ -261,10 +261,10 @@ func NotifyUrl(c *gin.Context) { ...@@ -261,10 +261,10 @@ 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 // return
} //}
if live[0].Status != models.PEDDING_PAYMENT { if live[0].Status != models.PEDDING_PAYMENT {
handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil) handler.SendResponse(c, errno.ErrUpdateLiveInfo, nil)
...@@ -310,10 +310,10 @@ func GetLiveCharge(c *gin.Context) { ...@@ -310,10 +310,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