<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.unis.enterpriseManagement.info.modular.emHonorTitle.mapper.EmHonorTitleMapper">
    <select id="selectMyMapsPage" resultType="java.util.Map">
        SELECT
        c.id,
        c.person_info_id AS "personInfoId",
        a.name AS "name",
        a.gender,
        b.DICT_LABEL AS "gendeName",
        c.title_name as "titleName",
        DATE_FORMAT(c.acquisition_time,'%Y-%m-%d %T') as "acquisitionTime"
        FROM
        biz_em_honor_title c
        LEFT JOIN biz_em_person_info a ON a.id = c.person_info_id
        LEFT JOIN dev_dict b ON a.gender = b.ID
        <if test="ew.sqlSegment != null and ew.sqlSegment != ''">
            where  ${ew.sqlSegment}
        </if>
        ORDER BY c.acquisition_time DESC
        
    </select>
</mapper>