|
1234567891011121314151617181920 |
- from flask_restful import Resource, reqparse
- from flask import jsonify,request,json
- from common import redis_helper,utils
- from wechat import gewe_chat
-
-
-
- class GetGroupsInfoResource(Resource):
- def __init__(self):
- self.parser = reqparse.RequestParser()
- self.wxchat = gewe_chat.wxchat
-
- def post(self):
- req = request.get_json()
- wxid = req.get("wxid")
- hash_key=f'__AI_OPS_WX__:GROUPS_INFO:{wxid}'
- cache=redis_helper.redis_helper.get_hash(hash_key)
- groups=[json.loads(v) for v in cache.values()]
-
- return jsonify(groups)
|