code: def get_records(self, start_time, end_time, msgid=1,
                      number=10000):
          
          if isinstance(start_time, datetime.datetime):
              start_time = time.mktime(start_time.timetuple())
          if isinstance(end_time, datetime.datetime):
              end_time = time.mktime(end_time.timetuple())
          record_data = {
              'starttime': int(start_time),
              'endtime': int(end_time),
              'msgid': msgid,
              'number': number
          }
          res = self._post(
              'https://api.weixin.qq.com/customservice/msgrecord/getmsglist',
              data=record_data,
          )
          return res
docs: 获取客服聊天记录
  
          :param start_time: 查询开始时间，UNIX 时间戳
          :param end_time: 查询结束时间，UNIX 时间戳，每次查询不能跨日查询
          :param msgid: 消息id顺序从小到大，从1开始
          :param number: 每次获取条数，最多10000条
  
          :return: 返回的 JSON 数据包