RedisConstant.java 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. package com.sckw.redis.constant;
  2. /**
  3. * @desc: redis常量
  4. * @author: yzc
  5. * @date: 2023-06-09 11:27
  6. */
  7. public class RedisConstant {
  8. /**
  9. * 短信验证码值key
  10. */
  11. public static final String MESSAGE_SMS_VERIFY_CODE_VALUE_KEY = "message:sms:verifyCode:value:%s:%s";
  12. /**
  13. * 短信验证码请求key
  14. */
  15. public static final String MESSAGE_SMS_VERIFY_CODE_REQUEST_KEY = "message:sms:verifyCode:request:%s:%s";
  16. /**
  17. * 短信验证码请求时间
  18. */
  19. public static final Long SMS_VERIFY_CODE_REQUEST_TIME = 60L;
  20. /**
  21. * 短信验证码锁key
  22. */
  23. public static final String MESSAGE_SMS_VERIFY_CODE_LOCK_KEY = "message:sms:verifyCode:lock:%s:%s";
  24. /**
  25. * 短信验证码有效时间(秒)5分钟
  26. */
  27. public static final Long SMS_VERIFY_CODE_VALID_TIME = 300L;
  28. /**
  29. * message消费请求key
  30. */
  31. public static final String MESSAGE_CONSUMER_REQUEST_KEY = "message:msg:consumer:request:%s";
  32. /**
  33. * 商品更新库存锁key
  34. */
  35. public static final String GOODS_UPDATE_AMOUNT_KEY = "product:goods:update:amount:%s";
  36. /**
  37. * 更新贸易订单委托量、已履约量锁key
  38. */
  39. public static final String TORDER_UPDATE_AMOUNT_KEY = "order:trade:update:amount:%s";
  40. /**
  41. * 合同签约完成更新贸易订单状态锁key
  42. */
  43. public static final String TORDER_CONTRACT_UPDATE_KEY = "order:trade:contract:update:%s";
  44. /**
  45. * 合同签约完成更新物流订单状态锁key
  46. */
  47. public static final String LOGISTICS_ORDER_CONTRACT_UPDATE_KEY = "order:trade:logistics:update:%s";
  48. /**
  49. * 生成贸易订单号锁key
  50. */
  51. public static final String TORDER_NO_GENERATE_KEY = "order:trade:no:generate:%s";
  52. /**
  53. * 生成物流订单号锁key
  54. */
  55. public static final String LOGISTICS_NO_GENERATE_KEY = "order:logistics:no:generate:%s";
  56. /**
  57. * 物流订单接单操作
  58. */
  59. public static final String LOGISTICS_ORDER_TAKING_KEY = "order:logistics:order:taking:%s";
  60. /**
  61. * 物流运单号生成key
  62. */
  63. public static final String WAYBILL_NO_GENERATE_KEY = "order:waybill:no:generate:%s";
  64. /**
  65. * 贸易订单生成物流托运锁key
  66. */
  67. public static final String TRADE_TO_LOGISTICS_NO_GENERATE_KEY = "order:trade:logistics:no:generate:%s";
  68. /**
  69. * 完结物流订单key
  70. */
  71. public static final String LOGISTICS_ORDER_FINISH_KEY = "order:logistics:no:finish:%s";
  72. /**
  73. * 取消物流订单key
  74. */
  75. public static final String LOGISTICS_ORDER_CANCEL_KEY = "order:logistics:no:cancel:%s";
  76. /**
  77. * 物流订单分包锁key
  78. */
  79. public static final String LOGISTICS_ORDER_SUBCONTRACT_KEY = "order:logistics:no:subcontract:%s";
  80. /**
  81. * mqtt-key
  82. */
  83. public static final String MQ_CONSUMER_ALARM_KEY = "mqtt:consumer:alarm:%s";
  84. /**
  85. * 消费请求有效时间(秒)
  86. */
  87. public static final Long CONSUMER_REQUEST_VALID_TIME = 180L;
  88. /**
  89. * 结算单锁
  90. */
  91. public static final String SETTLEMENT_KEY = "sckw:kst:%s";
  92. /**
  93. * 企业关联钱包
  94. */
  95. public static final String WALLET_ENT = "wallet:ent";
  96. /**
  97. * 钱包关联企业
  98. */
  99. public static final String WALLET_UID = "wallet:uid";
  100. /**
  101. * 电子钱包时间记录
  102. * uid:filter:channel->time
  103. */
  104. public static final String WALLET_TIME = "%s:%s:%s";
  105. }