Code Monkey home page Code Monkey logo

tiktok's Issues

关注列表与粉丝列表是否混淆?

根据follower表:

  • userid:用户
  • followerid:关注的用户
    而在followDao中,获取关注列表函数:
    func (*FollowDao) GetFollowingIds(userId int64) ([]int64, error) { var ids []int64 if err := Db. Model(Follow{}). Where("follower_id = ?", userId). Pluck("user_id", &ids).Error; nil != err { // 没有关注任何人,但是不能算错。 if "record not found" == err.Error() { return nil, nil } // 查询出错。 log.Println(err.Error()) return nil, err } // 查询成功。 return ids, nil }
  • follower_id =userId,即关注了userId 的 所有用户ids , 应该是userId的粉丝列表叭?
  • 同样地,在获取粉丝列表函数中:
    func (*FollowDao) GetFollowersIds(userId int64) ([]int64, error) { var ids []int64 if err := Db. Model(Follow{}). Where("user_id = ?", userId). Where("cancel = ?", 0). Pluck("follower_id", &ids).Error; nil != err { // 没有粉丝,但是不能算错。 if "record not found" == err.Error() { return nil, nil } // 查询出错。 log.Println(err.Error()) return nil, err } // 查询成功。 return ids, nil }
  • user_id = userId,即当前用户userId 关注的所有用户ids, 应该是关注列表?

您好,我想请问一个关于视频播放的问题。

您好,在视频设计模块的文档中,我注意到参考文献里面有nginx服务器的相关信息,我想知道为什么需要nginx服务器,如果直接把视频文件存在本地,然后返回play_url的时候,内容是自己主机的ip address+filepath,这样能实现在客户端上播放视频的功能吗?谢谢了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.