1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549 |
- package impl
- import (
- "context"
- "gd_management/apis"
- "gd_management/impl/accounting"
- "gd_management/impl/base_api"
- "gd_management/impl/data_api"
- "gd_management/impl/error_code"
- "gd_management/impl/h5"
- "gd_management/impl/management"
- "gd_management/impl/order"
- "gd_management/impl/provider"
- "gd_management/impl/try_api"
- "gd_management/impl/user_merchant"
- "time"
- "gd_management/common.in/task"
- "gd_management/common.in/utils"
- /*"gd_service/common.in/jsonrpc2"
- "encoding/json"*/
- "github.com/astaxie/beego/orm"
- )
- // 具体实现
- type Rcvr struct {
- }
- //基础api操作
- func (c *Rcvr) ManagementAddBaseApi(ctx context.Context, req *apis.ManagementAddBaseApiReq, reply *apis.ManagementAddBaseApiReply) error {
- t1 := func() error {
- return base_api.ManagementAddBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementDelBaseApi(ctx context.Context, req *apis.ManagementDelBaseApiReq, reply *apis.ManagementDelBaseApiReply) error {
- t1 := func() error {
- return base_api.ManagementDelBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementUpdateBaseApi(ctx context.Context, req *apis.ManagementUpdateBaseApiReq, reply *apis.ManagementUpdateBaseApiReply) error {
- t1 := func() error {
- return base_api.ManagementUpdateBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetBaseApiList(ctx context.Context, req *apis.ManagementGetBaseApiListReq, reply *apis.ManagementGetBaseApiListReply) error {
- t1 := func() error {
- return base_api.ManagementGetBaseApiList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetBaseApiInfo(ctx context.Context, req *apis.ManagementGetBaseApiInfoReq, reply *apis.ManagementGetBaseApiInfoReply) error {
- t1 := func() error {
- return base_api.ManagementGetBaseApiInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementSetBaseApiState(ctx context.Context, req *apis.ManagementSetBaseApiStateReq, reply *apis.ManagementSetBaseApiStateReply) error {
- t1 := func() error {
- return base_api.ManagementSetBaseApiState(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- //通用错误码操作
- func (c *Rcvr) ManagementAddError(ctx context.Context, req *apis.ManagementAddErrorReq, reply *apis.ManagementAddErrorReply) error {
- t1 := func() error {
- return error_code.ManagementAddError(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementDelError(ctx context.Context, req *apis.ManagementDelErrorReq, reply *apis.ManagementDelErrorReply) error {
- t1 := func() error {
- return error_code.ManagementDelError(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementUpdateError(ctx context.Context, req *apis.ManagementUpdateErrorReq, reply *apis.ManagementUpdateErrorReply) error {
- t1 := func() error {
- return error_code.ManagementUpdateError(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetErrorList(ctx context.Context, req *apis.ManagementGetErrorListReq, reply *apis.ManagementGetErrorListReply) error {
- t1 := func() error {
- return error_code.ManagementGetErrorList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementAddProviderPlatform(ctx context.Context, req *apis.ManagementAddProviderPlatformReq, reply *apis.ManagementAddProviderPlatformReply) error {
- t1 := func() error {
- return provider.ManagementAddProviderPlatform(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementDelProviderPlatform(ctx context.Context, req *apis.ManagementDelProviderPlatformReq, reply *apis.ManagementDelProviderPlatformReply) error {
- t1 := func() error {
- return provider.ManagementDelProviderPlatform(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementUpdateProviderPlatform(ctx context.Context, req *apis.ManagementUpdateProviderPlatformReq, reply *apis.ManagementUpdateProviderPlatformReply) error {
- t1 := func() error {
- return provider.ManagementUpdateProviderPlatform(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetProviderPlatformList(ctx context.Context, req *apis.ManagementGetProviderPlatformListReq, reply *apis.ManagementGetProviderPlatformListReply) error {
- t1 := func() error {
- return provider.ManagementGetProviderPlatformList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementAddProviderApi(ctx context.Context, req *apis.ManagementAddProviderApiReq, reply *apis.ManagementAddProviderApiReply) error {
- t1 := func() error {
- return provider.ManagementAddProviderApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementDelProviderApi(ctx context.Context, req *apis.ManagementDelProviderApiReq, reply *apis.ManagementDelProviderApiReply) error {
- t1 := func() error {
- return provider.ManagementDelProviderApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementUpdateProviderApi(ctx context.Context, req *apis.ManagementUpdateProviderApiReq, reply *apis.ManagementUpdateProviderApiReply) error {
- t1 := func() error {
- return provider.ManagementUpdateProviderApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetProviderApiList(ctx context.Context, req *apis.ManagementGetProviderApiListReq, reply *apis.ManagementGetProviderApiListReply) error {
- t1 := func() error {
- return provider.ManagementGetProviderApiList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- //基础api关联数据源操作
- func (c *Rcvr) ManagementAddBaseApiProvider(ctx context.Context, req *apis.ManagementAddBaseApiProviderReq, reply *apis.ManagementAddBaseApiProviderReply) error {
- t1 := func() error {
- return base_api.ManagementAddBaseApiProvider(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- /*func (c *Rcvr) ManagementDelBaseApiProvider(ctx context.Context, req *apis.ManagementDelBaseApiProviderReq, reply *apis.ManagementDelBaseApiProviderReply) error {
- t1 := func() error {
- return base_api.ManagementDelBaseApiProvider(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementSetBaseApiProviderPriority(ctx context.Context, req *apis.ManagementSetBaseApiProviderPriorityReq, reply *apis.ManagementSetBaseApiProviderPriorityReply) error {
- t1 := func() error {
- return base_api.ManagementSetBaseApiProviderPriority(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- */
- func (c *Rcvr) ManagementGetBaseApiProviderList(ctx context.Context, req *apis.ManagementGetBaseApiProviderListReq, reply *apis.ManagementGetBaseApiProviderListReply) error {
- t1 := func() error {
- return base_api.ManagementGetBaseApiProviderList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiAddApi(ctx context.Context, req *apis.ManagementDataApiAddApiReq, reply *apis.ManagementDataApiAddApiReply) error {
- t1 := func() error {
- return data_api.DataApiAddApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiDeleteApi(ctx context.Context, req *apis.ManagementDataApiDeleteApiReq, reply *apis.ManagementDataApiDeleteApiReply) error {
- t1 := func() error {
- return data_api.DataApiDeleteApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiModifyApi(ctx context.Context, req *apis.ManagementDataApiModifyApiReq, reply *apis.ManagementDataApiModifyApiReply) error {
- t1 := func() error {
- return data_api.DataApiModifyApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiGetAll(ctx context.Context, req *apis.ManagementDataApiGetAllReq, reply *apis.ManagementDataApiGetAllReply) error {
- t1 := func() error {
- return data_api.DataApiGetAll(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiGetApiInfo(ctx context.Context, req *apis.ManagementDataApiGetApiInfoReq, reply *apis.ManagementDataApiGetApiInfoReply) error {
- t1 := func() error {
- return data_api.DataApiGetApiInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiReleaseApi(ctx context.Context, req *apis.ManagementDataApiReleaseApiReq, reply *apis.ManagementDataApiReleaseApiReply) error {
- t1 := func() error {
- return data_api.DataApiReleaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiAddQueryType(ctx context.Context, req *apis.ManagementDataApiAddQueryTypeReq, reply *apis.ManagementDataApiAddQueryTypeReply) error {
- t1 := func() error {
- return data_api.DataApiAddQueryType(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiModifyQueryType(ctx context.Context, req *apis.ManagementDataApiModifyQueryTypeReq, reply *apis.ManagementDataApiModifyQueryTypeReply) error {
- t1 := func() error {
- return data_api.DataApiModifyQueryType(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiRemoveQueryType(ctx context.Context, req *apis.ManagementDataApiRemoveQueryTypeReq, reply *apis.ManagementDataApiRemoveQueryTypeReply) error {
- t1 := func() error {
- return data_api.DataApiRemoveQueryType(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiGetQueryType(ctx context.Context, req *apis.ManagementDataApiGetQueryTypeReq, reply *apis.ManagementDataApiGetQueryTypeReply) error {
- t1 := func() error {
- return data_api.DataApiGetQueryType(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiAddBaseApi(ctx context.Context, req *apis.ManagementDataApiAddBaseApiReq, reply *apis.ManagementDataApiAddBaseApiReply) error {
- t1 := func() error {
- return data_api.DataApiAddBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiRemoveBaseApi(ctx context.Context, req *apis.ManagementDataApiRemoveBaseApiReq, reply *apis.ManagementDataApiRemoveBaseApiReply) error {
- t1 := func() error {
- return data_api.DataApiRemoveBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiModifyBaseApi(ctx context.Context, req *apis.ManagementDataApiModifyBaseApiReq, reply *apis.ManagementDataApiModifyBaseApiReply) error {
- t1 := func() error {
- return data_api.DataApiModifyBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiGetBaseApi(ctx context.Context, req *apis.ManagementDataApiGetBaseApiReq, reply *apis.ManagementDataApiGetBaseApiReply) error {
- t1 := func() error {
- return data_api.DataApiGetBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- /*func (c *Rcvr) DataApiChangeBaseApiIndex(ctx context.Context, req *apis.ManagementDataApiChangeBaseApiIndexReq, reply *apis.ManagementDataApiChangeBaseApiIndexReply) error {
- t1 := func() error {
- return data_api.DataApiChangeBaseApiIndex(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }*/
- func (c *Rcvr) DataApiAddDataCombo(ctx context.Context, req *apis.ManagementDataApiAddDataComboReq, reply *apis.ManagementDataApiAddDataComboReply) error {
- t1 := func() error {
- return data_api.DataApiAddDataCombo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiModifyDataCombo(ctx context.Context, req *apis.ManagementDataApiModifyDataComboReq, reply *apis.ManagementDataApiModifyDataComboReply) error {
- t1 := func() error {
- return data_api.DataApiModifyDataCombo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiRemoveDataCombo(ctx context.Context, req *apis.ManagementDataApiRemoveDataComboReq, reply *apis.ManagementDataApiRemoveDataComboReply) error {
- t1 := func() error {
- return data_api.DataApiRemoveDataCombo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiGetDataCombo(ctx context.Context, req *apis.ManagementDataApiGetDataComboReq, reply *apis.ManagementDataApiGetDataComboReply) error {
- t1 := func() error {
- return data_api.DataApiGetDataCombo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- /*func (c *Rcvr) DataApiChooseProviderApi(ctx context.Context, req *apis.ManagementDataApiChooseProviderApiReq, reply *apis.ManagementDataApiChooseProviderApiReply) error {
- t1 := func() error {
- return data_api.DataApiChooseProviderApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- */
- //商户操作
- func (c *Rcvr) ManagementAddUserMerchant(ctx context.Context, req *apis.ManagementAddUserMerchantReq, reply *apis.ManagementAddUserMerchantReply) error {
- t1 := func() error {
- return user_merchant.ManagementAddUserMerchant(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementUpdateUserMerchant(ctx context.Context, req *apis.ManagementUpdateUserMerchantReq, reply *apis.ManagementUpdateUserMerchantReply) error {
- t1 := func() error {
- return user_merchant.ManagementUpdateUserMerchant(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetUserMerchantList(ctx context.Context, req *apis.ManagementGetUserMerchantListReq, reply *apis.ManagementGetUserMerchantListReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetUserMerchantList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementSetUserMerchantAuthState(ctx context.Context, req *apis.ManagementSetUserMerchantAuthStateReq, reply *apis.ManagementSetUserMerchantAuthStateReply) error {
- t1 := func() error {
- return user_merchant.ManagementSetUserMerchantAuthState(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- //商户数据api操作
- func (c *Rcvr) ManagementGetMerchantDataApiList(ctx context.Context, req *apis.ManagementGetMerchantDataApiListReq, reply *apis.ManagementGetMerchantDataApiListReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetMerchantDataApiList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetMerchantDataApiListByTotal(ctx context.Context, req *apis.ManagementGetMerchantDataApiListByTotalReq, reply *apis.ManagementGetMerchantDataApiListByTotalReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetMerchantDataApiListByTotal(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetMerchantDataApiListByDay(ctx context.Context, req *apis.ManagementGetMerchantDataApiListByDayReq, reply *apis.ManagementGetMerchantDataApiListByDayReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetMerchantDataApiListByDay(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetMerchantBaseApiList(ctx context.Context, req *apis.ManagementGetMerchantBaseApiListReq, reply *apis.ManagementGetMerchantBaseApiListReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetMerchantBaseApiList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementAddMerchantBaseApi(ctx context.Context, req *apis.ManagementAddMerchantBaseApiReq, reply *apis.ManagementAddMerchantBaseApiReply) error {
- t1 := func() error {
- return user_merchant.ManagementAddMerchantBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- /*
- func (c *Rcvr) ManagementDelMerchantBaseApi(ctx context.Context, req *apis.ManagementDelMerchantBaseApiReq, reply *apis.ManagementDelMerchantBaseApiReply) error {
- t1 := func() error {
- return user_merchant.ManagementDelMerchantBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- */
- func (c *Rcvr) ManagementUpdateMerchantBaseApi(ctx context.Context, req *apis.ManagementUpdateMerchantBaseApiReq, reply *apis.ManagementUpdateMerchantBaseApiReply) error {
- t1 := func() error {
- return user_merchant.ManagementUpdateMerchantBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- /*func (c *Rcvr) ManagementSetMerchantBaseApiPriority(ctx context.Context, req *apis.ManagementSetMerchantBaseApiPriorityReq, reply *apis.ManagementSetMerchantBaseApiPriorityReply) error {
- t1 := func() error {
- return user_merchant.ManagementSetMerchantBaseApiPriority(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- */
- func (c *Rcvr) ManagementGetMerchantBaseApiInfo(ctx context.Context, req *apis.ManagementGetMerchantBaseApiInfoReq, reply *apis.ManagementGetMerchantBaseApiInfoReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetMerchantBaseApiInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementSetMerchantDataApiQuota(ctx context.Context, req *apis.ManagementSetMerchantDataApiQuotaReq, reply *apis.ManagementSetMerchantDataApiQuotaReply) error {
- t1 := func() error {
- return user_merchant.ManagementSetMerchantDataApiQuota(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementAddOrder(ctx context.Context, req *apis.ManagementAddOrderReq, reply *apis.ManagementAddOrderReply) error {
- t1 := func() error {
- return user_merchant.ManagementAddOrder(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementPayOrder(ctx context.Context, req *apis.ManagementPayOrderReq, reply *apis.ManagementPayOrderReply) error {
- t1 := func() error {
- return user_merchant.ManagementPayOrder(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetMerchantOrderList(ctx context.Context, req *apis.ManagementGetMerchantOrderListReq, reply *apis.ManagementGetMerchantOrderListReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetMerchantOrderList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) MangementDataApiOrderConfirm(ctx context.Context, req *apis.MangementDataApiOrderConfirmReq, reply *apis.MangementDataApiOrderConfirmReply) error {
- t1 := func() error {
- return order.MangementDataApiOrderConfirm(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementMerchantOrderDetailInfo(ctx context.Context, req *apis.ManagementMerchantOrderDetailInfoReq, reply *apis.ManagementMerchantOrderDetailInfoReply) error {
- t1 := func() error {
- return order.ManagementMerchantOrderDetailInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementSetMerchantOrderPrice(ctx context.Context, req *apis.ManagementSetMerchantOrderPriceReq, reply *apis.ManagementSetMerchantOrderPriceReply) error {
- t1 := func() error {
- return user_merchant.ManagementSetMerchantOrderPrice(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- /*
- func (c *Rcvr) ManagementCheckApi(ctx context.Context, req *apis.ManagementCheckApiReq, reply *apis.ManagementCheckApiReply) error {
- t1 := func() error {
- return user_merchant.ManagementCheckApi(ctx, req, reply)
- }
- err := task.Do(ctx, t1)
- if err != nil {
- var e jsonrpc2.Error
- merr := json.Unmarshal([]byte(err.Error()), &e)
- if merr != nil {
- reply.ErrCode = int(10003)
- reply.ErrMsg = "内部服务错误"
- }
- reply.ErrCode = e.Code
- reply.ErrMsg = e.Message
- }
- return nil
- }*/
- /*
- func (c *Rcvr) ManagementGetName(ctx context.Context, req *apis.ManagementGetNameReq, reply *apis.ManagementGetNameReply) error {
- t1 := func() error {
- return provider.ManagementGetName(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- */
- func (c *Rcvr) DataApiSetFreeDataCombo(ctx context.Context, req *apis.ManagementDataApiSetFreeDataComboReq, reply *apis.ManagementDataApiSetFreeDataComboReply) error {
- t1 := func() error {
- return data_api.DataApiSetFreeDataCombo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) DataApiGetQueryTypeList(ctx context.Context, req *apis.ManagementDataApiGetQueryTypeListReq, reply *apis.ManagementDataApiGetQueryTypeListReply) error {
- t1 := func() error {
- return data_api.DataApiGetQueryTypeList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetMerchantDataApiQuota(ctx context.Context, req *apis.ManagementGetMerchantDataApiQuotaReq, reply *apis.ManagementGetMerchantDataApiQuotaReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetMerchantDataApiQuota(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetAllProviderApi(ctx context.Context, req *apis.ManagementGetAllProviderApiReq, reply *apis.ManagementGetAllProviderApiReply) error {
- t1 := func() error {
- return provider.ManagementGetAllProviderApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- /*
- func (c *Rcvr) ManagementCheckProviderApi(ctx context.Context, req *apis.ManagementCheckProviderApiReq, reply *apis.ManagementCheckProviderApiReply) error {
- t1 := func() error {
- return user_merchant.ManagementCheckProviderApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }*/
- /*
- func (c *Rcvr) ManagementThirdpartCountIncrease(ctx context.Context, req *apis.ManagementThirdpartCountIncreaseReq, reply *apis.ManagementThirdpartCountIncreaseReply) error {
- t1 := func() error {
- return user_merchant.ManagementThirdpartCountIncrease(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }*/
- func (c *Rcvr) ManagementQueryTypeBaseApiList(ctx context.Context, req *apis.ManagementQueryTypeBaseApiListReq, reply *apis.ManagementQueryTypeBaseApiListReply) error {
- t1 := func() error {
- return data_api.ManagementQueryTypeBaseApiList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementDataApiComboList(ctx context.Context, req *apis.ManagementDataApiComboListReq, reply *apis.ManagementDataApiComboListReply) error {
- t1 := func() error {
- return data_api.ManagementDataApiComboList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) UpdateMerchantDataApiQouta(ctx context.Context, req *apis.UpdateMerchantDataApiReq, reply *apis.UpdateMerchantDataApiReply) error {
- t1 := func() error {
- return user_merchant.Update(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func RegisterModel() {
- orm.RegisterModel(new(apis.GdBill))
- orm.RegisterModel(new(apis.GdBillDetail))
- orm.RegisterModel(new(apis.GdConsume))
- orm.RegisterModel(new(apis.TGdApi))
- orm.RegisterModel(new(apis.TGdErrorCode))
- orm.RegisterModel(new(apis.TGdMerchants))
- orm.RegisterModel(new(apis.TGdMerchantChildDataApi))
- orm.RegisterModel(new(apis.TGdMerchantDataApi))
- orm.RegisterModel(new(apis.TGdBankInfo))
- orm.RegisterModel(new(apis.TGdDataApiOrder))
- orm.RegisterModel(new(apis.TGdUser))
- orm.RegisterModel(new(apis.ProviderApi))
- orm.RegisterModel(new(apis.ProviderPlatform))
- orm.RegisterModel(new(apis.DataApi))
- orm.RegisterModel(new(apis.QueryType))
- orm.RegisterModel(new(apis.ManagementDataApiBaseApi))
- orm.RegisterModel(new(apis.DataCombo))
- orm.RegisterModel(new(apis.ManagementApiProviderRelation))
- orm.RegisterModel(new(apis.MerchantApiProviderRelation))
- orm.RegisterModel(new(apis.ManagementThirdpartCount))
- orm.RegisterModel(new(apis.TGdH5ServiceMerchant))
- orm.RegisterModel(new(apis.TGdH5ServiceOrder))
- orm.RegisterModel(new(apis.TGdH5Api))
- orm.RegisterModel(new(apis.TGdH5Service))
- orm.RegisterModel(new(apis.TGdH5BaseApiRelation))
- orm.RegisterModel(new(apis.TGdH5ServiceApiRelation))
- orm.RegisterModel(new(apis.TGdH5ServiceCombo))
- orm.RegisterModel(new(apis.TGdH5ServiceAccessCount))
- orm.RegisterModel(new(apis.TGdH5ThemeColorItem))
- orm.RegisterModel(new(apis.TGdDataApiProviderApiRelation))
- orm.RegisterModel(new(apis.TryApi))
- orm.RegisterModel(new(apis.TGdDataEditorDb))
- orm.RegisterModel(new(apis.TGdDataEditorSearch))
- orm.RegisterModel(new(apis.UpdateProviderApiHystrixReq))
- }
- func (c *Rcvr) ManagementGetSecret(ctx context.Context, req *apis.ManagementGetSecretReq, reply *apis.ManagementGetSecretReply) error {
- t1 := func() error {
- return provider.ManagementGetSecret(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementAddMerchantDataApi(ctx context.Context, req *apis.ManagementAddMerchantDataApiReq, reply *apis.ManagementAddMerchantDataApiReply) error {
- t1 := func() error {
- return user_merchant.ManagementAddMerchantDataApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- /*
- func (c *Rcvr) ManagementCheckCountCode(ctx context.Context, req *apis.ManagementCheckCountCodeReq, reply *apis.ManagementCheckCountCodeReply) error {
- t1 := func() error {
- return user_merchant.ManagementCheckCountCode(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }*/
- /*
- func (c *Rcvr) ManagementH5AddCount(ctx context.Context, req *apis.ManagementH5AddCountReq, reply *apis.ManagementH5AddCountReply) error {
- t1 := func() error {
- return h5.ManagementH5AddCount(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- */
- func (c *Rcvr) ManagementAddH5Api(ctx context.Context, req *apis.ManagementAddH5ApiReq, reply *apis.ManagementAddH5ApiReply) error {
- t1 := func() error {
- return h5.ManagementAddH5Api(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementH5AuthCheck(ctx context.Context, req *apis.ManagementH5AuthCheckReq, reply *apis.ManagementH5AuthCheckReply) error {
- t1 := func() error {
- return h5.ManagementH5AuthCheck(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementDelH5Api(ctx context.Context, req *apis.ManagementDelH5ApiReq, reply *apis.ManagementDelH5ApiReply) error {
- t1 := func() error {
- return h5.ManagementDelH5Api(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementUpdateH5Api(ctx context.Context, req *apis.ManagementUpdateH5ApiReq, reply *apis.ManagementUpdateH5ApiReply) error {
- t1 := func() error {
- return h5.ManagementUpdateH5Api(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementSetH5ApiState(ctx context.Context, req *apis.ManagementSetH5ApiStateReq, reply *apis.ManagementSetH5ApiStateReply) error {
- t1 := func() error {
- return h5.ManagementSetH5ApiState(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetH5ApiList(ctx context.Context, req *apis.ManagementGetH5ApiListReq, reply *apis.ManagementGetH5ApiListReply) error {
- t1 := func() error {
- return h5.ManagementGetH5ApiList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementH5ApiAddBaseApi(ctx context.Context, req *apis.ManagementH5ApiAddBaseApiReq, reply *apis.ManagementH5ApiAddBaseApiReply) error {
- t1 := func() error {
- return h5.ManagementH5ApiAddBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementAddH5Service(ctx context.Context, req *apis.ManagementAddH5ServiceReq, reply *apis.ManagementAddH5ServiceReply) error {
- t1 := func() error {
- return h5.ManagementAddH5Service(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementReleaseH5Service(ctx context.Context, req *apis.ManagementReleaseH5ServiceReq, reply *apis.ManagementReleaseH5ServiceReply) error {
- t1 := func() error {
- return h5.ManagementReleaseH5Service(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementUpdateH5Service(ctx context.Context, req *apis.ManagementUpdateH5ServiceReq, reply *apis.ManagementUpdateH5ServiceReply) error {
- t1 := func() error {
- return h5.ManagementUpdateH5Service(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementDelH5Service(ctx context.Context, req *apis.ManagementDelH5ServiceReq, reply *apis.ManagementDelH5ServiceReply) error {
- t1 := func() error {
- return h5.ManagementDelH5Service(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetH5ServiceList(ctx context.Context, req *apis.ManagementGetH5ServiceListReq, reply *apis.ManagementGetH5ServiceListReply) error {
- t1 := func() error {
- return h5.ManagementGetH5ServiceList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementH5ServiceAddH5Api(ctx context.Context, req *apis.ManagementH5ServiceAddH5ApiReq, reply *apis.ManagementH5ServiceAddH5ApiReply) error {
- t1 := func() error {
- return h5.ManagementH5ServiceAddH5Api(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementH5ServiceGetH5ApiList(ctx context.Context, req *apis.ManagementH5ServiceGetH5ApiListReq, reply *apis.ManagementH5ServiceGetH5ApiListReply) error {
- t1 := func() error {
- return h5.ManagementH5ServiceGetH5ApiList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementH5ServiceAddCombo(ctx context.Context, req *apis.ManagementH5ServiceAddComboReq, reply *apis.ManagementH5ServiceAddComboReply) error {
- t1 := func() error {
- return h5.ManagementH5ServiceAddCombo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementH5ServiceUpdateCombo(ctx context.Context, req *apis.ManagementH5ServiceUpdateComboReq, reply *apis.ManagementH5ServiceUpdateComboReply) error {
- t1 := func() error {
- return h5.ManagementH5ServiceUpdateCombo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementH5ServiceGetComboList(ctx context.Context, req *apis.ManagementH5ServiceGetComboListReq, reply *apis.ManagementH5ServiceGetComboListReply) error {
- t1 := func() error {
- return h5.ManagementH5ServiceGetComboList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementH5ServiceDelCombo(ctx context.Context, req *apis.ManagementH5ServiceDelComboReq, reply *apis.ManagementH5ServiceDelComboReply) error {
- t1 := func() error {
- return h5.ManagementH5ServiceDelCombo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementH5ServiceSetComboFree(ctx context.Context, req *apis.ManagementH5ServiceSetComboFreeReq, reply *apis.ManagementH5ServiceSetComboFreeReply) error {
- t1 := func() error {
- return h5.ManagementH5ServiceSetComboFree(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementAddMerchantH5Service(ctx context.Context, req *apis.ManagementAddMerchantH5ServiceReq, reply *apis.ManagementAddMerchantH5ServiceReply) error {
- t1 := func() error {
- return user_merchant.ManagementAddMerchantH5Service(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetMerchantH5Service(ctx context.Context, req *apis.ManagementGetMerchantH5ServiceReq, reply *apis.ManagementGetMerchantH5ServiceReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetMerchantH5Service(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetMerchantH5Combo(ctx context.Context, req *apis.ManagementGetMerchantH5ComboReq, reply *apis.ManagementGetMerchantH5ComboReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetMerchantH5Combo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementSetMerchantH5Combo(ctx context.Context, req *apis.ManagementSetMerchantH5ComboReq, reply *apis.ManagementSetMerchantH5ComboReply) error {
- t1 := func() error {
- return user_merchant.ManagementSetMerchantH5Combo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementH5ApiGetBaseApiList(ctx context.Context, req *apis.ManagementH5ApiGetBaseApiListReq, reply *apis.ManagementH5ApiGetBaseApiListReply) error {
- t1 := func() error {
- return h5.ManagementH5ApiGetBaseApiList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetUserMerchantName(ctx context.Context, req *apis.ManagementGetUserMerchantNameReq, reply *apis.ManagementGetUserMerchantNameReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetUserMerchantName(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetBaseApiId(ctx context.Context, req *apis.ManagementGetBaseApiIdReq, reply *apis.ManagementGetBaseApiIdReply) error {
- t1 := func() error {
- return base_api.ManagementGetBaseApiId(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementAddH5ThemeColor(ctx context.Context, req *apis.ManagementAddH5ThemeColorReq, reply *apis.ManagementAddH5ThemeColorReply) error {
- t1 := func() error {
- return h5.ManagementAddH5ThemeColor(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementDelH5ThemeColor(ctx context.Context, req *apis.ManagementDelH5ThemeColorReq, reply *apis.ManagementDelH5ThemeColorReply) error {
- t1 := func() error {
- return h5.ManagementDelH5ThemeColor(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementUpdateH5ThemeColor(ctx context.Context, req *apis.ManagementUpdateH5ThemeColorReq, reply *apis.ManagementUpdateH5ThemeColorReply) error {
- t1 := func() error {
- return h5.ManagementUpdateH5ThemeColor(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetH5ThemeColorList(ctx context.Context, req *apis.ManagementGetH5ThemeColorListReq, reply *apis.ManagementGetH5ThemeColorListReply) error {
- t1 := func() error {
- return h5.ManagementGetH5ThemeColorList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- /*
- func (r *Rcvr) MangementGetH5OrderInfo(ctx context.Context, req *apis.MangementGetH5OrderInfoReq, reply *apis.MangementGetH5OrderInfoReply) error {
- t1 := func() error {
- return user_merchant.MangementGetH5OrderInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- */
- func (r *Rcvr) MangementGetApiOrderInfo(ctx context.Context, req *apis.MangementGetApiOrderInfoReq, reply *apis.MangementGetApiOrderInfoReply) error {
- t1 := func() error {
- return user_merchant.MangementGetApiOrderInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- // order
- func (r *Rcvr) ManagementCreateDataApiOrder(ctx context.Context, req *apis.ManagementCreateDataApiOrderReq, reply *apis.ManagementCreateDataApiOrderReply) error {
- t1 := func() error {
- return order.ManagementCreateDataApiOrder(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementCancelDataApiOrder(ctx context.Context, req *apis.ManagementCancelDataApiOrderReq, reply *apis.ManagementCancelDataApiOrderReply) error {
- t1 := func() error {
- return order.ManagementCancelDataApiOrder(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementChangeDataApiOrderPrice(ctx context.Context, req *apis.ManagementChangeDataApiOrderPriceReq, reply *apis.ManagementChangeDataApiOrderPriceReply) error {
- t1 := func() error {
- return order.ManagementChangeDataApiOrderPrice(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) MangementGetDataApiOrderInfo(ctx context.Context, req *apis.MangementGetDataApiOrderInfoReq, reply *apis.MangementGetDataApiOrderInfoReply) error {
- t1 := func() error {
- return order.MangementGetDataApiOrderInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementGetDataApiOrderList(ctx context.Context, req *apis.ManagementGetDataApiOrderListReq, reply *apis.ManagementGetDataApiOrderListReply) error {
- t1 := func() error {
- return order.ManagementGetDataApiOrderList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementPayDataApiOrder(ctx context.Context, req *apis.ManagementPayDataApiOrderReq, reply *apis.ManagementPayDataApiOrderReply) error {
- t1 := func() error {
- return order.ManagementPayDataApiOrder(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementCreateH5Order(ctx context.Context, req *apis.ManagementCreateH5OrderReq, reply *apis.ManagementCreateH5OrderReply) error {
- t1 := func() error {
- return order.ManagementCreateH5Order(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementCancelH5Order(ctx context.Context, req *apis.ManagementCancelH5OrderReq, reply *apis.ManagementCancelH5OrderReply) error {
- t1 := func() error {
- return order.ManagementCancelH5Order(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementChangeH5OrderPrice(ctx context.Context, req *apis.ManagementChangeH5OrderPriceReq, reply *apis.ManagementChangeH5OrderPriceReply) error {
- t1 := func() error {
- return order.ManagementChangeH5OrderPrice(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) MangementGetH5OrderInfo(ctx context.Context, req *apis.MangementGetH5OrderInfoReq, reply *apis.MangementGetH5OrderInfoReply) error {
- t1 := func() error {
- return order.MangementGetH5OrderInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementGetH5OrderList(ctx context.Context, req *apis.ManagementGetH5OrderListReq, reply *apis.ManagementGetH5OrderListReply) error {
- t1 := func() error {
- return order.ManagementGetH5OrderList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementPayH5Order(ctx context.Context, req *apis.ManagementPayH5OrderReq, reply *apis.ManagementPayH5OrderReply) error {
- t1 := func() error {
- return order.ManagementPayH5Order(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementAddMerchantDataApiNew(ctx context.Context, req *apis.ManagementCreateDataApiOrderReq, reply *apis.ManagementCreateDataApiOrderReply) error {
- t1 := func() error {
- return order.ManagementAddMerchantDataApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementAddMerchantH5ServiceNew(ctx context.Context, req *apis.ManagementCreateH5OrderReq, reply *apis.ManagementCreateH5OrderReply) error {
- t1 := func() error {
- return order.ManagementAddMerchantH5Service(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- /*func (r *Rcvr) ManagementGetProviderApiLimitCount(ctx context.Context, req *apis.ManagementGetProviderApiLimitCountReq, reply *apis.ManagementGetProviderApiLimitCountReply) error {
- t1 := func() error {
- return provider.ManagementGetProviderApiLimitCount(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- */
- func (r *Rcvr) ManagementGetUserMerchantListNew(ctx context.Context, req *apis.ManagementGetUserMerchantListNewReq, reply *apis.ManagementGetUserMerchantListNewReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetUserMerchantListNew(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementGetUserMerchantAuthList(ctx context.Context, req *apis.ManagementGetUserMerchantAuthListNewReq, reply *apis.ManagementGetUserMerchantAuthListNewReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetUserMerchantAuthList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementTryBaseApi(ctx context.Context, req *apis.ManagementTryBaseApiReq, reply *apis.ManagementTryBaseApiReply) error {
- t1 := func() error {
- return base_api.ManagementTryBaseApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementGetBaseApiByRouter(ctx context.Context, req *apis.ManagementGetBaseApiByRouterReq, reply *apis.ManagementGetBaseApiByRouterReply) error {
- t1 := func() error {
- return base_api.ManagementGetBaseApiByRouter(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementBatchTryApi(ctx context.Context, req *apis.ManagementBatchTryApiReq, reply *apis.ManagementBatchTryApiReply) error {
- t1 := func() error {
- return base_api.ManagementBatchTryApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementCreateTryApiTask(ctx context.Context, req *apis.ManagementCreateTryApiTaskReq, reply *apis.ManagementCreateTryApiTaskReply) error {
- t1 := func() error {
- return base_api.ManagementCreateTryApiTask(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementUpdateTryApiTask(ctx context.Context, req *apis.ManagementUpdateTryApiTaskReq, reply *apis.ManagementUpdateTryApiTaskReply) error {
- t1 := func() error {
- return base_api.ManagementUpdateTryApiTask(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementDeleteTryApiTask(ctx context.Context, req *apis.ManagementDeleteTryApiTaskReq, reply *apis.ManagementDeleteTryApiTaskReply) error {
- t1 := func() error {
- return base_api.ManagementDeleteTryApiTask(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementGetTryApiTaskList(ctx context.Context, req *apis.ManagementGetTryApiTaskListReq, reply *apis.ManagementGetTryApiTaskListReply) error {
- t1 := func() error {
- return base_api.ManagementGetTryApiTaskList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ProviderBatchRequest(ctx context.Context, req *apis.ProviderBatchRequestReq, reply *apis.ProviderBatchRequestReply) error {
- t1 := func() error {
- return try_api.ProviderBatchRequest(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) TryApiTaskAdd(ctx context.Context, req *apis.TryApiTaskAddReq, reply *apis.TryApiTaskAddReply) error {
- t1 := func() error {
- return try_api.TryApiTaskAdd(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) TryApiTaskUpdate(ctx context.Context, req *apis.TryApiTaskUpdateReq, reply *apis.TryApiTaskUpdateReply) error {
- t1 := func() error {
- return try_api.TryApiTaskUpdate(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) GetTryApiTaskList(ctx context.Context, req *apis.GetTryApiTaskListReq, reply *apis.GetTryApiTaskListReply) error {
- t1 := func() error {
- return try_api.GetTryApiTaskList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementConvertMerchantDataApi(ctx context.Context, req *apis.ManagementConvertMerchantDataApiReq, reply *apis.ManagementConvertMerchantDataApiReply) error {
- t1 := func() error {
- return user_merchant.ManagementConvertMerchantDataApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementSetBaseApiThreshold(ctx context.Context, req *apis.ManagementSetBaseApiThresholdReq, reply *apis.ManagementSetBaseApiThresholdReply) error {
- t1 := func() error {
- return base_api.ManagementSetBaseApiThreshold(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementSetProviderThreshold(ctx context.Context, req *apis.ManagementSetProviderThresholdReq, reply *apis.ManagementSetProviderThresholdReply) error {
- t1 := func() error {
- return provider.ManagementSetProviderThreshold(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementDelMerchantDataApi(ctx context.Context, req *apis.ManagementDelMerchantDataApiReq, reply *apis.ManagementDelMerchantDataApiReply) error {
- t1 := func() error {
- return user_merchant.ManagementDelMerchantDataApi(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementGetMerchantBaseApiListAll(ctx context.Context, req *apis.ManagementGetMerchantBaseApiListAllReq, reply *apis.ManagementGetMerchantBaseApiListAllReply) error {
- t1 := func() error {
- return user_merchant.ManagementGetMerchantBaseApiListAll(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) GetMerchantInfo(ctx context.Context, req *apis.GetMerchantInfoReq, reply *apis.GetMerchantInfoReply) error {
- t1 := func() error {
- return user_merchant.Info(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) MerchantAppLogin(ctx context.Context, req *apis.MerchantAppLoginReq, reply *apis.MerchantAppLoginReply) error {
- t1 := func() error {
- return user_merchant.MerchantAppLogin(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) GetMerchantDataApiQuota(ctx context.Context, req *apis.GetMerchantDataApiQuotaReq, reply *apis.GetMerchantDataApiQuotaReply) error {
- t1 := func() error {
- return user_merchant.GetMerchantDataApiQuota(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) GetDataApiInfo(ctx context.Context, req *apis.GetApiInfoReq, reply *apis.GetApiInfoReply) error {
- t1 := func() error {
- return data_api.GetApiInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- //总次数套餐设置每天调用上限
- func (c *Rcvr) ManagementSetDayCountLimit(ctx context.Context, req *apis.ManagementSetDayCountLimitReq, reply *apis.ManagementSetDayCountLimitReply) error {
- t1 := func() error {
- return user_merchant.ManagementSetDayCountLimit(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementSetBaseApiShowInfo(ctx context.Context, req *apis.ManagementSetBaseApiShowInfoReq, reply *apis.ManagementSetBaseApiShowInfoReply) error {
- t1 := func() error {
- return base_api.ManagementSetBaseApiShowInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (r *Rcvr) ManagementGetProviderApiLimitCount(ctx context.Context, req *apis.ManagementGetProviderApiLimitCountReq, reply *apis.ManagementGetProviderApiLimitCountReply) error {
- t1 := func() error {
- return management.ManagementGetProviderApiLimitCount(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetName(ctx context.Context, req *apis.ManagementGetNameReq, reply *apis.ManagementGetNameReply) error {
- t1 := func() error {
- return management.ManagementGetName(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) GetApiThreshold(ctx context.Context, req *apis.GetApiThresholdReq, reply *apis.GetApiThresholdReply) error {
- t1 := func() error {
- return management.GetApiThreshold(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- // 获取商户计数码
- func (c *Rcvr) MangementGetUserMerchantCountCode(ctx context.Context, req *apis.MangementGetUserMerchantCountCodeReq, reply *apis.MangementGetUserMerchantCountCodeReply) error {
- t1 := func() error {
- return management.MangementGetUserMerchantCountCode(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- // 获取商户id和名称列表
- func (c *Rcvr) ManagementGetMerchantIds(ctx context.Context, req *apis.ManagementGetMerchantIdsReq, reply *apis.ManagementGetMerchantIdsReply) error {
- t1 := func() error {
- return management.ManagementGetMerchantIds(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetMerchantApiId(ctx context.Context, req *apis.ManagementGetMerchantApiIdReq, reply *apis.ManagementGetMerchantApiIdReply) error {
- t1 := func() error {
- return management.ManagementGetMerchantApiId(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetProviderCountInfo(ctx context.Context, req *apis.ManagementGetProviderCountInfoReq, reply *apis.ManagementGetProviderCountInfoReply) error {
- t1 := func() error {
- return management.ManagementGetProviderCountInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetProviderIds(ctx context.Context, req *apis.ManagementGetProviderIdsReq, reply *apis.ManagementGetProviderIdsReply) error {
- t1 := func() error {
- return management.ManagementGetProviderIds(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetApiShowInfo(ctx context.Context, req *apis.ManagementGetApiShowInfoReq, reply *apis.ManagementGetApiShowInfoReply) error {
- t1 := func() error {
- return management.ManagementGetApiShowInfo(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetMerchantApiTimeout(ctx context.Context, req *apis.ManagementGetMerchantApiTimeoutReq, reply *apis.ManagementGetMerchantApiTimeoutReply) error {
- t1 := func() error {
- return management.ManagementGetMerchantApiTimeout(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetProviderMerchantApiList(ctx context.Context, req *apis.ManagementGetProviderMerchantApiListReq, reply *apis.ManagementGetProviderMerchantApiListReply) error {
- t1 := func() error {
- return provider.ManagementGetProviderMerchantApiList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementDelProviderOldCount(ctx context.Context, req *apis.ManagementDelProviderOldCountReq, reply *apis.ManagementDelProviderOldCountReply) error {
- t1 := func() error {
- return provider.ManagementDelProviderOldCount(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetApiTask(ctx context.Context, req *apis.ManagementGetApiTaskReq, reply *apis.ManagementGetApiTaskReply) error {
- t1 := func() error {
- return base_api.ManagementGetApiTask(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ManagementGetFilterRule(ctx context.Context, req *apis.ManagementGetFilterRuleReq, reply *apis.ManagementGetFilterRuleReply) error {
- t1 := func() error {
- return data_api.ManagementGetFilterRule(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) GetProviderApiHystrix(ctx context.Context, req *apis.GetProviderApiHystrixReq, reply *apis.GetProviderApiHystrixReply) error {
- t1 := func() error {
- return provider.GetHystrix(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) UpdateProviderApiHystrix(ctx context.Context, req *apis.UpdateProviderApiHystrixReq, reply *apis.UpdateProviderApiHystrixReply) error {
- t1 := func() error {
- return provider.UpdateHystrix(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) UpdateMerchantDataApiAlias(ctx context.Context, req *apis.ModifyAliasReq, reply *apis.ModifyAliasReply) error {
- t1 := func() error {
- return user_merchant.ModifyAlias(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) GenerateBill(ctx context.Context, req *apis.GenerateBillReq, reply *apis.GenerateBillReply) error {
- t1 := func() error {
- return accounting.GenerateBill(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) BillList(ctx context.Context, req *apis.BillListReq, reply *apis.BillListReply) error {
- t1 := func() error {
- return accounting.BillList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ChargeList(ctx context.Context, req *apis.ChargeListReq, reply *apis.ChargeListReply) error {
- t1 := func() error {
- return accounting.ChargeList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ConsumeList(ctx context.Context, req *apis.ConsumeListReq, reply *apis.ConsumeListReply) error {
- t1 := func() error {
- return accounting.ConsumeList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) ConsumeTrendList(ctx context.Context, req *apis.ConsumeTrendListReq, reply *apis.ConsumeTrendListReply) error {
- t1 := func() error {
- return accounting.ConsumeTrendList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) MerchantCharge(ctx context.Context, req *apis.MerchantChargeReq, reply *apis.MerchantChargeReply) error {
- t1 := func() error {
- return accounting.MerchantCharge(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) MerchantDataApiPriceList(ctx context.Context, req *apis.MerchantDataApiPriceListReq, reply *apis.MerchantDataApiPriceListReply) error {
- t1 := func() error {
- return accounting.MerchantDataApiPriceList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) MerchantPriceList(ctx context.Context, req *apis.MerchantPriceListReq, reply *apis.MerchantPriceListReply) error {
- t1 := func() error {
- return accounting.MerchantPriceList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) SetMerchantDataApiPrice(ctx context.Context, req *apis.SetMerchantDataApiPriceReq, reply *apis.SetMerchantDataApiPriceReply) error {
- t1 := func() error {
- return accounting.SetMerchantDataApiPrice(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) SetMerchantType(ctx context.Context, req *apis.SetMerchantTypeReq, reply *apis.SetMerchantTypeReply) error {
- t1 := func() error {
- return accounting.SetMerchantType(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) BillDetailList(ctx context.Context, req *apis.BillDetailListReq, reply *apis.BillDetailListReply) error {
- t1 := func() error {
- return accounting.BillDetailList(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) BillExportExcel(ctx context.Context, req *apis.BillExportExcelReq, reply *apis.BillExportExcelReply) error {
- t1 := func() error {
- return accounting.BillExportExcel(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) UpdateBillDetail(ctx context.Context, req *apis.UpdateBillDetailReq, reply *apis.UpdateBillDetailReply) error {
- t1 := func() error {
- return accounting.UpdateBillDetail(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) BillRemark(ctx context.Context, req *apis.BillRemarkReq, reply *apis.BillRemarkReply) error {
- t1 := func() error {
- return accounting.BillRemark(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) BillNotify(ctx context.Context, req *apis.BillNotifyReq, reply *apis.BillNotifyReply) error {
- t1 := func() error {
- return accounting.BillNotify(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func (c *Rcvr) BillConfirm(ctx context.Context, req *apis.BillConfirmReq, reply *apis.BillConfirmReply) error {
- t1 := func() error {
- return accounting.BillConfirm(ctx, req, reply)
- }
- return task.Do(ctx, t1)
- }
- func CleanLocalCache() {
- t := time.NewTicker(5 * time.Minute)
- for {
- select {
- case <-t.C:
- LoadRedis()
- }
- }
- }
- func LoadRedis() {
- o := orm.NewOrm()
- apiTabs := []apis.TGdApi{}
- merchantTabs := []apis.TGdMerchants{}
- o.QueryTable("t_gd_api").All(&apiTabs)
- o.QueryTable("t_gd_merchants").All(&merchantTabs)
- for _, v := range apiTabs {
- tmp := v
- utils.RedisSet("t_gd_api", v.Method+"-"+v.Router, tmp)
- }
- for _, v := range merchantTabs {
- tmp := v
- utils.RedisSet("t_gd_merchants", v.AppKey, tmp)
- }
- }
- func InitProviderRelation() {
- data_api.InitProviderRelation()
- }
|