Skip to content

Instantly share code, notes, and snippets.

@hinunbi
Created July 5, 2013 12:22
Show Gist options
  • Save hinunbi/5934184 to your computer and use it in GitHub Desktop.
Save hinunbi/5934184 to your computer and use it in GitHub Desktop.
MailerMapper.xml
<?xml version="1.0" encoding="euckr"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="mailer">
<select id="selectEmail" resultType="hashmap" parameterType="map">
SELECT
MailID,
FromAddress,
ToAddress,
Subject,
Body,
RequestTime,
Send,
SendTime
FROM EMAIL
WHERE
Send = 'N'
limit 1000
</select>
<update id="updateEmail" parameterType="map">
UPDATE EMAIL
SET
Send = 'Y',
SendTime = NOW()
WHERE
MailID = #{MailID}
</update>
</mapper>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment