Sfoglia il codice sorgente

add reverse:for v3.8.1 test

tags/v3.8.1
huangjiajun 1 anno fa
parent
commit
12b7d58865
2 ha cambiato i file con 13 aggiunte e 1 eliminazioni
  1. +12
    -0
      db/db_integral_release_basic.go
  2. +1
    -1
      rule/integral_release_settlement.go

+ 12
- 0
db/db_integral_release_basic.go Vedi File

@@ -87,6 +87,18 @@ func IntegralReleaseGetOneByParams(session *xorm.Session, params map[string]inte
}
return &m, nil
}
func IntegralReleaseGetOneByParamsEg(eg *xorm.Engine, params map[string]interface{}) (*model.IntegralReleaseBasic, error) {
var m model.IntegralReleaseBasic
var query = fmt.Sprintf("%s =?", params["key"])
has, err := eg.Where(query, params["value"]).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
}

// IntegralReleaseFindByParams 通过传入的参数查询数据(多条)
func IntegralReleaseFindByParams(Db *xorm.Engine, params map[string]interface{}) (*[]model.IntegralReleaseBasic, error) {


+ 1
- 1
rule/integral_release_settlement.go Vedi File

@@ -78,7 +78,7 @@ func DailySettlementIntegralRelease(engine *xorm.Engine, mid string, isTask bool

//2、查询所有 `integral_release_user_with_ord` 记录
integralReleaseUserWithOrds, err := db.IntegralReleaseUserWithOrdFindByParams(session, map[string]interface{}{
"state": "is_use",
"key": "state",
"value": 1,
})
for _, ord := range *integralReleaseUserWithOrds {


Caricamento…
Annulla
Salva