|
|
@@ -12,6 +12,7 @@
|
|
|
<result column="user_id_" property="userId" />
|
|
|
<result column="nickname_" property="nickname" />
|
|
|
<result column="is_admin_" property="isAdmin" />
|
|
|
+ <result column="join_group_" property="joinGroup" />
|
|
|
<result column="role_type_" property="roleType"/>
|
|
|
<result column="type_" property="type"/>
|
|
|
<result column="group_role_type_" property="groupRoleType"/>
|
|
|
@@ -33,15 +34,18 @@
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.ImGroupMember" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO im_group_member (im_group_id_,user_id_,nickname_,is_admin_,role_type_,create_time_,update_time_,tenant_id_,type_,group_role_type_,mute_flag_)
|
|
|
- VALUES(#{imGroupId},#{userId},#{nickname},#{isAdmin},#{roleType},NOW(),NOW(),#{tenantId},#{type},#{groupRoleType},#{muteFlag})
|
|
|
+ INSERT INTO im_group_member (im_group_id_,user_id_,nickname_,is_admin_,role_type_,create_time_,
|
|
|
+ update_time_,tenant_id_,type_,group_role_type_,mute_flag_,join_group_)
|
|
|
+ VALUES(#{imGroupId},#{userId},#{nickname},#{isAdmin},#{roleType},NOW(),NOW(),#{tenantId},#{type},#{groupRoleType},#{muteFlag},#{joinGroup})
|
|
|
ON DUPLICATE KEY UPDATE nickname_ = VALUES(nickname_), is_admin_ = VALUES(is_admin_), role_type_ = VALUES(role_type_), type_ = VALUES(type_)
|
|
|
</insert>
|
|
|
|
|
|
<insert id="batchInsert" parameterType="com.ym.mec.biz.dal.entity.ImGroupMember" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO im_group_member (im_group_id_,user_id_,nickname_,is_admin_,role_type_,create_time_,update_time_,tenant_id_,type_,group_role_type_,mute_flag_) VALUES
|
|
|
+ INSERT INTO im_group_member (im_group_id_,user_id_,nickname_,is_admin_,role_type_,
|
|
|
+ create_time_,update_time_,tenant_id_,type_,group_role_type_,mute_flag_,join_group_) VALUES
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
- (#{item.imGroupId},#{item.userId},#{item.nickname},#{item.isAdmin},#{item.roleType},NOW(),NOW(),#{item.tenantId},#{item.type},#{item.groupRoleType},#{item.muteFlag})
|
|
|
+ (#{item.imGroupId},#{item.userId},#{item.nickname},#{item.isAdmin},#{item.roleType},NOW(),NOW(),
|
|
|
+ #{item.tenantId},#{item.type},#{item.groupRoleType},#{item.muteFlag},#{item.joinGroup})
|
|
|
</foreach>
|
|
|
ON DUPLICATE KEY UPDATE nickname_ = VALUES(nickname_), is_admin_ = VALUES(is_admin_), role_type_ = VALUES(role_type_), type_ = VALUES(type_)
|
|
|
</insert>
|
|
|
@@ -73,6 +77,9 @@
|
|
|
<if test="type != null">
|
|
|
type_ = #{type},
|
|
|
</if>
|
|
|
+ <if test="joinGroup != null">
|
|
|
+ join_group_ = #{joinGroup},
|
|
|
+ </if>
|
|
|
update_time_ = NOW()
|
|
|
</set> WHERE id_ = #{id} and tenant_id_ = #{tenantId}
|
|
|
</update>
|
|
|
@@ -105,6 +112,9 @@
|
|
|
<if test="item.type != null">
|
|
|
type_ = #{item.type},
|
|
|
</if>
|
|
|
+ <if test="item.joinGroup != null">
|
|
|
+ join_group_ = #{item.joinGroup},
|
|
|
+ </if>
|
|
|
update_time_ = NOW()
|
|
|
</set>
|
|
|
WHERE id_ = #{item.id} and tenant_id_ = #{item.tenantId}
|