Browse Source

add reverse:for v3.9.2 积分释放规则

tags/v3.9.2
huangjiajun 2 years ago
parent
commit
33441c0ed5
1 changed files with 18 additions and 0 deletions
  1. +18
    -0
      db/db_integral_release_user_with_ord.go

+ 18
- 0
db/db_integral_release_user_with_ord.go View File

@@ -28,6 +28,13 @@ func IntegralReleaseUserWithOrdInsert(Db *xorm.Engine, IntegralReleaseUserWithOr
} }
return IntegralReleaseUserWithOrd.Id, nil return IntegralReleaseUserWithOrd.Id, nil
} }
func IntegralReleaseUserWithOrdInsertSess(sess *xorm.Session, IntegralReleaseUserWithOrd *model.IntegralReleaseUserWithOrd) (int, error) {
_, err := sess.Insert(IntegralReleaseUserWithOrd)
if err != nil {
return 0, err
}
return IntegralReleaseUserWithOrd.Id, nil
}


// BatchAddIntegralReleaseUserWithOrds 批量新增数据 // BatchAddIntegralReleaseUserWithOrds 批量新增数据
func BatchAddIntegralReleaseUserWithOrds(Db *xorm.Engine, IntegralReleaseUserWithOrdData []*model.IntegralReleaseUserWithOrd) (int64, error) { func BatchAddIntegralReleaseUserWithOrds(Db *xorm.Engine, IntegralReleaseUserWithOrdData []*model.IntegralReleaseUserWithOrd) (int64, error) {
@@ -87,6 +94,17 @@ func IntegralReleaseUserWithOrdGetOneByParams(session *xorm.Session, params map[
} }
return &m, nil return &m, nil
} }
func IntegralReleaseUserWithOrdByUid(session *xorm.Session, uid, pvd int) (*model.IntegralReleaseUserWithOrd, error) {
var m model.IntegralReleaseUserWithOrd
has, err := session.Where("uid=? and pvd=?", uid, pvd).Get(&m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, errors.New("未查询到相应的 block_star_chain 记录")
}
return &m, nil
}


// IntegralReleaseUserWithOrdFindByParams 通过传入的参数查询数据(多条) // IntegralReleaseUserWithOrdFindByParams 通过传入的参数查询数据(多条)
func IntegralReleaseUserWithOrdFindByParams(session *xorm.Session, params map[string]interface{}) (*[]model.IntegralReleaseUserWithOrd, error) { func IntegralReleaseUserWithOrdFindByParams(session *xorm.Session, params map[string]interface{}) (*[]model.IntegralReleaseUserWithOrd, error) {


Loading…
Cancel
Save