尝试解密数据
This commit is contained in:
parent
02fdf31829
commit
ddb3cd3e5c
|
@ -3,9 +3,11 @@ package svc
|
||||||
import (
|
import (
|
||||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||||
"github.com/zeromicro/go-zero/rest"
|
"github.com/zeromicro/go-zero/rest"
|
||||||
|
"github.com/zeromicro/go-zero/zrpc"
|
||||||
"rs/cmd/api/internal/config"
|
"rs/cmd/api/internal/config"
|
||||||
"rs/cmd/api/internal/types"
|
"rs/cmd/api/internal/types"
|
||||||
"rs/genModel"
|
"rs/genModel"
|
||||||
|
"rs/rpc/transferClient"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ServiceContext struct {
|
type ServiceContext struct {
|
||||||
|
@ -14,15 +16,15 @@ type ServiceContext struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServiceContext(c config.Config) *ServiceContext {
|
func NewServiceContext(c config.Config) *ServiceContext {
|
||||||
//conn := zrpc.MustNewClient(zrpc.RpcClientConf{
|
conn := zrpc.MustNewClient(zrpc.RpcClientConf{
|
||||||
// Target: c.Nacos.Target,
|
Target: c.Nacos.Target,
|
||||||
//})
|
})
|
||||||
sqlConn := sqlx.NewMysql(c.DB.Coupon.DataSource)
|
sqlConn := sqlx.NewMysql(c.DB.Coupon.DataSource)
|
||||||
//client := transferClient.NewTransfer(conn)
|
client := transferClient.NewTransfer(conn)
|
||||||
|
|
||||||
base := types.BaseServiceContext{
|
base := types.BaseServiceContext{
|
||||||
Config: c,
|
Config: c,
|
||||||
//TransferRpc: client,
|
TransferRpc: client,
|
||||||
ProductRedirectConf: genModel.NewProductRedirectConfModel(sqlConn, c.Cache),
|
ProductRedirectConf: genModel.NewProductRedirectConfModel(sqlConn, c.Cache),
|
||||||
Merchant: genModel.NewMerchantModel(sqlConn, c.Cache),
|
Merchant: genModel.NewMerchantModel(sqlConn, c.Cache),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue