Skip to content

Instantly share code, notes, and snippets.

@levancho
Created July 16, 2024 17:27
Show Gist options
  • Save levancho/25e1f63a957cd44e1a88dc0ffd4d41df to your computer and use it in GitHub Desktop.
Save levancho/25e1f63a957cd44e1a88dc0ffd4d41df to your computer and use it in GitHub Desktop.
how to write in select in mybatis
@Select({"<script>",
SELECT_PRODUCTS,
"WHERE desp_product.oid IN",
"<foreach item='oidItem' index='index' collection='oids'",
"open='(' separator=',' close=')'>",
"#{oidItem}",
"</foreach>",
"</script>"})
@ResultMap("noParrent")
public List<DespProduct> getAllProductsIn(@Param("oids") List<Integer> oids) ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment