|
|
@@ -232,6 +232,91 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="isRecommendName" column="is_recommend_name"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="com.ylx.massage.domain.vo.MaTechnicianAuditListVO" id="MaTechnicianAuditListResult">
|
|
|
+ <result property="merchantId" column="merchant_id"/>
|
|
|
+ <result property="teName" column="te_name"/>
|
|
|
+ <result property="teSex" column="te_sex"/>
|
|
|
+ <result property="teSexName" column="te_sex_name"/>
|
|
|
+ <result property="tePhone" column="te_phone"/>
|
|
|
+ <result property="avatar" column="avatar"/>
|
|
|
+ <result property="teAddress" column="te_address"/>
|
|
|
+ <result property="openServiceName" column="open_service_name"/>
|
|
|
+ <result property="applyTime" column="apply_time"/>
|
|
|
+ <result property="auditStatus" column="audit_status"/>
|
|
|
+ <result property="auditStatusName" column="audit_status_name"/>
|
|
|
+ <result property="techType" column="tech_type"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="selectMerchantAuditList" resultMap="MaTechnicianAuditListResult">
|
|
|
+ SELECT
|
|
|
+ t.id AS merchant_id,
|
|
|
+ t.te_name,
|
|
|
+ t.te_sex,
|
|
|
+ CASE t.te_sex
|
|
|
+ WHEN 0 THEN '女'
|
|
|
+ WHEN 1 THEN '男'
|
|
|
+ ELSE ''
|
|
|
+ END AS te_sex_name,
|
|
|
+ t.te_phone,
|
|
|
+ t.avatar,
|
|
|
+ t.te_address,
|
|
|
+ COALESCE((
|
|
|
+ SELECT GROUP_CONCAT(DISTINCT sc.name ORDER BY sc.sort, sc.id SEPARATOR '/')
|
|
|
+ FROM service_category sc
|
|
|
+ WHERE FIND_IN_SET(sc.id, t.openService)
|
|
|
+ AND sc.is_delete = 0
|
|
|
+ ), '') AS open_service_name,
|
|
|
+ t.create_time AS apply_time,
|
|
|
+ t.audit_status,
|
|
|
+ CASE t.audit_status
|
|
|
+ WHEN 0 THEN '待入驻'
|
|
|
+ WHEN 1 THEN '待审核'
|
|
|
+ WHEN 2 THEN '审核通过'
|
|
|
+ WHEN 3 THEN '审核驳回'
|
|
|
+ ELSE ''
|
|
|
+ END AS audit_status_name,
|
|
|
+ t.tech_type
|
|
|
+ FROM ma_technician t
|
|
|
+ <where>
|
|
|
+ t.is_delete = 0
|
|
|
+ <if test="dto != null">
|
|
|
+ <choose>
|
|
|
+ <when test="dto.auditStatus != null">
|
|
|
+ AND t.audit_status = #{dto.auditStatus}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ AND t.audit_status IN (0, 1, 2, 3)
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ <if test="dto.teName != null and dto.teName != ''">
|
|
|
+ AND t.te_name LIKE CONCAT('%', #{dto.teName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.teNickName != null and dto.teNickName != ''">
|
|
|
+ AND t.te_nick_name LIKE CONCAT('%', #{dto.teNickName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.techType != null">
|
|
|
+ AND t.tech_type = #{dto.techType}
|
|
|
+ </if>
|
|
|
+ <if test="dto.tePhone != null and dto.tePhone != ''">
|
|
|
+ AND t.te_phone LIKE CONCAT('%', #{dto.tePhone}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.beginApplyTime != null and dto.beginApplyTime != ''">
|
|
|
+ AND t.create_time >= #{dto.beginApplyTime}
|
|
|
+ </if>
|
|
|
+ <if test="dto.endApplyTime != null and dto.endApplyTime != ''">
|
|
|
+ AND t.create_time <= #{dto.endApplyTime}
|
|
|
+ </if>
|
|
|
+ <if test="dto.teSex != null">
|
|
|
+ AND t.te_sex = #{dto.teSex}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="dto == null">
|
|
|
+ AND t.audit_status IN (0, 1, 2, 3)
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY t.create_time DESC
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectMerchantList" resultMap="MaTechnicianMerchantListResult">
|
|
|
SELECT
|
|
|
t.id AS merchant_id,
|