CollegesDictDAO.xml 2.4 KB
<?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>