新增备注列表
此提交包含在:
@@ -1,62 +1,48 @@
|
||||
<?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="lingtao.net.dao.InformationMapper">
|
||||
<mapper namespace="lingtao.net.dao.StandardMemoMapper">
|
||||
<select id="getStandardMemos" parameterType="lingtao.net.bean.StandardMemo"
|
||||
resultType="lingtao.net.bean.StandardMemo">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tbl_standard_memo
|
||||
<where>
|
||||
<if test="content != null and content != ''">
|
||||
title like '%${content}%' or content like '%${content}%'
|
||||
</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="getInformations" parameterType="Information"
|
||||
resultType="Information">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tbl_information
|
||||
<where>
|
||||
<if test="content != null and content != ''">
|
||||
content like '%${content}%'
|
||||
</if>
|
||||
</where>
|
||||
order by id
|
||||
</select>
|
||||
|
||||
<!-- 获取简答题 -->
|
||||
<select id="getShortAnswers" resultType="Information">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tbl_information
|
||||
WHERE TYPE = 0
|
||||
ORDER BY id
|
||||
</select>
|
||||
<insert id="addStandardMemo" parameterType="lingtao.net.bean.StandardMemo">
|
||||
insert into tbl_standard_memo
|
||||
(content, createBy, createDate, title)
|
||||
values (#{content}, #{createBy}, now(), #{title})
|
||||
</insert>
|
||||
|
||||
<insert id="addInformation" parameterType="Information">
|
||||
insert into
|
||||
tbl_information
|
||||
(content,type,createBy,createDate,attachment)
|
||||
values
|
||||
(#{content},#{type},#{createBy},now(),#{attachment})
|
||||
</insert>
|
||||
<update id="updateStandardMemoById" parameterType="lingtao.net.bean.StandardMemo">
|
||||
update tbl_standard_memo
|
||||
<set>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
updateBy = #{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateDate != null">
|
||||
updateDate = now(),
|
||||
</if>
|
||||
<if test="attachment != null">
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<update id="updateInformationById" parameterType="Information">
|
||||
update tbl_information
|
||||
<set>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
updateBy = #{updateBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateDate != null">
|
||||
updateDate = now(),
|
||||
</if>
|
||||
<if test="attachment != null">
|
||||
attachment = #{attachment,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInformationById">
|
||||
delete from tbl_information where id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteStandardMemoById">
|
||||
delete
|
||||
from tbl_standard_memo
|
||||
where id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
新增問題並參考
封鎖使用者