style: 自动格式化
This commit is contained in:
@@ -13,4 +13,4 @@ func GenCode() string {
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%06d", n.Int64())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ type ServiceContext struct {
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
s3obj := NewObjectStorage(c.S3Conf)
|
||||
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
S3: s3obj.MustNews3Client(context.Background()),
|
||||
|
||||
@@ -39,17 +39,17 @@ func toAPIOrder(in *orderservice.Orders) types.Order {
|
||||
_ = json.Unmarshal([]byte(in.GetServiceSnapshot()), &service)
|
||||
|
||||
order = types.Order{
|
||||
Id: in.GetId(),
|
||||
ConsumerId: in.GetConsumerId(),
|
||||
PlayerId: playerID,
|
||||
ShopId: in.GetShopId(),
|
||||
Service: service,
|
||||
Status: in.GetStatus(),
|
||||
TotalPrice: totalPrice,
|
||||
Note: in.GetNote(),
|
||||
CreatedAt: formatUnix(in.GetCreatedAt()),
|
||||
AcceptedAt: formatUnix(in.GetAcceptedAt()),
|
||||
CompletedAt: formatUnix(in.GetCompletedAt()),
|
||||
Id: in.GetId(),
|
||||
ConsumerId: in.GetConsumerId(),
|
||||
PlayerId: playerID,
|
||||
ShopId: in.GetShopId(),
|
||||
Service: service,
|
||||
Status: in.GetStatus(),
|
||||
TotalPrice: totalPrice,
|
||||
Note: in.GetNote(),
|
||||
CreatedAt: formatUnix(in.GetCreatedAt()),
|
||||
AcceptedAt: formatUnix(in.GetAcceptedAt()),
|
||||
CompletedAt: formatUnix(in.GetCompletedAt()),
|
||||
}
|
||||
|
||||
return order
|
||||
|
||||
@@ -9,7 +9,7 @@ type Config struct {
|
||||
zrpc.RpcServerConf
|
||||
|
||||
SnowflakeRpcConf zrpc.RpcClientConf
|
||||
DB struct {
|
||||
DB struct {
|
||||
Master string
|
||||
Slaves string
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ type Config struct {
|
||||
zrpc.RpcServerConf
|
||||
|
||||
SnowflakeRpcConf zrpc.RpcClientConf
|
||||
DB struct {
|
||||
DB struct {
|
||||
Master string
|
||||
Slaves string
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ type Config struct {
|
||||
zrpc.RpcServerConf
|
||||
|
||||
SnowflakeRpcConf zrpc.RpcClientConf
|
||||
DB struct {
|
||||
DB struct {
|
||||
Master string
|
||||
Slaves string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user