Get the App
SLTechnology News&Howtos  ›  Development  › 

How does Mybatis query List results in batches according to List?

Shulou Source: shulou.com Published: 2022-06-01 06:16:38 09月30日 Update

This article mainly introduces the relevant knowledge of "Mybatis how to query List results in batches according to List". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to query List results in batches according to List by Mybatis" can help you solve the problem.

Query List results according to List mapper API / * query Drama Code according to id list * / public List selectByIds (@ Param ("dramaIds") List dramaIds); mapper.xml file select * from drama where drama_id in # {dramaId}

Array parameter

/ / API method ArrayList selectByIds (Integer [] ids); / / xml mapping file select * from user where id in # {item}

List parameter

/ / API method ArrayList selectByIds (List ids); / / xml mapping file Select from jria where ID in # {item} query mapper file select from table table.a = an and table.b in'${item} 'DAO fragment List selectWhere (@ Param ("list") List list, @ Param ("a") String a based on multi-conditional List This is the end of the content about "how Mybatis queries List results in batches according to List". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Queries results files interfaces methods knowledge parameters industries different practical content practical practical array articles more conditions cases fragments knowledge points Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Tech Info Redmi macOS Huawei