func Dispatch(order engine.Order) errcode.ErrorCode {
	if engine.ChanMap[order.Symbol] == nil {
		return errcode.EngineNotFound
	}
	if order.Action == enum.ActionCreate {
		if cache.OrderExist(order.Symbol, order.OrderId, order.Action.String()) {
			return errcode.OrderExist
		}
	} else {
		if !cache.OrderExist(order.Symbol, order.OrderId, order.Action.String()) {
			return errcode.OrderNotFound
		} else {
		}
	}
	order.Timestamp = time.Now().UnixNano() / 1e3
	engine.ChanMap[order.Symbol] <- order
	return errcode.OK
}
dispatch to order handler
package process
import (
	"kunkka-match/engine"
	"kunkka-match/enum"
	"kunkka-match/errcode"
	"kunkka-match/middleware/cache"
	"time"
)