|
|
@@ -6,18 +6,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
<select id="selectVoPage2" resultType="org.dromara.business.domain.vo.TermsOfServiceVo">
|
|
|
- SELECT id, title, content, version, language, is_default, create_time, update_time
|
|
|
+ SELECT id, title, content, version, language, is_default, create_time, update_time,type
|
|
|
FROM terms_of_service ${ew.customSqlSegment}
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<select id="selectTermsServiceList" resultType="org.dromara.business.domain.vo.TermsOfServiceVo">
|
|
|
- SELECT id, title, content, version, language, is_default, create_time, update_time
|
|
|
+ SELECT id, title, content, version, language, is_default, create_time, update_time,type
|
|
|
FROM terms_of_service ${ew.customSqlSegment}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectVoInfoById" resultType="org.dromara.business.domain.vo.TermsOfServiceVo">
|
|
|
- SELECT id, title, content, version, language, is_default, create_time, update_time
|
|
|
+ SELECT id, title, content, version, language, is_default, create_time, update_time,type
|
|
|
FROM terms_of_service WHERE id = #{id}
|
|
|
</select>
|
|
|
|
|
|
@@ -39,6 +39,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDefault != null">
|
|
|
is_default = #{isDefault},
|
|
|
</if>
|
|
|
+ <if test="type != null">
|
|
|
+ type = #{type},
|
|
|
+ </if>
|
|
|
update_time = NOW()
|
|
|
</set>
|
|
|
WHERE id = #{id}
|
|
|
@@ -52,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="version != null and version != ''">version,</if>
|
|
|
<if test="language != null and language != ''">language,</if>
|
|
|
<if test="isDefault != null">is_default,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
</trim>
|
|
|
VALUES
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -60,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="version != null and version != ''">#{version},</if>
|
|
|
<if test="language != null and language != ''">#{language},</if>
|
|
|
<if test="isDefault != null">#{isDefault},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -77,11 +82,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectTermsServiceListMax" resultType="org.dromara.business.domain.vo.TermsOfServiceVo">
|
|
|
SELECT id, title, content, version, language, is_default, create_time, update_time
|
|
|
- FROM terms_of_service where is_default = true limit 1
|
|
|
+ FROM terms_of_service where is_default = true and type = #{type} limit 1
|
|
|
</select>
|
|
|
|
|
|
<update id="updateTermsServiceOtherFalse">
|
|
|
- UPDATE terms_of_service set is_default = false
|
|
|
+ UPDATE terms_of_service set is_default = false where type =#{type}
|
|
|
</update>
|
|
|
|
|
|
|