|
@@ -76,73 +76,73 @@
|
|
|
|
|
|
<select id="getAll" resultMap="getAllMap">
|
|
|
select t_order.c_id,
|
|
|
- t_order.order_no,
|
|
|
- t_order.atlas_add,
|
|
|
- t_order.pay_type,
|
|
|
- t_order.c_js_id,
|
|
|
- t_order.tape,
|
|
|
- t_order.fare,
|
|
|
- t_order.total_price,
|
|
|
- t_order.parent_no,
|
|
|
- t_order.c_open_id,
|
|
|
- t_order.c_goods,
|
|
|
- t_order.d_total_money,
|
|
|
- t_order.n_status,
|
|
|
- t_order.c_address,
|
|
|
- t_order.c_name,
|
|
|
- t_order.c_phone,
|
|
|
- t_order.c_note,
|
|
|
- t_order.c_time,
|
|
|
- t_order.timeout_cause,
|
|
|
- t_order.name,
|
|
|
- t_order.latitude,
|
|
|
- t_order.longitude,
|
|
|
- t_order.address,
|
|
|
- t_order.c_tj_open_id,
|
|
|
- t_order.dt_create_time,
|
|
|
- t_order.acceptance_time,
|
|
|
- t_order.reach_time,
|
|
|
- t_order.start_time,
|
|
|
- t_order.arrival_longitude,
|
|
|
- t_order.arrival_latitude,
|
|
|
- t_order.depart_longitude,
|
|
|
- t_order.depart_latitude,
|
|
|
- t_order.arrival_photo,
|
|
|
- t_order.depart_time,
|
|
|
- t_order.end_time,
|
|
|
- t_order.reason_refusal,
|
|
|
- t_js.c_open_id as jsc_open_id,
|
|
|
- t_js.c_bh_list as jsc_bh_list,
|
|
|
- t_js.c_img_list as jsc_img_list,
|
|
|
- t_js.c_sfz_img as jsc_sfz_img,
|
|
|
- t_js.n_sex as jsn_sex,
|
|
|
- t_js.c_nick_name as jsc_nick_name,
|
|
|
- t_js.c_portrait as jsc_portrait,
|
|
|
- t_js.c_name as jsc_name,
|
|
|
- t_js.c_phone as jsc_phone,
|
|
|
- t_js.c_address as jsc_address,
|
|
|
- t_js.c_jianjie as jsc_jianjie,
|
|
|
- t_js.n_star as jsn_star,
|
|
|
- t_js.n_bili as jsn_bili,
|
|
|
- t_js.n_num as jsn_num,
|
|
|
- t_js.n_status as jsn_status,
|
|
|
- t_js.n_status2 as jsn_status2,
|
|
|
- t_js.n_tong as jsn_tong,
|
|
|
- t_js.c_time as jsc_time,
|
|
|
- t_js.n_b1 as jsn_b1,
|
|
|
- t_js.n_b2 as jsn_b2,
|
|
|
- t_js.n_b3 as jsn_b3,
|
|
|
- t_js.dt_create_time as jsdt_create_time,
|
|
|
- t_wx_user.c_openid as wxUserc_openid,
|
|
|
- t_wx_user.c_icon as wxUsercc_icon,
|
|
|
- t_wx_user.c_nick_name as wxc_nick_name
|
|
|
+ t_order.order_no,
|
|
|
+ t_order.atlas_add,
|
|
|
+ t_order.pay_type,
|
|
|
+ t_order.c_js_id,
|
|
|
+ t_order.tape,
|
|
|
+ t_order.fare,
|
|
|
+ t_order.total_price,
|
|
|
+ t_order.parent_no,
|
|
|
+ t_order.c_open_id,
|
|
|
+ t_order.c_goods,
|
|
|
+ t_order.d_total_money,
|
|
|
+ t_order.n_status,
|
|
|
+ t_order.c_address,
|
|
|
+ t_order.c_name,
|
|
|
+ t_order.c_phone,
|
|
|
+ t_order.c_note,
|
|
|
+ t_order.c_time,
|
|
|
+ t_order.timeout_cause,
|
|
|
+ t_order.name,
|
|
|
+ t_order.latitude,
|
|
|
+ t_order.longitude,
|
|
|
+ t_order.address,
|
|
|
+ t_order.c_tj_open_id,
|
|
|
+ t_order.dt_create_time,
|
|
|
+ t_order.acceptance_time,
|
|
|
+ t_order.reach_time,
|
|
|
+ t_order.start_time,
|
|
|
+ t_order.arrival_longitude,
|
|
|
+ t_order.arrival_latitude,
|
|
|
+ t_order.depart_longitude,
|
|
|
+ t_order.depart_latitude,
|
|
|
+ t_order.arrival_photo,
|
|
|
+ t_order.depart_time,
|
|
|
+ t_order.end_time,
|
|
|
+ t_order.reason_refusal,
|
|
|
+ t_js.c_open_id as jsc_open_id,
|
|
|
+ t_js.c_bh_list as jsc_bh_list,
|
|
|
+ t_js.c_img_list as jsc_img_list,
|
|
|
+ t_js.c_sfz_img as jsc_sfz_img,
|
|
|
+ t_js.n_sex as jsn_sex,
|
|
|
+ t_js.c_nick_name as jsc_nick_name,
|
|
|
+ t_js.c_portrait as jsc_portrait,
|
|
|
+ t_js.c_name as jsc_name,
|
|
|
+ t_js.c_phone as jsc_phone,
|
|
|
+ t_js.c_address as jsc_address,
|
|
|
+ t_js.c_jianjie as jsc_jianjie,
|
|
|
+ t_js.n_star as jsn_star,
|
|
|
+ t_js.n_bili as jsn_bili,
|
|
|
+ t_js.n_num as jsn_num,
|
|
|
+ t_js.n_status as jsn_status,
|
|
|
+ t_js.n_status2 as jsn_status2,
|
|
|
+ t_js.n_tong as jsn_tong,
|
|
|
+ t_js.c_time as jsc_time,
|
|
|
+ t_js.n_b1 as jsn_b1,
|
|
|
+ t_js.n_b2 as jsn_b2,
|
|
|
+ t_js.n_b3 as jsn_b3,
|
|
|
+ t_js.dt_create_time as jsdt_create_time,
|
|
|
+ t_wx_user.c_openid as wxUserc_openid,
|
|
|
+ t_wx_user.c_icon as wxUsercc_icon,
|
|
|
+ t_wx_user.c_nick_name as wxc_nick_name
|
|
|
from t_order
|
|
|
- left join
|
|
|
- t_js on
|
|
|
- t_order.c_js_id = t_js.id
|
|
|
- left join
|
|
|
- t_wx_user on
|
|
|
- t_wx_user.c_openid = t_order.c_open_id
|
|
|
+ left join
|
|
|
+ t_js on
|
|
|
+ t_order.c_js_id = t_js.id
|
|
|
+ left join
|
|
|
+ t_wx_user on
|
|
|
+ t_wx_user.c_openid = t_order.c_open_id
|
|
|
<where>
|
|
|
t_order.is_delete = 0 and t_js.is_delete = 0 and t_wx_user.is_delete = 0
|
|
|
<if test="param.cId != null and param.cId != ''">
|
|
@@ -151,6 +151,18 @@
|
|
|
<if test="param.cName != null and param.cName != ''">
|
|
|
and t_order.c_name like concat('%',#{param.cName},'%')
|
|
|
</if>
|
|
|
+ <if test="param.cNickName != null and param.cNickName != ''">
|
|
|
+ and t_js.c_nick_name like concat('%',#{param.cNickName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="param.jsName != null and param.jsName != ''">
|
|
|
+ and t_js.c_name like concat('%',#{param.jsName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="param.jsPhone != null and param.jsPhone != ''">
|
|
|
+ and t_js.c_phone like concat('%',#{param.jsPhone},'%')
|
|
|
+ </if>
|
|
|
+ <if test="param.cPhone != null and param.cPhone != ''">
|
|
|
+ and t_order.c_phone = #{cPhone}
|
|
|
+ </if>
|
|
|
<if test="param.orderNo != null and param.orderNo != ''">
|
|
|
and t_order.order_no = #{ param.orderNo }
|
|
|
</if>
|
|
@@ -171,51 +183,40 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
order by
|
|
|
- t_order.dt_create_time desc
|
|
|
+ t_order.dt_create_time desc
|
|
|
</select>
|
|
|
<select id="getOrderNum" resultType="java.lang.Integer">
|
|
|
- SELECT
|
|
|
- count( 1 )
|
|
|
- FROM
|
|
|
- t_order
|
|
|
- WHERE
|
|
|
- is_delete = 0
|
|
|
+ SELECT count(1)
|
|
|
+ FROM t_order
|
|
|
+ WHERE is_delete = 0
|
|
|
AND c_js_id = #{jsid}
|
|
|
AND end_time BETWEEN #{startDate} AND #{endDate}
|
|
|
- AND n_status in(4,5)
|
|
|
+ AND n_status in (4, 5)
|
|
|
</select>
|
|
|
<select id="getAddNum" resultType="java.lang.Integer">
|
|
|
- SELECT
|
|
|
- count( 1 )
|
|
|
- FROM
|
|
|
- t_order
|
|
|
- WHERE
|
|
|
- is_delete = 0
|
|
|
+ SELECT count(1)
|
|
|
+ FROM t_order
|
|
|
+ WHERE is_delete = 0
|
|
|
AND c_js_id = #{jsid}
|
|
|
AND end_time BETWEEN #{startDate} AND #{endDate}
|
|
|
- AND n_status in(4,5) and order_type = 1
|
|
|
+ AND n_status in (4, 5)
|
|
|
+ and order_type = 1
|
|
|
</select>
|
|
|
<select id="getUpgradeNum" resultType="java.lang.Integer">
|
|
|
- SELECT
|
|
|
- count( 1 )
|
|
|
- FROM
|
|
|
- t_order
|
|
|
- WHERE
|
|
|
- is_delete = 0
|
|
|
+ SELECT count(1)
|
|
|
+ FROM t_order
|
|
|
+ WHERE is_delete = 0
|
|
|
AND c_js_id = #{jsid}
|
|
|
AND end_time BETWEEN #{startDate} AND #{endDate}
|
|
|
- AND n_status in(4,5) and order_type = 2
|
|
|
+ AND n_status in (4, 5)
|
|
|
+ and order_type = 2
|
|
|
</select>
|
|
|
-
|
|
|
- <select id="getTurnover">
|
|
|
- SELECT
|
|
|
- sum(total_price)
|
|
|
- FROM
|
|
|
- t_order
|
|
|
- WHERE
|
|
|
- is_delete = 0
|
|
|
+ <select id="getTurnover" resultType="java.math.BigDecimal">
|
|
|
+ SELECT sum(total_price)
|
|
|
+ FROM t_order
|
|
|
+ WHERE is_delete = 0
|
|
|
AND c_js_id = #{jsid}
|
|
|
AND end_time BETWEEN #{startDate} AND #{endDate}
|
|
|
- AND n_status in(4,5)
|
|
|
+ AND n_status in (4, 5)
|
|
|
</select>
|
|
|
</mapper>
|