|
@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
|
|
|
<if test="location != null and location != ''"> and location = #{location}</if>
|
|
|
<if test="code != null and code != ''"> and code = #{code}</if>
|
|
|
+ <if test="typeNum != null and typeNum != ''"> and type_num = #{typeNum}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
from enterprise a
|
|
|
left join enterprise_type b
|
|
|
on a.type_num = b.number
|
|
|
- where id = #{id}
|
|
|
+ where a.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertEnterprise" parameterType="Enterprise" useGeneratedKeys="true" keyProperty="id">
|
|
@@ -79,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and a.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
|
|
|
<if test="location != null and location != ''"> and a.location = #{location}</if>
|
|
|
<if test="code != null and code != ''"> and a.code = #{code}</if>
|
|
|
+ <if test="typeNum != null and typeNum != ''"> and a.type_num = #{typeNum}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|