1
This commit is contained in:
commit
f69ac6fd9e
@ -136,6 +136,14 @@ func (pai *PlayerApi) BagQuery(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(reqJson.Account_id) > 0xFF {
|
||||||
|
c.JSON(http.StatusOK, gin.H{
|
||||||
|
"code": 1,
|
||||||
|
"message": "输入过长",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
cursor := q5.ToInt64(c.DefaultQuery("cursor", ""))
|
cursor := q5.ToInt64(c.DefaultQuery("cursor", ""))
|
||||||
filterstr := " account_id = '" + reqJson.Account_id + "' "
|
filterstr := " account_id = '" + reqJson.Account_id + "' "
|
||||||
sql := fmt.Sprintf(`SELECT * FROM t_bag WHERE idx > %d AND %s `, cursor, filterstr)
|
sql := fmt.Sprintf(`SELECT * FROM t_bag WHERE idx > %d AND %s `, cursor, filterstr)
|
||||||
@ -157,6 +165,14 @@ func (pai *PlayerApi) HeroesQuery(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(reqJson.Account_id) > 0xFF {
|
||||||
|
c.JSON(http.StatusOK, gin.H{
|
||||||
|
"code": 1,
|
||||||
|
"message": "输入过长",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
cursor := q5.ToInt64(c.DefaultQuery("cursor", ""))
|
cursor := q5.ToInt64(c.DefaultQuery("cursor", ""))
|
||||||
filterstr := " account_id = '" + reqJson.Account_id + "' "
|
filterstr := " account_id = '" + reqJson.Account_id + "' "
|
||||||
sql := fmt.Sprintf(`SELECT * FROM t_hero WHERE idx > %d AND %s `, cursor, filterstr)
|
sql := fmt.Sprintf(`SELECT * FROM t_hero WHERE idx > %d AND %s `, cursor, filterstr)
|
||||||
@ -264,3 +280,36 @@ func (pai *PlayerApi) GameMallQuery(c *gin.Context) {
|
|||||||
return p
|
return p
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (pai *PlayerApi) RechargeQuery(c *gin.Context) {
|
||||||
|
type RechargeQueryForm struct {
|
||||||
|
Identity string `binding:"required" json:"identity"`
|
||||||
|
}
|
||||||
|
|
||||||
|
reqJson := RechargeQueryForm{}
|
||||||
|
if !checkparam(&reqJson, c) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(reqJson.Identity) > 0xFF {
|
||||||
|
c.JSON(http.StatusOK, gin.H{
|
||||||
|
"code": 1,
|
||||||
|
"message": "输入过长",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
cursor := q5.ToInt64(c.DefaultQuery("cursor", ""))
|
||||||
|
filterstr :=
|
||||||
|
" (receiver_account_id = '" + reqJson.Identity +
|
||||||
|
"' OR account_address = '" + reqJson.Identity +
|
||||||
|
"' OR passport_address = '" + reqJson.Identity +
|
||||||
|
"' OR lower_case_email = '" + reqJson.Identity + "')"
|
||||||
|
sql := fmt.Sprintf(`SELECT * FROM t_recharge_order WHERE idx > %d AND %s `, cursor, filterstr)
|
||||||
|
|
||||||
|
query(constant.BCNFT_DB, cursor, sql, c, func(ds *f5.DataSet) interface{} {
|
||||||
|
p := new(system.RechargeOrder)
|
||||||
|
f5.UnmarshalModel(ds, p)
|
||||||
|
return p
|
||||||
|
})
|
||||||
|
}
|
||||||
|
31
server/adminserver/model/system/rechargeorder.go
Normal file
31
server/adminserver/model/system/rechargeorder.go
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
package system
|
||||||
|
|
||||||
|
type RechargeOrder struct {
|
||||||
|
Idx int64 `gorm:"column:idx" json:"idx"`
|
||||||
|
Order_id string `gorm:"column:order_id;comment:订单id" json:"order_id"`
|
||||||
|
Short_Order_id string `gorm:"column:short_order_id;comment:短订单id" json:"short_order_id"`
|
||||||
|
Account_address string `gorm:"column:account_address;comment:钱包地址" json:"account_address"`
|
||||||
|
Passport_address string `gorm:"column:passport_address;comment:passport地址" json:"passport_address"`
|
||||||
|
Currency_address string `gorm:"column:currency_address;comment:货币地址" json:"currency_address"`
|
||||||
|
Currency_name string `gorm:"column:currency_name;comment:货币名称" json:"currency_name"`
|
||||||
|
Item_id int `gorm:"column:item_id;comment:item_id" json:"item_id"`
|
||||||
|
Item_num int64 `gorm:"column:item_num;comment:item_num" json:"item_num"`
|
||||||
|
Price string `gorm:"column:price;comment:price" json:"price"`
|
||||||
|
Createtime int `gorm:"column:createtime;comment:创建时间" json:"createtime"`
|
||||||
|
Modifytime int `gorm:"column:modifytime;comment:修改时间" json:"modifytime"`
|
||||||
|
Diamond float64 `gorm:"column:diamond;comment:diamond" json:"diamond"`
|
||||||
|
Pay_status int `gorm:"column:pay_status;comment:0:支付中 1:支付成功" json:"pay_status"`
|
||||||
|
Pay_time int `gorm:"column:pay_time;comment:支付成功时间" json:"pay_time"`
|
||||||
|
Delivery_status int `gorm:"column:delivery_status;comment:0:未发货 1:发货成功" json:"delivery_status"`
|
||||||
|
Delivery_time int `gorm:"column:delivery_time;comment:发货成功时间" json:"delivery_time"`
|
||||||
|
Receiver_account_id string `gorm:"column:receiver_account_id;comment:收货人account_id" json:"receiver_account_id"`
|
||||||
|
Net_id int64 `gorm:"column:net_id;comment:net_id" json:"net_id"`
|
||||||
|
Txhash string `gorm:"column:txhash;comment:txhash" json:"txhash"`
|
||||||
|
Lower_case_email string `gorm:"column:lower_case_email;comment:lower_case_email" json:"lower_case_email"`
|
||||||
|
Present_diamond float64 `gorm:"column:present_diamond;comment:充值赠送钻石" json:"present_diamond"`
|
||||||
|
Return_contribution float64 `gorm:"column:return_contribution;comment:return_contribution" json:"return_contribution"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *RechargeOrder) TableName() string {
|
||||||
|
return "t_recharge_rder"
|
||||||
|
}
|
@ -19,5 +19,6 @@ func (pr *PlayerRouter) InitPlayerRouter(priRouter *gin.RouterGroup) {
|
|||||||
group.POST("goldbullionquery", middleware.Permission("api/v1/player/goldbullionquery", api.GoldBullionQuery))
|
group.POST("goldbullionquery", middleware.Permission("api/v1/player/goldbullionquery", api.GoldBullionQuery))
|
||||||
group.POST("ticketconsumequery", middleware.Permission("api/v1/player/ticketconsumequery", api.TicketConsumeQuery))
|
group.POST("ticketconsumequery", middleware.Permission("api/v1/player/ticketconsumequery", api.TicketConsumeQuery))
|
||||||
group.POST("gamemallquery", middleware.Permission("api/v1/player/gamemallquery", api.GameMallQuery))
|
group.POST("gamemallquery", middleware.Permission("api/v1/player/gamemallquery", api.GameMallQuery))
|
||||||
|
group.POST("rechargequery", middleware.Permission("api/v1/player/rechargequery", api.RechargeQuery))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ type taskMgr struct {
|
|||||||
sysMail
|
sysMail
|
||||||
repairOrder
|
repairOrder
|
||||||
refreshMeta
|
refreshMeta
|
||||||
contribution
|
//contribution
|
||||||
chainActivity
|
chainActivity
|
||||||
recharge
|
recharge
|
||||||
}
|
}
|
||||||
@ -20,7 +20,7 @@ func (this *taskMgr) Init() {
|
|||||||
this.sysMail.init()
|
this.sysMail.init()
|
||||||
this.repairOrder.init()
|
this.repairOrder.init()
|
||||||
//this.refreshMeta.init()
|
//this.refreshMeta.init()
|
||||||
this.contribution.init()
|
//this.contribution.init()
|
||||||
this.chainActivity.init()
|
this.chainActivity.init()
|
||||||
this.recharge.init()
|
this.recharge.init()
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ func (this *taskMgr) Init() {
|
|||||||
func (this *taskMgr) UnInit() {
|
func (this *taskMgr) UnInit() {
|
||||||
this.recharge.unInit()
|
this.recharge.unInit()
|
||||||
this.chainActivity.unInit()
|
this.chainActivity.unInit()
|
||||||
this.contribution.unInit()
|
//this.contribution.unInit()
|
||||||
//this.refreshMeta.unInit()
|
//this.refreshMeta.unInit()
|
||||||
this.repairOrder.unInit()
|
this.repairOrder.unInit()
|
||||||
this.sysMail.unInit()
|
this.sysMail.unInit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user