customXDetail method

Future<EasyPacket<CustomX>> customXDetail({
  1. required int no,
  2. required dynamic id,
  3. int hot1 = 0,
  4. int hot2 = 0,
  5. dynamic hotx = 0,
  6. bool body1 = false,
  7. bool body2 = false,
  8. bool body3 = false,
})

读取自定义数据,no为数据集合分类序号,hot1不为0时CustomX.hot1自增减1,hot2不为0时CustomX.hot2自增减1,hotx不为0时CustomX.hotx自增减hotx

body1为false时返回数据不包含CustomX.body1字段,body2为false时返回数据不包含CustomX.body2字段,body3为false时返回数据不包含CustomX.body3字段

Implementation

Future<EasyPacket<CustomX>> customXDetail({required int no, required ObjectId id, int hot1 = 0, int hot2 = 0, hotx = 0, bool body1 = false, bool body2 = false, bool body3 = false}) async {
  final response = await _aliveClient.websocketRequest('customXDetail', data: {'bsid': bsid, 'no': no, 'id': id, 'hot1': hot1, 'hot2': hot2, 'hotx': hotx, 'body1': body1, 'body2': body2, 'body3': body3});
  if (response.ok) {
    return response.cloneExtra(
      CustomX.fromJson(response.data!['customx'])
        ..cusmark = response.data!['cusmark'] == null ? null : Cusmark.fromJson(response.data!['cusmark'])
        ..cusstar = response.data!['cusstar'] == null ? null : Cusstar.fromJson(response.data!['cusstar']),
    );
  } else {
    return response.cloneExtra(null);
  }
}