User.js 398 B

12345678910111213141516171819202122
  1. import TableHelper from './lib/TableHelper'
  2. class User extends TableHelper {
  3. constructor () {
  4. super('user')
  5. }
  6. async getUserMap (userIds) {
  7. let objTable = await this.getObjTable()
  8. let map = {}
  9. if (!objTable) return map
  10. for (let k in userIds) {
  11. let userId = userIds[k]
  12. map[userId] = await objTable.get(userId)
  13. }
  14. return map
  15. }
  16. }
  17. export default User