|
|
@@ -40,16 +40,11 @@
|
|
|
<result property="modifyTime" column="modify_time"/>
|
|
|
<result property="evaluationTime" column="evaluation_time"/>
|
|
|
<result property="presaleTime" column="presale_time"/>
|
|
|
- <result property="groupHead" column="group_head"/>
|
|
|
- <result property="groupId" column="group_id"/>
|
|
|
- <result property="groupMarketingId" column="group_marketing_id"/>
|
|
|
- <result property="groupSkuId" column="group_sku_id"/>
|
|
|
- <result property="groupStatus" column="group_status"/>
|
|
|
- <result property="groupNum" column="group_num"/>
|
|
|
+
|
|
|
<result property="openGroupTime" column="open_group_time"/>
|
|
|
- <result property="autoHandleStatus" column="auto_handle_status"/>
|
|
|
+ <result column="customer_name" property="customerName"/>
|
|
|
+
|
|
|
<result property="recommended" column="recommended"/>
|
|
|
- <result property="crowdfundingId" column="crowdfunding_id"/>
|
|
|
<result property="lotteryStatus" column="lottery_status"/>
|
|
|
<result property="writeOffCode" column="write_off_code"/>
|
|
|
<result property="communityBuyCustomerId" column="community_buy_customer_id"/>
|
|
|
@@ -61,8 +56,6 @@
|
|
|
<result property="dealerInfo" column="dealer_info"/>
|
|
|
<result property="payChannel" column="pay_channel"/>
|
|
|
<result property="skuType" column="sku_type"/>
|
|
|
- <result property="jetourSendFlag" column="jetour_send_flag"/>
|
|
|
- <result property="incomingUrl" column="incoming_url"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
@@ -118,6 +111,7 @@
|
|
|
profit,
|
|
|
community_name,
|
|
|
community_buy_name,
|
|
|
+ bill_no,
|
|
|
dealer_id,
|
|
|
dealer_info,
|
|
|
pay_channel,
|
|
|
@@ -195,6 +189,7 @@
|
|
|
<if test="profit != null">profit,</if>
|
|
|
<if test="communityName != null">community_name,</if>
|
|
|
<if test="communityBuyName != null">community_buy_name,</if>
|
|
|
+ <if test="billNo != null">bill_no,</if>
|
|
|
<if test="dealerId != null">dealer_id,</if>
|
|
|
<if test="dealerInfo != null">dealer_info,</if>
|
|
|
<if test="payChannel != null">pay_channel,</if>
|
|
|
@@ -255,6 +250,7 @@
|
|
|
<if test="profit != null">#{profit},</if>
|
|
|
<if test="communityName != null">#{communityName},</if>
|
|
|
<if test="communityBuyName != null">#{communityBuyName},</if>
|
|
|
+ <if test="billNo != null">#{billNo},</if>
|
|
|
<if test="dealerId != null">#{dealerId},</if>
|
|
|
<if test="dealerInfo != null">#{dealerInfo},</if>
|
|
|
<if test="payChannel != null">#{payChannel},</if>
|
|
|
@@ -268,6 +264,7 @@
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.pine.admin.modules.business.entity.Order">
|
|
|
update ls_order
|
|
|
<set>
|
|
|
+ <if test="id != null">id = #{id},</if>
|
|
|
<if test="orderCode != null">order_code = #{orderCode},</if>
|
|
|
<if test="masterOrderCode != null">master_order_code = #{masterOrderCode},</if>
|
|
|
<if test="customerId != null">customer_id = #{customerId},</if>
|
|
|
@@ -319,6 +316,7 @@
|
|
|
<if test="profit != null">profit = #{profit},</if>
|
|
|
<if test="communityName != null">community_name = #{communityName},</if>
|
|
|
<if test="communityBuyName != null">community_buy_name = #{communityBuyName},</if>
|
|
|
+ <if test="billNo != null">bill_no = #{billNo},</if>
|
|
|
<if test="dealerId != null">dealer_id = #{dealerId},</if>
|
|
|
<if test="dealerInfo != null">dealer_info = #{dealerInfo},</if>
|
|
|
<if test="payChannel != null">pay_channel = #{payChannel},</if>
|
|
|
@@ -332,186 +330,57 @@
|
|
|
<!-- 分页查询-->
|
|
|
<select id="queryByPage" parameterType="java.util.Map"
|
|
|
resultMap="entityMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- from ls_order
|
|
|
- <where>
|
|
|
- <if test="record.id != null and !"".equals(record.id)">
|
|
|
- and id = #{record.id}
|
|
|
- </if>
|
|
|
- <if test="record.orderCode != null and !"".equals(record.orderCode)">
|
|
|
- and order_code = #{record.orderCode}
|
|
|
- </if>
|
|
|
- <if test="record.masterOrderCode != null and !"".equals(record.masterOrderCode)">
|
|
|
- and master_order_code = #{record.masterOrderCode}
|
|
|
- </if>
|
|
|
- <if test="record.customerId != null and !"".equals(record.customerId)">
|
|
|
- and customer_id = #{record.customerId}
|
|
|
- </if>
|
|
|
- <if test="record.price != null and !"".equals(record.price)">
|
|
|
- and price = #{record.price}
|
|
|
- </if>
|
|
|
- <if test="record.presalePrice != null and !"".equals(record.presalePrice)">
|
|
|
- and presale_price = #{record.presalePrice}
|
|
|
- </if>
|
|
|
- <if test="record.originalPrice != null and !"".equals(record.originalPrice)">
|
|
|
- and original_price = #{record.originalPrice}
|
|
|
- </if>
|
|
|
- <if test="record.freightPrice != null and !"".equals(record.freightPrice)">
|
|
|
- and freight_price = #{record.freightPrice}
|
|
|
- </if>
|
|
|
- <if test="record.modifyPrice != null and !"".equals(record.modifyPrice)">
|
|
|
- and modify_price = #{record.modifyPrice}
|
|
|
- </if>
|
|
|
- <if test="record.pointPrice != null and !"".equals(record.pointPrice)">
|
|
|
- and point_price = #{record.pointPrice}
|
|
|
- </if>
|
|
|
- <if test="record.couponPrice != null and !"".equals(record.couponPrice)">
|
|
|
- and coupon_price = #{record.couponPrice}
|
|
|
- </if>
|
|
|
- <if test="record.redEnvelopePrice != null and !"".equals(record.redEnvelopePrice)">
|
|
|
- and red_envelope_price = #{record.redEnvelopePrice}
|
|
|
- </if>
|
|
|
- <if test="record.concessionalRate != null and !"".equals(record.concessionalRate)">
|
|
|
- and concessional_rate = #{record.concessionalRate}
|
|
|
- </if>
|
|
|
- <if test="record.status != null and !"".equals(record.status)">
|
|
|
- and status = #{record.status}
|
|
|
- </if>
|
|
|
- <if test="record.presaleStatus != null and !"".equals(record.presaleStatus)">
|
|
|
- and presale_status = #{record.presaleStatus}
|
|
|
- </if>
|
|
|
- <if test="record.evaluationStatus != null and !"".equals(record.evaluationStatus)">
|
|
|
- and evaluation_status = #{record.evaluationStatus}
|
|
|
- </if>
|
|
|
- <if test="record.redEnvelopeCode != null and !"".equals(record.redEnvelopeCode)">
|
|
|
- and red_envelope_code = #{record.redEnvelopeCode}
|
|
|
- </if>
|
|
|
- <if test="record.couponNo != null and !"".equals(record.couponNo)">
|
|
|
- and coupon_no = #{record.couponNo}
|
|
|
- </if>
|
|
|
- <if test="record.usePoint != null and !"".equals(record.usePoint)">
|
|
|
- and use_point = #{record.usePoint}
|
|
|
- </if>
|
|
|
- <if test="record.payType != null and !"".equals(record.payType)">
|
|
|
- and pay_type = #{record.payType}
|
|
|
- </if>
|
|
|
- <if test="record.storeId != null and !"".equals(record.storeId)">
|
|
|
- and store_id = #{record.storeId}
|
|
|
- </if>
|
|
|
- <if test="record.cancelReson != null and !"".equals(record.cancelReson)">
|
|
|
- and cancel_reson = #{record.cancelReson}
|
|
|
- </if>
|
|
|
- <if test="record.predepositPay != null and !"".equals(record.predepositPay)">
|
|
|
- and predeposit_pay = #{record.predepositPay}
|
|
|
- </if>
|
|
|
- <if test="record.source != null and !"".equals(record.source)">
|
|
|
- and source = #{record.source}
|
|
|
- </if>
|
|
|
- <if test="record.freightTemplateId != null and !"".equals(record.freightTemplateId)">
|
|
|
- and freight_template_id = #{record.freightTemplateId}
|
|
|
- </if>
|
|
|
- <if test="record.waybillCode != null and !"".equals(record.waybillCode)">
|
|
|
- and waybill_code = #{record.waybillCode}
|
|
|
- </if>
|
|
|
- <if test="record.orderType != null and !"".equals(record.orderType)">
|
|
|
- and order_type = #{record.orderType}
|
|
|
- </if>
|
|
|
- <if test="record.createTime != null and !"".equals(record.createTime)">
|
|
|
- and create_time = #{record.createTime}
|
|
|
- </if>
|
|
|
- <if test="record.payTime != null and !"".equals(record.payTime)">
|
|
|
- and pay_time = #{record.payTime}
|
|
|
- </if>
|
|
|
- <if test="record.deliveryTime != null and !"".equals(record.deliveryTime)">
|
|
|
- and delivery_time = #{record.deliveryTime}
|
|
|
- </if>
|
|
|
- <if test="record.receivingTime != null and !"".equals(record.receivingTime)">
|
|
|
- and receiving_time = #{record.receivingTime}
|
|
|
- </if>
|
|
|
- <if test="record.cancelTime != null and !"".equals(record.cancelTime)">
|
|
|
- and cancel_time = #{record.cancelTime}
|
|
|
- </if>
|
|
|
- <if test="record.modifyTime != null and !"".equals(record.modifyTime)">
|
|
|
- and modify_time = #{record.modifyTime}
|
|
|
- </if>
|
|
|
- <if test="record.evaluationTime != null and !"".equals(record.evaluationTime)">
|
|
|
- and evaluation_time = #{record.evaluationTime}
|
|
|
- </if>
|
|
|
- <if test="record.presaleTime != null and !"".equals(record.presaleTime)">
|
|
|
- and presale_time = #{record.presaleTime}
|
|
|
- </if>
|
|
|
- <if test="record.groupHead != null and !"".equals(record.groupHead)">
|
|
|
- and group_head = #{record.groupHead}
|
|
|
- </if>
|
|
|
- <if test="record.groupId != null and !"".equals(record.groupId)">
|
|
|
- and group_id = #{record.groupId}
|
|
|
- </if>
|
|
|
- <if test="record.groupMarketingId != null and !"".equals(record.groupMarketingId)">
|
|
|
- and group_marketing_id = #{record.groupMarketingId}
|
|
|
- </if>
|
|
|
- <if test="record.groupSkuId != null and !"".equals(record.groupSkuId)">
|
|
|
- and group_sku_id = #{record.groupSkuId}
|
|
|
- </if>
|
|
|
- <if test="record.groupStatus != null and !"".equals(record.groupStatus)">
|
|
|
- and group_status = #{record.groupStatus}
|
|
|
- </if>
|
|
|
- <if test="record.groupNum != null and !"".equals(record.groupNum)">
|
|
|
- and group_num = #{record.groupNum}
|
|
|
- </if>
|
|
|
- <if test="record.openGroupTime != null and !"".equals(record.openGroupTime)">
|
|
|
- and open_group_time = #{record.openGroupTime}
|
|
|
- </if>
|
|
|
- <if test="record.autoHandleStatus != null and !"".equals(record.autoHandleStatus)">
|
|
|
- and auto_handle_status = #{record.autoHandleStatus}
|
|
|
- </if>
|
|
|
- <if test="record.recommended != null and !"".equals(record.recommended)">
|
|
|
- and recommended = #{record.recommended}
|
|
|
- </if>
|
|
|
- <if test="record.crowdfundingId != null and !"".equals(record.crowdfundingId)">
|
|
|
- and crowdfunding_id = #{record.crowdfundingId}
|
|
|
- </if>
|
|
|
- <if test="record.lotteryStatus != null and !"".equals(record.lotteryStatus)">
|
|
|
- and lottery_status = #{record.lotteryStatus}
|
|
|
- </if>
|
|
|
- <if test="record.writeOffCode != null and !"".equals(record.writeOffCode)">
|
|
|
- and write_off_code = #{record.writeOffCode}
|
|
|
- </if>
|
|
|
- <if test="record.communityBuyCustomerId != null and !"".equals(record.communityBuyCustomerId)">
|
|
|
- and community_buy_customer_id = #{record.communityBuyCustomerId}
|
|
|
- </if>
|
|
|
- <if test="record.communityBuyId != null and !"".equals(record.communityBuyId)">
|
|
|
- and community_buy_id = #{record.communityBuyId}
|
|
|
- </if>
|
|
|
- <if test="record.profit != null and !"".equals(record.profit)">
|
|
|
- and profit = #{record.profit}
|
|
|
- </if>
|
|
|
- <if test="record.communityName != null and !"".equals(record.communityName)">
|
|
|
- and community_name = #{record.communityName}
|
|
|
- </if>
|
|
|
- <if test="record.communityBuyName != null and !"".equals(record.communityBuyName)">
|
|
|
- and community_buy_name = #{record.communityBuyName}
|
|
|
- </if>
|
|
|
- <if test="record.dealerId != null and !"".equals(record.dealerId)">
|
|
|
- and dealer_id = #{record.dealerId}
|
|
|
- </if>
|
|
|
- <if test="record.dealerInfo != null and !"".equals(record.dealerInfo)">
|
|
|
- and dealer_info = #{record.dealerInfo}
|
|
|
- </if>
|
|
|
- <if test="record.payChannel != null and !"".equals(record.payChannel)">
|
|
|
- and pay_channel = #{record.payChannel}
|
|
|
- </if>
|
|
|
- <if test="record.skuType != null and !"".equals(record.skuType)">
|
|
|
- and sku_type = #{record.skuType}
|
|
|
- </if>
|
|
|
- <if test="record.jetourSendFlag != null and !"".equals(record.jetourSendFlag)">
|
|
|
- and jetour_send_flag = #{record.jetourSendFlag}
|
|
|
- </if>
|
|
|
- <if test="record.incomingUrl != null and !"".equals(record.incomingUrl)">
|
|
|
- and incoming_url = #{record.incomingUrl}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- order by id desc
|
|
|
+ select ls_order.*,ls_customer.username as customer_name from ls_order join ls_customer on ls_order.customer_id =
|
|
|
+ ls_customer.id where ls_customer.del_flag = '0'
|
|
|
+ and ls_order.store_id = 0
|
|
|
+ <if test="record.orderCode != null and record.orderCode != '' ">
|
|
|
+ AND ls_order.order_code = #{record.orderCode}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="record.customerName != null and record.customerName != ''">
|
|
|
+ AND ls_customer.username like CONCAT(CONCAT('%', #{record.customerName}),'%')
|
|
|
+ </if>
|
|
|
+
|
|
|
+
|
|
|
+ <if test="record.customerId != null and record.customerId != ''">
|
|
|
+ AND ls_order.id=#{record.customerId}
|
|
|
+ </if>
|
|
|
+ <if test="record.dealerId != null and record.dealerId != ''">
|
|
|
+ AND ls_order.dealer_id=#{record.dealerId}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="record.payType != null and record.payType != '' ">
|
|
|
+ AND ls_order.pay_type = #{record.payType}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test='record.status != null and record.status != "" and record.status!= "5"'>
|
|
|
+ AND ls_order.status = #record.{status}
|
|
|
+ </if>
|
|
|
+ <if test='record.status=="5"'>
|
|
|
+ AND ls_order.status in ('5','6','7')
|
|
|
+ AND ls_order.order_type in ('0','1','2','3','7')
|
|
|
+ </if>
|
|
|
+ <if test="record.startTime!=''and record.startTime!=null">
|
|
|
+ AND ls_order.create_time >=#{record.startTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="record.endTime!=''and record.endTime!=null">
|
|
|
+ AND ls_order.create_time <=#{record.endTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="record.orderType!=null and record.orderType !=''">
|
|
|
+ AND ls_order.order_type=#{record.orderType}
|
|
|
+ </if>
|
|
|
+ <if test='record.status !="5"'>
|
|
|
+ AND ls_order.order_type in ('0','1','2','7')
|
|
|
+ </if>
|
|
|
+ <choose>
|
|
|
+ <when test="record.orderType ==1 ||record.orderType==2">
|
|
|
+ order by ls_order.pay_time desc
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ order by ls_order.create_time desc
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+
|
|
|
</select>
|
|
|
|
|
|
<!-- 全部查询 -->
|
|
|
@@ -521,6 +390,7 @@
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from ls_order
|
|
|
<where>
|
|
|
+ and del_flag = 'N'
|
|
|
<if test="id != null and !"".equals(id)">
|
|
|
and id = #{id}
|
|
|
</if>
|
|
|
@@ -677,6 +547,9 @@
|
|
|
<if test="communityBuyName != null and !"".equals(communityBuyName)">
|
|
|
and community_buy_name = #{communityBuyName}
|
|
|
</if>
|
|
|
+ <if test="billNo != null and !"".equals(billNo)">
|
|
|
+ and bill_no = #{billNo}
|
|
|
+ </if>
|
|
|
<if test="dealerId != null and !"".equals(dealerId)">
|
|
|
and dealer_id = #{dealerId}
|
|
|
</if>
|
|
|
@@ -706,6 +579,7 @@
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from ls_order
|
|
|
<where>
|
|
|
+ and del_flag = 'N'
|
|
|
<if test="id != null and !"".equals(id)">
|
|
|
and id = #{id}
|
|
|
</if>
|
|
|
@@ -862,6 +736,9 @@
|
|
|
<if test="communityBuyName != null and !"".equals(communityBuyName)">
|
|
|
and community_buy_name = #{communityBuyName}
|
|
|
</if>
|
|
|
+ <if test="billNo != null and !"".equals(billNo)">
|
|
|
+ and bill_no = #{billNo}
|
|
|
+ </if>
|
|
|
<if test="dealerId != null and !"".equals(dealerId)">
|
|
|
and dealer_id = #{dealerId}
|
|
|
</if>
|