NoticeTemplateMapper.xml
1.15 KB
<?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="com.yohobuy.platform.dal.users.NoticeTemplateMapper">
<resultMap id="BaseResultMap" type="com.yohobuy.platform.dal.users.model.NoticeTemplate">
<id column="id" property="id" jdbcType="INTEGER"/>
<result column="template_id" property="templateId" jdbcType="INTEGER"/>
<result column="template_name" property="templateName" jdbcType="VARCHAR"/>
<result column="content" property="content" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id, template_id, template_name, content
</sql>
<select id="selectAllUser" resultMap="BaseResultMap">
select template_name,content from notice_template where template_name="register"
</select>
<update id="updateByTemplateName" parameterType="java.lang.String">
update notice_template set
<if test="content != null">
content=#{content,jdbcType=VARCHAR}
</if>
where template_name = "register" <!--#{templateName,jdbcType=VARCHAR}-->
</update>
</mapper>