|
|
@@ -3,6 +3,7 @@ package railsadmin_controller
|
|
|
import (
|
|
|
"fmt"
|
|
|
"fohow.com/apps"
|
|
|
+ "fohow.com/apps/helpers"
|
|
|
"fohow.com/apps/models/balance_model"
|
|
|
"fohow.com/apps/models/cent_model"
|
|
|
"fohow.com/apps/models/live_model"
|
|
|
@@ -14,7 +15,7 @@ import (
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
-//
|
|
|
+//发放直播赠品
|
|
|
func (self *RailsadminController) LiveAward() {
|
|
|
|
|
|
_id := self.Ctx.Input.Param(":id")
|
|
|
@@ -109,3 +110,20 @@ func (self *RailsadminController) LiveAward() {
|
|
|
|
|
|
self.ServeJSON()
|
|
|
}
|
|
|
+
|
|
|
+//发放充值赠品
|
|
|
+func (self *RailsadminController) PatchCashAward() {
|
|
|
+
|
|
|
+ _id := self.Ctx.Input.Param(":id")
|
|
|
+ id, _ := strconv.ParseInt(_id, 10, 64)
|
|
|
+
|
|
|
+ beego.BeeLogger.Warn("PatchCashAward id:(%d)", id)
|
|
|
+
|
|
|
+ order := order_model.GetOrderByIntId(id)
|
|
|
+ if order != nil {
|
|
|
+ go helpers.PresentTransferToOrder(order.OrderId, order.WxUserId)
|
|
|
+ }
|
|
|
+
|
|
|
+ beego.BeeLogger.Warn("----------------end patch cash recharge awards order_id ---%s ", order.OrderId)
|
|
|
+ self.ServeJSON()
|
|
|
+}
|