You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
763 B
33 lines
763 B
package relation |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/app/admin/main/credit/conf" |
|
relationmdl "go-common/app/service/main/relation/model" |
|
relationrpc "go-common/app/service/main/relation/rpc/client" |
|
"go-common/library/log" |
|
) |
|
|
|
// Dao is account dao. |
|
type Dao struct { |
|
// rpc |
|
relationRPC *relationrpc.Service |
|
} |
|
|
|
// New is initial for account . |
|
func New(c *conf.Config) (d *Dao) { |
|
d = &Dao{ |
|
relationRPC: relationrpc.New(c.RPCClient.Relation), |
|
} |
|
return |
|
} |
|
|
|
// RPCStats rpc info get by muti mid . |
|
func (d *Dao) RPCStats(c context.Context, mids []int64) (res map[int64]*relationmdl.Stat, err error) { |
|
arg := &relationmdl.ArgMids{Mids: mids} |
|
if res, err = d.relationRPC.Stats(c, arg); err != nil { |
|
log.Error("d.relationRPC.Stats error(%v)", err) |
|
} |
|
return |
|
}
|
|
|