Git Product home page Git Product logo

Comments (11)

kareanyi avatar kareanyi commented on August 16, 2024

主要是微信官方提供的接口就是直接给的openId的列表呢

from wxjava.

binarywang avatar binarywang commented on August 16, 2024

可以考虑添加接口,方便客户端一次性得到想要的用户信息

from wxjava.

xrian avatar xrian commented on August 16, 2024

感觉没必要啊,各自按需实现就行,因为微信返回的openid是一万个啊,循环一万次......很耗时间的
再说有的人不一定获取一万个用户的,只是获取100,1000呢

from wxjava.

binarywang avatar binarywang commented on August 16, 2024

@xrian 你说的问题我也考虑过,但是确实有需要获取多个用户信息的场景,比如同步用户数据时批量获取用户信息的时候保存到本地数据库,虽然这个只是个小概率场景,不推荐多次调用,用户多的时候确实很耗时

from wxjava.

binarywang avatar binarywang commented on August 16, 2024

而且每次获取的用户数量也是可以指定的,比如可以指定每次获取多少用户

from wxjava.

xrian avatar xrian commented on August 16, 2024

@binarywang 我觉得这样实现会比较好些,写一个方法,传入list(或者数组或者list的形式),list里面是openid,这方法就是遍历list,然后根据openid获取用户信息,这样就不用考虑指定获取多少用户信息的情况了.
方法分同步和异步,如果数据少就可以用同步的方法,数据多可以用异步的
这样是否会好些呢

from wxjava.

wangjia2016 avatar wangjia2016 commented on August 16, 2024

@xrian 可以分页读取的,这种数据一般改动很少,也不是经常同步的,

from wxjava.

binarywang avatar binarywang commented on August 16, 2024

@wangjia2016 你可否帮忙实现一下?有人需要就用,不需要的话放那里也无妨

from wxjava.

wangjia2016 avatar wangjia2016 commented on August 16, 2024

@binarywang 可以,等我整理完了提交上来。

from wxjava.

binarywang avatar binarywang commented on August 16, 2024

@wangjia2016 最近有计划实现不?

from wxjava.

binarywang avatar binarywang commented on August 16, 2024

需求不强烈,暂时不实现

from wxjava.

Related Issues (20)

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.