|
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
<result property="xmId" column="xm_id" />
|
|
<result property="xmId" column="xm_id" />
|
|
<result property="xmbh" column="xmbh" />
|
|
<result property="xmbh" column="xmbh" />
|
|
|
|
+ <result property="sourceId" column="source_id" />
|
|
<result property="fjName" column="fj_name" />
|
|
<result property="fjName" column="fj_name" />
|
|
<result property="path" column="path" />
|
|
<result property="path" column="path" />
|
|
<result property="type" column="type" />
|
|
<result property="type" column="type" />
|
|
@@ -15,7 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFgwFjVo">
|
|
<sql id="selectFgwFjVo">
|
|
- select id, xm_id, xmbh, fj_name, path, type, remark from fgw_fj
|
|
|
|
|
|
+ select id, xm_id, xmbh,source_id, fj_name, path, type, remark from fgw_fj
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectFgwFjList" parameterType="FgwFj" resultMap="FgwFjResult">
|
|
<select id="selectFgwFjList" parameterType="FgwFj" resultMap="FgwFjResult">
|
|
@@ -23,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<where>
|
|
<where>
|
|
<if test="xmId != null "> and xm_id = #{xmId}</if>
|
|
<if test="xmId != null "> and xm_id = #{xmId}</if>
|
|
<if test="xmbh != null and xmbh != ''"> and xmbh = #{xmbh}</if>
|
|
<if test="xmbh != null and xmbh != ''"> and xmbh = #{xmbh}</if>
|
|
|
|
+ <if test="sourceId != null "> and source_id = #{sourceId}</if>
|
|
<if test="fjName != null and fjName != ''"> and fj_name like concat('%', #{fjName}, '%')</if>
|
|
<if test="fjName != null and fjName != ''"> and fj_name like concat('%', #{fjName}, '%')</if>
|
|
<if test="path != null and path != ''"> and path = #{path}</if>
|
|
<if test="path != null and path != ''"> and path = #{path}</if>
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
@@ -33,12 +35,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<include refid="selectFgwFjVo"/>
|
|
<include refid="selectFgwFjVo"/>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+ <select id="selectFgwFjByXmId" parameterType="Long" resultMap="FgwFjResult">
|
|
|
|
+ <include refid="selectFgwFjVo"/>
|
|
|
|
+ where xm_id = #{id}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectFgwFjBySourceId" parameterType="Long" resultMap="FgwFjResult">
|
|
|
|
+ <include refid="selectFgwFjVo"/>
|
|
|
|
+ where source_id = #{id} and type = '18'
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<insert id="insertFgwFj" parameterType="FgwFj" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertFgwFj" parameterType="FgwFj" useGeneratedKeys="true" keyProperty="id">
|
|
insert into fgw_fj
|
|
insert into fgw_fj
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="xmId != null">xm_id,</if>
|
|
<if test="xmId != null">xm_id,</if>
|
|
<if test="xmbh != null">xmbh,</if>
|
|
<if test="xmbh != null">xmbh,</if>
|
|
|
|
+ <if test="sourceId != null">source_id,</if>
|
|
<if test="fjName != null and fjName != ''">fj_name,</if>
|
|
<if test="fjName != null and fjName != ''">fj_name,</if>
|
|
<if test="path != null">path,</if>
|
|
<if test="path != null">path,</if>
|
|
<if test="type != null">type,</if>
|
|
<if test="type != null">type,</if>
|
|
@@ -47,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="xmId != null">#{xmId},</if>
|
|
<if test="xmId != null">#{xmId},</if>
|
|
<if test="xmbh != null">#{xmbh},</if>
|
|
<if test="xmbh != null">#{xmbh},</if>
|
|
|
|
+ <if test="sourceId != null">#{sourceId},</if>
|
|
<if test="fjName != null and fjName != ''">#{fjName},</if>
|
|
<if test="fjName != null and fjName != ''">#{fjName},</if>
|
|
<if test="path != null">#{path},</if>
|
|
<if test="path != null">#{path},</if>
|
|
<if test="type != null">#{type},</if>
|
|
<if test="type != null">#{type},</if>
|
|
@@ -77,4 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
+ <delete id="deleteFgwFjByXmId" parameterType="Long">
|
|
|
|
+ delete from fgw_fj where xm_id = #{id}
|
|
|
|
+ </delete>
|
|
</mapper>
|
|
</mapper>
|