|
@@ -789,7 +789,9 @@ where date_format(a.create_date,'%Y') = date_format(now(),'%Y')
|
|
|
select ifnull(b.name,SUBSTRING(a.client_id,1,4)) as categorie,count(1) as saleNum,sum(a.price) as salePrice
|
|
|
from t_order a,t_equipment b
|
|
|
where b.id = a.equipment_id
|
|
|
-and a.admin_id= #{adminId} -- 所属商家id
|
|
|
+ <if test="adminId != null and adminId !=''">
|
|
|
+ and a.admin_id= #{adminId} -- 所属商家id
|
|
|
+ </if>
|
|
|
AND a.create_date >= STR_TO_DATE(CONCAT(#{startDate},' 00:00:00'),'%Y/%m/%d %H:%i:%s')
|
|
|
<![CDATA[ AND a.create_date <= STR_TO_DATE(CONCAT(#{endDate},' 23:59:59'),'%Y/%m/%d %H:%i:%s') ]]>
|
|
|
group by b.id
|