|  |  |  | 
|---|
|  |  |  | <result property="scorePay" column="score_pay" /> | 
|---|
|  |  |  | <result property="payMethod" column="pay_method" /> | 
|---|
|  |  |  | <result property="companyId" column="company_id" /> | 
|---|
|  |  |  | <!--返回详情列表--> | 
|---|
|  |  |  | <collection property="details" column="{orderId=id}" | 
|---|
|  |  |  | select="com.matrix.system.shopXcx.dao.ShopOrderDetailsDao.selectByOrderId"/> | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 分页查询 --> | 
|---|
|  |  |  | <select id="selectInPageByQuery" resultMap="ShopOrderMap"> | 
|---|
|  |  |  | <select id="selectInPageByQuery" resultMap="ShopOrderComplexMap"> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | o.*, | 
|---|
|  |  |  | s.shop_name | 
|---|
|  |  |  | 
|---|
|  |  |  | <!-- 导出Excel --> | 
|---|
|  |  |  | <select id="selectInPageByQueryOfExcel" resultMap="ShopOrderComplexMap"> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | o.*, | 
|---|
|  |  |  | s.store_name | 
|---|
|  |  |  | o.create_by, | 
|---|
|  |  |  | o.create_time, | 
|---|
|  |  |  | o.update_by, | 
|---|
|  |  |  | o.update_time, | 
|---|
|  |  |  | o.id, | 
|---|
|  |  |  | o.order_no, | 
|---|
|  |  |  | o.order_money, | 
|---|
|  |  |  | o.commodity_price, | 
|---|
|  |  |  | o.user_id, | 
|---|
|  |  |  | o.order_time, | 
|---|
|  |  |  | o.pay_status, | 
|---|
|  |  |  | o.discount_explain, | 
|---|
|  |  |  | o.discount_amount, | 
|---|
|  |  |  | o.order_status, | 
|---|
|  |  |  | o.refund_charge, | 
|---|
|  |  |  | o.user_name, | 
|---|
|  |  |  | o.user_tel, | 
|---|
|  |  |  | o.remarks, | 
|---|
|  |  |  | o.shipping_method, | 
|---|
|  |  |  | o.store_id, | 
|---|
|  |  |  | o.purchase_quantity, | 
|---|
|  |  |  | o.del_flag, | 
|---|
|  |  |  | o.wx_order_no, | 
|---|
|  |  |  | o.pay_result, | 
|---|
|  |  |  | o.postage, | 
|---|
|  |  |  | o.pay_method, | 
|---|
|  |  |  | s.shop_name, | 
|---|
|  |  |  | o.order_type | 
|---|
|  |  |  | from shop_order o | 
|---|
|  |  |  | LEFT JOIN shop_store s on o.store_id = s.store_id | 
|---|
|  |  |  | LEFT JOIN sys_shop_info s on o.store_id = s.ID | 
|---|
|  |  |  | where del_flag = 2 and o.company_id  = #{record.companyId} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <if test="record != null"> | 
|---|
|  |  |  | 
|---|
|  |  |  | and  o.order_status = #{record.orderStatus} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="(record.storeName!=null and record.storeName!='')"> | 
|---|
|  |  |  | and s.store_name like concat('%', #{record.storeName}, '%') | 
|---|
|  |  |  | and s.shop_name like concat('%', #{record.storeName}, '%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> | 
|---|
|  |  |  | 
|---|
|  |  |  | group by order_status | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectShopOrderByOrderNo"  resultType="com.matrix.system.shopXcx.bean.ShopOrder"  > | 
|---|
|  |  |  | select | 
|---|
|  |  |  | a.* | 
|---|
|  |  |  | from shop_order a | 
|---|
|  |  |  | where a.order_no=#{orderNo} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <update id="batchUpdateOrderStatus"> | 
|---|
|  |  |  | <foreach collection="list" index="index" item="item" separator=";"> | 
|---|
|  |  |  | update shop_order set order_status=#{item.orderStatus} | 
|---|