|
@@ -359,7 +359,10 @@ func WebGmProcessCreateOrder(c *gin.Context) {
|
|
|
uidStr := c.DefaultQuery("uid", "") ///default ""
|
|
uidStr := c.DefaultQuery("uid", "") ///default ""
|
|
|
orderIdStr := c.DefaultQuery("order_id", "") ///default ""
|
|
orderIdStr := c.DefaultQuery("order_id", "") ///default ""
|
|
|
productIdStr := c.DefaultQuery("productId", "") ///default ""
|
|
productIdStr := c.DefaultQuery("productId", "") ///default ""
|
|
|
|
|
+ countStr := c.DefaultQuery("count", "") ///default ""
|
|
|
uid, _ := model.Str2NumU64(uidStr)
|
|
uid, _ := model.Str2NumU64(uidStr)
|
|
|
|
|
+ productId, _ := strconv.Atoi(productIdStr)
|
|
|
|
|
+ count, _ := strconv.Atoi(countStr)
|
|
|
if uidStr == "" || orderIdStr == "" || productIdStr == "" {
|
|
if uidStr == "" || orderIdStr == "" || productIdStr == "" {
|
|
|
errStr = "uid invalid!!!"
|
|
errStr = "uid invalid!!!"
|
|
|
util.ErrorF("param error:%v ,%v,%v", uidStr, orderIdStr, productIdStr)
|
|
util.ErrorF("param error:%v ,%v,%v", uidStr, orderIdStr, productIdStr)
|
|
@@ -368,40 +371,11 @@ func WebGmProcessCreateOrder(c *gin.Context) {
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- //获取简介信息
|
|
|
|
|
- var bfInfo *WebBriefInfo = nil
|
|
|
|
|
- if len(service.GetMysqlPay()) > 0 {
|
|
|
|
|
- for _, v := range service.GetMysqlPay() {
|
|
|
|
|
- v.Operate(func(rawClient interface{}) interface{} {
|
|
|
|
|
- wrapper := mysql.NewWrapper(rawClient.(*sql.DB))
|
|
|
|
|
-
|
|
|
|
|
- wrapper.Query("select * from role where uid=?", uid).Each(func(wrapper2 *mysql.Wrapper) bool {
|
|
|
|
|
- bfInfo = parseUserInfo(wrapper2)
|
|
|
|
|
-
|
|
|
|
|
- return true
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- if wrapper.Err != nil {
|
|
|
|
|
- util.ErrorF("uid=%v WebGmProcessUserGet err=%v", uid, wrapper.Err)
|
|
|
|
|
- }
|
|
|
|
|
- return nil
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- if bfInfo == nil {
|
|
|
|
|
- c.JSON(http.StatusOK, gin.H{
|
|
|
|
|
- "err": "玩家不存在!!!",
|
|
|
|
|
- })
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- callBackKey := "http://165.154.215.99:80"
|
|
|
|
|
- if bfInfo.Serverid <= 10 {
|
|
|
|
|
- callBackKey = callBackKey + "0" + strconv.Itoa(bfInfo.Serverid-1) + "/pay/hwDn"
|
|
|
|
|
- } else if bfInfo.Serverid == 2 {
|
|
|
|
|
- callBackKey = callBackKey + "86" + "/pay/hwDn"
|
|
|
|
|
- } else {
|
|
|
|
|
- callBackKey = callBackKey + strconv.Itoa(bfInfo.Serverid-1) + "/pay/hwDn"
|
|
|
|
|
|
|
+ ss := serverproto.SSPayOrderCreateReq{
|
|
|
|
|
+ OrderId: orderIdStr,
|
|
|
|
|
+ GoodsId: int32(productId),
|
|
|
|
|
+ Count: int32(count),
|
|
|
|
|
+ Uid: uidStr,
|
|
|
}
|
|
}
|
|
|
c.JSON(http.StatusOK, CheckUser{CharacterName: bfInfo.NickName, Server: strconv.Itoa(bfInfo.Serverid / 2), CallBackKey: callBackKey})
|
|
c.JSON(http.StatusOK, CheckUser{CharacterName: bfInfo.NickName, Server: strconv.Itoa(bfInfo.Serverid / 2), CallBackKey: callBackKey})
|
|
|
}
|
|
}
|