Blame view

CollegesDictDAO.xml 2.4 KB
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
<?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.zhongzhi.dao.CollegesDictDAO">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.zhongzhi.model.CollegesDictDO">
        <id column="id" property="id"/>
        <result column="code" property="code"/>
        <result column="education" property="education"/>
        <result column="name" property="name"/>
        <result column="account" property="account"/>
        <result column="password" property="password"/>
        <result column="address" property="address"/>
        <result column="leader_name" property="leaderName"/>
        <result column="leader_post" property="leaderPost"/>
        <result column="leader_phone" property="leaderPhone"/>
        <result column="contact_name" property="contactName"/>
        <result column="contact_post" property="contactPost"/>
        <result column="contact_phone" property="contactPhone"/>
        <result column="login_time" property="loginTime"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <result column="delete_time" property="deleteTime"/>
        <result column="login_status" property="loginStatus"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, code, name, education, account, password, address, login_time, create_time, update_time, delete_time,loginStatus
    </sql>

    <select id="listPage" resultType="com.zhongzhi.vo.college.CollegePageVO">
        select
        *
        from colleges_dict
        <where>
            <if test="name != null and name != ''">
                and name like concat('%', #{name}, '%')
            </if>
            and delete_time is null
        </where>
    </select>

    <select id="getAwardedList" resultType="com.zhongzhi.vo.college.AwardedListVO">
        select
        *
        from colleges_dict
        <where>
            <if test="name != null and name != ''">
                and name like concat('%', #{name} ,'%')
            </if>
            and delete_time is null
        </where>
    </select>

    <select id="getAwardedListAll" resultType="com.zhongzhi.vo.college.AwardedListVO">
        select
        *
        from colleges_dict
        where delete_time is null
    </select>

</mapper>