标签:ram close div ctc cat com span 多个 entity
dao层:
List<ProjectCompanyOrg> findProCompanyListByOrgIds(@Param("orgIdList") List<Integer> orgIdList, @Param("orgName") String orgName, @Param("projectId") Integer projectId);
xml层:
<select id="findProCompanyOrgListByOrgIds" resultType="com.highgoal.group.project.domain.entity.ProjectCompanyOrg"> select a.id as aid,a.org_id , b.* from project_company_org_unti a join project_company_org b on a.project_company_org_id = b.project_company_org_id <where> a.del = 0 and b.del = 0 <if test="orgIdList.size()!=0"> and a.org_id in <foreach collection="orgIdList" index="index" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> <if test="orgName != null and orgName != ‘‘"> and b.org_name like concat(‘%‘,concat(#{orgName},‘%‘)) </if> <if test="projectId != null"> and b.project_id = #{projectId,jdbcType=INTEGER} </if> </where> </select>
SpringMvc的xml里关于<if>里传递多个参数(包含List、Integer、String)
标签:ram close div ctc cat com span 多个 entity
原文地址:https://www.cnblogs.com/supiaopiao/p/12326011.html