|
@@ -44,6 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="carNo" column="car_no" />
|
|
<result property="carNo" column="car_no" />
|
|
<result property="customerPhone" column="customer_phone" />
|
|
<result property="customerPhone" column="customer_phone" />
|
|
<result property="customerGrade" column="customer_grade" />
|
|
<result property="customerGrade" column="customer_grade" />
|
|
|
|
+ <result property="wxNum" column="wx_num" />
|
|
|
|
+ <result property="zfbNum" column="zfb_num" />
|
|
|
|
+ <result property="xjNum" column="xj_num" />
|
|
|
|
+ <result property="qyAmt" column="qy_amt" />
|
|
|
|
+ <result property="cyAmt" column="cy_amt" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
@@ -92,9 +97,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="carNo != null and carNo != ''"> and car_no = #{carNo}</if>
|
|
<if test="carNo != null and carNo != ''"> and car_no = #{carNo}</if>
|
|
<if test="customerPhone != null and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
|
|
<if test="customerPhone != null and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
|
|
<if test="customerGrade != null and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
|
|
<if test="customerGrade != null and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
|
|
- <if test="likeConsumer != null and likeConsumer != ''"> and customer like concat('%',#{likeConsumer}, '%')</if>
|
|
|
|
|
|
+ <if test="likeConsumer != null and likeConsumer != ''"> and consumer like concat('%',#{likeConsumer}, '%')</if>
|
|
<if test="likeCarNo != null and likeCarNo != ''"> and car_no like concat('%',#{likeCarNo}, '%') </if>
|
|
<if test="likeCarNo != null and likeCarNo != ''"> and car_no like concat('%',#{likeCarNo}, '%') </if>
|
|
<if test="likeCustomerPhone != null and likeCustomerPhone != ''"> and customer_phone like concat('%',#{likeCustomerPhone}, '%') </if>
|
|
<if test="likeCustomerPhone != null and likeCustomerPhone != ''"> and customer_phone like concat('%',#{likeCustomerPhone}, '%') </if>
|
|
|
|
+ <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
|
|
+ AND date_format(created_date,'%y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
|
|
+ AND date_format(created_date,'%y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="stationIdList != null ">
|
|
|
|
+ and station_id in
|
|
|
|
+ <foreach item="item" index="index" collection="stationIdList"
|
|
|
|
+ open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
order by order_id desc
|
|
order by order_id desc
|
|
</select>
|
|
</select>
|
|
@@ -142,6 +160,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="carNo != null and carNo != ''"> and car_no = #{carNo}</if>
|
|
<if test="carNo != null and carNo != ''"> and car_no = #{carNo}</if>
|
|
<if test="customerPhone != null and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
|
|
<if test="customerPhone != null and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
|
|
<if test="customerGrade != null and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
|
|
<if test="customerGrade != null and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
|
|
|
|
+ <if test="stationIdList != null ">
|
|
|
|
+ and station_id in
|
|
|
|
+ <foreach item="item" index="index" collection="stationIdList"
|
|
|
|
+ open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
order by order_id desc
|
|
order by order_id desc
|
|
</select>
|
|
</select>
|
|
@@ -153,6 +178,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
SELECT SUM(amt) as amt,sum(order_liters) as order_liters
|
|
SELECT SUM(amt) as amt,sum(order_liters) as order_liters
|
|
from pay_order
|
|
from pay_order
|
|
<where>
|
|
<where>
|
|
|
|
+ <if test="stationId != null "> and station_id = #{stationId}</if>
|
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
<if test="createdDate != null "> and created_date like concat(#{createdDate}, '%') </if>
|
|
<if test="createdDate != null "> and created_date like concat(#{createdDate}, '%') </if>
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
@@ -160,12 +187,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="stationIdList != null ">
|
|
|
|
+ and station_id in
|
|
|
|
+ <foreach item="item" index="index" collection="stationIdList"
|
|
|
|
+ open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
<select id="selectOilTypeSources" parameterType="Long" resultMap="PayOrderResult">
|
|
<select id="selectOilTypeSources" parameterType="Long" resultMap="PayOrderResult">
|
|
SELECT SUM(amt) as amt,sum(order_liters) as order_liters, oil_type
|
|
SELECT SUM(amt) as amt,sum(order_liters) as order_liters, oil_type
|
|
from pay_order
|
|
from pay_order
|
|
<where>
|
|
<where>
|
|
|
|
+ <if test="stationId != null "> and station_id = #{stationId}</if>
|
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
<if test="createdDate != null "> and created_date = #{createdDate}</if>
|
|
<if test="createdDate != null "> and created_date = #{createdDate}</if>
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
@@ -173,6 +209,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="stationIdList != null ">
|
|
|
|
+ and station_id in
|
|
|
|
+ <foreach item="item" index="index" collection="stationIdList"
|
|
|
|
+ open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
GROUP BY oil_type
|
|
GROUP BY oil_type
|
|
</select>
|
|
</select>
|
|
@@ -180,6 +223,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
SELECT SUM(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt, sum(pos_amt) as pos_amt, sum(xj_amt) as xj_amt,sum(didi_app_amt) as didi_app_amt,sum(ty_app_amt) as ty_app_amt,sum(other_amt) as other_amt,sum(member_amt) as member_amt
|
|
SELECT SUM(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt, sum(pos_amt) as pos_amt, sum(xj_amt) as xj_amt,sum(didi_app_amt) as didi_app_amt,sum(ty_app_amt) as ty_app_amt,sum(other_amt) as other_amt,sum(member_amt) as member_amt
|
|
from pay_order
|
|
from pay_order
|
|
<where>
|
|
<where>
|
|
|
|
+ <if test="stationId != null "> and station_id = #{stationId}</if>
|
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
<if test="createdDate != null "> and created_date = #{createdDate}</if>
|
|
<if test="createdDate != null "> and created_date = #{createdDate}</if>
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
@@ -187,20 +232,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="stationIdList != null ">
|
|
|
|
+ and station_id in
|
|
|
|
+ <foreach item="item" index="index" collection="stationIdList"
|
|
|
|
+ open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
<!--日报数据-->
|
|
<!--日报数据-->
|
|
<select id="selectDayReport" parameterType="Long" resultMap="PayOrderResult">
|
|
<select id="selectDayReport" parameterType="Long" resultMap="PayOrderResult">
|
|
- SELECT date_format( b.pay_date, '%Y-%m-%d' ) as pay_date,sum(b.amt) as amt,sum(b.qyamt) as qy_amt, sum(b.cyamt) as cy_amt,sum(b.order_liters) as order_liters ,count(b.order_no) order_no ,sum(b.member_amt) as menber_amt
|
|
|
|
|
|
+ SELECT date_format( b.created_date, '%Y-%m-%d' ) as created_date,sum(b.amt) as amt,sum(b.qyamt) as qy_amt, sum(b.cyamt) as cy_amt,sum(b.order_liters) as order_liters ,count(b.order_no) order_no ,sum(b.member_amt) as menber_amt,sum(receivable_amt) as receivable_amt,sum(received_amt) as received_amt
|
|
from (SELECT a.*,(SELECT sum(amt) as qyamt from pay_order where order_no=a.order_no and oil_type=2) as qyamt , (SELECT sum(amt) as qyamt from pay_order where order_no=a.order_no and oil_type=1) as cyamt
|
|
from (SELECT a.*,(SELECT sum(amt) as qyamt from pay_order where order_no=a.order_no and oil_type=2) as qyamt , (SELECT sum(amt) as qyamt from pay_order where order_no=a.order_no and oil_type=1) as cyamt
|
|
from pay_order a) b
|
|
from pay_order a) b
|
|
- GROUP BY date_format( pay_date, '%Y-%m-%d' )
|
|
|
|
|
|
+ <where>
|
|
|
|
+ <if test="stationId != null "> and station_id = #{stationId}</if>
|
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
|
|
+ <if test="stationIdList != null ">
|
|
|
|
+ and station_id in
|
|
|
|
+ <foreach item="item" index="index" collection="stationIdList"
|
|
|
|
+ open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ GROUP BY date_format( created_date, '%Y-%m-%d' )
|
|
|
|
+ ORDER BY date_format( created_date, '%Y-%m-%d' ) DESC
|
|
</select>
|
|
</select>
|
|
<!-- 日报折线图油品数据-->
|
|
<!-- 日报折线图油品数据-->
|
|
<select id="listQydata" parameterType="Long" resultMap="PayOrderResult">
|
|
<select id="listQydata" parameterType="Long" resultMap="PayOrderResult">
|
|
SELECT sum(amt) as amt,date_format(created_date,'%Y-%m-%d') as created_date
|
|
SELECT sum(amt) as amt,date_format(created_date,'%Y-%m-%d') as created_date
|
|
from pay_order
|
|
from pay_order
|
|
<where>
|
|
<where>
|
|
|
|
+ <if test="stationId != null "> and station_id = #{stationId}</if>
|
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="oilName != null "> and oil_name = #{oilName}</if>
|
|
<if test="oilName != null "> and oil_name = #{oilName}</if>
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
@@ -208,6 +274,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="stationIdList != null ">
|
|
|
|
+ and station_id in
|
|
|
|
+ <foreach item="item" index="index" collection="stationIdList"
|
|
|
|
+ open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
GROUP BY oil_name ,date_format(created_date,'%Y-%m-%d')
|
|
GROUP BY oil_name ,date_format(created_date,'%Y-%m-%d')
|
|
</select>
|
|
</select>
|
|
@@ -216,15 +289,93 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
SELECT date_format(created_date,'%Y-%m-%d') as created_date
|
|
SELECT date_format(created_date,'%Y-%m-%d') as created_date
|
|
from pay_order
|
|
from pay_order
|
|
<where>
|
|
<where>
|
|
|
|
+ <if test="stationId != null "> and station_id = #{stationId}</if>
|
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
</if>
|
|
</if>
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="stationIdList != null ">
|
|
|
|
+ and station_id in
|
|
|
|
+ <foreach item="item" index="index" collection="stationIdList"
|
|
|
|
+ open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
GROUP BY date_format(created_date,'%Y-%m-%d')
|
|
GROUP BY date_format(created_date,'%Y-%m-%d')
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <!--查询数据,根据员工汇总数据-->
|
|
|
|
+ <select id="selectPersonnelStructure" parameterType="Long" resultMap="PayOrderResult">
|
|
|
|
+ SELECT a.oil_personnel,GROUP_CONCAT(DISTINCT a.oil_gun) as oil_gun,ROUND(SUM(a.amt),2) as amt,ROUND(SUM(order_liters),2) as order_liters,COUNT(order_no) as order_no
|
|
|
|
+ from pay_order a
|
|
|
|
+ <where>
|
|
|
|
+ <if test="stationId != null "> and a.station_id = #{stationId}</if>
|
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
+ <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
|
|
+ AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
|
|
+ AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="stationIdList != null ">
|
|
|
|
+ and station_id in
|
|
|
|
+ <foreach item="item" index="index" collection="stationIdList"
|
|
|
|
+ open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ GROUP BY a.oil_personnel
|
|
|
|
+ </select>
|
|
|
|
+ <!--初始化数据班结数据,根据油品汇总 -->
|
|
|
|
+ <select id="selectOilStructure" parameterType="Long" resultMap="PayOrderResult">
|
|
|
|
+ SELECT a.oil_name,GROUP_CONCAT(DISTINCT oil_gun) as oil_gun,ROUND(SUM(a.amt),2) as amt,ROUND(SUM(order_liters),2) as order_liters,COUNT(order_no) as order_no
|
|
|
|
+ from pay_order a
|
|
|
|
+ <where>
|
|
|
|
+ <if test="stationId != null "> and a.station_id = #{stationId}</if>
|
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
+ <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
|
|
+ AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
|
|
+ AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ GROUP BY a.oil_name
|
|
|
|
+ </select>
|
|
|
|
+ <!--初始化数据班结数据,根据员工/支付方式汇总 -->
|
|
|
|
+ <select id="selectPersonnelPayStructure" parameterType="Long" resultMap="PayOrderResult">
|
|
|
|
+ SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,SUM(xj_amt) xj_amt,sum(member_amt) member_amt
|
|
|
|
+ from pay_order a
|
|
|
|
+ <where>
|
|
|
|
+ <if test="stationId != null "> and a.station_id = #{stationId}</if>
|
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
+ <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
|
|
|
+ AND date_format(created_date,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
|
|
|
+ AND date_format(created_date,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ GROUP BY a.oil_personnel
|
|
|
|
+ </select>
|
|
|
|
+<!--查询本站第一笔数据-->
|
|
|
|
+ <select id="getPayOrderInfoMin" parameterType="Long" resultMap="PayOrderResult">
|
|
|
|
+ SELECT * from pay_order where order_id = (
|
|
|
|
+ SELECT min(order_id)
|
|
|
|
+ from pay_order
|
|
|
|
+ <where>
|
|
|
|
+ <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
|
|
|
+ <if test="stationId != null "> and station_id = #{stationId}</if>
|
|
|
|
+ <if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
+ </where>
|
|
|
|
+ )
|
|
|
|
+ </select>
|
|
<insert id="insertPayOrder" parameterType="PayOrder" useGeneratedKeys="true" keyProperty="orderId">
|
|
<insert id="insertPayOrder" parameterType="PayOrder" useGeneratedKeys="true" keyProperty="orderId">
|
|
insert into pay_order
|
|
insert into pay_order
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|