浏览代码

更新

guide_order
huangjiajun 3 个月前
父节点
当前提交
bc3c3a6287
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. +17
    -0
      app/db/db_comm_coupon_user_ord.go

+ 17
- 0
app/db/db_comm_coupon_user_ord.go 查看文件

@@ -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)
}


正在加载...
取消
保存