|
|
@@ -15,17 +15,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="teAge" column="te_age" />
|
|
|
<result property="teAvatar" column="te_avatar" />
|
|
|
<result property="openService" column="openService" />
|
|
|
- <result property="lifePhotos" column="life_photos" />
|
|
|
<result property="avatar" column="avatar" />
|
|
|
<result property="teBrief" column="te_brief" />
|
|
|
<result property="avatar" column="avatar" />
|
|
|
- <result property="idCard" column="id_card" />
|
|
|
- <result property="healthCertificate" column="health_certificate" />
|
|
|
- <result property="qualificationCertificate" column="qualification_certificate" />
|
|
|
- <result property="noCrimeRecord" column="no_crime_record" />
|
|
|
- <result property="commitmentPdf" column="commitment_pdf" />
|
|
|
- <result property="commitmentAudio" column="commitment_audio" />
|
|
|
- <result property="commitmentVideo" column="commitment_video" />
|
|
|
<result property="serviceState" column="service_state" />
|
|
|
<result property="nStatus2" column="n_status2" />
|
|
|
<result property="merchantStatus" column="merchant_status" />
|
|
|
@@ -38,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="isDelete" column="is_delete" />
|
|
|
- <result property="nStar" column="n_star" />
|
|
|
+ <result property="score" column="score" />
|
|
|
<result property="nNum" column="n_num" />
|
|
|
<result property="isRecommend" column="is_recommend" />
|
|
|
</resultMap>
|
|
|
@@ -200,11 +192,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="teSexName" column="te_sex_name"/>
|
|
|
<result property="teAvatar" column="te_avatar"/>
|
|
|
<result property="tePhone" column="te_phone"/>
|
|
|
- <result property="nStar" column="n_star"/>
|
|
|
+ <result property="score" column="score"/>
|
|
|
<result property="serviceState" column="service_state"/>
|
|
|
<result property="serviceStateName" column="service_state_name"/>
|
|
|
<result property="nNum" column="n_num"/>
|
|
|
<result property="onlineTime" column="online_time"/>
|
|
|
+ <result property="openService" column="openService"/>
|
|
|
<result property="teProject" column="te_project"/>
|
|
|
<result property="postState" column="post_state"/>
|
|
|
<result property="isRecommend" column="is_recommend"/>
|
|
|
@@ -338,7 +331,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
END AS te_sex_name,
|
|
|
t.te_avatar,
|
|
|
t.te_phone,
|
|
|
- t.n_star,
|
|
|
+ t.score,
|
|
|
t.service_state,
|
|
|
CASE t.service_state
|
|
|
WHEN 0 THEN '服务中'
|
|
|
@@ -347,7 +340,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
ELSE ''
|
|
|
END AS service_state_name,
|
|
|
t.n_num,
|
|
|
- IFNULL(sign_data.online_time, 0) AS online_time,
|
|
|
+ IFNULL(attendance_data.online_time, 0) AS online_time,
|
|
|
+ t.openService,
|
|
|
t.te_project,
|
|
|
t.post_state,
|
|
|
t.is_recommend,
|
|
|
@@ -368,11 +362,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
t.create_time
|
|
|
FROM ma_technician t
|
|
|
LEFT JOIN (
|
|
|
- SELECT js_id, SUM(IFNULL(online_time, 0)) AS online_time
|
|
|
- FROM t_sign
|
|
|
+ SELECT merchant_id, SUM(IFNULL(total_work_minutes, 0)) AS online_time
|
|
|
+ FROM merchant_daily_attendance
|
|
|
WHERE is_delete = 0
|
|
|
- GROUP BY js_id
|
|
|
- ) sign_data ON sign_data.js_id = t.id
|
|
|
+ GROUP BY merchant_id
|
|
|
+ ) attendance_data ON attendance_data.merchant_id = t.id
|
|
|
<where>
|
|
|
t.is_delete = 0
|
|
|
<if test="dto != null">
|
|
|
@@ -475,7 +469,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT
|
|
|
t.id AS merchantId,
|
|
|
t.te_name AS teName,
|
|
|
- t.n_star AS nStar,
|
|
|
+ t.score AS nStar,
|
|
|
COALESCE(o.sales, 0) AS nNum,
|
|
|
COALESCE(p.min_price, 0) AS price,
|
|
|
t.avatar AS avatar,
|
|
|
@@ -488,7 +482,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT
|
|
|
t.id,
|
|
|
t.te_name,
|
|
|
- t.n_star,
|
|
|
+ t.score,
|
|
|
t.avatar,
|
|
|
ROUND(ST_Distance_Sphere(POINT(a.longitude, a.latitude), POINT(#{dto.longitude}, #{dto.latitude})), 0) AS dist_meters
|
|
|
FROM ma_technician t
|
|
|
@@ -524,7 +518,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT
|
|
|
t.id AS merchantId,
|
|
|
t.te_name AS merchantName,
|
|
|
- t.n_star AS nStar,
|
|
|
+ t.score AS nStar,
|
|
|
COALESCE(o.sales, 0) AS nNum,
|
|
|
COALESCE(p.min_price, 0) AS price,
|
|
|
t.avatar AS avatar,
|
|
|
@@ -537,7 +531,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT
|
|
|
t.id,
|
|
|
t.te_name,
|
|
|
- t.n_star,
|
|
|
+ t.score,
|
|
|
t.avatar,
|
|
|
ROUND(ST_Distance_Sphere(POINT(a.longitude, a.latitude), POINT(#{dto.longitude}, #{dto.latitude})), 0) AS dist_meters
|
|
|
FROM ma_technician t
|
|
|
@@ -598,7 +592,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
) / 1000, 2), 'km')
|
|
|
END AS distance,
|
|
|
<!-- 2. 评分处理:如果为null或0,默认为5.0 -->
|
|
|
- GREATEST(IFNULL(t.n_star, 0), 4.5) AS score
|
|
|
+ GREATEST(IFNULL(t.score, 0), 4.5) AS score
|
|
|
|
|
|
FROM ma_technician t
|
|
|
<!-- 关联项目表以获取价格和分类信息 -->
|
|
|
@@ -687,7 +681,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
t.te_nick_name AS nickName,
|
|
|
t.te_avatar AS avatar,
|
|
|
t.te_brief AS brief,
|
|
|
- t.n_star AS score,
|
|
|
+ t.score AS score,
|
|
|
GROUP_CONCAT( CASE WHEN f.file_type = '1' THEN f.file_url END ORDER BY f.create_time ASC SEPARATOR ',' ) AS headshotStr,
|
|
|
GROUP_CONCAT( CASE WHEN f.file_type = '2' THEN f.file_url END ORDER BY f.create_time ASC SEPARATOR ',' ) AS lifestyleStr,
|
|
|
GROUP_CONCAT( CASE WHEN f.file_type = '12' THEN f.file_url END ORDER BY f.create_time ASC SEPARATOR ',' ) AS background
|
|
|
@@ -715,7 +709,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<!--关联地址表获取经纬度-->
|
|
|
<select id="selectTechWithAddressByIds" resultType="com.ylx.merchant.domain.vo.MerchantWithAddressVO">
|
|
|
SELECT
|
|
|
- t.id, t.te_nick_name, t.te_avatar, t.avatar, t.n_star, t.n_num, t.te_project,
|
|
|
+ t.id, t.te_nick_name, t.te_avatar, t.avatar, t.score, t.n_num, t.te_project,
|
|
|
a.latitude, a.longitude
|
|
|
FROM ma_technician t
|
|
|
LEFT JOIN t_address a ON t.id = a.merchant_id
|
|
|
@@ -728,7 +722,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="listValidTechWithAddress" resultType="com.ylx.merchant.domain.vo.MerchantWithAddressVO">
|
|
|
SELECT
|
|
|
- t.id, t.te_nick_name, t.te_avatar, t.avatar, t.n_star, t.n_num, t.te_project,
|
|
|
+ t.id, t.te_nick_name, t.te_avatar, t.avatar, t.score, t.n_num, t.te_project,
|
|
|
a.latitude, a.longitude
|
|
|
FROM ma_technician t
|
|
|
-- 关联商户默认真实地址
|