|
|
|
@@ -27,13 +27,14 @@ |
|
|
|
<result column="starttime" property="starttime"/> |
|
|
|
<result column="endtime" property="endtime"/> |
|
|
|
<result column="freeze" property="freeze"/> |
|
|
|
<result column="build_way" property="buildWay"/> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`, |
|
|
|
`tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`type`, |
|
|
|
`rent_shop_type`,`pay_way`,`price_detail`,`starttime`,`endtime`,freeze |
|
|
|
`rent_shop_type`,`pay_way`,`price_detail`,`starttime`,`endtime`,freeze,build_way |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
@@ -56,6 +57,8 @@ |
|
|
|
<if test=" null != type "> and `type` = #{type} </if> |
|
|
|
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if> |
|
|
|
<if test=" null != payWay ">and `pay_way` = #{payWay}</if> |
|
|
|
<if test=" null != buildWay ">and `build_way` = #{buildWay}</if> |
|
|
|
|
|
|
|
<if test=" null != ids "> |
|
|
|
and id in |
|
|
|
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
|
@@ -74,7 +77,7 @@ |
|
|
|
select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day` , |
|
|
|
case when br.status=1 then br.owe else 0 end owe,br.`status`,m.`name` merchant_name,s.shop_number, |
|
|
|
br.`updatetime`,br.`merchant_id`,br.shop_id,br.type,br.`rent_shop_type`,br.pay_way,br.price_detail, |
|
|
|
br.`starttime`,br.`endtime` |
|
|
|
br.`starttime`,br.`endtime`,br.`build_way` |
|
|
|
from wx_bill_daily br left join wx_merchant m on br.merchant_id=m.id |
|
|
|
left join wx_shop s on br.shop_id=s.id |
|
|
|
<where> |
|
|
|
@@ -88,6 +91,8 @@ |
|
|
|
<if test=" null != payWay ">and br.`pay_way` = #{payWay}</if> |
|
|
|
<if test=" null != starttime and null!=endtime ">and br.`receive_date` between #{starttime} and #{endtime} |
|
|
|
</if> |
|
|
|
<if test=" null != buildWay ">and br.`build_way` = #{buildWay}</if> |
|
|
|
|
|
|
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
|