| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554 |
- package routers
- import (
- "mtp2_if/config"
- "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/erms2"
- "mtp2_if/controllers/erms3"
- "mtp2_if/controllers/hsby"
- "mtp2_if/controllers/market"
- "mtp2_if/controllers/order"
- "mtp2_if/controllers/qhj"
- "mtp2_if/controllers/qhjPCWeb"
- "mtp2_if/controllers/quote"
- "mtp2_if/controllers/search"
- "mtp2_if/controllers/szdz"
- "mtp2_if/controllers/taaccount"
- "mtp2_if/controllers/trade"
- "mtp2_if/controllers/user"
- "mtp2_if/controllers/wrtrade"
- "mtp2_if/logger"
- "mtp2_if/token"
- "net/http"
- "time"
- "github.com/gin-gonic/gin"
- // Swagger生成的文档
- _ "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() {
- r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
- }
- // 终端配置
- 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)
- }
- // ************************ 资金账户 ************************
- taAccountR := apiR.Group("TaAccount")
- taAccountR.Use(token.Auth())
- {
- // 获取资金账户信息
- taAccountR.GET("/GetTaAccounts", taaccount.GetTaAccounts)
- // 资金流水查询(当前)
- taAccountR.GET("/QueryAmountLog", taaccount.QueryAmountLog)
- // 资金流水查询(历史)
- taAccountR.GET("/QueryHisAmountLog", taaccount.QueryHisAmountLog)
- }
- // ************************ 通用服务 ************************
- 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.Use(token.Auth()).GET("/QueryNotice", common.QueryNotice)
- // 通知公告设置已读请求
- commonR.Use(token.Auth()).POST("/NoticeReaded", common.NoticeReaded)
- // 获取交易端菜单
- commonR.Use(token.Auth()).GET("/GetClientMenus", common.GetClientMenus)
- }
- // ************************ 通用市场 ************************
- marketR := apiR.Group("Market")
- marketR.Use(token.Auth())
- {
- // 查询市场运行信息
- marketR.GET("/QueryMarketRun", market.QueryMarketRun)
- // 获取登录账号有权限的市场信息
- marketR.GET("/QueryMarketsByLoginID", market.QueryMarketsByLoginID)
- // 获取登录账号有权限的商品信息
- marketR.GET("/QueryGoodsesByLoginID", market.QueryGoodsesByLoginID)
- }
- // ************************ 通用单据 ************************
- 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)
- }
- // ************************ 通用交易 ************************
- tradeR := apiR.Group("Trade")
- tradeR.Use(token.Auth())
- {
- // 点选挂牌委托单据查询(保证金摘牌大厅)
- tradeR.GET("/QueryRecieptOrder", trade.QueryRecieptOrder)
- }
- // ************************ 行情服务 ************************
- quoteR := apiR.Group("Quote")
- quoteR.Use(token.AuthByHsby())
- {
- // 查询行情历史数据
- quoteR.GET("/QueryHistoryDatas", quote.QueryHistoryDatas)
- // 查询行情Tik数据
- quoteR.GET("/QueryHistoryTikDatas", quote.QueryHistoryTikDatas)
- // 查询分时图历史数据
- quoteR.GET("/QueryTSData", quote.QueryTSData)
- // 获取商品盘面信息
- quoteR.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("/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("/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)
- }
- // ****************************大连千海金******************************
- qhjR := apiR.Group("Qhj")
- qhjR.Use(token.Auth())
- {
- qhjR.GET("QueryContract", qhj.QueryContract)
- qhjR.GET("QueryContractLog", qhj.QueryContractLog)
- qhjR.GET("QueryRStrategy", qhj.QueryRStrategy)
- qhjR.GET("QueryRSTriggerLog", qhj.QueryRSTriggerLog)
- qhjR.GET("QueryUserReceiveInfo", qhj.QueryUserReceiveInfo)
- qhjR.GET("QueryUserCollectConfig", qhj.QueryUserCollectConfig)
- qhjR.GET("QueryTradeGoodsPickup", qhj.QueryTradeGoodsPickup)
- qhjR.GET("QueryBankAccountSign", qhj.QueryBankAccountSign)
- qhjR.GET("QueryPickGoods", qhj.QueryPickGoods)
- qhjR.GET("QueryPickArea", qhj.QueryPickArea)
- qhjR.GET("QueryBankInfo", qhj.QueryBankInfo)
- qhjR.GET("QueryReckonPriceLog", qhj.QueryReckonPriceLog)
- qhjR.GET("QueryCustomerInfo", qhj.QueryCustomerInfo)
- qhjR.GET("QueryCusBankSignBank", qhj.QueryCusBankSignBank)
- qhjR.GET("QuerySiteColumnDetail", qhj.QuerySiteColumnDetail)
- qhjR.GET("QueryAccountInOutApply", qhj.QueryAccountInOutApply)
- qhjR.GET("QueryPayOrder", qhj.QueryPayOrder)
- qhjR.GET("QueryGoodsEx", qhj.QueryGoodsEx)
- qhjR.GET("QueryParentAreaList", qhj.QueryParentAreaList)
- qhjR.GET("QueryAreaFinanceConfig", qhj.QueryAreaFinanceConfig)
- qhjR.GET("QueryMyTeam", qhj.QueryMyTeam)
- qhjR.GET("QueryMyTeamOrder", qhj.QueryTeamOrder)
- qhjR.GET("QueryBrokerRewardLog", qhj.QueryBrokerRewardLog)
- qhjR.GET("QueryScoreLog", qhj.QueryScoreLog)
- qhjR.GET("QueryBrokerApply", qhj.QueryBrokerApply)
- qhjR.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)
- }
- 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-Methods", "POST, OPTIONS, GET, PUT")
- 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()
- }
- }
|