|
@@ -7,6 +7,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<resultMap type="OrderFile" id="OrderFileResult">
|
|
<resultMap type="OrderFile" id="OrderFileResult">
|
|
<result property="orderId" column="order_id" />
|
|
<result property="orderId" column="order_id" />
|
|
<result property="flowId" column="flow_id" />
|
|
<result property="flowId" column="flow_id" />
|
|
|
|
+ <result property="chainsCode" column="chains_code" />
|
|
|
|
+ <result property="chainsName" column="chainsName" />
|
|
<result property="customersCode" column="customers_code" />
|
|
<result property="customersCode" column="customers_code" />
|
|
<result property="signerId" column="signer_id" />
|
|
<result property="signerId" column="signer_id" />
|
|
<result property="signerName" column="signer_name" />
|
|
<result property="signerName" column="signer_name" />
|
|
@@ -19,17 +21,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectOrderFileVo">
|
|
<sql id="selectOrderFileVo">
|
|
- select order_id, flow_id,customers_code,signer_id,signer_name, file_url, create_by, create_time, update_by, update_time, is_delete from ssb_order_file
|
|
|
|
|
|
+ select order_id, flow_id,chains_code,customers_code,signer_id,signer_name, file_url, create_by, create_time, update_by, update_time, is_delete from ssb_order_file
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectOrderFileList" parameterType="OrderFile" resultMap="OrderFileResult">
|
|
<select id="selectOrderFileList" parameterType="OrderFile" resultMap="OrderFileResult">
|
|
- <include refid="selectOrderFileVo"/>
|
|
|
|
|
|
+ SELECT
|
|
|
|
+ of.order_id,
|
|
|
|
+ of.flow_id,
|
|
|
|
+ of.chains_code,
|
|
|
|
+ of.customers_code,
|
|
|
|
+ of.signer_id,
|
|
|
|
+ of.signer_name,
|
|
|
|
+ of.file_url,
|
|
|
|
+ of.create_by,
|
|
|
|
+ of.create_time,
|
|
|
|
+ of.update_by,
|
|
|
|
+ of.update_time,
|
|
|
|
+ of.is_delete,
|
|
|
|
+ c.chains_name AS chainsName
|
|
|
|
+ FROM
|
|
|
|
+ ssb_order_file AS of
|
|
|
|
+ LEFT JOIN customers AS c ON of.chains_code = c.chains_code
|
|
<where>
|
|
<where>
|
|
- <if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
|
|
|
|
|
+ <if test="orderId != null and orderId != ''"> and c.chains_name = #{orderId}</if>
|
|
|
|
+ <if test="chainsName != null and chainsName != ''"> and c.chains_name like concat('%', #{chainsName}, '%')</if>
|
|
|
|
+ <if test="signerName != null and signerName != ''"> and of.signer_name like concat('%', #{signerName}, '%')</if>
|
|
<if test="flowId != null and flowId != ''"> and flow_id = #{flowId}</if>
|
|
<if test="flowId != null and flowId != ''"> and flow_id = #{flowId}</if>
|
|
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
|
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
|
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
|
|
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
|
|
</where>
|
|
</where>
|
|
|
|
+ GROUP BY
|
|
|
|
+ of.chains_code
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectOrderFileById" parameterType="String" resultMap="OrderFileResult">
|
|
<select id="selectOrderFileById" parameterType="String" resultMap="OrderFileResult">
|
|
@@ -42,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="orderId != null">order_id,</if>
|
|
<if test="orderId != null">order_id,</if>
|
|
<if test="flowId != null">flow_id,</if>
|
|
<if test="flowId != null">flow_id,</if>
|
|
|
|
+ <if test="chainsCode != null">chains_code,</if>
|
|
<if test="customersCode != null">customers_code,</if>
|
|
<if test="customersCode != null">customers_code,</if>
|
|
<if test="signerId != null">signer_id,</if>
|
|
<if test="signerId != null">signer_id,</if>
|
|
<if test="signerName != null">signer_name,</if>
|
|
<if test="signerName != null">signer_name,</if>
|
|
@@ -55,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="orderId != null">#{orderId},</if>
|
|
<if test="orderId != null">#{orderId},</if>
|
|
<if test="flowId != null">#{flowId},</if>
|
|
<if test="flowId != null">#{flowId},</if>
|
|
|
|
+ <if test="chainsCode != null">#{chainsCode},</if>
|
|
<if test="customersCode != null">#{customersCode},</if>
|
|
<if test="customersCode != null">#{customersCode},</if>
|
|
<if test="signerId != null">#{signerId},</if>
|
|
<if test="signerId != null">#{signerId},</if>
|
|
<if test="signerName != null">#{signerName},</if>
|
|
<if test="signerName != null">#{signerName},</if>
|
|
@@ -71,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
update ssb_order_file
|
|
update ssb_order_file
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="flowId != null">flow_id = #{flowId},</if>
|
|
<if test="flowId != null">flow_id = #{flowId},</if>
|
|
|
|
+ <if test="chainsCode != null">chains_code = #{chainsCode},</if>
|
|
<if test="customersCode != null">customers_code = #{customersCode},</if>
|
|
<if test="customersCode != null">customers_code = #{customersCode},</if>
|
|
<if test="signerId != null">signer_id = #{signerId},</if>
|
|
<if test="signerId != null">signer_id = #{signerId},</if>
|
|
<if test="signerName != null">signer_name = #{signerName},</if>
|
|
<if test="signerName != null">signer_name = #{signerName},</if>
|
|
@@ -86,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<update id="updateOrderFileByFlowId">
|
|
<update id="updateOrderFileByFlowId">
|
|
update ssb_order_file
|
|
update ssb_order_file
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="chainsCode != null">chains_code = #{chainsCode},</if>
|
|
<if test="customersCode != null">customers_code = #{customersCode},</if>
|
|
<if test="customersCode != null">customers_code = #{customersCode},</if>
|
|
<if test="signerId != null">signer_id = #{signerId},</if>
|
|
<if test="signerId != null">signer_id = #{signerId},</if>
|
|
<if test="signerName != null">signer_name = #{signerName},</if>
|
|
<if test="signerName != null">signer_name = #{signerName},</if>
|