| | |
| | | update man_order |
| | | set settle = #{settle} |
| | | ,update_time = getdate() |
| | | ,update_by = #{userId} |
| | | <if test="userId != null"> |
| | | ,update_by = #{userId} |
| | | </if> |
| | | where 1=1 |
| | | and id = #{orderId} |
| | | </update> |
| | | <update id="updateSettleByOrderNo"> |
| | | update man_order |
| | | set settle = #{status} |
| | | ,update_time = getdate() |
| | | <if test="userId != null"> |
| | | ,update_by = #{userId} |
| | | </if> |
| | | where 1=1 |
| | | and order_no = #{orderNo} |
| | | and settle != #{status} |
| | | </update> |
| | | |
| | | <select id="selectComplete" resultMap="BaseResultMap"> |
| | | select |
| | | top 5 mo.* |
| | | from |
| | | man_order mo |
| | | inner join man_doc_type mt on |
| | | mo.doc_type = mt.doc_id |
| | | where |
| | | mt.pakout = 1 |
| | | and mo.settle = 4 |
| | | and mo.status = 1 |
| | | order by |
| | | mo.create_time asc |
| | | </select> |
| | | |
| | | <insert id="addToLogTable"> |
| | | INSERT INTO man_order_log SELECT * FROM man_order WHERE id = #{id} |
| | | </insert> |
| | | |
| | | <select id="selectorderNoL" resultMap="BaseResultMap"> |
| | | select top 10 * |
| | | from man_order |
| | | where 1=1 |
| | | <if test="orderNo != null"> |
| | | and order_no = #{orderNo} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |