package routers import ( "mtp2_if/config" "mtp2_if/controllers/bank" "mtp2_if/controllers/cfg" "mtp2_if/controllers/common" "mtp2_if/controllers/cptrade" "mtp2_if/controllers/delivery" "mtp2_if/controllers/ermcp" "mtp2_if/controllers/ermcp3" "mtp2_if/controllers/ermcp8" "mtp2_if/controllers/erms2" "mtp2_if/controllers/erms3" "mtp2_if/controllers/ferroalloy" "mtp2_if/controllers/guangzuan" "mtp2_if/controllers/hsby" "mtp2_if/controllers/market" "mtp2_if/controllers/mine" "mtp2_if/controllers/order" "mtp2_if/controllers/other" "mtp2_if/controllers/presale" "mtp2_if/controllers/qhj" "mtp2_if/controllers/qhjPCWeb" "mtp2_if/controllers/quote" "mtp2_if/controllers/report" "mtp2_if/controllers/sbyj" "mtp2_if/controllers/search" "mtp2_if/controllers/szdz" "mtp2_if/controllers/taaccount" "mtp2_if/controllers/tjmd" "mtp2_if/controllers/trade" "mtp2_if/controllers/tradexx" "mtp2_if/controllers/user" "mtp2_if/controllers/wrTrade2" "mtp2_if/controllers/wrtrade" "mtp2_if/controllers/zj" "mtp2_if/logger" "mtp2_if/token" "net/http" "time" "github.com/gin-gonic/gin" // Swagger生成的文档 docs "mtp2_if/docs" ginSwagger "github.com/swaggo/gin-swagger" "github.com/swaggo/gin-swagger/swaggerFiles" ) // InitRouter 初始化路由器的方法 func InitRouter() *gin.Engine { r := gin.New() // 设置日志中间件 r.Use(ginLoggerMiddleware()) // 设置奔溃中间件 r.Use(ginRecoveryMiddleware()) // 跨域 r.Use(CORSMiddleware()) // Swagger if config.SerCfg.GetDebugMode() { docs.SwaggerInfo.BasePath = "/api" // v1.8.x 需要增加这一句,不然会404 r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) r.GET("/debug/log", other.LogList) r.GET("/debug/log/view", other.LogView) r.GET("/debug/download", other.DownloadFile) r.GET("/debug/update", other.MakeUpdateScript) r.GET("/debug/token", other.SetToken) } // 终端配置 r.GET("/cfg", cfg.QueryCfg) // 主业务路由分组 apiR := r.Group("/api") // apiR.Use(token.Auth()) // ************************ 账户信息 ************************ userR := apiR.Group("User") userR.Use() { // 获取登录ID userR.GET("/GetLoginID", user.GetLoginID) // 获取用户邀请码请求参数 userR.GET("/QueryUserReferNum", user.QueryUserReferNum) // 获取用户信息请求参数 userR.Use(token.Auth()).GET("/QueryUserInfo", user.QueryUserInfo) // 获取用户实名认证状态 userR.Use(token.Auth()).GET("/GetUserAuthStatus", user.GetUserAuthStatus) // 获取用户商品收藏信息 userR.Use(token.Auth()).GET("/QueryUserFavoriteGoodses", user.QueryUserFavoriteGoodses) // 添加用户商品收藏信息 userR.Use(token.Auth()).POST("/AddUserFavoriteGoods", user.AddUserFavoriteGoods) // 移除用户商品收藏信息 userR.Use(token.Auth()).POST("/RemoveUserFavoriteGoods", user.RemoveUserFavoriteGoods) // 获取用户留言板信息 userR.Use(token.Auth()).GET("/QueryMessageBoard", user.QueryMessageBoard) // 添加用户留言板信息 userR.Use(token.Auth()).POST("/AddMessageBoard", user.AddMessageBoard) // 获取用户账号信息 userR.Use(token.Auth()).GET("/GetUserAccount", user.GetUserAccount) // 更新用户状态 userR.Use(token.Auth()).POST("/UpdateUserAccountStatus", user.UpdateUserAccountStatus) // 账户登录后信息查询 userR.Use(token.Auth()).GET("/LoginQuery", user.LoginQuery) userR.Use(token.Auth()).POST("/UpdateUserHeadUrl", user.UpdateUserHeadUrl) } // ************************ 资金账户 ************************ taAccountR := apiR.Group("TaAccount") taAccountR.Use(token.Auth()) { // 获取资金账户信息 taAccountR.GET("/GetTaAccounts", taaccount.GetTaAccounts) // 资金流水查询(当前) taAccountR.GET("/QueryAmountLog", taaccount.QueryAmountLog) // 资金流水查询(历史) taAccountR.GET("/QueryHisAmountLog", taaccount.QueryHisAmountLog) // 获取关联资金账户信息 taAccountR.GET("/QueryRelatedTaAccount", taaccount.QueryRelatedTaAccount) } // ************************ 通用服务 ************************ commonR := apiR.Group("Common") commonR.Use() { // 查询交易端菜单 commonR.GET("/QueryTraderMenu", common.QueryTraderMenu) // 查询交易端列表头信息 commonR.GET("/QueryTableDefine", common.QueryTableDefine) // 查询省市信息(不包括区) commonR.GET("/QueryProvincesAndCities", common.QueryProvincesAndCities) // 查询区域信息 commonR.GET("/GetDivisions", common.GetDivisions) // 查询轮播图配置信息 commonR.GET("/QueryImageConfigs", common.QueryImageConfigs) // 获取所有枚举信息 commonR.GET("/GetAllEnums", common.GetAllEnums) // 获取服务器时间 commonR.GET("/GetServerTime", common.GetServerTime) // 获取数据库错误信息 commonR.GET("/QueryErrorInfos", common.QueryErrorInfos) // 获取数据库错误信息 commonR.GET("/QueryNewTitles", common.QueryNewTitles) // 获取资讯内容 commonR.GET("/QueryNewContents", common.QueryNewContents) commonR.GET("/GetJ10News", common.GetJ10News) // 通知公告系统消息查询 commonR.Use(token.Auth()).GET("/QueryNotice", common.QueryNotice) // 通知公告设置已读请求 commonR.Use(token.Auth()).POST("/NoticeReaded", common.NoticeReaded) // 获取交易端菜单 commonR.Use(token.Auth()).GET("/GetClientMenus", common.GetClientMenus) // 获取PCWeb交易端菜单(V6版本之后使用) commonR.Use(token.Auth()).GET("/GetPCWebMenus", common.GetPCWebMenus) // 这四个接口不开放给一般操作人员使用 commonR.Use(token.Auth()).GET("/FindNewFuncmenu", common.FindNewFuncmenu) commonR.Use(token.Auth()).POST("/InsertNewFuncmenu", common.InsertNewFuncmenu) commonR.Use(token.Auth()).PUT("/UpdateNewFuncmenu", common.UpdateNewFuncmenu) commonR.Use(token.Auth()).DELETE("/DeleteNewFuncmenu", common.DeleteNewFuncmenu) commonR.Use(token.Auth()).GET("/GetClientNewFuncmenu", common.GetClientNewFuncmenu) commonR.Use(token.Auth()).GET("/QueryRates", common.QueryRates) } // ************************ 通用市场 ************************ marketR := apiR.Group("Market") marketR.Use() { // 查询市场运行信息 marketR.GET("/QueryMarketRun", market.QueryMarketRun) // 获取登录账号有权限的市场信息 marketR.Use(token.Auth()).GET("/QueryMarketsByLoginID", market.QueryMarketsByLoginID) // 获取登录账号有权限的商品信息 marketR.Use(token.Auth()).GET("/QueryGoodsesByLoginID", market.QueryGoodsesByLoginID) // 获取所有外部交易所信息 marketR.Use(token.Auth()).GET("/GetAllExExchanges", market.GetAllExExchanges) } // ************************ 通用单据 ************************ orderR := apiR.Group("Order") orderR.Use(token.Auth()) { // 持仓汇总查询(合约市场) orderR.GET("/QueryTradePosition", order.QueryTradePosition) // 委托单查询请求(合约市场) orderR.GET("/QueryTradeOrderDetail", order.QueryTradeOrderDetail) // 历史委托单查询请求(合约市场) orderR.GET("/QueryHisTradeOrderDetail", order.QueryHisTradeOrderDetail) // 成交单查询(合约市场) orderR.GET("/QueryTradeDetail", order.QueryTradeDetail) // 历史成交单查询(合约市场) orderR.GET("/QueryHisTradeDetail", order.QueryHisTradeDetail) orderR.GET("/QueryTradeHolderDetail", tradexx.QueryTradeHolderDetail) orderR.GET("/QueryTradePosition2", tradexx.QueryTradePosition) } // ************************ 通用交易 ************************ tradeR := apiR.Group("Trade") tradeR.Use(token.Auth()) { // 点选挂牌委托单据查询(保证金摘牌大厅) tradeR.GET("/QueryRecieptOrder", trade.QueryRecieptOrder) } // ************************ 行情服务 ************************ quoteR := apiR.Group("Quote") // quoteR.Use(token.AuthByHsby()) quoteR.Use() { quoteR.Use().GET("/GetTouristQuoteDay", quote.GetTouristQuoteDay) // 查询行情历史数据 quoteR.Use(token.Auth()).GET("/QueryHistoryDatas", quote.QueryHistoryDatas) // 查询行情Tik数据 quoteR.Use(token.Auth()).GET("/QueryHistoryTikDatas", quote.QueryHistoryTikDatas) // 查询分时图历史数据 quoteR.Use(token.Auth()).GET("/QueryTSData", quote.QueryTSData) // 获取商品盘面信息 quoteR.Use(token.Auth()).GET("/QueryQuoteDay", quote.QueryQuoteDay) } // ************************ 检索服务 ************************ searchR := apiR.Group("Search") searchR.Use() { // 检索商品信息 searchR.GET("/SearchGoodses", search.Goodses) } // ************************ 仓单贸易 ************************ wrTradeR := apiR.Group("WRTrade") wrTradeR.Use(token.Auth()) { wrTradeR.GET("/GetAllDeliveryGoods", wrtrade.GetAllDeliveryGoods) } // ************************ 产能预售 ************************ cpTradeR := apiR.Group("CPTrade") cpTradeR.Use(token.Auth()) { // 查询产能预售申请表 cpTradeR.GET("/QueryPreasleApply", cptrade.QueryPreasleApply) // 查询远期订单信息 cpTradeR.GET("/QueryUserGoodsData", cptrade.QueryUserGoodsData) // 查询远期订单注销申请信息 cpTradeR.GET("/QueryPositionCancel", cptrade.QueryPositionCancel) // 查询产能预售商品扩展信息 cpTradeR.GET("/QueryPresaleGoodsEx", cptrade.QueryPresaleGoodsEx) // 查询产能预售我的出价信息 cpTradeR.GET("/QueryCPTradeMyBidInfos", cptrade.QueryCPTradeMyBidInfos) // 查询我的预售信息 cpTradeR.GET("/QueryMyCPTradeGoods", cptrade.QueryMyCPTradeGoods) // 查询产能预售委托单信息 cpTradeR.GET("/QueryCPTradeOrderDetail", cptrade.QueryCPTradeOrderDetail) } // ************************ 交割服务 ************************ deliveryR := apiR.Group("Delivery") deliveryR.Use(token.Auth()) { // 查询商品交割关系表 deliveryR.GET("/QueryDeliveryRelation", delivery.QueryDeliveryRelation) } // ************************ 风险管理 ************************ erms2R := apiR.Group("Erms2") erms2R.Use(token.Auth()) { // 查询内部成交单信息 erms2R.GET("/QueryInnerTradeDetail", erms2.QueryInnerTradeDetail) // 查询期现套利策略表信息(指定资金账户、未结束的) erms2R.GET("/QueryArbitrageStrategy", erms2.QueryArbitrageStrategy) // 查询现货合同表信息(指定策略ID、未结束的) erms2R.GET("/QuerySpotContract", erms2.QuerySpotContract) } // ************************ 风险管理v3 ************************ erms3R := apiR.Group("Erms3") erms3R.Use(token.Auth()) { // 新增现货合同申请 erms3R.POST("/AddSpotContractApply", erms3.AddSpotContractApply) // 查询合同申请表单数据 erms3R.GET("/QuerySpotContractAppleForm", erms3.QuerySpotContractAppleForm) // 查询合同详细信息. erms3R.GET("/QuerySpotContractDetail", erms3.QuerySpotContractDetail) // 查询待审核合同 erms3R.GET("/QueryPendingAuditContract", erms3.QueryPendingAuditContract) // 新增客户申请 erms3R.POST("/AddUserInfoApply", erms3.AddUserInfoApply) // 修改客户申请 erms3R.POST("/ModifyUserInfoApply", erms3.ModifyUserInfoApply) // 删除客户申请 erms3R.GET("/DeleteUserInfoApply", erms3.DeleteUserInfoApply) // 客户申请信息查询 erms3R.GET("/QueryUserInfoApplies", erms3.QueryUserInfoApplies) // 待审核业务查询 erms3R.GET("/QueryPendingBusiness", erms3.QueryPendingBusiness) // 业务信息查询 erms3R.GET("/QueryBusinessInfo", erms3.QueryBusinessInfo) // 客户信息查询 erms3R.GET("/QueryUserInfos", erms3.QueryUserInfos) // 新增期现套利业务申请 erms3R.POST("/AddErms2ASApply", erms3.AddErms2ASApply) // 新增现货贸易业务申请 erms3R.POST("/AddErms2SpotTradeApply", erms3.AddErms2SpotTradeApply) } // ************************ 定制【尚志大宗】 ************************ szdzR := apiR.Group("SZDZ") szdzR.Use(token.Auth()) { // 点选挂牌委托单据查询(摘牌大厅) szdzR.GET("/QueryRecieptOrder", szdz.QueryRecieptOrder) // 商品提货单查询 szdzR.GET("/QueryGoodsPickup", szdz.QueryGoodsPickup) // 交易系统转换流水查询 szdzR.GET("/QueryConvertLog", szdz.QueryConvertLog) // 搜索白名单 szdzR.GET("/SearchWhite", szdz.SearchWhite) // 查询交易系统转换设置 szdzR.GET("/QueryConvertConfig", szdz.QueryConvertConfig) // 持仓汇总查询(尚志大宗) szdzR.GET("/QuerySZDZTradePosition", szdz.QuerySZDZTradePosition) } // ************************ 定制【海商报业】 ************************ hsbyR := apiR.Group("HSBY") hsbyR.Use(token.AuthByHsby()) { // 查询热门商品列表(二级市场,挂牌点选) hsbyR.GET("/QueryHsbyTopGoodses", hsby.QueryHsbyTopGoodses) // 查询二级市场(挂牌点选)商品信息详情 hsbyR.GET("/QueryHsbyListingGoodsDetail", hsby.QueryHsbyListingGoodsDetail) // 查询二级市场(挂牌点选)商品对应的挂牌委托单信息 hsbyR.GET("/QueryHsbyGoodsOrderDetails", hsby.QueryHsbyGoodsOrderDetails) // 查询“我的订单”信息 hsbyR.GET("/QueryHsbyMyBuyOrderDetails", hsby.QueryHsbyMyBuyOrderDetails) // 查询“我的商品”信息 hsbyR.GET("/QueryHsbyMyGoods", hsby.QueryHsbyMyGoods) // 查询新品上市商品列表(一级市场预售) hsbyR.GET("/QueryHsbyPreGoodses", hsby.QueryHsbyPreGoodses) // 查询一级市场(预售)商品信息详情 hsbyR.GET("/QueryHsbyPreGoodsDetail", hsby.QueryHsbyPreGoodsDetail) // 查询"我的闲置"单据信息 hsbyR.GET("/QueryHsbySellMyDetails", hsby.QueryHsbySellMyDetails) // 查询我的包裹信息 hsbyR.GET("/QueryHsbyMyPackages", hsby.QueryHsbyMyPackages) // 设置我的包裹已收货状态 hsbyR.POST("/SetHsbyMyPackagesStatus", hsby.SetHsbyMyPackagesStatus) // 查询省市信息(不包括区) hsbyR.GET("/QueryProvincesAndCities", hsby.QueryProvincesAndCities) // 查询"我的订单 - 已完成"单据信息 hsbyR.GET("/QueryHsbyBuyMyTradeDetail", hsby.QueryHsbyBuyMyTradeDetail) // 获取我的订单与包裹数量 hsbyR.GET("/GetHsbyMyCount", hsby.GetHsbyMyCount) // 获取我的订单中待付款信息 hsbyR.GET("/QueryMyPayOrders", hsby.QueryMyPayOrders) // 获取我的闲置中收款信息查询 hsbyR.GET("/QueryMyCollectionOrders", hsby.QueryMyCollectionOrders) // 查询海商报业相关市场信息 hsbyR.GET("/QueryHsbyMarkets", hsby.QueryHsbyMarkets) // 查询游客特卖商品列表(三级商城) hsbyR.GET("/QueryHsbyVisitorMarketGoodses", hsby.QueryHsbyVisitorMarketGoodses) // 查询特卖商品列表(三级商城) hsbyR.GET("/QueryHsbyMarketGoodses", hsby.QueryHsbyMarketGoodses) // 查询游客三级市场(商城)商品信息详情 hsbyR.GET("/QueryHsbyVisitorMarketGoodsDetail", hsby.QueryHsbyVisitorMarketGoodsDetail) // 查询三级市场(商城)商品信息详情 hsbyR.GET("/QueryHsbyMarketGoodsDetail", hsby.QueryHsbyMarketGoodsDetail) // 我的优惠卷查询 hsbyR.GET("/QueryMyCoupons", hsby.QueryMyCoupons) // 我的优惠卷持仓查询 hsbyR.GET("/QueryMyCouponHolds", hsby.QueryMyCouponHolds) // 已使用优惠卷查询 hsbyR.GET("/QueryMyUsedCoupon", hsby.QueryMyUsedCoupon) // 获取终端固定广告配置 hsbyR.GET("/QueryClientFixedADConfigs", hsby.QueryClientFixedADConfigs) } // ***************************** 企业风险管理(app)*************************** ermcpR := apiR.Group("Ermcp") ermcpR.Use(token.Auth()) { // 查询待点价、履约和全部合同 ermcpR.GET("/QueryUserInfo", ermcp.QueryUserInfo) ermcpR.GET("/QueryWrStandard", ermcp.QueryWrStandard) ermcpR.GET("/QueryWrStandardDetail", ermcp.QueryWrStandardDetail) ermcpR.GET("/QuerySpotContract", ermcp.QuerySpotContract) ermcpR.GET("/QueryContract", ermcp.QueryContract) ermcpR.GET("/QueryHedgePlan", ermcp.QueryHedgePlan) ermcpR.GET("/QueryBusinessDj", ermcp.QueryBusinessDj) ermcpR.GET("/QueryBusinessJs", ermcp.QueryBusinessJs) ermcpR.GET("/QueryBusinessJsEx", ermcp.QueryBusinessJsEx) ermcpR.GET("/QueryBusinessKx", ermcp.QueryBusinessKx) ermcpR.GET("/QueryBusinessFp", ermcp.QueryBusinessFp) ermcpR.GET("/QueryChangeLog", ermcp.QueryChangeLog) ermcpR.GET("/QueryRealtimeExposure", ermcp.QueryRealtimeExposure) ermcpR.GET("/QueryExposureDetail", ermcp.QueryExposureDetail) ermcpR.GET("/QueryExposureSpot", ermcp.QueryExposureSpot) ermcpR.GET("/QueryExposureSpotDetail", ermcp.QueryExposureSpotDetail) ermcpR.GET("/QueryHisExposure", ermcp.QueryHisExposure) ermcpR.GET("/QueryMiddleGoods", ermcp.QueryMiddleGoods) ermcpR.GET("/QueryMiddleGoodsDetail", ermcp.QueryMiddleGoodsDetail) ermcpR.GET("/QueryGGConvertConfig", ermcp.QueryGGConvertConfig) ermcpR.GET("/QueryMiddleGoodsChangeLog", ermcp.QueryMiddleGoodsChangeLog) ermcpR.GET("/QueryAvaildGoodsGroup", ermcp.QueryAvaildGoodsGroup) ermcpR.GET("/QueryRealtimeExposurePosition", ermcp.QueryRealtimeExposurePosition) ermcpR.GET("/QueryExposureHedgePosition", ermcp.QueryExposureHedgePosition) ermcpR.GET("/QryReportDayFinance", ermcp.QryReportDayFinance) ermcpR.GET("/QryReportDayFinanceKx", ermcp.QryReportDayFinanceKx) ermcpR.GET("/QryReportDayFinanceFp", ermcp.QryReportDayFinanceFp) ermcpR.GET("/QryReportMonthFinance", ermcp.QryReportMonthFinance) ermcpR.GET("/QryReportDaySpot", ermcp.QryReportDaySpot) ermcpR.GET("/QryReportDaySpotDetail", ermcp.QryReportDaySpotDetail) ermcpR.GET("/QryReportMonthSpot", ermcp.QryReportMonthSpot) ermcpR.GET("/QryReportMonthSpotDetail", ermcp.QryReportMonthSpotDetail) ermcpR.GET("/QryReportAreaSpotPL", ermcp.QryReportAreaSpotPL) ermcpR.GET("/QueryExposureHedgePositionDetail", ermcp.QueryExposureHedgePositionDetail) ermcpR.GET("/QueryPendingAuditInfo", ermcp.QueryPendingAuditInfo) ermcpR.GET("/QueryWarehouseInfo", ermcp.QueryWarehouseInfo) ermcpR.GET("/QueryAreaStockApply", ermcp.QueryAreaStockApply) ermcpR.GET("/QueryAreaStockApplySum", ermcp.QueryAreaStockApplySum) ermcpR.GET("/QueryAreaStock", ermcp.QueryAreaStock) ermcpR.GET("/QueryAreaStockReport", ermcp.QueryAreaStockReport) ermcpR.GET("/QueryAreaStockReportDetail", ermcp.QueryAreaStockReportDetail) ermcpR.GET("/QueryGoodsBrand", ermcp.QueryGoodsBrand) ermcpR.GET("/QueryGoodsModel", ermcp.QueryGoodsModel) ermcpR.GET("/QueryAccMgrLoginUser", ermcp.QueryAccMgrLoginUser) ermcpR.GET("/QueryAccMgrTaaccount", ermcp.QueryAccMgrTaaccount) ermcpR.GET("/QueryAccMgrMainAccountInfo", ermcp.QueryAccMgrMainAccountInfo) ermcpR.GET("/QueryAccMgrRole", ermcp.QueryAccMgrRole) ermcpR.GET("/QueryAccMgrRoleMenu", ermcp.QueryAccMgrRoleMenu) ermcpR.GET("/QueryRoleMenu", ermcp.QueryRoleMenu) ermcpR.GET("/QueryAccMgrBizGroupSet", ermcp.QueryAccMgrBizGroupSet) ermcpR.GET("/QueryAccMgrTaAccountInfo", ermcp.QueryAccMgrTaAccountInfo) ermcpR.GET("/QuerySpotGoodsPrice", ermcp.QuerySpotGoodsPrice) ermcpR.GET("/QuerySpotGoodsPriceLog", ermcp.QuerySpotGoodsPriceLog) ermcpR.GET("/QueryFuturesCompany", ermcp.QueryFuturesCompany) ermcpR.GET("/QueryTradeConfigTMP", ermcp.QueryTradeConfigTMP) ermcpR.GET("/QueryExposureGoods", ermcp.QueryExposureGoods) // 期货相关 // 查询企业风管期货商品信息 ermcpR.GET("/GetErmcpGoods", ermcp.GetErmcpGoods) // 查询企业风管期货主力、次主力商品信息 ermcpR.GET("/GetErmcpGoodsSortByPosition", ermcp.GetErmcpGoodsSortByPosition) // 获取企业风管期货持仓头寸信息 ermcpR.GET("/QueryErmcpTradePosition", ermcp.QueryErmcpTradePosition) // 获取企业风管期货内部持仓单信息 ermcpR.GET("/QueryErmcpInnerHolderDetails", ermcp.QueryErmcpInnerHolderDetails) // 获取企业风管期货委托单信息 ermcpR.GET("/QueryErmcpOrderDetails", ermcp.QueryErmcpOrderDetails) // 获取企业风管期货成交单信息 ermcpR.GET("/QueryErmcpTradeDetails", ermcp.QueryErmcpTradeDetails) // 获取企业风管期货历史委托单信息 ermcpR.GET("/QueryErmcpHisOrderDetails", ermcp.QueryErmcpHisOrderDetails) // 获取企业风管期货历史成交单信息 ermcpR.GET("/QueryErmcpHisTradeDetails", ermcp.QueryErmcpHisTradeDetails) // 权限相关 // 获取企业风管终端权限 ermcpR.GET("/GetErmcpRoleFuncMenuLists", ermcp.GetErmcpRoleFuncMenuLists) // 获取目标登录账号当前对冲账号在线状态 ermcpR.GET("/GetErmcpOutAccountStatus", ermcp.GetErmcpOutAccountStatus) } // ***************************** 企业风险管理v3(app)*************************** ermcp3R := apiR.Group("Ermcp3") ermcp3R.Use(token.Auth()) { ermcp3R.GET("/QueryDeliveryGoods", ermcp3.QueryDeliveryGoods) ermcp3R.GET("/QueryDeliveryGoodsDetail", ermcp3.QueryDeliveryGoodsDetail) ermcp3R.GET("/QuerySpotContract", ermcp3.QuerySpotContract) ermcp3R.GET("/QuerySpotContractBS", ermcp3.QuerySpotContractBS) ermcp3R.GET("/QueryExposureDetail", ermcp3.QueryExposureDetail) ermcp3R.GET("/QueryExposureSpot", ermcp3.QueryExposureSpot) ermcp3R.GET("/QueryExposureSpotDetail", ermcp3.QueryExposureSpotDetail) ermcp3R.GET("/QueryDGFactoryItem", ermcp3.QueryDGFactoryItem) ermcp3R.GET("/QueryGoodsbrand", ermcp3.QueryGoodsbrand) ermcp3R.GET("/QueryGoodsWrstandard", ermcp3.QueryGoodsWrstandard) ermcp3R.GET("/QueryAreaStockApply", ermcp3.QueryAreaStockApply) ermcp3R.GET("/QueryAreaStock", ermcp3.QueryAreaStock) ermcp3R.GET("/QueryAreaStockApplySum", ermcp3.QueryAreaStockApplySum) ermcp3R.GET("/QueryAreaStockReportDetail", ermcp3.QueryAreaStockReportDetail) ermcp3R.GET("/QuerySpotGoodsPrice", ermcp3.QuerySpotGoodsPrice) ermcp3R.GET("/QuerySpotGoodsPriceLog", ermcp3.QuerySpotGoodsPriceLog) ermcp3R.GET("/QueryHedgePlan", ermcp3.QueryHedgePlan) ermcp3R.GET("/QueryGoodsGroup", ermcp3.QueryGoodsGroup) ermcp3R.GET("/QueryMiddleGoodsDetail", ermcp3.QueryMiddleGoodsDetail) ermcp3R.GET("/QueryRootUserAccount", ermcp3.QueryRootUserAccount) ermcp3R.GET("/QueryPaAreaSubject", ermcp3.QueryPaAreaSubject) ermcp3R.GET("/QueryPaAreaAuditCfg", ermcp3.QueryPaAreaAuditCfg) ermcp3R.GET("/QueryPaTradeLink", ermcp3.QueryPaTradeLink) ermcp3R.GET("/QuerySCMiddleGoods", ermcp3.QuerySCMiddleGoods) ermcp3R.GET("/QueryHPMiddleGoods", ermcp3.QueryHPMiddleGoods) ermcp3R.GET("/QueryPaTradeLinkDetail", ermcp3.QueryPaTradeLinkDetail) ermcp3R.GET("/QueryOutTradeLink", ermcp3.QueryOutTradeLink) ermcp3R.GET("/QuerySubTaaccount", ermcp3.QuerySubTaaccount) ermcp3R.GET("/QueryInnerTradeLink", ermcp3.QueryInnerTradeLink) ermcp3R.GET("/QueryParamChangeApp", ermcp3.QueryParamChangeApp) ermcp3R.GET("/QueryErmcp3ContractMiddleGoodsCfg", ermcp3.QueryErmcp3ContractMiddleGoodsCfg) // 报表 ermcp3R.GET("/QryReportDaySpotDetail", ermcp3.QryReportDaySpotDetail) ermcp3R.GET("/QryReportDayFinanceKx", ermcp3.QryReportDayFinanceKx) ermcp3R.GET("/QryReportDayFinanceFp", ermcp3.QryReportDayFinanceFp) ermcp3R.GET("/QryReportDaySpot", ermcp3.QryReportDaySpot) ermcp3R.GET("/QryReportMonthSpot", ermcp3.QryReportMonthSpot) ermcp3R.GET("/QryReportMonthSpotDetail", ermcp3.QryReportMonthSpotDetail) ermcp3R.GET("/QryAreaSpotplReport", ermcp3.QryAreaSpotplReport) ermcp3R.GET("/QryAreaExpourseReport", ermcp3.QryAreaExpourseReport) ermcp3R.GET("/QryAreaExpourseContractDetail", ermcp3.QryAreaExpourseContractDetail) ermcp3R.GET("/QryAreaExpourseHedgeplanDetail", ermcp3.QryAreaExpourseHedgeplanDetail) ermcp3R.GET("/QryAreaExpourseFutuDetail", ermcp3.QryAreaExpourseFutuDetail) ermcp3R.GET("/QryAreaExpourseParamChLogDetail", ermcp3.QryAreaExpourseParamChLogDetail) ermcp3R.GET("/QryAreaStockReport", ermcp3.QryAreaStockReport) ermcp3R.GET("/QryFinanceReport", ermcp3.QryFinanceReport) ermcp3R.GET("/QryAreaSumPL", ermcp3.QryAreaSumPL) ermcp3R.GET("/QryTaFutureDataReport", ermcp3.QryTaFutureDataReport) ermcp3R.GET("/QrySCMiddleGoodsReport", ermcp3.QrySCMiddleGoodsReport) } // ***************************** 企业风险管理v8 *************************** ermcp8R := apiR.Group("Ermcp8") ermcp8R.Use(token.Auth()) { ermcp8R.GET("/QueryErmcp2HedgedItem", ermcp8.QueryErmcp2HedgedItem) ermcp8R.GET("/QueryERMCPJRLinkPos", ermcp8.QueryERMCPJRLinkPos) ermcp8R.GET("/QueryERMCP2HedgedItemspot", ermcp8.QueryERMCP2HedgedItemspot) ermcp8R.GET("/QueryERMCP2HedgedItemSpotDetail", ermcp8.QueryERMCP2HedgedItemSpotDetail) ermcp8R.GET("/QueryERMCPPatradeLinkDetail", ermcp8.QueryERMCPPatradeLinkDetail) ermcp8R.GET("/QueryInternalUncorrelatedTradeDetail", ermcp8.QueryInternalUncorrelatedTradeDetail) ermcp8R.GET("/QueryInternalEnableTradeDetail", ermcp8.QueryInternalEnableTradeDetail) ermcp8R.GET("/QueryErmcp8HedgeditemReport", ermcp8.QueryErmcp8HedgeditemReport) ermcp8R.GET("/QueryUnLinkSpotContract", ermcp8.QueryUnLinkSpotContract) ermcp8R.GET("/QueryErmcp8EnableHedgeditem", ermcp8.QueryErmcp8EnableHedgeditem) ermcp8R.GET("/QueryErmcp8RunningHedgeditem", ermcp8.QueryErmcp8RunningHedgeditem) ermcp8R.GET("/QueryErmcp2AreaExposure", ermcp8.QueryErmcp2AreaExposure) ermcp8R.GET("/QueryErmcp2StockSpotChangeLog", ermcp8.QueryErmcp2StockSpotChangeLog) ermcp8R.GET("/QueryErmcp2HedgedItemsDetail", ermcp8.QueryErmcp2HedgedItemsDetail) ermcp8R.GET("/QueryPatradeLinkDetail", ermcp8.QueryPatradeLinkDetail) ermcp8R.GET("/QueryUnLinkErmcpHedgePlan", ermcp8.QueryUnLinkErmcpHedgePlan) ermcp8R.GET("/QueryErmcp2HedgedItemLink", ermcp8.QueryErmcp2HedgedItemLink) ermcp8R.GET("/QueryMarketCalendar", ermcp8.QueryMarketCalendar) } // ****************************大连千海金****************************** qhjR := apiR.Group("Qhj") qhjR.Use() { qhjR.GET("QuerySiteColumnDetail", qhj.QuerySiteColumnDetail) qhjR.Use(token.Auth()).GET("QueryContract", qhj.QueryContract) qhjR.Use(token.Auth()).GET("QueryContractLog", qhj.QueryContractLog) qhjR.Use(token.Auth()).GET("QueryRStrategy", qhj.QueryRStrategy) qhjR.Use(token.Auth()).GET("QueryRSTriggerLog", qhj.QueryRSTriggerLog) qhjR.Use(token.Auth()).GET("QueryUserReceiveInfo", qhj.QueryUserReceiveInfo) qhjR.Use(token.Auth()).GET("QueryUserCollectConfig", qhj.QueryUserCollectConfig) qhjR.Use(token.Auth()).GET("QueryTradeGoodsPickup", qhj.QueryTradeGoodsPickup) qhjR.Use(token.Auth()).GET("QueryBankAccountSign", qhj.QueryBankAccountSign) qhjR.Use(token.Auth()).GET("QueryPickGoods", qhj.QueryPickGoods) qhjR.Use(token.Auth()).GET("QueryPickArea", qhj.QueryPickArea) qhjR.Use(token.Auth()).GET("QueryBankInfo", qhj.QueryBankInfo) qhjR.Use(token.Auth()).GET("QueryReckonPriceLog", qhj.QueryReckonPriceLog) qhjR.Use(token.Auth()).GET("QueryCustomerInfo", qhj.QueryCustomerInfo) qhjR.Use(token.Auth()).GET("QueryCusBankSignBank", qhj.QueryCusBankSignBank) qhjR.Use(token.Auth()).GET("QueryAccountInOutApply", qhj.QueryAccountInOutApply) qhjR.Use(token.Auth()).GET("QueryPayOrder", qhj.QueryPayOrder) qhjR.Use(token.Auth()).GET("QueryGoodsEx", qhj.QueryGoodsEx) qhjR.Use(token.Auth()).GET("QueryParentAreaList", qhj.QueryParentAreaList) qhjR.Use(token.Auth()).GET("QueryAreaFinanceConfig", qhj.QueryAreaFinanceConfig) qhjR.Use(token.Auth()).GET("QueryMyTeam", qhj.QueryMyTeam) qhjR.Use(token.Auth()).GET("QueryMyTeamOrder", qhj.QueryTeamOrder) qhjR.Use(token.Auth()).GET("QueryBrokerRewardLog", qhj.QueryBrokerRewardLog) qhjR.Use(token.Auth()).GET("QueryScoreLog", qhj.QueryScoreLog) qhjR.Use(token.Auth()).GET("QueryBrokerApply", qhj.QueryBrokerApply) qhjR.Use(token.Auth()).GET("QueryBrokerApplyEx", qhj.QueryBrokerApplyEx) } // *************************千海金(PCWeb)***************************** qhjPCWebR := apiR.Group("QhjMgr") qhjPCWebR.Use(token.Auth()) { qhjPCWebR.GET("QuerySubArea", qhjPCWeb.QuerySubArea) qhjPCWebR.GET("QueryCustomerInfo", qhjPCWeb.QueryCustomerInfo) qhjPCWebR.GET("QueryAccountInOutApply", qhjPCWeb.QueryAccountInOutApply) qhjPCWebR.GET("QueryTradePosition", qhjPCWeb.QueryTradePosition) qhjPCWebR.GET("QueryTradeDetail", qhjPCWeb.QueryTradeDetail) qhjPCWebR.GET("QueryTradeOrderDetail", qhjPCWeb.QueryTradeOrderDetail) qhjPCWebR.GET("QueryTradePayOrder", qhjPCWeb.QueryTradePayOrder) qhjPCWebR.GET("QueryContract", qhjPCWeb.QueryContract) qhjPCWebR.GET("QueryPickGoods", qhjPCWeb.QueryPickGoods) qhjPCWebR.GET("QueryBrokerApply", qhjPCWeb.QueryBrokerApply) qhjPCWebR.GET("QueryBrokerRewardReport", qhjPCWeb.QueryBrokerRewardReport) } // **********************千海金(协议和签约)************************** qhjAgreementR := apiR.Group("QhjSys") { qhjAgreementR.GET("QueryAgreementConfig", qhj.QueryAgreementConfig) qhjAgreementR.GET("QueryAgreementChangeLog", qhj.QueryAgreementChangeLog) qhjAgreementR.GET("QueryNodeAgreementConfig", qhj.QueryNodeAgreementConfig) qhjAgreementR.GET("QueryCustomerSignStatus", qhj.QueryCustomerSignStatus) qhjAgreementR.GET("QueryQhjCustomerSignLog", qhj.QueryQhjCustomerSignLog) qhjAgreementR.GET("QueryUserNodeCfgAndStatus", qhj.QueryUserNodeCfgAndStatus) } // **************************仓单贸易v2(仓单优化)******************** wrTrade2R := apiR.Group("WrTrade2") wrTrade2R.Use() { wrTrade2R.GET("QuerySiteColumnConfig", wrTrade2.QuerySiteColumnConfig) wrTrade2R.GET("QuerySiteColumnDetail", wrTrade2.QuerySiteColumnDetail) wrTrade2R.Use(token.Auth()).GET("QueryOrderQuote", wrTrade2.QueryOrderQuote) wrTrade2R.Use(token.Auth()).GET("QueryOrderQuoteDetail", wrTrade2.QueryOrderQuoteDetail) wrTrade2R.Use(token.Auth()).GET("QueryWrPosition", wrTrade2.QueryWrPosition) wrTrade2R.Use(token.Auth()).GET("QueryWrOrderDetail", wrTrade2.QueryWrOrderDetail) wrTrade2R.Use(token.Auth()).GET("QueryWrTradeDetail", wrTrade2.QueryWrTradeDetail) wrTrade2R.Use(token.Auth()).GET("QueryWrSpecialMatchOrder", wrTrade2.QueryWrSpecialMatchOrder) wrTrade2R.Use(token.Auth()).GET("QueryWrGoodsInfo", wrTrade2.QueryWrGoodsInfo) wrTrade2R.Use(token.Auth()).GET("QueryPerformancePlan", wrTrade2.QueryPerformancePlan) wrTrade2R.Use(token.Auth()).GET("QueryHoldLB", wrTrade2.QueryHoldLB) wrTrade2R.Use(token.Auth()).GET("QueryFilterItem", wrTrade2.QueryFilterItem) wrTrade2R.Use(token.Auth()).GET("QueryFaProductDetail", wrTrade2.QueryFaProductDetail) wrTrade2R.Use(token.Auth()).GET("QueryWrFactorTypeInfo", wrTrade2.QueryWrFactorTypeInfo) wrTrade2R.Use(token.Auth()).GET("QueryWrFactorTypeInfoEx", wrTrade2.QueryWrFactorTypeInfoEx) wrTrade2R.Use(token.Auth()).GET("QueryWrMarketTradeConfig", wrTrade2.QueryWrMarketTradeConfig) wrTrade2R.Use(token.Auth()).GET("QueryFtDeliveryGoods", wrTrade2.QueryFtDeliveryGoods) wrTrade2R.Use(token.Auth()).GET("QueryWrStandardFactoryItem", wrTrade2.QueryWrStandardFactoryItem) wrTrade2R.Use(token.Auth()).GET("QueryWrPerformancePlanStep", wrTrade2.QueryWrPerformancePlanStep) wrTrade2R.Use(token.Auth()).GET("QueryWrFinanceBuyApply", wrTrade2.QueryWrFinanceBuyApply) wrTrade2R.Use(token.Auth()).GET("QueryWrScfContract", wrTrade2.QueryWrScfContract) wrTrade2R.Use(token.Auth()).GET("QueryWrBuybackDetail", wrTrade2.QueryWrBuybackDetail) wrTrade2R.Use(token.Auth()).GET("QueryWrScfContractInterest", wrTrade2.QueryWrScfContractInterest) wrTrade2R.Use(token.Auth()).GET("QueryWrOutInApply", wrTrade2.QueryWrOutInApply) wrTrade2R.Use(token.Auth()).GET("QueryWrDeliveryDetail", wrTrade2.QueryWrDeliveryDetail) wrTrade2R.Use(token.Auth()).GET("QueryWrBsGoodsInfo", wrTrade2.QueryWrBsGoodsInfo) wrTrade2R.Use(token.Auth()).GET("QueryWrTradeOrderDetail", wrTrade2.QueryWrTradeOrderDetail) wrTrade2R.Use(token.Auth()).GET("QueryWrAverageTradePrice", wrTrade2.QueryWrAverageTradePrice) wrTrade2R.Use(token.Auth()).GET("QueryOrderQuoteMyq", wrTrade2.QueryOrderQuoteMyq) wrTrade2R.Use(token.Auth()).GET("QueryWrDeliveryAvalidHoldLB", wrTrade2.QueryWrDeliveryAvalidHoldLB) wrTrade2R.Use(token.Auth()).GET("QueryWrUserFriend", wrTrade2.QueryWrUserFriend) wrTrade2R.Use(token.Auth()).GET("QueryWrFriendApply", wrTrade2.QueryWrFriendApply) wrTrade2R.Use(token.Auth()).GET("QueryPermancePlanTmp", wrTrade2.QueryPermancePlanTmp) wrTrade2R.Use(token.Auth()).GET("QueryWrTradeBargainApply", wrTrade2.QueryWrTradeBargainApply) wrTrade2R.Use(token.Auth()).GET("QueryWrPerformanceStepType", wrTrade2.QueryWrPerformanceStepType) wrTrade2R.Use(token.Auth()).GET("QueryWrUserReceiptInfo", wrTrade2.QueryWrUserReceiptInfo) wrTrade2R.Use(token.Auth()).GET("QueryDeliveryGoodsSection", wrTrade2.QueryDeliveryGoodsSection) wrTrade2R.Use(token.Auth()).GET("QuerySpotGroupTradeSum", wrTrade2.QuerySpotGroupTradeSum) wrTrade2R.Use(token.Auth()).GET("QuerySpotGroupTradeSumDetail", wrTrade2.QuerySpotGroupTradeSumDetail) wrTrade2R.Use(token.Auth()).GET("QueryWrPreSaleInfo", wrTrade2.QueryWrPreSaleInfo) wrTrade2R.Use(token.Auth()).GET("QueryWrReckonSpotGoodsTradeSum", wrTrade2.QueryWrReckonSpotGoodsTradeSum) wrTrade2R.Use(token.Auth()).GET("QueryWrSearchUser", wrTrade2.QueryWrSearchUser) wrTrade2R.Use(token.Auth()).GET("QueryWrDraftUserInfo", wrTrade2.QueryWrDraftUserInfo) wrTrade2R.Use(token.Auth()).GET("QueryWrBrandAndYears", wrTrade2.QueryWrBrandAndYears) wrTrade2R.Use(token.Auth()).GET("QueryWrClientAdSpaceConfig", wrTrade2.QueryWrClientAdSpaceConfig) wrTrade2R.Use(token.Auth()).GET("QueryXhcpSellBackApply", wrTrade2.QueryXhcpSellBackApply) wrTrade2R.Use(token.Auth()).POST("InsertXhcpSellBackApply", wrTrade2.InsertXhcpSellBackApply) wrTrade2R.Use(token.Auth()).GET("QueryWrTradeQuote", wrTrade2.QueryWrTradeQuote) } // **************************天津麦顿************************* tjmdR := apiR.Group("Tjmd") tjmdR.Use(token.Auth()) { tjmdR.GET("QueryQuoteGoodsList", tjmd.QueryQuoteGoodsList) tjmdR.GET("QueryTjmdTradeOrderDetail", tjmd.QueryTjmdTradeOrderDetail) tjmdR.GET("QueryTjmdTransferApply", tjmd.QueryTjmdTransferApply) tjmdR.GET("QueryTjmdTodayAccountMargin", tjmd.QueryTjmdTodayAccountMargin) tjmdR.GET("QueryTjmdMarketSection", tjmd.QueryTjmdMarketSection) tjmdR.GET("QueryTjmdHolderDetailTradeInfo", tjmd.QueryTjmdHolderDetailTradeInfo) } // **************************中江************************* zjR := apiR.Group("ZJ") zjR.Use() { zjR.GET("GetBankTip", zj.GetBankTip) zjR.GET("GetCusBankChannels", zj.GetCusBankChannels) } // **************************广钻************************* guangzuanR := apiR.Group("Guangzuan") guangzuanR.Use(token.Auth()) { guangzuanR.GET("QueryWarehouseInfo", guangzuan.QueryWarehouseInfo) guangzuanR.GET("QueryMyWRPosition", guangzuan.QueryMyWRPosition) guangzuanR.GET("QueryBuyOrder", guangzuan.QueryBuyOrder) guangzuanR.GET("QuerySellOrder", guangzuan.QuerySellOrder) guangzuanR.POST("QueryDiamond", guangzuan.QueryDiamond) guangzuanR.GET("QueryMyBuyOrder", guangzuan.QueryMyBuyOrder) guangzuanR.GET("QueryMySellOrder", guangzuan.QueryMySellOrder) guangzuanR.GET("QueryMyDeListing", guangzuan.QueryMyDeListing) guangzuanR.GET("QueryMyBargainApply", guangzuan.QueryMyBargainApply) guangzuanR.GET("QueryMyDelistingApply", guangzuan.QueryMyDelistingApply) guangzuanR.GET("GetGoods", guangzuan.GetGoods) guangzuanR.GET("QueryMyPerformanc", guangzuan.QueryMyPerformanc) guangzuanR.GET("QueryMyFavorite", guangzuan.QueryMyFavorite) guangzuanR.GET("PriceCalc", guangzuan.PriceCalc) guangzuanR.GET("GzCertAddressConfig", guangzuan.GzCertAddressConfig) guangzuanR.GET("GzCertAddressParam", guangzuan.GzCertAddressParam) guangzuanR.GET("HomeData", guangzuan.HomeData) guangzuanR.GET("QueryGZCJJCOrder", guangzuan.QueryGZCJJCOrder) guangzuanR.GET("QueryGZCJJCOrderDetail", guangzuan.QueryGZCJJCOrderDetail) guangzuanR.GET("QueryGZCJBSOrderFile", guangzuan.QueryGZCJBSOrderFile) guangzuanR.GET("QueryGZBSFWOrder", guangzuan.QueryGZBSFWOrder) guangzuanR.GET("QueryGZBSFWOrderDetail", guangzuan.QueryGZBSFWOrderDetail) guangzuanR.GET("GZBSFWOrderOperate", guangzuan.GZBSFWOrderOperate) guangzuanR.GET("QueryMemberReport", guangzuan.QueryMemberReport) guangzuanR.GET("QueryWRPositionReport", guangzuan.QueryWRPositionReport) guangzuanR.GET("QueryTradeReport", guangzuan.QueryTradeReport) guangzuanR.GET("QueryGzcjjcorderoperate", guangzuan.QueryGzcjjcorderoperate) guangzuanR.GET("QueryFworderoperate", guangzuan.QueryFworderoperate) guangzuanR.GET("QueryGzbscinOutOrder", guangzuan.QueryGzbscinOutOrder) guangzuanR.GET("QueryBScinOutOrderDetail", guangzuan.QueryBScinOutOrderDetail) guangzuanR.GET("QueryBScOutOrderDetailatt", guangzuan.QueryBScOutOrderDetailatt) guangzuanR.GET("QueryGzbscPosition", guangzuan.QueryGzbscPosition) guangzuanR.GET("QueryGzbscusermonthpay", guangzuan.QueryGzbscusermonthpay) guangzuanR.GET("QueryGzbscuserpowerfee", guangzuan.QueryGzbscuserpowerfee) guangzuanR.GET("QueryBscinoutorder", guangzuan.QueryBscinoutorder) guangzuanR.GET("GetGZBSCGoods", guangzuan.GetGZBSCGoods) guangzuanR.GET("GetGZMemberInfo", guangzuan.GetGZMemberInfo) guangzuanR.GET("QueryGZPreSell", guangzuan.QueryGZPreSell) guangzuanR.GET("QueryGZMyPresell", guangzuan.QueryGZMyPresell) guangzuanR.GET("QueryGZMyTradingPreSell", guangzuan.QueryGZMyTradingPreSell) guangzuanR.GET("QueryGZWrPreSaleApply", guangzuan.QueryGZWrPreSaleApply) guangzuanR.GET("QueryPresaleorderapplyprice", guangzuan.QueryPresaleorderapplyprice) guangzuanR.GET("QueryGzbscreckonorder", guangzuan.QueryGzbscreckonorder) } // **************************上海铁合金************************* ferroalloyR := apiR.Group("Ferroalloy") ferroalloyR.Use() { ferroalloyR.Use().GET("QueryMyRegisterMoney", ferroalloy.QueryMyRegisterMoney) ferroalloyR.Use().GET("QueryThjSpotQuoteConfig", ferroalloy.QueryThjSpotQuoteConfig) ferroalloyR.Use().GET("QueryThjSpotQuote", ferroalloy.QueryThjSpotQuote) ferroalloyR.Use(token.Auth()).GET("GetSpotGoodsPrice", ferroalloy.GetSpotGoodsPrice) ferroalloyR.Use(token.Auth()).POST("Signin", ferroalloy.Signin) ferroalloyR.Use(token.Auth()).GET("QueryMyRefer", ferroalloy.QueryMyRefer) ferroalloyR.Use(token.Auth()).GET("QueryUserScoreLog", ferroalloy.QueryUserScoreLog) ferroalloyR.Use(token.Auth()).GET("QueryTHJWrstandard", ferroalloy.QueryTHJWrstandard) ferroalloyR.Use(token.Auth()).GET("QueryTHJListing", ferroalloy.QueryTHJListing) ferroalloyR.Use(token.Auth()).GET("QueryTHJWrstandardDetail", ferroalloy.QueryTHJWrstandardDetail) ferroalloyR.Use(token.Auth()).GET("QueryTHJPurchaseTradeDetail", ferroalloy.QueryTHJPurchaseTradeDetail) ferroalloyR.Use(token.Auth()).GET("QueryTHJScoreConfig", ferroalloy.QueryTHJScoreConfig) ferroalloyR.Use(token.Auth()).GET("QueryTHJProduct", ferroalloy.QueryTHJProduct) ferroalloyR.Use(token.Auth()).GET("QueryTHJTradeData", ferroalloy.QueryTHJTradeData) ferroalloyR.Use(token.Auth()).GET("QueryTHJGoodsDetail", ferroalloy.QueryTHJGoodsDetail) ferroalloyR.Use(token.Auth()).GET("QueryTHJPurchaseTransfer", ferroalloy.QueryTHJPurchaseTransfer) ferroalloyR.Use(token.Auth()).GET("QueryTHJPurchaseTransferDetail", ferroalloy.QueryTHJPurchaseTransferDetail) ferroalloyR.Use(token.Auth()).GET("QueryTHJPurchaseTransferOrder", ferroalloy.QueryTHJPurchaseTransferOrder) ferroalloyR.Use(token.Auth()).GET("QueryTHJPromotionIncome", ferroalloy.QueryTHJPromotionIncome) ferroalloyR.Use(token.Auth()).GET("QueryTHJPromotionIncomeDetail", ferroalloy.QueryTHJPromotionIncomeDetail) ferroalloyR.Use(token.Auth()).GET("QueryTHJPurchaseTransferOrderDetail", ferroalloy.QueryTHJPurchaseTransferOrderDetail) ferroalloyR.Use(token.Auth()).GET("QueryUserLevelInfo", ferroalloy.QueryUserLevelInfo) ferroalloyR.Use(token.Auth()).GET("QuerySpotgoodsPrice", ferroalloy.QuerySpotgoodsPrice) ferroalloyR.Use(token.Auth()).GET("QueryInvestorLevelGroup", ferroalloy.QueryInvestorLevelGroup) ferroalloyR.Use(token.Auth()).GET("QueryTHJFriends", ferroalloy.QueryTHJFriends) ferroalloyR.Use(token.Auth()).GET("QueryTHJProfits", ferroalloy.QueryTHJProfits) ferroalloyR.Use(token.Auth()).GET("QueryTHJinvesotrdeposit", ferroalloy.QueryTHJinvesotrdeposit) ferroalloyR.Use(token.Auth()).GET("QueryMyDeposit", ferroalloy.QueryMyDeposit) ferroalloyR.Use(token.Auth()).GET("QueryTHJInvesotrDepositLog", ferroalloy.QueryTHJInvesotrDepositLog) } // **************************华南石化************************* // hnshR := apiR.Group("Hnsh") // hnshR.Use() // { // hnshR.Use(token.Auth()).GET("QueryPresaleGoods", hnsh.QueryPresaleGoods) // } // ************************** 预售 ************************* presaleR := apiR.Group("Presale") presaleR.Use() { presaleR.Use(token.Auth()).GET("QueryPresaleAuctions", presale.QueryPresaleAuctions) presaleR.Use(token.Auth()).GET("QueryPresaleDefault", presale.QueryPresaleDefault) } mineR := apiR.Group("Mine") mineR.Use() { mineR.Use(token.Auth()).GET("QueryMineCpTradePreSaleResults", mine.QueryMineCpTradePreSaleResults) mineR.Use(token.Auth()).GET("QueryMineTradePositionExs", mine.QueryMineTradePositionExs) mineR.Use(token.Auth()).GET("QueryMineTradeOrderDetails", mine.QueryMineTradeOrderDetails) mineR.Use(token.Auth()).GET("QueryMineTradeOrders", mine.QueryMineTradeOrders) mineR.Use(token.Auth()).GET("QueryMineTradeTradeDetails", mine.QueryMineTradeTradeDetails) mineR.Use(token.Auth()).GET("QueryMineTradeGoodsDeliveryOfflines", mine.QueryMineTradeGoodsDeliveryOfflines) } // ************************* 水贝亿爵 ************************* sbyjR := apiR.Group("sbyj") sbyjR.Use() { sbyjR.Use().GET("GetTouristGoods", sbyj.GetTouristGoods) sbyjR.Use(token.Auth()).GET("GetMyOrders", sbyj.GetMyOrders) sbyjR.Use(token.Auth()).GET("QueryMyTradegoodsdeliveryoffline", sbyj.QueryMyTradegoodsdeliveryoffline) sbyjR.Use(token.Auth()).GET("QueryMyDeliveryofflinedetail", sbyj.QueryMyDeliveryofflinedetail) sbyjR.Use(token.Auth()).GET("QueryMyDeliveryofflineoperatelog", sbyj.QueryMyDeliveryofflineoperatelog) sbyjR.Use(token.Auth()).GET("QueryTradeHolderDetailEx", sbyj.QueryTradeHolderDetailEx) } bankR := apiR.Group("Bank") bankR.Use() { bankR.Use(token.Auth()).GET("QueryBankCusBankExtendConfigs", bank.QueryBankCusBankExtendConfigs) } // ************************* 报表 ************************* reportR := apiR.Group("Report") reportR.Use(token.Auth()) { reportR.GET("QueryReportReckonDayTaaccount", report.QueryReportReckonDayTaaccount) reportR.GET("QueryReportBankAccountOutInLog", report.QueryReportBankAccountOutInLog) reportR.GET("QueryReportReckonDayPosition", report.QueryReportReckonDayPosition) reportR.GET("QueryReportTradeDetail", report.QueryReportTradeDetail) reportR.GET("QueryReportMonthTaaccount", report.QueryReportMonthTaaccount) } return r } func ginLoggerMiddleware() gin.HandlerFunc { return func(c *gin.Context) { start := time.Now() c.Next() end := time.Now() latency := end.Sub(start) path := c.Request.URL.RequestURI() clientip := c.ClientIP() method := c.Request.Method statuscode := c.Writer.Status() logger.GetLogger().Debugf("|%3d|%13v|%15s|%s %s", statuscode, latency, clientip, method, path) } } func ginRecoveryMiddleware() gin.HandlerFunc { return gin.RecoveryWithWriter(logger.GetLogWriter()) } // CORSMiddleware cors跨域. func CORSMiddleware() gin.HandlerFunc { return func(c *gin.Context) { c.Writer.Header().Set("Access-Control-Allow-Origin", "*") c.Writer.Header().Set("Access-Control-Allow-Credentials", "true") // c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With, X-session-Token") c.Writer.Header().Set("Access-Control-Allow-Headers", "*") c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT, DELETE") c.Writer.Header().Set("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type, X-session-Token") if c.Request.Method == "OPTIONS" { c.AbortWithStatus(http.StatusNoContent) return } c.Next() } }