传文件上来看一下
ds5的语句:
select distinct pay_type from one_acc_detail where
where 1=1
${if(len(fee_sort)=0,"","and fee_sort in('"+ fee_sort + "')")}
${if(len(fee_type)=0,"","and fee_type in('"+ fee_type + "')")}
d4的语句:
select fee_type from one_acc_detail where 1=1
${if(len(fee_sort)=0,"","and fee_sort in('"+ fee_sort + "')")}
d2的语句
SELECT
businesses,
fee_type,
fee_sort,
pay_type,
COUNT( 1 ) as 笔数,
round(sum(should_amount),2) as 应收金额,
round(sum(counter_fee),2) as 手续费,
round(sum(pay_amount),2) as 实收金额
FROM
one_acc_detail a
where
a.pay_time>="${startTime}"
and a.pay_time<"${endTime}"
and a.fee_sort in ('${feeSort}')
and a.fee_type in ('${feeType}')
and a.pay_type in ('${payType}')
GROUP BY
businesses,
fee_type,
fee_sort,
pay_type
ORDER BY
businesses,
fee_sort
ds1的语句
SELECT
*
FROM
one_acc_detail a
WHERE
a.pay_time>="${startTime}"
and a.pay_time<"${endTime}"
and a.fee_sort in ('${feeSort}')
and a.fee_type in ('${feeType}')
and a.pay_type in ('${payType}')
order by a.pay_time asc