客户体征相关

This commit is contained in:
xiezhijun
2021-01-27 18:54:05 +08:00
parent 9c899e344e
commit badf491694
8 changed files with 274 additions and 73 deletions

View File

@ -60,8 +60,10 @@
SELECT SUM(amount) FROM sys_order
<where>
<if test="orderId != null and orderId != ''">and order_id = #{orderId}</if>
<if test="customer != null and customer != ''">and customer = #{customer}</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="customer != null and customer != ''">
and (customer like concat('%',#{customer},'%') or phone like concat('%',#{customer},'%'))
</if>
<!-- <if test="phone != null and phone != ''">and phone = #{phone}</if>-->
<if test="status != null ">and status = #{status}</if>
<if test="payTypeId != null ">and pay_type_id = #{payTypeId}</if>
<if test="preSaleId != null ">and pre_sale_id = #{preSaleId}</if>
@ -78,7 +80,14 @@
<if test="endTime != null and endTime != ''">and date_format(order_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')</if>
<if test="serveTimeId != null ">and serve_time_id = #{serveTimeId}</if>
<if test="reviewStatus != null ">and review_status = #{reviewStatus}</if>
<if test="serveTimeId != null ">and serve_time_id = #{serveTimeId}</if>
<if test="amountFlag != null">
<if test="amountFlag == 0">
and amount >= 0
</if>
<if test="amountFlag == 1">
and 0 > amount
</if>
</if>
</where>
</select>
@ -86,8 +95,10 @@
<include refid="selectSysOrderVo"/>
<where>
<if test="orderId != null and orderId != ''">and order_id = #{orderId}</if>
<if test="customer != null and customer != ''">and customer = #{customer}</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="customer != null and customer != ''">
and (customer like concat('%',#{customer},'%') or phone like concat('%',#{customer},'%'))
</if>
<!--<if test="phone != null and phone != ''">and phone = #{phone}</if>-->
<if test="status != null ">and status = #{status}</if>
<if test="payTypeId != null ">and pay_type_id = #{payTypeId}</if>
<if test="preSaleId != null ">and pre_sale_id = #{preSaleId}</if>
@ -104,6 +115,14 @@
<if test="endTime != null and endTime != ''">and date_format(order_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')</if>
<if test="serveTimeId != null ">and serve_time_id = #{serveTimeId}</if>
<if test="reviewStatus != null ">and review_status = #{reviewStatus}</if>
<if test="amountFlag != null">
<if test="amountFlag == 0">
and amount >= 0
</if>
<if test="amountFlag == 1">
and 0 > amount
</if>
</if>
</where>
order by order_time desc
</select>