| | |
| | | <result column="rider_name" property="riderName"/> |
| | | <collection property="productSnapshots" ofType="com.oying.modules.sh.domain.OrderReturnProductSnapshot"> |
| | | <id column="snapshot_id" property="snapshotId"/> |
| | | <result column="return_num" property="returnNum"/> |
| | | <result column="store_id" property="storeId"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_code" property="productCode"/> |
| | | <result column="product_barcode" property="productBarcode"/> |
| | |
| | | </sql> |
| | | |
| | | <sql id="Product_Column_List"> |
| | | p.snapshot_id, p.product_id, p.product_code, p.product_barcode, p.product_name, p.product_title, p.product_main_image, |
| | | p.snapshot_id, p.return_num, p.store_id, p.product_id, p.product_code, p.product_barcode, p.product_name, p.product_title, p.product_main_image, |
| | | p.product_description, p.param_data, p.unit_price, p.detail_count, p.original_price, p.paid_price, p.actually_pay_price |
| | | </sql> |
| | | <sql id="Where_sql"> |
| | |
| | | or p.product_name like concat('%',#{blurry},'%') |
| | | or p.product_title like concat('%',#{blurry},'%') |
| | | or p.product_description like concat('%',#{blurry},'%') |
| | | or o.orderNum like concat('%',#{blurry},'%') |
| | | or o.order_describe like concat('%',#{blurry},'%') |
| | | or o.return_num like concat('%',#{blurry},'%') |
| | | or o.username like concat('%',#{blurry},'%') |
| | | or o.order_num like concat('%',#{blurry},'%')) |
| | | </if> |
| | |
| | | |
| | | <update id="updatePayStatus"> |
| | | update sh_order_return |
| | | set return_status = #{payState}, |
| | | success_time = #{payTime} |
| | | set refund_status = #{refundStatus}, |
| | | success_time = #{successTime} |
| | | where return_num = #{returnNum} |
| | | </update> |
| | | <update id="updateStatus"> |
| | | update sh_order_return |
| | | set return_status = #{returnStatus}, |
| | | return_status_describe = #{value}, |
| | | audit_status = #{auditStatus} |
| | | where return_num = #{returnNum} |
| | | </update> |
| | | |
| | |
| | | ) o |
| | | left join sh_order_return_product_snapshot as p on p.return_num = o.return_num |
| | | <include refid="Where_Sql_Product"/> |
| | | order by o.order_id desc |
| | | order by o.return_id desc |
| | | </select> |
| | | <select id="getByReturnNum" resultMap="BaseResultMap"> |
| | | select o.* from ( select |
| | | select o.*, from ( select |
| | | <include refid="Base_Column_List"/> |
| | | from sh_order_return as o ) o |
| | | left join sh_order_return_product_snapshot as p on p.return_num = o.return_num |
| | |
| | | </select> |
| | | <select id="countAll" resultType="java.lang.Long"> |
| | | select count(1) from ( |
| | | select distinct o.* |
| | | select distinct o.*, |
| | | p.product_code, p.product_barcode, p.product_name, p.product_title, p.product_description |
| | | from ( select |
| | | <include refid="Base_Column_List"/> |