wa_strapi
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

18 行
449 B

  1. 'use strict';
  2. /**
  3. * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services)
  4. * to customize this service
  5. */
  6. module.exports = {
  7. distinctbyKey: async (params) =>{
  8. const results = await strapi.query('message').find(params);
  9. let arrKeys = [];
  10. results.forEach((i)=>{
  11. if(!arrKeys.includes(i["session_datum_key"])) arrKeys.push(i["session_datum_key"]);
  12. });
  13. return arrKeys
  14. }
  15. };