redis.go 723 B

12345678910111213141516171819202122232425262728
  1. package partner
  2. import "app.yhyue.com/moapp/jybase/redis"
  3. // 存储文档doc 起始-id
  4. func SetDocsStartId(code, key string, startId int64, expireTime int) bool {
  5. return redis.Put(code, key, startId, expireTime)
  6. }
  7. // 获取文档doc 起始-id
  8. func GetDocsStartId(code, key string) int64 {
  9. return int64(redis.GetInt(code, key))
  10. }
  11. // 删除文档doc 起始-id
  12. func DelDocsStartId(code, key string) bool {
  13. return redis.Del(code, key)
  14. }
  15. // 更新文档信息起始时间
  16. func SetUpdateTaskInfo(code, key, startDate string, expireTime int) bool {
  17. return redis.Put(code, key, startDate, expireTime)
  18. }
  19. // 获取文档信息起始时间
  20. func GetUpdateTaskInfo(code, key string) string {
  21. return redis.GetStr(code, key)
  22. }