Ver código fonte

add reverse:for v4.2.6 区域代理处理

tags/v4.2.6
huangjiajun 2 anos atrás
pai
commit
33937f3660
2 arquivos alterados com 5 adições e 2 exclusões
  1. +2
    -2
      db/db_regional_agent_user_belong.go
  2. +3
    -0
      rule/regional_agent.go

+ 2
- 2
db/db_regional_agent_user_belong.go Ver arquivo

@@ -174,12 +174,12 @@ func GetCountByRegionalAgentUserBelongById(Db *xorm.Engine, uid interface{}, pvd
}
fmt.Println(pvd)
if pvd == md.PVD_COMMON {
if has, err := Db.Where("uid = ? and (pvd='' or pvd=?)", uid, pvd).Get(&m); err != nil || has == false {
if has, err := Db.Where("uid = ? and (pvd='' or pvd=?)", uid, pvd).Desc("id").Get(&m); err != nil || has == false {
return nil, err
}
return &m, nil
} else {
if has, err := Db.Where("uid = ? and pvd=?", uid, pvd).Get(&m); err != nil || has == false {
if has, err := Db.Where("uid = ? and pvd=?", uid, pvd).Desc("id").Get(&m); err != nil || has == false {
return nil, err
}
return &m, nil


+ 3
- 0
rule/regional_agent.go Ver arquivo

@@ -62,6 +62,9 @@ func HandleCommissionDistributionSystem(engine *xorm.Engine, args *md.RegionalAg
if err != nil {
return nil, false
}
if regionalAgentRegion == nil {
return nil, true
}
//查询 regional_agent_base 表获取虚拟币相关配置信息
agentBase, err := db.GetCountByRegionalAgentBase(engine)
if err != nil {


Carregando…
Cancelar
Salvar