From 347304eb8272e53b4b6013942584805b72a5c0e9 Mon Sep 17 00:00:00 2001 From: huangjuajun <102564160@qq.com> Date: Mon, 30 May 2022 11:22:26 +0800 Subject: [PATCH] add Reverse:for v1.1.0 --- db/db_comm_coupon_user_ord.go | 4 ++-- db/db_comm_coupon_user_total.go | 6 +++--- db/db_coupon_comm_check.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/db/db_comm_coupon_user_ord.go b/db/db_comm_coupon_user_ord.go index 10bfde2..083aef5 100644 --- a/db/db_comm_coupon_user_ord.go +++ b/db/db_comm_coupon_user_ord.go @@ -2,7 +2,7 @@ package db import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_coupon.git/db/model" - "code.fnuoos.com/go_rely_warehouse/zyos_go_coupon.git/utils" + zhios_tool_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_tools.git/utils" "fmt" "xorm.io/xorm" ) @@ -149,7 +149,7 @@ func commWhere(Db *xorm.Engine, uid int, types, pvdType, times string, ordType [ userOne, _ := UserFindByPhoneOrNickname(Db, keyword) uids := "0" if userOne != nil { - uids = utils.IntToStr(userOne.Uid) + uids = zhios_tool_utils.IntToStr(userOne.Uid) } dbWhere = dbWhere.And("to_uid = ? and to_uid>0", uids) } diff --git a/db/db_comm_coupon_user_total.go b/db/db_comm_coupon_user_total.go index 8a35ff5..9535d3a 100644 --- a/db/db_comm_coupon_user_total.go +++ b/db/db_comm_coupon_user_total.go @@ -2,7 +2,7 @@ package db import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_coupon.git/db/model" - "code.fnuoos.com/go_rely_warehouse/zyos_go_coupon.git/utils" + zhios_tool_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_tools.git/utils" "xorm.io/xorm" ) @@ -24,14 +24,14 @@ func GetCouponUserByUid(Db *xorm.Engine, uid string) (*[]model.CommCouponUserTot func GetCouponUserTotalByLeaveSumWithTypeSession(session *xorm.Session, uid int, pvdType string) (*[]model.CommCouponUserTotal, error) { var m []model.CommCouponUserTotal - if err := session.Where("uid = " + utils.IntToStr(uid) + " and leave_coupon_amount_value>=0 and (pvd_type LIKE '%" + pvdType + "%' or pvd_type='ordinary' )").Asc("leave_coupon_amount_value").Find(&m); err != nil { + if err := session.Where("uid = " + zhios_tool_utils.IntToStr(uid) + " and leave_coupon_amount_value>=0 and (pvd_type LIKE '%" + pvdType + "%' or pvd_type='ordinary' )").Asc("leave_coupon_amount_value").Find(&m); err != nil { return nil, err } return &m, nil } func GetCouponUserTotalByNegative(Db *xorm.Engine, uid int, pvdType, cols string) (float64, error) { var m model.CommCouponUserTotal - total, err := Db.Where("uid = "+utils.IntToStr(uid)+" and leave_coupon_amount_value<0 and (pvd_type LIKE '%"+pvdType+"%' or pvd_type='ordinary' )").Sum(m, cols) + total, err := Db.Where("uid = "+zhios_tool_utils.IntToStr(uid)+" and leave_coupon_amount_value<0 and (pvd_type LIKE '%"+pvdType+"%' or pvd_type='ordinary' )").Sum(m, cols) if err != nil { return 0, err } diff --git a/db/db_coupon_comm_check.go b/db/db_coupon_comm_check.go index 7049371..edd7e50 100644 --- a/db/db_coupon_comm_check.go +++ b/db/db_coupon_comm_check.go @@ -2,14 +2,14 @@ package db import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_coupon.git/db/model" - "code.fnuoos.com/go_rely_warehouse/zyos_go_coupon.git/utils" + zhios_tool_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_tools.git/utils" "fmt" "xorm.io/xorm" ) func GetCouponUserTotalByLeaveSumWithType(Db *xorm.Engine, uid int, pvdType, cols string) (float64, error) { var m model.CommCouponUserTotal - total, err := Db.Where("uid = "+utils.IntToStr(uid)+" and (pvd_type LIKE '%"+pvdType+"%' or pvd_type='ordinary' )").Sum(m, cols) + total, err := Db.Where("uid = "+zhios_tool_utils.IntToStr(uid)+" and (pvd_type LIKE '%"+pvdType+"%' or pvd_type='ordinary' )").Sum(m, cols) if err != nil { fmt.Println(err) return 0, err