8d73e917
陈威
初始化提交
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<?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.hotent.portal.persistence.dao.SysIndexMyLayoutDao">
<resultMap id="SysIndexMyLayout" type="com.hotent.portal.model.SysIndexMyLayout">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="userId" column="USER_ID" jdbcType="VARCHAR"/>
<result property="templateHtml" column="TEMPLATE_HTML" jdbcType="LONGVARCHAR"/>
<result property="designHtml" column="DESIGN_HTML" jdbcType="LONGVARCHAR"/>
<result property="name" column="NAME_" jdbcType="VARCHAR"/>
<result property="valid" column="VALID_" jdbcType="NUMERIC"/>
</resultMap>
<delete id="removeByUserId" parameterType="java.lang.String">
DELETE FROM portal_sys_my_layout
WHERE
USER_ID=#{userId}
</delete>
<select id="getByUserId" parameterType="java.lang.String" resultMap="SysIndexMyLayout">
SELECT <include refid="columns"/>
FROM portal_sys_my_layout
WHERE
user_id=#{userId}
</select>
<sql id="columns">
id,user_id,template_html,design_html
</sql>
<select id="updateValid" >
UPDATE portal_sys_my_layout SET VALID_ = #{type} WHERE USER_ID=#{userId}
</select>
<select id="setValid" >
UPDATE portal_sys_my_layout SET VALID_ = 1 WHERE ID=#{id}
</select>
</mapper>
|