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.
37 lines
1.0 KiB
37 lines
1.0 KiB
package shareData
|
|
|
|
import (
|
|
"matchmaking-system/internal/data/socket/publicData"
|
|
"matchmaking-system/internal/data/tradedeal/share"
|
|
"matchmaking-system/internal/pkg/logging/applogger"
|
|
"matchmaking-system/internal/pkg/logging/common"
|
|
"matchmaking-system/internal/pkg/utils"
|
|
)
|
|
|
|
// ShareThaOrderProcessing
|
|
//
|
|
// @Description: 股票-泰股订阅处理
|
|
// @param topIc
|
|
// @param msg
|
|
// @return *public.OrderSub
|
|
func ShareThaOrderProcessing(topIc string, msg share.ShareThaTallyCache) *publicData.OrderSub {
|
|
price, err := publicData.CheckSymbol(topIc, msg.Symbol)
|
|
if err != nil {
|
|
applogger.Warn("%v ShareThaOrderProcessing.CheckSymbol.err:%v--%v", common.ErrShareTha, msg.Symbol, err)
|
|
}
|
|
|
|
orderM := &publicData.OrderSub{
|
|
OrderId: msg.OrderId,
|
|
Price: utils.DecimalsPrice(price),
|
|
Status: msg.Status,
|
|
Symbol: topIc,
|
|
Count: 0,
|
|
OpenPrice: msg.OpenPrice,
|
|
Market: msg.Symbol,
|
|
OrderNumber: msg.Order.OrderNumber,
|
|
TradeType: msg.Order.TradeType,
|
|
UserId: msg.UserId,
|
|
}
|
|
|
|
return orderM
|
|
}
|
|
|