|
@@ -52,25 +52,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
IFNULL(sum(platform_income), 0) as platform_income,
|
|
IFNULL(sum(platform_income), 0) as platform_income,
|
|
|
IFNULL(sum(point_verified_order_num), 0) as point_verified_order_num,
|
|
IFNULL(sum(point_verified_order_num), 0) as point_verified_order_num,
|
|
|
IFNULL(sum(point_verified_order_amount), 0) as point_verified_order_amount
|
|
IFNULL(sum(point_verified_order_amount), 0) as point_verified_order_amount
|
|
|
- from tb_business_day_bill
|
|
|
|
|
|
|
+ from tb_business_day_bill as tbdb
|
|
|
|
|
+ left join tb_business as tb on tbdb.business_id = tb.business_id
|
|
|
<where>
|
|
<where>
|
|
|
<if test="bo.businessId!=null">
|
|
<if test="bo.businessId!=null">
|
|
|
- and business_id = #{bo.businessId}
|
|
|
|
|
|
|
+ and tbdb.business_id = #{bo.businessId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="bo.businessName!=null and bo.businessName!=''">
|
|
|
|
|
+ and tbdb.business_name like concat('%',#{bo.businessName},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="bo.legalName!=null and bo.legalName!=''">
|
|
|
|
|
+ and tb.legal_name like concat('%',#{bo.legalName},'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="bo.chainBusinessIds!=null and bo.chainBusinessIds.size>0">
|
|
<if test="bo.chainBusinessIds!=null and bo.chainBusinessIds.size>0">
|
|
|
- and business_id in
|
|
|
|
|
|
|
+ and tbdb.business_id in
|
|
|
<foreach item="item" collection="bo.chainBusinessIds" separator="," open="(" close=")" index="">
|
|
<foreach item="item" collection="bo.chainBusinessIds" separator="," open="(" close=")" index="">
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
<if test="bo.startTime!=null">
|
|
<if test="bo.startTime!=null">
|
|
|
- and bill_day >= #{bo.startTime}
|
|
|
|
|
|
|
+ and tbdb.bill_day >= #{bo.startTime}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="bo.endTime!=null">
|
|
<if test="bo.endTime!=null">
|
|
|
- and bill_day <= #{bo.endTime}
|
|
|
|
|
|
|
+ and tbdb.bill_day <= #{bo.endTime}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="bo.dayValue!=null and bo.dayValue!=''">
|
|
<if test="bo.dayValue!=null and bo.dayValue!=''">
|
|
|
- and day_value = #{bo.dayValue}
|
|
|
|
|
|
|
+ and tbdb.day_value = #{bo.dayValue}
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|