Newer
Older
huludao / src / main / resources / mapper / PeopleMapper.xml
@新烽开发者 新烽开发者 on 19 Jul 985 bytes init
<?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.newfiber.api.pc.dao.PeopleMapper">
    <resultMap id="onlineUserMap" type="com.newfiber.api.pc.model.vo.OnlineUserVo">
        <result column="area_name" property="areaName"/>
        <result column="people_name" property="peopleName"/>
        <result column="people_no" property="peopleNo"/>
        <result column="phone" property="phone"/>
        <result column="job" property="job"/>
        <result column="x" property="x"/>
        <result column="y" property="y"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>

    <select id="selectOnlineUser" resultMap="onlineUserMap">
        select  mp.people_name,mp.people_no,mp.phone,mp.area_name,mp.job,pl.x,pl.y,pl.update_time from meet_people mp LEFT JOIN people_location pl on mp.people_no = pl.user_no
    </select>

</mapper>