fix:
This commit is contained in:
parent
a01e8fdfd2
commit
932fcf597f
|
@ -249,9 +249,9 @@ func RentCardOrderCreate(c *gin.Context) {
|
|||
rentCard = &model.UserRentCard{LevelRentCount: memberConfig.CardMax, CanRentCount: memberConfig.CardMax}
|
||||
}
|
||||
|
||||
if uc.Uid == 15304136 || uc.Uid == 45935373 {
|
||||
rentCard.CanRentCount -= 1
|
||||
}
|
||||
//if uc.Uid == 45935373 {
|
||||
// rentCard.CanRentCount -= 1
|
||||
//}
|
||||
if cardCount > rentCard.CanRentCount {
|
||||
logger.Error("GetMemberConfig err:", err)
|
||||
RespJson(c, status.OrderOutRentCount, nil)
|
||||
|
|
|
@ -1074,7 +1074,7 @@ type HmPayBizContent struct {
|
|||
// AccessPartyCode string `json:"access_party_code"`
|
||||
//} `json:"extend_params"`
|
||||
//GoodsDetails []HmPayGoodsDetails `json:"goods_details"`
|
||||
LimitPay string `json:"limit_pay"`
|
||||
//LimitPay string `json:"limit_pay"`
|
||||
NotifyUrl string `json:"notify_url"`
|
||||
//OperatorId string `json:"operator_id"`
|
||||
OutOrderNo string `json:"out_order_no"`
|
||||
|
@ -1157,13 +1157,13 @@ func HmJsPayUnifiedOrder(orderId string, totalFee uint32, openId, notifyUrl stri
|
|||
}
|
||||
|
||||
biz := HmPayBizContent{
|
||||
Body: "服务费",
|
||||
MerAppId: WxAppId,
|
||||
MerBuyerId: openId,
|
||||
CreateIp: clientIp,
|
||||
CreateTime: strTime,
|
||||
ExpireTime: strExpireTime,
|
||||
LimitPay: "NO_CREDIT",
|
||||
Body: "服务费",
|
||||
MerAppId: WxAppId,
|
||||
MerBuyerId: openId,
|
||||
CreateIp: clientIp,
|
||||
CreateTime: strTime,
|
||||
ExpireTime: strExpireTime,
|
||||
//LimitPay: "NO_CREDIT",
|
||||
NotifyUrl: notifyUrl,
|
||||
OutOrderNo: orderId,
|
||||
PayType: "JSAPI",
|
||||
|
|
|
@ -1057,14 +1057,17 @@ func TestOrderCancelId(t *testing.T) {
|
|||
//}
|
||||
|
||||
func TestGameCardGoodsStockInspection(t *testing.T) {
|
||||
GameCardGoodsStockInspection()
|
||||
InitDBProd()
|
||||
ids := []uint32{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26}
|
||||
for i, _ := range ids {
|
||||
GameCardGoodsStockInspection(ids[i])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func GameCardGoodsStockInspection() {
|
||||
InitDBProd()
|
||||
|
||||
func GameCardGoodsStockInspection(id uint32) {
|
||||
var gameCardGoodses []GameCardGoods
|
||||
err := NewGameCardGoodsQuerySet(DBProd).StoreIdEq(16).All(&gameCardGoodses)
|
||||
err := NewGameCardGoodsQuerySet(DBProd).StoreIdEq(uint64(id)).All(&gameCardGoodses)
|
||||
if err != nil {
|
||||
logger.Error("err:", err)
|
||||
}
|
||||
|
@ -1076,12 +1079,12 @@ func GameCardGoodsStockInspection() {
|
|||
//rentMap[uint32(gameCard.StoreId)] += 1
|
||||
rentMap[uint32(gameCard.GameCardId)] += 1
|
||||
}
|
||||
if gameCard.Status == 3 {
|
||||
if gameCard.Status == 3 || gameCard.Status == 2 {
|
||||
holdMap[uint32(gameCard.GameCardId)] += 1
|
||||
}
|
||||
}
|
||||
var gameCardGoodsStocks []GameCardGoodsStock
|
||||
err = NewGameCardGoodsStockQuerySet(DBProd).StoreIdEq(16).All(&gameCardGoodsStocks)
|
||||
err = NewGameCardGoodsStockQuerySet(DBProd).StoreIdEq(uint64(id)).All(&gameCardGoodsStocks)
|
||||
if err != nil {
|
||||
logger.Error("err:", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user