package global

var (
	MoneyChangedNtf       = 131076 // 资金变化通知
	OrderDealedNtf        = 131081 // 委托单成交通知
	MarketStatusChangeNtf = 131089 // 市场状态变更通知
	ListingOrderChangeNtf = 131176 // 挂牌委托变更广播通知
	PosChangedNtf         = 131075 // 头寸变化通知
	OrderCanceledNtf      = 131084 // 委托单撤单通知

	AccountFundInfoReq = 262150 // 账户资金信息请求
	AccountFundInfoRsp = 262151 // 账户资金信息响应

	ModifyPwdReq            = 65543   // 修改账户密码请求
	ModifyPwdRsp            = 65544   // 修改账户密码应答
	UserReceiveInfoReq      = 1900545 // 新增修改收货地址请求
	UserReceiveInfoRsp      = 1900546 // 新增修改收货地址请求响应
	DelUserReceiveInfoReq   = 1900547 // 删除收货地址请求
	DelUserReceiveInfoRsp   = 1900548 // 删除收货地址请求响应
	UserReceiveIsDefaultReq = 1900570 // 设置默认收货地址请求
	UserReceiveIsDefaultRsp = 1900571 // 设置默认收货地址应答
	UserReceiptInfoReq      = 1900549 // 新增修改用户发票信息请求
	UserReceiptInfoRsp      = 1900550 // 新增修改用户发票信息请求响应
	DelUserReceiptInfoReq   = 1900551 // 删除用户发票信息请求
	DelUserReceiptInfoRsp   = 1900552 // 删除用户发票信息请求响应

	T2bBankSignReq       = 589825 // 签约请求
	T2bBankSignRsp       = 589826 // 签约应答
	T2bBankCancelSignReq = 589827 // 解约请求
	T2bBankCancelSignRsp = 589828 // 解约应答
	T2bBankWithdrawReq   = 589837 // 出金请求
	T2bBankWithdrawRsp   = 589838 // 出金应答
	T2bBankDepositReq    = 589843 // 入金请求
	T2bBankDepositRsp    = 589844 // 入金应答

	WarehouseApplyReq                   = 1900685 // 仓库申请请求
	WarehouseApplyRsp                   = 1900686 // 仓库申请应答
	PerformanceContractedApplyReq       = 1310729 // 违约申请请求
	PerformanceContractedApplyRsp       = 1310730 // 违约申请应答
	PerformanceDelayApplyReq            = 1310725 // 延期申请请求
	PerformanceDelayApplyRsp            = 1310726 // 延期申请应答
	PerformanceManualConfirmReq         = 1310723 // 履约手动确认请求
	PerformanceManualConfirmRsp         = 1310724 // 履约手动确认应答
	PerformanceModifyContactReq         = 1310735 // 履约修改联络信息请求
	PerformanceModifyContactRsp         = 1310736 // 履约修改联络信息回应
	GoodsFavoriteOperateReq             = 1441843 // 商品收藏操作接口请求
	GoodsFavoriteOperateRsp             = 1441844 // 商品收藏操作接口应答
	ZSBuyOrderListingReq                = 1441837 // 钻石买挂牌接口请求
	ZSBuyOrderListingRsp                = 1441838 // 钻石买挂牌接口应答
	ZSSellOrderListingReq               = 1441829 // 钻石卖挂牌接口请求
	ZSSellOrderListingRsp               = 1441830 // 钻石卖挂牌接口响应
	ZSBuyOrderDestingReq                = 1441831 // 钻石买摘牌接口请求
	ZSBuyOrderDestingRsp                = 1441832 // 钻石买摘牌接口响应
	ZSSellOrderDestingApplyReq          = 1441839 // 钻石卖摘牌申请接口请求
	ZSSellOrderDestingApplyRsp          = 1441840 // 钻石卖摘牌申请接口响应
	ZSSellOrderDestingApplyOperateReq   = 1441841 // 钻石卖摘牌申请操作接口请求
	ZSSellOrderDestingApplyOperateRsp   = 1441842 // 钻石卖摘牌申请操作接口应答
	ZSBuyOrderDestingNegPriceReq        = 1441833 // 买摘牌询价接口请求
	ZSBuyOrderDestingNegPriceRsp        = 1441834 // 买摘牌询价接口应答
	ZSBuyOrderDestingNegPriceOperateReq = 1441835 // 买摘牌询价操作接口请求
	ZSBuyOrderDestingNegPriceOperateRsp = 1441836 // 买摘牌询价操作接口应答
	WRListingCancelOrderReq             = 1441796 // 挂牌撤单请求
	WRListingCancelOrderRsp             = 1441797 // 挂牌撤单应答
	ReceiptZSOutApplyReq                = 1376463 // 钻石出库申请接口请求
	ReceiptZSOutApplyRsp                = 1376464 // 钻石出库申请接口响应
	CJJCMemberOperateReq                = 1114117 // 出境检测会员操作请求
	CJJCMemberOperateRsp                = 1114118 // 出境检测会员操作响应
	BSFWMemberOperateReq                = 1114119 // 保税服务会员操作请求
	BSFWMemberOperateRsp                = 1114120 // 保税服务会员操作响应

	SpotPresaleListingOrderReq = 1441847 // 铁合金现货预售挂牌接口请求
	SpotPresaleListingOrderRsp = 1441848 // 铁合金现货预售挂牌接口应答

	THJPurchaseTradeNtf = 1441865 // 铁合金成交通知
	PurchaseTransferNtf = 1441846 // 铁合金协议转让通知
	WRTradeDealedNtf    = 131110  // 仓单贸易成交通知

	GZPresaleApplyReq        = 1441879 // 广钻预售\申请请求
	GZPresaleApplyRsp        = 1441880 // 广钻预售申请响应
	GZPresaleOrderReq        = 1441883 // 广钻预售认购下单请求
	GZPresaleOrderRsp        = 1441884 //  广钻预售认购下单响应
	GZCenterPurchaseApplyReq = 1441887 // 广钻集采申请请求
	GZCenterPurchaseApplyRsp = 1441888 // 广钻集采申请响应
	GZCenterPurchaseOrderReq = 1441891 // 广钻集采认购下单请求
	GZCenterPurchaseOrderRsp = 1441892 // 广钻集采认购下单响应
	BSWMSReckonPayReq        = 1114135 // WMS结算单支付接口请求
	BSWMSReckonPayRsp        = 1114136 // WMS结算单支付接口响应

	HdWROrderReq  = 1441807 // 持仓单挂牌请求
	HdWROrderRsp  = 1441808 // 持仓单挂牌应答
	WROutApplyReq = 1900657 // 仓单出库申请
	WROutApplyRsp = 1900658 // 仓单出库申请响应

	OrderReq                           = 196609 // 交易委托请求
	OrderRsp                           = 196610 // 交易委托应答
	CancelOrderReq                     = 196611 // 撤单请求
	CancelOrderRsp                     = 196612 // 撤单应答
	HolderCloseReq                     = 196713 // 按单平仓请求
	HolderCloseRsp                     = 196714 // 按单平仓应答
	OfflineDeliveryReq                 = 196723 // 线下交收申请请求
	OfflineDeliveryRsp                 = 196724 // 线下交收申请请求
	OfflineDeliveryApplyCancelOrderReq = 196745 // 线下交收申请撤销接口请求
	OfflineDeliveryApplyCancelOrderRsp = 196746 // 线下交收申请撤销接口响应

	DeliveryOrderReq = 393217 // 交割申报请求
	DeliveryOrderRsp = 393218 // 交割申报应答

	MakeUpDepositReq     = 196715 // 补足定金请求
	MakeUpDepositRsp     = 196716 // 补足定金应答
	HoldAppendDepositReq = 196719 // 持仓追加定金接口请求
	HoldAppendDepositRsp = 196720 // 持仓追加定金接口应答

	HdWRDealOrderReq = 1441809 // 持仓单摘牌请求
	HdWRDealOrderRsp = 1441810 // 持仓单摘牌应答

	SupplementDepositReq        = 196731 // 补充定金接口请求
	SupplementDepositRsp        = 196732 // 补充定金接口响应
	RefundedDepositReq          = 196733 // 退返定金接口请求
	RefundedDepositRsp          = 196734 // 退返定金接口响应
	MarketOrderDeliveryApplyReq = 196739 // 按单做市交收申请接口请求
	MarketOrderDeliveryApplyRsp = 196740 // 按单做市交收申请接口响应
	DeliveryClientOperatorReq   = 196743 // 交收终端操作接口请求
	DeliveryClientOperatorRsp   = 196744 // 交收终端操作接口响应

	LoginReq  = 65537 // 用户登录请求
	LoginRsp  = 65538 // 用户登录应答
	LogoutReq = 65539 // 用户登出请求
	LogoutRsp = 65540 // 用户登出应答 - 主要用于接收管理端踢上线
	// CustOfflineNtf = 131074 // 客户离线通知 - 暂时不用
)

// 通过请求功能码获取对应主题的方法
func GetTopic(funcode int) string {
	for k, v := range M2A_FuncodeTopic {
		for _, f := range v {
			if f == funcode {
				return k
			}
		}
	}

	return ""
}
