模糊查询:
@Select({
"SELECT * FROM account where account like CONCAt('%',#{query},'%') or email like CONCAt('%',#{query},'%')"
})
Account findAccountByAccountOrMail(@Param("query") String query);
批量添加:
@Insert({
""
})
void insertLabelForCompany(@Param("companyId") Long companyId,@Param("item") List item);
批量删除:
@Delete({
""
})
void removeLabelForCompany(@Param("companyId") Long companyId,@Param("item") List item);
批量修改:
@Update(value = "")
int updateStatus(@Param("status") Long status, @Param("ids") Long[] ids);
批量查询:
@Select({
""
})
List findByIdList(@Param("idList")List idList);
条件查询,if里面不仅可以判空,还可以判断是否满足某个条件
@Select({
" "
})
List findCompanyConditional(@Param("isScanSameLevelValue") String isScanSameLevelValue, @Param("isScanParentLevelValue") String isScanParentLevelValue, @Param("companyId") Long companyId, @Param("type") Integer type);
条件查询:
*/
@Lang(XMLLanguageDriver.class)
@Select({""
})
List findProductFromLocal(@Param("hId")Long hId,@Param("categoryId")Long categoryId,@Param("input")String input,@Param("method")Long method,@Param("org")Long org,@Param("location")String location);
以上所述是小编给大家介绍的Mybatis 条件查询 批量增删改查功能,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对考高分网网站的支持!



