<?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.crk.cplbusiness.mapper.DataCrkywCplbjdyDefaultMapper">

        <!-- 通用查询映射结果 -->
        <resultMap id="BaseResultMap" type="com.unis.crk.cplbusiness.entity.DataCrkywCplbjdyDefault">
                    <id column="dataId" property="dataId" />
                    <result column="unitid" property="unitid" />
                    <result column="builder" property="builder" />
                    <result column="cjsj" property="cjsj" />
                    <result column="editor" property="editor" />
                    <result column="modifyDate" property="modifyDate" />
                    <result column="updateTime" property="updateTime" />
                    <result column="scrq" property="scrq" />
                    <result column="bzq" property="bzq" />
                    <result column="deptId" property="deptId" />
                    <result column="sjjlpzmc" property="sjjlpzmc" />
                    <result column="sjjlpzbh" property="sjjlpzbh" />
                    <result column="sjjlppmc" property="sjjlppmc" />
                    <result column="sjjlppbh" property="sjjlppbh" />
                    <result column="sjjlspmc" property="sjjlspmc" />
                    <result column="sjjlspmcbh" property="sjjlspmcbh" />
                    <result column="gys" property="gys" />
                    <result column="bjbh" property="bjbh" />
                    <result column="scpc" property="scpc" />
                    <result column="gg" property="gg" />
                    <result column="jldw" property="jldw" />
                    <result column="js" property="js" />
                    <result column="ywsj" property="ywsj" />
                    <result column="bz" property="bz" />
        </resultMap>

    <select id="selectMyMapsPage" resultType="java.util.Map">
        SELECT
        a.unitid,
        a.builder,
        a.cjsj,
        a.editor,
        a.modifyDate,
        a.updateTime,
        a.scrq,
        a.bzq,
        a.deptId,
        a.sjjlpzmc,
        a.sjjlpzbh,
        a.sjjlppmc,
        a.sjjlppbh,
        a.sjjlspmc,
        a.sjjlspmcbh,
        a.gys,
        a.bjbh,
        a.scpc,
        a.gg,
        a.js,
        a.ywsj,
        a.bz,
        b.enumName AS jldw,
        a.dataId
        FROM
        data_crkyw_cplbjdy_default a
        LEFT JOIN basic_enum b ON a.jldw = b.enumId
        <if test="ew.sqlSegment != null and ew.sqlSegment != ''">
            where  ${ew.sqlSegment}
        </if>
        order by ywsj desc
    </select>

</mapper>