deleteDeviceScheduleBoot static method

Future<String> deleteDeviceScheduleBoot(
  1. String userId,
  2. String ids
)

更新预约开机记录 userId app用户id ids 记录id: "xxx,xxx,xxx"

Implementation

static Future<String> deleteDeviceScheduleBoot(String userId,String ids) async {
  Map<String,String> headers = {
    'tenantId': '10002',
    'token': SpUtil().getString(SpUtil.SP_KEY_ACCESS_TOKEN) ?? '',
    'appSource': 'Maxims',
    'reqSource': '1',
  };
  int timestamp = DateTime.now().millisecondsSinceEpoch;
  String randomStr = CipherUtil.generateRandomString(6);
  Map<String,dynamic> data = {
    'timestamp': timestamp,
    'appKey': BaseHttpConstant.APP_BUSINESS_KEY,
    'nonceStr': randomStr,
    'signVersion': '1',
    'data': {
      "userId": userId,
      "ids": ids
    }
  };
  String sign = CipherUtil.generateSignature2(data, ['data'], BaseHttpConstant.APP_BUSINESS_SECRET);
  data['sign'] = sign;
  Options options = Options(
    headers: headers,
    contentType: Headers.jsonContentType,
  );
  var result = await HttpUtils.post(true, Api.PATH_ORDER_DEVICE_SCHEDULE_DELETE,
      data: data,
      options: options);
  return formatResponse(result);
}