62 lines
2.2 KiB
XML
62 lines
2.2 KiB
XML
|
|
<?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="UnivWordAchive">
|
||
|
|
|
||
|
|
<insert id="insertUnivWordAchive" parameterType="UnivWordAchive">
|
||
|
|
INSERT INTO UnivWordAchive ( wordAchiveId, uid, pointCaseType, wordsId, score, accuracy, fluent, integrity, content, created , areaid )
|
||
|
|
Values ( #{wordAchiveId}, #{uid}, #{pointCaseType}, #{wordsId}, #{score}, #{accuracy}, #{fluent}, #{integrity}, #{content},current_timestamp ,#{areaId} )
|
||
|
|
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateUnivWordAchive" parameterType="UnivWordAchive">
|
||
|
|
|
||
|
|
|
||
|
|
UPDATE UnivWordAchive SET
|
||
|
|
|
||
|
|
wordAchiveId = #{wordAchiveId}, uid = #{uid}, pointCaseType = #{pointCaseType}, wordsId = #{wordsId}, score = #{score}, accuracy = #{accuracy}, fluent = #{fluent}, integrity = #{integrity}, content = #{content}, created = #{created} , areaid = #{areaId}
|
||
|
|
where wordAchiveId=#{wordAchiveId}
|
||
|
|
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<select id="getUnivWordAchiveByKey" parameterType="java.lang.Integer" resultType="UnivWordAchive">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
SELECT wordAchiveId , uid , pointCaseType , wordsId , score , accuracy , fluent , integrity , content , created , areaid
|
||
|
|
FROM UnivWordAchive WHERE wordAchiveId=#{wordAchiveId}
|
||
|
|
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
<select id="getSeqUnivWordAchive" resultType="Integer" useCache="false" flushCache="true">
|
||
|
|
|
||
|
|
|
||
|
|
SELECT nextval('seq_univwordAchiveId') ;
|
||
|
|
|
||
|
|
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getUnivWordAchivesByUid" parameterType="Long" resultType="UnivWordAchive">
|
||
|
|
|
||
|
|
|
||
|
|
SELECT wordAchiveId , uid , pointCaseType , wordsId , score , accuracy , fluent , integrity ,
|
||
|
|
content , created , areaid
|
||
|
|
FROM UnivWordAchive
|
||
|
|
|
||
|
|
WHERE uid=#{uid}
|
||
|
|
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getUnivWordAchivesByYesterday" resultType="UnivWordAchive">
|
||
|
|
|
||
|
|
|
||
|
|
SELECT wordAchiveId , uid , pointCaseType , wordsId , score , accuracy , fluent , integrity ,
|
||
|
|
content , created , areaid
|
||
|
|
FROM UnivWordAchive
|
||
|
|
|
||
|
|
where created < current_date and created > current_date - interval '1 day'
|
||
|
|
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|