xiaoyong931011
2021-06-29 13f17e5f0f2bc304dbfbfd62e31786fd5ec26dd9
gc-shop/src/main/resources/mapper/shop/JhyOrderMapper.xml
@@ -14,12 +14,12 @@
        a.remark remark,
        b.nick_name name,
        b.mobile_phone mobilePhone,
               (select ifnull(sum(price),0) from xzx_jhy_order_items where order_id = a.id) totalPrice,
               (select ifnull(sum(price*weight*40),0) from xzx_jhy_order_items where order_id = a.id) totalPrice,
        d.username username
        FROM
        xzx_jhy_order a
        left join xzx_user_info b on b.user_id = a.user_id
        left join xzx_jhy_info d on d.id = a.jhy_id
        left join xzx_jhy_info d on d.user_id = a.jhy_id
        WHERE 1 = 1
        <if test="record.orderNo != null and record.orderNo != ''">
            and a.order_no like concat('%',#{record.orderNo},'%')
@@ -29,7 +29,7 @@
        </if>
        <if test="record.account != null and record.account != ''">
            and ( b.nick_name like concat('%',#{record.account},'%')
                      or b.mobile_phone like concat('%',#{record.account},'%') )
                      or b.mobile_phone like concat('%',#{record.accountPhone},'%') )
        </if>
        <if test="record.reserveTimeStart != null">
            and a.reserve_time >= #{record.reserveTimeStart}
@@ -64,7 +64,7 @@
        FROM
        xzx_jhy_order a
        left join xzx_user_info b on b.user_id = a.user_id
        left join xzx_jhy_info d on d.id = a.jhy_id
        left join xzx_jhy_info d on d.user_id = a.jhy_id
        WHERE a.id=#{id}
    </select>