@@ -23,7 +23,7 @@ use crate::{
2323 async_util,
2424 error:: jni_result,
2525 init:: TRADE_CONTEXT_CLASS ,
26- types:: { FromJValue , IntoJValue , ObjectArray , get_field, set_field} ,
26+ types:: { FromJValue , IntoJValue , JavaInteger , ObjectArray , get_field, set_field} ,
2727} ;
2828
2929#[ derive( Default ) ]
@@ -350,13 +350,13 @@ pub unsafe extern "system" fn Java_com_longport_SdkNative_tradeContextReplaceOrd
350350 if let Some ( trailing_percent) = trailing_percent {
351351 new_opts = new_opts. trailing_percent ( trailing_percent) ;
352352 }
353- let limit_depth_level: Option < i32 > = get_field ( env, & opts, "limitDepthLevel" ) ?;
353+ let limit_depth_level: Option < JavaInteger > = get_field ( env, & opts, "limitDepthLevel" ) ?;
354354 if let Some ( limit_depth_level) = limit_depth_level {
355- new_opts = new_opts. limit_depth_level ( limit_depth_level) ;
355+ new_opts = new_opts. limit_depth_level ( limit_depth_level. into ( ) ) ;
356356 }
357- let trigger_count: Option < i32 > = get_field ( env, & opts, "triggerCount" ) ?;
357+ let trigger_count: Option < JavaInteger > = get_field ( env, & opts, "triggerCount" ) ?;
358358 if let Some ( trigger_count) = trigger_count {
359- new_opts = new_opts. trigger_count ( trigger_count) ;
359+ new_opts = new_opts. trigger_count ( trigger_count. into ( ) ) ;
360360 }
361361 let monitor_price: Option < Decimal > = get_field ( env, & opts, "monitorPrice" ) ?;
362362 if let Some ( monitor_price) = monitor_price {
@@ -419,13 +419,13 @@ pub unsafe extern "system" fn Java_com_longport_SdkNative_tradeContextSubmitOrde
419419 if let Some ( outside_rth) = outside_rth {
420420 new_opts = new_opts. outside_rth ( outside_rth) ;
421421 }
422- let limit_depth_level: Option < i32 > = get_field ( env, & opts, "limitDepthLevel" ) ?;
422+ let limit_depth_level: Option < JavaInteger > = get_field ( env, & opts, "limitDepthLevel" ) ?;
423423 if let Some ( limit_depth_level) = limit_depth_level {
424- new_opts = new_opts. limit_depth_level ( limit_depth_level) ;
424+ new_opts = new_opts. limit_depth_level ( limit_depth_level. into ( ) ) ;
425425 }
426- let trigger_count: Option < i32 > = get_field ( env, & opts, "triggerCount" ) ?;
426+ let trigger_count: Option < JavaInteger > = get_field ( env, & opts, "triggerCount" ) ?;
427427 if let Some ( trigger_count) = trigger_count {
428- new_opts = new_opts. trigger_count ( trigger_count) ;
428+ new_opts = new_opts. trigger_count ( trigger_count. into ( ) ) ;
429429 }
430430 let monitor_price: Option < Decimal > = get_field ( env, & opts, "monitorPrice" ) ?;
431431 if let Some ( monitor_price) = monitor_price {
0 commit comments