config.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. package config
  2. import (
  3. "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/entity"
  4. "github.com/zeromicro/go-zero/zrpc"
  5. )
  6. type Config struct {
  7. zrpc.RpcServerConf
  8. WebRpcPort int64
  9. BidSearchOldUserLimit int64 //老用户 使用付费功能
  10. LabelUrl struct {
  11. Area string
  12. SType string
  13. Industry string
  14. }
  15. DefaultSearchCacheTime int //清除搜索列表内存缓存 间隔时间
  16. LimitSearchText struct {
  17. Flag bool
  18. Count int
  19. NoLogin int
  20. TimeOut int
  21. Percentage int
  22. UserIds []string
  23. Msg string
  24. LimitKey string
  25. ForPayer int
  26. WebhookURL []string
  27. LimitItems []string
  28. }
  29. SearchTypeSwitch bool //标题和正文 同时查询,关键词>1;是否优化查询只查正文(正文包含标题)
  30. FileSignBool bool //IC.C.FileSignBool列表是否显示附件标识开关
  31. PaySearchLimit struct {
  32. Switch bool
  33. Year int
  34. Month int
  35. WordSize int
  36. PageNum int64
  37. PageSize int64
  38. PrecisionNum int64
  39. } //优化付费用户搜索速度
  40. KeywordsLimit int //关键词长度限制
  41. DefaultBidInfo struct {
  42. PageNum int
  43. Count int
  44. PayCount int
  45. } //招标信息初始化
  46. DefaultTopTypes []string //信息类型初始值
  47. JYKeyMark string //关键词分组标识
  48. ContextOldVipLimit int64 //老版超级订阅 超前项目权限
  49. Middleground struct { //中台
  50. Etcd struct {
  51. Hosts []string
  52. }
  53. PowerCheckCenterKey string
  54. UserCenterKey string
  55. ResourceCenterKey string
  56. }
  57. ResourceCode string
  58. SearchConcurrency int64
  59. NoLoginSearch struct {
  60. Switch bool
  61. ExecutionNum int
  62. Wait int
  63. }
  64. Stages []string
  65. SearchWinner struct {
  66. Switch bool
  67. RegWinner string
  68. }
  69. }
  70. type Db struct {
  71. Mysql entity.Mysql `json:"mysql"`
  72. Redis entity.RedisStuct `json:"redis"`
  73. Es entity.EsStruct `json:"es"`
  74. Mongo entity.Mongo `json:"mongo"`
  75. EsNoLogin entity.EsStruct `json:"esNoLogin"`
  76. EsFree entity.EsStruct `json:"esFree"`
  77. }