先看解决方案,其他的都是问题的出处 解决方案:if中使用 _parameter,#{value}不变 <if test="_parameter!='' and _parameter!=null"> join scm_product p on pt.ProductTypeID=p.ProductTypeID where (p.ProductNameCN like concat('%',#{value},'%') or p.ProductNameEN like concat('
IDEA 2018 创建springboot工程后,如果你打开一个.sql文件,或者一个mybatis的mapper.xml文件,会提示: No data source are configured to run this SQL and provide advanced code assistance. 不要觉得这个很烦,我个人觉得这个工具提供了这么强大的能提高你编码效率的功能给你,不用白不用~ 到底哪里提升效率呢?看下面几个操作对比: 没有配置DataSource前的操作没有智能输入提醒,手
public class User { private int id; private String username;// 用户姓名 private String sex;// 性别 private Date birthday;// 生日 private String address;// 地址 public int getId() { return id; } public void setId(int id) { this.id = id; } public String getUsern
mapper.xml文件中传入list参数,使用foreach循环遍历值,但是在遍历的过程中出错了,具体代码如下所示 mapper.xml <select id="selectByCondition2" resultType="java.util.Map"> select id,name from [dbo].[TB_LandInfectantData] where 1=1 and LandMonitoringUid in ( <foreach i