o.`id`,o.`tenant_id`,o.`parent_tenant_id`,o.`c_user_id`,o.`product_id`,o.`type`,o.`way`,o.`payment_type`,o.`payment`, o.`payment_time`,o.`order_status`,o.`create_date`,o.`update_date`,o.`is_recorded`,o.`recorded_date`, u.`nick_name`,u.`phone`, o.`product_title`,o.`product_pic`,o.`product_sale_price`, m.`name` author,m.`img_url` author_pic where 1 = 1 and o.`id` = #{id} and o.`tenant_id` = #{tenantId} and o.`parent_tenant_id` = #{parentTenantId} and o.`c_user_id` = #{cUserId} and o.`product_id` = #{productId} and o.`type` = #{type} and o.`way` = #{way} and o.`payment_type` = #{paymentType} and o.`create_date` >= #{startdate} and o.`create_date` <= #{enddate} and o.`order_status` = #{orderStatus} and o.`is_recorded` = #{isRecorded} and u.`nick_name` like concat('%', #{nickName},'%') and u.`phone` like concat('%', #{phone},'%') and o.`product_title` like concat('%', #{productTitle},'%') and o.merchant_id = #{merchantId} and m.`name` like concat('%', #{author},'%') and o.`order_status` in #{sItem} and o.`id` in #{idItem} order by o.`update_date` desc o.`id`,o.`tenant_id`,o.`parent_tenant_id`,o.`c_user_id`,o.`product_id`,o.`type`,o.`way`,o.`payment_type`,o.`payment`, o.`payment_time`,o.`order_status`,o.`create_date`,o.`update_date`, o.`product_title`,o.`product_pic`,o.`product_sale_price`, m.`name` author,m.`img_url` author_pic where 1 = 1 and o.`id` = #{id} and o.`tenant_id` = #{tenantId} and o.`parent_tenant_id` = #{parentTenantId} and o.`c_user_id` = #{cUserId} and o.`product_id` = #{productId} and o.`product_title` like concat('%', #{productTitle},'%') and o.`type` = #{type} and o.`way` = #{way} and o.`payment_type` = #{paymentType} and o.`create_date` >= #{startdate} and o.`create_date` <= #{enddate} and o.`order_status` = #{orderStatus} and o.merchant_id = #{merchantId} and m.`name` like concat('%', #{author},'%') and o.`order_status` in #{sItem} and o.`id` in #{idItem} order by o.`update_date` desc update tt_order set `is_recorded` = #{isRecorded},recorded_date = now() where id = #{id}