|
@@ -1,8 +1,8 @@
|
|
|
<?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.ImGroupMemberDao">
|
|
|
|
|
@@ -12,7 +12,7 @@
|
|
|
<result column="user_id_" property="userId" />
|
|
|
<result column="nickname_" property="nickname" />
|
|
|
<result column="is_admin_" property="isAdmin" />
|
|
|
- <result column="role_type_" property="roleType" />
|
|
|
+ <result column="role_type_" property="roleType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
<result column="create_time_" property="createTime" />
|
|
|
<result column="update_time_" property="updateTime" />
|
|
|
</resultMap>
|
|
@@ -29,18 +29,14 @@
|
|
|
|
|
|
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.ImGroupMember" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
-
|
|
|
- <selectKey resultClass="int" keyProperty="id" >
|
|
|
- SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
|
|
|
- </selectKey>
|
|
|
- -->
|
|
|
- INSERT INTO im_group_member (id_,im_group_id_,user_id_,nickname_,is_admin_,role_type_,create_time_,update_time_) VALUES(#{id},#{imGroupId},#{userId},#{nickname},#{isAdmin},#{roleType},#{createTime},#{updateTime})
|
|
|
+ INSERT INTO im_group_member (im_group_id_,user_id_,nickname_,is_admin_,role_type_,create_time_,update_time_)
|
|
|
+ VALUES(#{imGroupId},#{userId},#{nickname},#{isAdmin},#{roleType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},NOW(),NOW())
|
|
|
</insert>
|
|
|
|
|
|
<insert id="batchInsert" parameterType="com.ym.mec.biz.dal.entity.ImGroupMember" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO im_group_member (id_,im_group_id_,user_id_,nickname_,is_admin_,role_type_,create_time_,update_time_) VALUES
|
|
|
+ INSERT INTO im_group_member (im_group_id_,user_id_,nickname_,is_admin_,role_type_,create_time_,update_time_) VALUES
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
- (#{item.id},#{item.imGroupId},#{item.userId},#{item.nickname},#{item.isAdmin},#{item.roleType},#{item.createTime},#{item.updateTime})
|
|
|
+ (#{item.imGroupId},#{item.userId},#{item.nickname},#{item.isAdmin},#{item.roleType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},NOW(),NOW())
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
@@ -48,7 +44,7 @@
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.ImGroupMember">
|
|
|
UPDATE im_group_member <set>
|
|
|
<if test="roleType != null">
|
|
|
- role_type_ = #{roleType},
|
|
|
+ role_type_ = #{roleType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
</if>
|
|
|
<if test="userId != null">
|
|
|
user_id_ = #{userId},
|
|
@@ -56,21 +52,13 @@
|
|
|
<if test="nickname != null">
|
|
|
nickname_ = #{nickname},
|
|
|
</if>
|
|
|
- <if test="id != null">
|
|
|
- id_ = #{id},
|
|
|
- </if>
|
|
|
<if test="isAdmin != null">
|
|
|
is_admin_ = #{isAdmin},
|
|
|
</if>
|
|
|
<if test="imGroupId != null">
|
|
|
im_group_id_ = #{imGroupId},
|
|
|
</if>
|
|
|
- <if test="updateTime != null">
|
|
|
- update_time_ = #{updateTime},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time_ = #{createTime},
|
|
|
- </if>
|
|
|
+ update_time_ = NOW()
|
|
|
</set> WHERE id_ = #{id}
|
|
|
</update>
|
|
|
|
|
@@ -78,32 +66,24 @@
|
|
|
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
|
|
UPDATE im_group_member
|
|
|
<set>
|
|
|
- <if test="item。roleType != null">
|
|
|
- role_type_ = #{item。roleType},
|
|
|
+ <if test="item.roleType != null">
|
|
|
+ role_type_ = #{item.roleType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
</if>
|
|
|
- <if test="item。userId != null">
|
|
|
- user_id_ = #{item。userId},
|
|
|
+ <if test="item.userId != null">
|
|
|
+ user_id_ = #{item.userId},
|
|
|
</if>
|
|
|
<if test="item.nickname != null">
|
|
|
nickname_ = #{item.nickname},
|
|
|
</if>
|
|
|
- <if test="item。id != null">
|
|
|
- id_ = #{item。id},
|
|
|
- </if>
|
|
|
- <if test="item。isAdmin != null">
|
|
|
- is_admin_ = #{item。isAdmin},
|
|
|
- </if>
|
|
|
- <if test="item。imGroupId != null">
|
|
|
- im_group_id_ = #{item。imGroupId},
|
|
|
- </if>
|
|
|
- <if test="item。updateTime != null">
|
|
|
- update_time_ = #{item。updateTime},
|
|
|
+ <if test="item.isAdmin != null">
|
|
|
+ is_admin_ = #{item.isAdmin},
|
|
|
</if>
|
|
|
- <if test="item。createTime != null">
|
|
|
- create_time_ = #{item。createTime},
|
|
|
+ <if test="item.imGroupId != null">
|
|
|
+ im_group_id_ = #{item.imGroupId},
|
|
|
</if>
|
|
|
- </set>
|
|
|
- WHERE id_ = #{item。id}
|
|
|
+ update_time_ = NOW()
|
|
|
+ </set>
|
|
|
+ WHERE id_ = #{item.id}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
|