|
@@ -19,10 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="isOpen" column="is_open" />
|
|
|
<result property="isAttack" column="is_attack" />
|
|
|
<result property="isDefend" column="is_defend" />
|
|
|
+ <result property="title" column="title" />
|
|
|
+ <result property="brief" column="brief" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectMatchFriendshipVo">
|
|
|
- select _id, team_id, opponent, type, date, time, duration, money, address, max_person, file, is_open, is_attack, is_defend from match_friendship
|
|
|
+ select _id, team_id, opponent, type, date, time, duration, money, address, max_person, file, is_open, is_attack, is_defend, title, brief from match_friendship
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectMatchFriendshipList" parameterType="MatchFriendship" resultMap="MatchFriendshipResult">
|
|
@@ -41,6 +43,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isOpen != null and isOpen != ''"> and is_open = #{isOpen}</if>
|
|
|
<if test="isAttack != null and isAttack != ''"> and is_attack = #{isAttack}</if>
|
|
|
<if test="isDefend != null and isDefend != ''"> and is_defend = #{isDefend}</if>
|
|
|
+ <if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
+ <if test="brief != null and brief != ''"> and brief = #{brief}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -65,6 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isOpen != null">is_open,</if>
|
|
|
<if test="isAttack != null">is_attack,</if>
|
|
|
<if test="isDefend != null">is_defend,</if>
|
|
|
+ <if test="title != null">title,</if>
|
|
|
+ <if test="brief != null">brief,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="teamId != null">#{teamId},</if>
|
|
@@ -80,6 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isOpen != null">#{isOpen},</if>
|
|
|
<if test="isAttack != null">#{isAttack},</if>
|
|
|
<if test="isDefend != null">#{isDefend},</if>
|
|
|
+ <if test="title != null">#{title},</if>
|
|
|
+ <if test="brief != null">#{brief},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -99,6 +107,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isOpen != null">is_open = #{isOpen},</if>
|
|
|
<if test="isAttack != null">is_attack = #{isAttack},</if>
|
|
|
<if test="isDefend != null">is_defend = #{isDefend},</if>
|
|
|
+ <if test="title != null">title = #{title},</if>
|
|
|
+ <if test="brief != null">brief = #{brief},</if>
|
|
|
</trim>
|
|
|
where _id = #{Id}
|
|
|
</update>
|