298 lines
13 KiB
Go
298 lines
13 KiB
Go
package service
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/appointment"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/blockchain"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/buy"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/chainbrowser"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/children_competition"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/coin"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/collection_record"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/conference"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/contract"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/digital_copyright"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/domain_name"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/e_card"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/employee"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/equity"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/exam"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/goods_management"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/inventory"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/invoice"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/loanbill"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/meeting"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/patent"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/recruit"
|
|
site "github.com/fonchain_enterprise/fonchain-main/api/site_sign_in"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/software_copyright"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/trademark"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/warehouse"
|
|
"os"
|
|
|
|
"github.com/fonchain_enterprise/fonchain-main/api/dci"
|
|
meal_backend_account "github.com/fonchain_enterprise/fonchain-main/api/meal/backend/account"
|
|
meal_backend_goods "github.com/fonchain_enterprise/fonchain-main/api/meal/backend/goods"
|
|
indent "github.com/fonchain_enterprise/fonchain-main/api/meal/backend/indent"
|
|
meal_backend_order "github.com/fonchain_enterprise/fonchain-main/api/meal/backend/order"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/payment"
|
|
|
|
"github.com/fonchain_enterprise/fonchain-main/api/oa"
|
|
|
|
"github.com/fonchain_enterprise/fonchain-main/api/artwork_shop"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/preorder"
|
|
|
|
"github.com/fonchain_enterprise/fonchain-main/api/artist_third_party"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/chain"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/collections"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/documentContract"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/health"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/orderproduct"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/prebook"
|
|
|
|
"github.com/fonchain_enterprise/fonchain-main/api/express"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/paybill"
|
|
|
|
"github.com/fonchain_enterprise/fonchain-main/api/artartwork"
|
|
|
|
"github.com/fonchain_enterprise/fonchain-main/api/shopbrand"
|
|
|
|
"github.com/fonchain_enterprise/fonchain-main/api/artwork_third_party"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/push"
|
|
backendSeries "github.com/fonchain_enterprise/fonchain-main/api/series"
|
|
|
|
"github.com/fonchain_enterprise/fonchain-main/api/backup"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/draw"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/task"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/workbench"
|
|
|
|
"dubbo.apache.org/dubbo-go/v3/common/constant"
|
|
"dubbo.apache.org/dubbo-go/v3/config"
|
|
_ "dubbo.apache.org/dubbo-go/v3/imports"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/account"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/approval"
|
|
artShow "github.com/fonchain_enterprise/fonchain-main/api/artShow"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/artist"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/artwork"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/artwork_chain"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/artwork_query"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/department"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/feedback"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/journal"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/log"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/note"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/order"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/position"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/rule"
|
|
"github.com/fonchain_enterprise/fonchain-main/api/rule_log"
|
|
pkConfig "github.com/fonchain_enterprise/fonchain-main/pkg/config"
|
|
)
|
|
|
|
var DepartmentProvider = new(department.DepartmentClientImpl)
|
|
var PositionProvider = new(position.PositionClientImpl)
|
|
var RuleProvider = new(rule.RuleClientImpl)
|
|
var RuleLogProvider = new(rule_log.RuleLogClientImpl)
|
|
var AccountProvider = new(account.AccountClientImpl)
|
|
var ApprovalProvider = new(approval.ApprovalClientImpl)
|
|
var AppointmentProvider = new(appointment.AppointmentClientImpl)
|
|
var BuyProvider = new(buy.BuyClientImpl)
|
|
var OrderProvider = new(order.OrderClientImpl)
|
|
var GrpcArtistImpl = new(artist.ArtistClientImpl)
|
|
var ArtArtworkImpl = new(artartwork.ArtartworkClientImpl)
|
|
|
|
var GrpcArtworkImpl = new(artwork.ArtworkClientImpl)
|
|
var GrpcArtworkQueryImpl = new(artwork_query.ArtworkQueryClientImpl)
|
|
var GrpcArtworkChainImpl = new(artwork_chain.ArtworkChainClientImpl)
|
|
var GrpcArtworkThirdPartyImpl = new(artwork_third_party.ArtworkThirdPartyClientImpl)
|
|
var GrpcLogImpl = new(log.LogClientImpl)
|
|
var GrpcNoteImpl = new(note.NoteClientImpl)
|
|
var GrpcArtShowImpl = new(artShow.ArtShowClientImpl)
|
|
var TaskProvider = new(task.TaskClientImpl)
|
|
var GrpcWorkbenchImpl = new(workbench.WorkbenchClientImpl)
|
|
var GrpcDrawImpl = new(draw.DrawClientImpl)
|
|
var GrpcBackupImpl = new(backup.BackupClientImpl)
|
|
var GrpcPushImpl = new(push.PushClientImpl)
|
|
var GrpcBackendSeriesImpl = new(backendSeries.SeriesClientImpl)
|
|
var GrpcShopBrandImpl = new(shopbrand.BrandClientImpl)
|
|
var GrpcPayBillImpl = new(paybill.PaybillClientImpl)
|
|
var ChainProvider = new(chain.ChainClientImpl)
|
|
var GrpcArtistThirdPartyImpl = new(artist_third_party.ArtistThirdPartyClientImpl)
|
|
var ContractImpl = new(contract.ContractClientImpl)
|
|
var GrpcCollectionImpl = new(collections.CollectionsClientImpl)
|
|
var GrpcPrebookImpl = new(prebook.PrebookClientImpl)
|
|
var GrpcExpressImpl = new(express.ExpressClientImpl) //快递柜微服务
|
|
var GrpcProductImpl = new(orderproduct.OrderproductClientImpl) //顾廷龙预约商品
|
|
var GrpcArtworkShopImpl = new(artwork_shop.ArtworkShopClientImpl)
|
|
var GrpcHealthImpl = new(health.HealthClientImpl)
|
|
var GrpcPreorderImpl = new(preorder.PreorderClientImpl)
|
|
var GrpcJournalImpl = new(journal.JournalClientImpl)
|
|
var GrpcIndentImpl = new(indent.IndentClientImpl)
|
|
var GrpcChainBrowserImpl = new(chainbrowser.ChainBrowserClientImpl)
|
|
|
|
// 点餐
|
|
var GrpcMealAccountImpl = new(meal_backend_account.MealAccountClientImpl)
|
|
var GrpcMealGoodsImpl = new(meal_backend_goods.MealGoodsClientImpl)
|
|
var GrpcMealOrderImpl = new(meal_backend_order.MealOrderClientImpl)
|
|
|
|
// 库管
|
|
var InventoryProvider = new(inventory.InventoryClientImpl)
|
|
|
|
// oa
|
|
var GrpcOAImpl = new(oa.OAClientImpl)
|
|
var GrpcMeetingImpl = new(meeting.MeetingClientImpl)
|
|
|
|
var GrpcPaymentImpl = new(payment.PaymentClientImpl)
|
|
var GrpcCollectionRecordImpl = new(collection_record.CollectionRecordClientImpl)
|
|
var WarehouseProvider = new(warehouse.WarehouseClientImpl)
|
|
|
|
// 招聘
|
|
var GrpcRecruitClientImpl = new(recruit.RecruitClientImpl)
|
|
|
|
// 物资管理
|
|
var GrpcGoodsManagementImpl = new(goods_management.GoodsManagementClientImpl)
|
|
|
|
var GrpcExamClientImpl = new(exam.ExamClientImpl)
|
|
var GrpcSiteSignInImpl = new(site.SiteSignInClientImpl)
|
|
|
|
// 签到
|
|
|
|
// 版权
|
|
var GrpcCopyrightImpl = new(digital_copyright.CopyrightClientImpl)
|
|
var GrpcDciImpl = new(dci.DciClientImpl)
|
|
var GrpcSoftwareCopyrightImpl = new(software_copyright.SoftwareCopyrightClientImpl)
|
|
var GrpcTrademarkImpl = new(trademark.TrademarkClientImpl)
|
|
|
|
// 专利申请
|
|
var GrpcPatentClientImpl = new(patent.PatentClientImpl)
|
|
|
|
var CoinProvider = new(coin.CoinClientImpl)
|
|
|
|
// 反馈审核
|
|
var FeedbackProvider = new(feedback.FeedbackClientImpl)
|
|
|
|
//画展管理
|
|
//var GrpcExhibitionFClientImpl = new(exhibition_f.ExhibitionFClientImpl)
|
|
|
|
// 儿童画展比赛
|
|
var ChildrenCompetitionProvider = new(children_competition.ChildrenCompetitionClientImpl)
|
|
|
|
// 区块链浏览器
|
|
var InvoiceProvider = new(invoice.InvoiceClientImpl)
|
|
var BlockchainImpl = new(blockchain.BlockchainClientImpl)
|
|
var EquityProvider = new(equity.EquityClientImpl)
|
|
var GrpcConferenceImpl = new(conference.ConferenceClientImpl)
|
|
var GrpcDocumentContractImpl = new(documentContract.DocumentContractClientImpl)
|
|
|
|
var GrpcLoanBillClientImpl = new(loanbill.LoanBillClientImpl) //借款单申请
|
|
var GrpcEmployeeProvider = new(employee.EmployeeClientImpl) //员工档案
|
|
var ECardProvider = new(e_card.ECardClientImpl) // 员工电子名片
|
|
var DomainNameProvider = new(domain_name.DomainNameClientImpl) // 域名管理
|
|
|
|
func init() {
|
|
config.SetConsumerService(AppointmentProvider)
|
|
config.SetConsumerService(ChainProvider)
|
|
config.SetConsumerService(BuyProvider)
|
|
config.SetConsumerService(DepartmentProvider)
|
|
config.SetConsumerService(PositionProvider)
|
|
config.SetConsumerService(RuleProvider)
|
|
config.SetConsumerService(RuleLogProvider)
|
|
config.SetConsumerService(AccountProvider)
|
|
config.SetConsumerService(OrderProvider)
|
|
config.SetConsumerService(ApprovalProvider)
|
|
config.SetConsumerService(GrpcArtistImpl)
|
|
config.SetConsumerService(GrpcArtistThirdPartyImpl)
|
|
config.SetConsumerService(GrpcArtworkImpl)
|
|
config.SetConsumerService(GrpcArtworkQueryImpl)
|
|
config.SetConsumerService(GrpcArtworkChainImpl)
|
|
config.SetConsumerService(GrpcArtworkThirdPartyImpl)
|
|
config.SetConsumerService(GrpcWorkbenchImpl)
|
|
config.SetConsumerService(GrpcArtworkShopImpl)
|
|
config.SetConsumerService(GrpcLogImpl)
|
|
config.SetConsumerService(GrpcNoteImpl)
|
|
config.SetConsumerService(TaskProvider)
|
|
//config.SetConsumerService(GrpcDrawImpl)
|
|
config.SetConsumerService(GrpcBackupImpl)
|
|
config.SetConsumerService(GrpcPushImpl)
|
|
config.SetConsumerService(GrpcBackendSeriesImpl)
|
|
config.SetConsumerService(GrpcShopBrandImpl)
|
|
config.SetConsumerService(GrpcCollectionImpl)
|
|
config.SetConsumerService(GrpcPayBillImpl)
|
|
config.SetConsumerService(ContractImpl)
|
|
config.SetConsumerService(GrpcArtShowImpl)
|
|
config.SetConsumerService(ArtArtworkImpl)
|
|
config.SetConsumerService(GrpcPrebookImpl)
|
|
config.SetConsumerService(GrpcProductImpl)
|
|
config.SetConsumerService(GrpcHealthImpl)
|
|
config.SetConsumerService(GrpcPreorderImpl)
|
|
config.SetConsumerService(GrpcExpressImpl)
|
|
config.SetConsumerService(GrpcJournalImpl)
|
|
|
|
// 画家宝
|
|
initArtistinfoClients()
|
|
config.SetConsumerService(GrpcRecruitClientImpl)
|
|
|
|
/**/
|
|
//物资管理
|
|
config.SetConsumerService(GrpcGoodsManagementImpl) //有
|
|
config.SetConsumerService(GrpcMeetingImpl) //会议
|
|
/***/
|
|
|
|
//oa
|
|
config.SetConsumerService(GrpcOAImpl)
|
|
|
|
config.SetConsumerService(GrpcMealAccountImpl)
|
|
config.SetConsumerService(GrpcMealGoodsImpl)
|
|
config.SetConsumerService(GrpcMealOrderImpl)
|
|
config.SetConsumerService(GrpcIndentImpl)
|
|
|
|
//库管
|
|
config.SetConsumerService(InventoryProvider)
|
|
config.SetConsumerService(GrpcPaymentImpl)
|
|
config.SetConsumerService(GrpcCollectionRecordImpl)
|
|
config.SetConsumerService(WarehouseProvider)
|
|
|
|
//区块链浏览器网页版
|
|
config.SetConsumerService(EquityProvider)
|
|
|
|
config.SetConsumerService(BlockchainImpl)
|
|
config.SetConsumerService(InvoiceProvider)
|
|
|
|
config.SetConsumerService(GrpcExamClientImpl) // 考试
|
|
config.SetConsumerService(GrpcSiteSignInImpl)
|
|
|
|
config.SetConsumerService(GrpcChainBrowserImpl) //区块链浏览器
|
|
config.SetConsumerService(GrpcDciImpl) //dci
|
|
config.SetConsumerService(GrpcCopyrightImpl) //版权登记
|
|
config.SetConsumerService(GrpcSoftwareCopyrightImpl) //软件版权登记
|
|
config.SetConsumerService(GrpcTrademarkImpl) //商标登记
|
|
|
|
//ai生图部分
|
|
config.SetConsumerService(CoinProvider) //商标登记
|
|
config.SetConsumerService(FeedbackProvider) //反馈审核
|
|
|
|
//儿童画展包
|
|
config.SetConsumerService(ChildrenCompetitionProvider)
|
|
|
|
//专利申请
|
|
config.SetConsumerService(GrpcPatentClientImpl)
|
|
config.SetConsumerService(GrpcLoanBillClientImpl)
|
|
//
|
|
//config.SetConsumerService(GrpcExhibitionFClientImpl) // 画展管理
|
|
//上市文件管理
|
|
config.SetConsumerService(GrpcConferenceImpl)
|
|
config.SetConsumerService(GrpcDocumentContractImpl)
|
|
config.SetConsumerService(GrpcEmployeeProvider)
|
|
config.SetConsumerService(ECardProvider)
|
|
config.SetConsumerService(DomainNameProvider)
|
|
|
|
// 判断是不是单元测试
|
|
if os.Args[len(os.Args)-1] == "unit-test" {
|
|
_ = os.Setenv(constant.ConfigFileEnvKey, "../../conf/dubbogo.yaml")
|
|
}
|
|
pkConfig.GetOptions()
|
|
fmt.Println(os.Getenv(constant.ConfigFileEnvKey))
|
|
if err := config.Load(); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|