<?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="io.renren.modules.admin.dao.EmployeeDao">

	<!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="io.renren.modules.admin.entity.EmployeeEntity" id="employeeMap">
        <result property="id" column="id"/>
        <result property="username" column="username"/>
        <result property="password" column="password"/>
        <result property="truename" column="truename"/>
        <result property="companyId" column="company_id"/>
        <result property="roleId" column="role_id"/>
        <result property="departmentId" column="department_id"/>
        <result property="positionId" column="position_id"/>
        <result property="phone" column="phone"/>
        <result property="email" column="email"/>
        <result property="createTime" column="create_time"/>
        <result property="modifyTime" column="modify_time"/>
        <result property="isDel" column="is_del"/>
    </resultMap>

    <select id="findAllByisDel" resultType="io.renren.modules.admin.entity.EmployeeEntity">
        select * from employee where  is_del = #{isDel}
    </select>

    <update id="updatePasswordByid" parameterType="map">
        update employee set password = "123456" where id = #{id}
    </update>

    <!--<update id="delete" parameterType="map">-->
        <!--update employee set is_del= 1  where id = #{id}-->
    <!--</update>-->
    <!--<select id="queryListBykey" resultType="io.renren.modules.generator.entity.EmployeeEntity">-->
      <!--select e.id,e.truename,e.username,e.password,e.phone,e.email,e.create_time,e.modify_time,e.is_del,c.companyname from employee e left JOIN company c on e.company_id = c.id-->
        <!--where e.is_del = 0 AND (e.truename like '%${key}%' or e.username like '%${key2}%') limit #{page},#{limit}-->

    <!--</select>-->

    <!--<select id="queryTotalCount" resultType="io.renren.modules.generator.entity.EmployeeEntity">-->
        <!--select count(*) from employee where is_del=0 and (truename like '%${key}%' or username like '%${key2}%')-->

    <!--</select>-->
</mapper>