zouxuan 3 سال پیش
والد
کامیت
ba95536e5c

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/HereWhiteDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.HereWhite;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface HereWhiteDao extends BaseDAO<Integer, HereWhite> {
+
+    HereWhite findByCourseScheduleId(Integer id);
+}

+ 20 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/RoomDao.java

@@ -0,0 +1,20 @@
+package com.ym.mec.biz.dal.dao;
+
+
+import com.ym.mec.biz.dal.entity.Room;
+import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
+
+public interface RoomDao extends BaseDAO<Long,Room> {
+    Room findOne(String roomId);
+
+    Room getLock(String roomId);
+
+    int deleteRoom(String roomId);
+
+    int updateRoom(@Param("roomId") String roomId,
+                   @Param("display") String display,
+                   @Param("soundVolume") Integer soundVolume,
+                   @Param("whiteboardNameIndex") Integer whiteboardNameIndex);
+
+}

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/RoomMemberDao.java

@@ -0,0 +1,22 @@
+package com.ym.mec.biz.dal.dao;
+
+
+import com.ym.mec.biz.dal.entity.RoomMember;
+import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface RoomMemberDao extends BaseDAO<Integer, RoomMember> {
+    List<RoomMember> queryRoomMember(@Param("roomId") String roomId, @Param("userId") String userId, @Param("role") Integer role);
+
+    RoomMember findOne(@Param("roomId") String roomId, @Param("userId") String userId);
+
+    int deleteRoomMember(@Param("roomId") String roomId);
+
+    int countRoomMember(@Param("roomId") String roomId, @Param("excludeRole") Integer excludeRole);
+
+    int deleteRoomMember(@Param("roomId") String roomId, @Param("userId") String userId);
+
+    int updateByRidAndUid(@Param("roomId") String roomId, @Param("userId") String userId, @Param("role") Integer role);
+}

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/UserDao.java

@@ -0,0 +1,11 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.UserInfo;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface UserDao extends BaseDAO<Integer,UserInfo> {
+
+    UserInfo findOne(String roomId);
+
+    int deleteUser(String userId);
+}

+ 15 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/WhiteboardDao.java

@@ -0,0 +1,15 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.Whiteboard;
+import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface WhiteboardDao extends BaseDAO<Integer,Whiteboard> {
+    List<Whiteboard> queryWhiteboard(@Param("roomId") String roomId, @Param("creator") String creator, @Param("wbid") String wbid);
+
+    int deleteWhiteboard(@Param("roomId") String roomId, @Param("creator") String creator, @Param("wbid") String wbid);
+
+    int updatePageByRidAndWbid(@Param("roomId") String roomId, @Param("wbid") String wbid, @Param("page") Integer page);
+}

+ 136 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/HereWhite.java

@@ -0,0 +1,136 @@
+package com.ym.mec.biz.dal.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class HereWhite implements Serializable {
+    private Integer id;
+
+    private int courseScheduleId;
+
+    private String name;
+
+    private int limit;
+
+    private int teamId;
+
+    private int adminId;
+
+    private String mode;
+
+    private String template;
+
+    private String region;
+
+    private String uuid;
+
+    private String roomToken;
+
+    private Date updatedAt;
+
+    private Date createdAt;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public int getCourseScheduleId() {
+        return courseScheduleId;
+    }
+
+    public void setCourseScheduleId(int courseScheduleId) {
+        this.courseScheduleId = courseScheduleId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getLimit() {
+        return limit;
+    }
+
+    public void setLimit(int limit) {
+        this.limit = limit;
+    }
+
+    public int getTeamId() {
+        return teamId;
+    }
+
+    public void setTeamId(int teamId) {
+        this.teamId = teamId;
+    }
+
+    public int getAdminId() {
+        return adminId;
+    }
+
+    public void setAdminId(int adminId) {
+        this.adminId = adminId;
+    }
+
+    public String getMode() {
+        return mode;
+    }
+
+    public void setMode(String mode) {
+        this.mode = mode;
+    }
+
+    public String getTemplate() {
+        return template;
+    }
+
+    public void setTemplate(String template) {
+        this.template = template;
+    }
+
+    public String getRegion() {
+        return region;
+    }
+
+    public void setRegion(String region) {
+        this.region = region;
+    }
+
+    public String getUuid() {
+        return uuid;
+    }
+
+    public void setUuid(String uuid) {
+        this.uuid = uuid;
+    }
+
+    public String getRoomToken() {
+        return roomToken;
+    }
+
+    public void setRoomToken(String roomToken) {
+        this.roomToken = roomToken;
+    }
+
+    public Date getUpdatedAt() {
+        return updatedAt;
+    }
+
+    public void setUpdatedAt(Date updatedAt) {
+        this.updatedAt = updatedAt;
+    }
+
+    public Date getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(Date createdAt) {
+        this.createdAt = createdAt;
+    }
+}

+ 99 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Room.java

@@ -0,0 +1,99 @@
+package com.ym.mec.biz.dal.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Room implements Serializable {
+    private long id;
+
+    private String rid;
+
+    private String name;
+
+    private String portrait;
+
+    private Date createDt;
+
+    private String display;
+
+    private int whiteboardNameIndex;
+
+    private int soundVolume = 100;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getRid() {
+        return rid;
+    }
+
+    public void setRid(String rid) {
+        this.rid = rid;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPortrait() {
+        return portrait;
+    }
+
+    public void setPortrait(String portrait) {
+        this.portrait = portrait;
+    }
+
+    public Date getCreateDt() {
+        return createDt;
+    }
+
+    public void setCreateDt(Date createDt) {
+        this.createDt = createDt;
+    }
+
+    public String getDisplay() {
+        return display;
+    }
+
+    public void setDisplay(String display) {
+        this.display = display;
+    }
+
+    public int getWhiteboardNameIndex() {
+        return whiteboardNameIndex;
+    }
+
+    public void setWhiteboardNameIndex(int whiteboardNameIndex) {
+        this.whiteboardNameIndex = whiteboardNameIndex;
+    }
+
+    public int getSoundVolume() {
+        return soundVolume;
+    }
+
+    public void setSoundVolume(int soundVolume) {
+        this.soundVolume = soundVolume;
+    }
+
+    @Override
+    public String toString() {
+        return "Room{" +
+                "rid='" + rid + '\'' +
+                ", name='" + name + '\'' +
+                ", portrait='" + portrait + '\'' +
+                ", createDt=" + createDt +
+                ", display='" + display + '\'' +
+                ", soundVolume='" + soundVolume + '\'' +
+                ", whiteboardNameIndex='" + whiteboardNameIndex + '\'' +
+                '}';
+    }
+}

+ 145 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/RoomMember.java

@@ -0,0 +1,145 @@
+package com.ym.mec.biz.dal.entity;
+
+import java.util.Date;
+
+public class RoomMember {
+    private long id;
+
+    private String uid;
+
+    private String rid;
+
+    private String headUrl;
+
+    private int role;
+
+    private Date joinDt;
+
+    private String name;
+
+    private boolean camera = true;
+
+    private boolean musicMode = true;
+
+    private boolean mic = true;
+
+    private boolean hand = false;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public String getRid() {
+        return rid;
+    }
+
+    public void setRid(String rid) {
+        this.rid = rid;
+    }
+
+    public String getHeadUrl() {
+        return headUrl;
+    }
+
+    public void setHeadUrl(String headUrl) {
+        this.headUrl = headUrl;
+    }
+
+    public int getRole() {
+        return role;
+    }
+
+    public void setRole(int role) {
+        this.role = role;
+    }
+
+    public Date getJoinDt() {
+        return joinDt;
+    }
+
+    public void setJoinDt(Date joinDt) {
+        this.joinDt = joinDt;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public boolean isCamera() {
+        return camera;
+    }
+
+    public void setCamera(boolean camera) {
+        this.camera = camera;
+    }
+
+    public boolean isMusicMode() {
+        return musicMode;
+    }
+
+    public void setMusicMode(boolean musicMode) {
+        this.musicMode = musicMode;
+    }
+
+    public boolean isMic() {
+        return mic;
+    }
+
+    public void setMic(boolean mic) {
+        this.mic = mic;
+    }
+
+    public boolean isHand() {
+        return hand;
+    }
+
+    public void setHand(boolean hand) {
+        this.hand = hand;
+    }
+
+    public RoomMember() {
+    }
+
+    public RoomMember(String uid, String rid) {
+        this.uid = uid;
+        this.rid = rid;
+    }
+
+    public RoomMember(String uid) {
+        this.uid = uid;
+    }
+
+    @Override
+    public String toString() {
+        return "RoomMember{" +
+                "uid='" + uid + '\'' +
+                ", rid='" + rid + '\'' +
+                ", role=" + role +
+                ", joinDt=" + joinDt +
+                ", name='" + name + '\'' +
+                ", camera=" + camera +
+                ", musicMode=" + musicMode +
+                ", mic=" + mic +
+                '}';
+    }
+//
+//    @ManyToOne(fetch = FetchType.LAZY)
+//    @JoinColumn(name = "room_id", referencedColumnName = "rid")
+//    private Room room;
+}

+ 65 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/UserInfo.java

@@ -0,0 +1,65 @@
+package com.ym.mec.biz.dal.entity;
+
+import java.util.Date;
+
+public class UserInfo {
+    private Long id;
+
+    private String uid;
+
+    private String name;
+
+    private String portrait;
+
+    private Date createDt;
+
+    private Date updateDt;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPortrait() {
+        return portrait;
+    }
+
+    public void setPortrait(String portrait) {
+        this.portrait = portrait;
+    }
+
+    public Date getCreateDt() {
+        return createDt;
+    }
+
+    public void setCreateDt(Date createDt) {
+        this.createDt = createDt;
+    }
+
+    public Date getUpdateDt() {
+        return updateDt;
+    }
+
+    public void setUpdateDt(Date updateDt) {
+        this.updateDt = updateDt;
+    }
+}

+ 96 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Whiteboard.java

@@ -0,0 +1,96 @@
+package com.ym.mec.biz.dal.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Whiteboard implements Serializable {
+    private long id;
+
+    private String rid;
+
+    private String wbid;
+
+    private String wbRoom;
+
+    private String name;
+
+    private String creator;
+
+    private Date createDt;
+
+    private int pgCount;
+
+    private int curPg;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getRid() {
+        return rid;
+    }
+
+    public void setRid(String rid) {
+        this.rid = rid;
+    }
+
+    public String getWbid() {
+        return wbid;
+    }
+
+    public void setWbid(String wbid) {
+        this.wbid = wbid;
+    }
+
+    public String getWbRoom() {
+        return wbRoom;
+    }
+
+    public void setWbRoom(String wbRoom) {
+        this.wbRoom = wbRoom;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public Date getCreateDt() {
+        return createDt;
+    }
+
+    public void setCreateDt(Date createDt) {
+        this.createDt = createDt;
+    }
+
+    public int getPgCount() {
+        return pgCount;
+    }
+
+    public void setPgCount(int pgCount) {
+        this.pgCount = pgCount;
+    }
+
+    public int getCurPg() {
+        return curPg;
+    }
+
+    public void setCurPg(int curPg) {
+        this.curPg = curPg;
+    }
+}

+ 92 - 0
mec-biz/src/main/resources/config/mybatis/HereWhiteMapper.xml

@@ -0,0 +1,92 @@
+<?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.ym.mec.biz.dal.dao.HereWhiteDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.HereWhite" id="HereWhite">
+		<result column="id_" property="id" />
+		<result column="course_schedule_id_" property="courseScheduleId" />
+		<result column="name_" property="name" />
+		<result column="limit_" property="limit" />
+		<result column="team_id_" property="teamId" />
+		<result column="admin_id_" property="adminId" />
+		<result column="mode_" property="mode" />
+		<result column="template_" property="template" />
+		<result column="region_" property="region" />
+		<result column="room_token_" property="roomToken" />
+		<result column="uuid_" property="uuid" />
+		<result column="updated_at_" property="updatedAt" />
+		<result column="created_at_" property="createdAt" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="HereWhite" >
+		SELECT * FROM rongyun_here_white WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="HereWhite">
+		SELECT * FROM rongyun_here_white ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.HereWhite" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		INSERT INTO rongyun_here_white (id_,course_schedule_id_,name_,limit_,team_id_,admin_id_,mode_,template_,region_,room_token_,uuid_,updated_at_,created_at_)
+		VALUES(#{id},#{courseScheduleId},#{name},#{limit},#{teamId},#{adminId},#{mode},#{template},#{region},#{roomToken},#{uuid},#{updatedAt},#{createdAt})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.HereWhite">
+		UPDATE rongyun_here_white <set>
+		<if test="limit != null">
+		limit_ = #{limit},
+		</if>
+		<if test="uuid != null">
+		uuid_ = #{uuid},
+		</if>
+		<if test="adminId != null">
+		admin_id_ = #{adminId},
+		</if>
+		<if test="roomToken != null">
+		room_token_ = #{roomToken},
+		</if>
+		<if test="updatedAt != null">
+		updated_at_ = #{updatedAt},
+		</if>
+		<if test="name != null">
+		name_ = #{name},
+		</if>
+		<if test="mode != null">
+		mode_ = #{mode},
+		</if>
+		<if test="teamId != null">
+		team_id_ = #{teamId},
+		</if>
+		<if test="courseScheduleId != null">
+		course_schedule_id_ = #{courseScheduleId},
+		</if>
+		<if test="region != null">
+		region_ = #{region},
+		</if>
+		<if test="template != null">
+		template_ = #{template},
+		</if>
+		</set> WHERE id_ = #{id}
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM rongyun_here_white WHERE id_ = #{id} 
+	</delete>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM rongyun_here_white
+	</select>
+	<select id="findByCourseScheduleId" resultMap="HereWhite">
+		SELECT * FROM rongyun_here_white WHERE course_schedule_id_ = #{courseScheduleId}
+	</select>
+</mapper>

+ 94 - 0
mec-biz/src/main/resources/config/mybatis/RoomMapper.xml

@@ -0,0 +1,94 @@
+<?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.ym.mec.biz.dal.dao.RoomDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.Room" id="Room">
+		<result column="id" property="id" />
+		<result column="rid" property="rid" />
+		<result column="name" property="name" />
+		<result column="portrait" property="portrait" />
+		<result column="create_dt" property="createDt" />
+		<result column="display" property="display" />
+		<result column="whiteboard_name_index" property="whiteboardNameIndex" />
+		<result column="sound_volume" property="soundVolume" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="Room" >
+		SELECT * FROM rongyun_room WHERE id = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="Room">
+		SELECT * FROM rongyun_room ORDER BY id
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Room" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		INSERT INTO rongyun_room (id,rid,name,portrait,create_dt,display,whiteboard_name_index,sound_volume)
+		VALUES(#{id},#{rid},#{name},#{portrait},#{createDt},#{display},#{whiteboardNameIndex},#{soundVolume})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.Room">
+		UPDATE rongyun_room <set>
+		<if test="whiteboardNameIndex != null">
+		whiteboard_name_index = #{whiteboardNameIndex},
+		</if>
+		<if test="soundVolume != null">
+		sound_volume = #{soundVolume},
+		</if>
+		<if test="display != null">
+		display = #{display},
+		</if>
+		<if test="name != null">
+		name = #{name},
+		</if>
+		<if test="rid != null">
+		rid = #{rid},
+		</if>
+		<if test="portrait != null">
+		portrait = #{portrait},
+		</if>
+		</set> WHERE id = #{id}
+	</update>
+	<update id="updateRoom">
+		UPDATE rongyun_room
+		<set>
+			<if test="display">
+				display = #{display}
+			</if>
+			<if test="soundVolume">
+				sound_volume = #{soundVolume}
+			</if>
+			<if test="whiteboardNameIndex">
+				whiteboard_name_index = #{whiteboardNameIndex}
+			</if>
+		</set>
+		WHERE rid = #{roomId}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM rongyun_room WHERE id = #{roomId}
+	</delete>
+	<delete id="deleteRoom">
+		DELETE FROM rongyun_room WHERE rid = #{roomId}
+	</delete>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM rongyun_room
+	</select>
+
+	<select id="findOne" resultMap="Room">
+		SELECT * FROM rongyun_room WHERE rid = #{roomId}
+	</select>
+	<select id="getLock" resultMap="Room">
+		SELECT * FROM rongyun_room WHERE rid = #{roomId} FOR UPDATE
+	</select>
+</mapper>

+ 121 - 0
mec-biz/src/main/resources/config/mybatis/RoomMemberMapper.xml

@@ -0,0 +1,121 @@
+<?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.ym.mec.biz.dal.dao.RoomMemberDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.RoomMember" id="RoomMember">
+		<result column="id" property="id" />
+		<result column="rid" property="rid" />
+		<result column="uid" property="uid" />
+		<result column="join_dt" property="joinDt" />
+		<result column="role" property="role" />
+		<result column="head_url" property="headUrl" />
+		<result column="name" property="name" />
+		<result column="camera" property="camera" />
+		<result column="mic" property="mic" />
+		<result column="music_mode" property="musicMode" />
+		<result column="hand" property="hand" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="RoomMember" >
+		SELECT * FROM rongyun_room_member WHERE id = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="RoomMember">
+		SELECT * FROM rongyun_room_member ORDER BY id
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.RoomMember" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		INSERT INTO rongyun_room_member (id,rid,uid,join_dt,role,head_url,name,camera,mic,music_mode,play_midi_json,hand)
+		VALUES(#{id},#{rid},#{uid},#{joinDt},#{role},#{headUrl},#{name},#{camera},#{mic},#{musicMode},#{playMidiJson},#{hand})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.RoomMember">
+		UPDATE rongyun_room_member <set>
+		<if test="uid != null">
+		uid = #{uid},
+		</if>
+		<if test="musicMode != null">
+		music_mode = #{musicMode},
+		</if>
+		<if test="role != null">
+		role = #{role},
+		</if>
+		<if test="headUrl != null">
+		head_url = #{headUrl},
+		</if>
+		<if test="playMidiJson != null">
+		play_midi_json = #{playMidiJson},
+		</if>
+		<if test="mic != null">
+		mic = #{mic},
+		</if>
+		<if test="name != null">
+		name = #{name},
+		</if>
+		<if test="rid != null">
+		rid = #{rid},
+		</if>
+		<if test="joinDt != null">
+		join_dt = #{joinDt},
+		</if>
+		<if test="camera != null">
+		camera = #{camera},
+		</if>
+		<if test="hand != null">
+		hand = #{hand},
+		</if>
+		</set> WHERE id = #{id}
+	</update>
+	<update id="updateByRidAndUid">
+		UPDATE rongyun_room_member SET role = #{role}
+		WHERE rid = #{roomId} AND uid = #{userId}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM rongyun_room_member WHERE id = #{id}
+	</delete>
+	<delete id="deleteRoomMember">
+		DELETE FROM rongyun_room_member
+		WHERE rid = #{roomId}
+		<if test="userId != null">
+			AND uid = #{userId}
+		</if>
+	</delete>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM rongyun_room_member
+	</select>
+	<select id="queryRoomMember" resultMap="RoomMember">
+		SELECT * FROM rongyun_room_member
+		WHERE rid = #{roomId}
+		<if test="role != null">
+			AND role = #{role}
+		</if>
+		<if test="userId != null">
+			AND uid = #{userId}
+		</if>
+	</select>
+	<select id="findOne" resultMap="RoomMember">
+		SELECT * FROM rongyun_room_member WHERE rid = #{roomId}
+		<if test="userId != null">
+			AND uid = #{userId}
+		</if>
+		LIMIT 1
+	</select>
+	<select id="countRoomMember" resultType="java.lang.Integer">
+		SELECT COUNT(id) FROM rongyun_room_member WHERE rid = #{roomId}
+		<if test="excludeRole != null">
+			AND role != #{excludeRole}
+		</if>
+	</select>
+</mapper>

+ 70 - 0
mec-biz/src/main/resources/config/mybatis/UserMapper.xml

@@ -0,0 +1,70 @@
+<?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.ym.mec.biz.dal.dao.UserDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.UserInfo" id="UserInfo">
+		<result column="id" property="id" />
+		<result column="uid" property="uid" />
+		<result column="name" property="name" />
+		<result column="portrait" property="portrait" />
+		<result column="create_dt" property="createDt" />
+		<result column="update_dt" property="updateDt" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="UserInfo" >
+		SELECT * FROM rongyun_user WHERE id = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="UserInfo">
+		SELECT * FROM rongyun_user ORDER BY id
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.UserInfo" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		INSERT INTO rongyun_user (id,uid,name,portrait,create_dt,update_dt)
+		VALUES(#{id},#{uid},#{name},#{portrait},#{createDt},#{updateDt})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.UserInfo">
+		UPDATE rongyun_user <set>
+		<if test="uid != null">
+		uid = #{uid},
+		</if>
+		<if test="updateDt != null">
+		update_dt = #{updateDt},
+		</if>
+		<if test="name != null">
+		name = #{name},
+		</if>
+		<if test="createDt != null">
+		create_dt = #{createDt},
+		</if>
+		<if test="portrait != null">
+		portrait = #{portrait},
+		</if>
+		</set> WHERE id = #{id}
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM rongyun_user WHERE id = #{id} 
+	</delete>
+	<delete id="deleteUser">
+		DELETE FROM rongyun_user WHERE uid = #{userId}
+	</delete>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM rongyun_user
+	</select>
+	<select id="findOne" resultMap="UserInfo">
+		SELECT * FROM rongyun_user WHERE uid = #{userId}
+	</select>
+</mapper>

+ 110 - 0
mec-biz/src/main/resources/config/mybatis/WhiteboardMapper.xml

@@ -0,0 +1,110 @@
+<?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.ym.mec.biz.dal.dao.WhiteboardDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.Whiteboard" id="Whiteboard">
+		<result column="id" property="id" />
+		<result column="rid" property="rid" />
+		<result column="wb_room" property="wbRoom" />
+		<result column="wbid" property="wbid" />
+		<result column="name" property="name" />
+		<result column="creator" property="creator" />
+		<result column="pg_count" property="pgCount" />
+		<result column="cur_pg" property="curPg" />
+		<result column="create_dt" property="createDt" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="Whiteboard" >
+		SELECT * FROM rongyun_whiteboard WHERE id = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="Whiteboard">
+		SELECT * FROM rongyun_whiteboard ORDER BY id
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Whiteboard" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		INSERT INTO rongyun_whiteboard (id,rid,wb_room,wbid,name,creator,pg_count,cur_pg,create_dt)
+		VALUES(#{id},#{rid},#{wbRoom},#{wbid},#{name},#{creator},#{pgCount},#{curPg},#{createDt})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.Whiteboard">
+		UPDATE rongyun_whiteboard <set>
+		<if test="wbid != null">
+		wbid = #{wbid},
+		</if>
+		<if test="creator != null">
+		creator = #{creator},
+		</if>
+		<if test="curPg != null">
+		cur_pg = #{curPg},
+		</if>
+		<if test="name != null">
+		name = #{name},
+		</if>
+		<if test="createDt != null">
+		create_dt = #{createDt},
+		</if>
+		<if test="id != null">
+		id = #{id},
+		</if>
+		<if test="rid != null">
+		rid = #{rid},
+		</if>
+		<if test="pgCount != null">
+		pg_count = #{pgCount},
+		</if>
+		<if test="wbRoom != null">
+		wb_room = #{wbRoom},
+		</if>
+		</set> WHERE id = #{id}
+	</update>
+	<update id="updatePageByRidAndWbid">
+		UPDATE rongyun_whiteboard SET cur_pg = #{page} WHERE rid = #{roomId} AND wbid = #{whiteBoardId}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM rongyun_whiteboard WHERE id = #{id} 
+	</delete>
+	<delete id="deleteWhiteboard">
+		DELETE FROM rongyun_whiteboard
+		<where>
+			<if test="roomId != null">
+				rid = #{roomId},
+			</if>
+			<if test="wbid != null">
+				wbid = #{wbid},
+			</if>
+			<if test="creator != null">
+				creator = #{creator},
+			</if>
+		</where>
+	</delete>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM rongyun_whiteboard
+	</select>
+	<select id="queryWhiteboard" resultMap="Whiteboard">
+		SELECT * FROM rongyun_whiteboard
+		<where>
+			<if test="roomId != null">
+				rid = #{roomId},
+			</if>
+			<if test="wbid != null">
+				wbid = #{wbid},
+			</if>
+			<if test="creator != null">
+				creator = #{creator},
+			</if>
+		</where>
+	</select>
+</mapper>

+ 0 - 4
mec-im/pom.xml

@@ -27,10 +27,6 @@
 		</dependency>
     <dependency>
       <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-data-jpa</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-data-redis</artifactId>
     </dependency>