redis_dataCache.go 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package model
  2. //type DataCacheOfRedis struct {
  3. // Id int `json:"id"`
  4. // ServiceConfig struct {
  5. // ServiceUrl string `json:"serviceUrl"`
  6. // RequestMethod string `json:"requestMethod"`
  7. // ParamForm string `json:"paramForm"`
  8. // AuthWay string `json:"authWay"`
  9. // RequestParam string `json:"requestParam"`
  10. // ColumnMap []struct {
  11. // ColumnName string `json:"columnName"`
  12. // FieldName string `json:"fieldName"`
  13. // } `json:"columnMap"`
  14. // } `json:"serviceConfig"`
  15. // DbConfig struct {
  16. // DbId int `json:"dbId"`
  17. // Type string `json:"type"`
  18. // ConnectionString string `json:"connectionString"`
  19. // TbName string `json:"tbName"`
  20. // } `json:"dbConfig"`
  21. // CacheCycle struct {
  22. // Unit string `json:"unit"`
  23. // Value int `json:"value"`
  24. // } `json:"cacheCycle"`
  25. // Mode string `json:"mode"`
  26. // AddField string `json:"addField"`
  27. // PageField string `json:"pageField"`
  28. // PageSizeField string `json:"pageSizeField"`
  29. // SearchField string `json:"searchField"`
  30. //}
  31. //数据缓存
  32. type CacheColumnMap struct{
  33. ColumnName string `json:"columnName"`
  34. FieldName string `json:"fieldName"`
  35. }
  36. type CacheServiceConfig struct{
  37. ServiceUrl string `json:"serviceUrl"`
  38. RequestMethod string `json:"requestMethod"`
  39. ParamForm string `json:"paramForm"`
  40. AuthWay string `json:"authWay"`
  41. RequestParam string `json:"requestParam"`
  42. ColumnMap []CacheColumnMap `json:"columnMap"`
  43. }
  44. type CacheDbConfig struct{
  45. DbId int `json:"dbId"`
  46. DbType string `json:"type"`
  47. ConnectionString string `json:"connectionString"`
  48. TbName string `json:"tbName"`
  49. }
  50. type CacheCycleConfig struct{
  51. Unit string `json:"unit"`
  52. Value string `json:"value"`
  53. }
  54. type DataCacheOfRedis struct{
  55. Id int `json:"id"`
  56. ServiceConfig CacheServiceConfig `json:"serviceConfig"` //接口服务信息
  57. DbConfig CacheDbConfig `json:"dbConfig"` //缓存数据表连接信息
  58. CacheCycle CacheCycleConfig `json:"cacheCycle"` //定时存储规则
  59. Mode string `json:"mode"` //同步方式 add-增量 full-全量
  60. AddField string `json:"addField"`
  61. PageField string `json:"pageField"`
  62. PageSizeField string `json:"pageSizeField"`
  63. SearchField string `json:"searchField"`
  64. }