From 95f9ea7eb339c36cade6c67d0385c49ec2d81477 Mon Sep 17 00:00:00 2001 From: 935090232@qq.com <ak473600000> Date: Wed, 14 Apr 2021 19:39:45 +0800 Subject: [PATCH] Merge branch 'score_shop' into api_score_meger --- zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml | 69 ++++++++++++++++++---------------- 1 files changed, 36 insertions(+), 33 deletions(-) diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml index 8ec31fb..ba616cb 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml @@ -33,7 +33,12 @@ <result property="storeName" column="shop_name" /> <result property="orderType" column="order_type" /> <result property="applyStatus" column="apply_status" /> + <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> @@ -44,6 +49,7 @@ <result property="createTime" column="create_time" /> <result property="updateBy" column="update_by" /> <result property="updateTime" column="update_time" /> + <result property="payMethod" column="pay_method" /> <result property="orderNo" column="order_no" /> <result property="orderMoney" column="order_money" /> <result property="commodityPrice" column="commodity_price" /> @@ -66,6 +72,7 @@ <result property="postage" column="postage" /> <result property="orderType" column="order_type" /> <result property="storeName" column="shop_name" /> + <result property="scorePay" column="score_pay" /> <result property="companyId" column="company_id" /> <result property="activityType" column="activity_type" /> <!--支付时间--> @@ -127,6 +134,9 @@ postage, order_type, activity_type, +score_pay, + + pay_method, company_id </sql> @@ -159,6 +169,8 @@ #{item.postage}, #{item.orderType}, #{item.activityType}, + #{item.scorePay}, + #{item.payMethod}, #{item.companyId} </sql> @@ -235,6 +247,7 @@ <if test="(record.companyId!=null and record.companyId!='') or (record.companyId!='' and record.companyId==0) "> and company_id = #{record.companyId} </if> + </if> </sql> @@ -337,6 +350,9 @@ <if test="_parameter.containsKey('orderType')"> order_type = #{orderType}, </if> + <if test="_parameter.containsKey('scorePay')"> + score_pay = #{scorePay}, + </if> </set> WHERE id=#{id} </update> @@ -405,6 +421,9 @@ </if> <if test="record.postage != null and record.postage != '' "> postage = #{record.postage}, + </if> + <if test="record.scorePay != null and record.scorePay != '' "> + score_pay = #{record.scorePay}, </if> <if test="true"> update_time = now(), @@ -529,36 +548,10 @@ </select> <!-- 分页查询 --> - <select id="selectInPageByQuery" resultMap="ShopOrderMap"> + <select id="selectInPageByQuery" resultMap="ShopOrderComplexMap"> select - 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, - s.shop_name, - o.order_type, - o.apply_status + o.*, + s.shop_name from shop_order o INNER JOIN sys_shop_info s on o.store_id = s.ID where del_flag = 2 and o.company_id = #{record.companyId} @@ -587,6 +580,8 @@ <if test="(record.shopId!=null and record.shopId!='')"> and o.store_id=#{record.shopId} </if> + + </if> <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> <if test="pageVo.sort !=null and pageVo.order !=null"> @@ -628,10 +623,11 @@ o.wx_order_no, o.pay_result, o.postage, - s.store_name, + 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"> @@ -654,7 +650,7 @@ 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对象是否为空 --> @@ -756,10 +752,17 @@ <select id="selectOrderStatusCount" resultType="java.util.HashMap" > select count(order_status) as count , order_status as orderStatus from shop_order - where user_id=#{openId} + where user_id=#{userId} 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} -- Gitblit v1.9.1