diff --git a/src/main/resources/mapper/artificer/ArtificerDao.xml b/src/main/resources/mapper/artificer/ArtificerDao.xml index def60cf..5cac07f 100644 --- a/src/main/resources/mapper/artificer/ArtificerDao.xml +++ b/src/main/resources/mapper/artificer/ArtificerDao.xml @@ -7,7 +7,7 @@ select * from (select a.*,u.phone,s.code as classifyName,u.status as artificerStatus,u.consortia_id,c.consortia_name, (select count(*) from collect_artificer o where o.artificer_id=a.artificer_id and classify=1) as collectCount, (select count(*) from orders o where o.artificer_id=a.artificer_id and o.status in (3,5)) as ordersCount, - ifnull((select avg(c.score) from taking_commnt c where c.artificer_id=a.artificer_id ),0.00) as ordersScore, + ifnull((select avg(c.score) from taking_commnt c where c.artificer_id=a.artificer_id ),5.00) as ordersScore, (select count(*) from taking_commnt c where c.artificer_id=a.artificer_id ) as commentCount, (st_distance (point (a.longitude, a.latitude),point(#{longitude},#{latitude}) ) *111195) as distance, v.vip_name as technicianTypeName,v.rate as technicianTypeRate ,(CASE WHEN DATEDIFF(CURDATE(), a.create_time) <=7 THEN 1 ELSE 2 END) AS isNewer @@ -84,7 +84,7 @@ (select code from sys_dict o where o.id = a.classify_id) as classifyName, (select count(*) from collect_artificer o where o.artificer_id = a.artificer_id and classify = 1) as collectCount, (select count(*) from collect_artificer o where o.artificer_id = a.artificer_id and o.user_id = #{userId} and classify = 1) as myCollectCount, - ifnull((select avg(c.score) from taking_commnt c where c.artificer_id = a.artificer_id), 0.00) as ordersScore, + ifnull((select avg(c.score) from taking_commnt c where c.artificer_id = a.artificer_id), 5.00) as ordersScore, (st_distance(point(a.longitude, a.latitude), point(#{longitude}, #{latitude})) * 111195) as distance, v.vip_name as technicianTypeName,v.rate as technicianTypeRate ,(CASE WHEN DATEDIFF(CURDATE(), a.create_time) <=7 THEN 1 ELSE 2 END) AS isNewer from artificer a @@ -99,7 +99,7 @@ select a.*, (select count(*) from orders o where o.artificer_id = a.artificer_id and o.status in (3,5)) as ordersCount, ifnull((select avg(c.score) from taking_commnt c where c.artificer_id = a.artificer_id), - 0.00) as ordersScore + 5.00) as ordersScore from artificer a left join tb_user u on a.user_id = u.user_id where a.user_id = #{artificerId} @@ -140,7 +140,7 @@ u.status as artificerStatus, (select count(*) from collect_artificer o where o.artificer_id=a.artificer_id and classify=1) as collectCount, (select count(*) from orders o where o.artificer_id=a.artificer_id and o.status in (3,5)) as ordersCount, - ifnull((select avg(c.score) from taking_commnt c where c.artificer_id=a.artificer_id ),0.00) as ordersScore, + ifnull((select avg(c.score) from taking_commnt c where c.artificer_id=a.artificer_id ),5.00) as ordersScore, (select count(*) from taking_commnt c where c.artificer_id=a.artificer_id ) as commentCount, (select ifnull(sum(o.shop_money),0.00) as money from orders o where o.shop_user_id=#{shopId}