Ver código fonte

更新

guide_order
huangjiajun 3 meses atrás
pai
commit
bc3c3a6287
1 arquivos alterados com 17 adições e 0 exclusões
  1. +17
    -0
      app/db/db_comm_coupon_user_ord.go

+ 17
- 0
app/db/db_comm_coupon_user_ord.go Ver arquivo

@@ -6,6 +6,7 @@ import (
"applet/app/utils"
"applet/app/utils/logx"
"fmt"
"github.com/syyongx/php2go"
"strings"
"xorm.io/xorm"
)
@@ -118,6 +119,14 @@ func CouponUserOrdByGidAscBatch(eg *xorm.Engine, uid int, gid string, refundStat
} else {
session = eg.Where("uid=? AND type= ? and gid=? and refund_state=?", uid, 1, gid, refundState)
}
} else if utils.InArr(pvd, []string{md.PVD_JD}) && php2go.IsNumeric(gid) == false {
ex := strings.Split(gid, "_")
if len(ex) == 2 {
gid = ex[1]
session = eg.Where("uid=? AND type= ? and gid LIKE ? and refund_state=?", uid, 1, "%"+gid+"%", refundState)
} else {
session = eg.Where("uid=? AND type= ? and gid=? and refund_state=?", uid, 1, gid, refundState)
}
} else {
session = eg.Where("uid=? AND type= ? and gid=? and refund_state=?", uid, 1, gid, refundState)
}
@@ -141,6 +150,14 @@ func CouponUserOrdByGidAscBatchALL(eg *xorm.Engine, uid int, gid string, refundS
} else {
session = eg.Where("uid=? AND type= ? and gid=? and refund_state=? and batch=?", uid, 1, gid, refundState, batch)
}
} else if utils.InArr(pvd, []string{md.PVD_JD}) && php2go.IsNumeric(gid) == false {
ex := strings.Split(gid, "_")
if len(ex) == 2 {
gid = ex[1]
session = eg.Where("uid=? AND type= ? and gid LIKE ? and refund_state=? and batch=?", uid, 1, "%"+gid+"%", refundState, batch)
} else {
session = eg.Where("uid=? AND type= ? and gid=? and refund_state=? and batch=?", uid, 1, gid, refundState, batch)
}
} else {
session = eg.Where("uid=? AND type= ? and gid=? and refund_state=? and batch=?", uid, 1, gid, refundState, batch)
}


Carregando…
Cancelar
Salvar