|
@@ -0,0 +1,52 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://www.mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="org.hswebframework.web.dashboard.local.dao.DashBoardConfigDao">
|
|
|
+ <resultMap id="DashBoardConfigEntityResultMap" type="org.hswebframework.web.dashboard.DashBoardConfigEntity">
|
|
|
+ <id property="id" column="u_id" javaType="string" jdbcType="VARCHAR"/>
|
|
|
+ <result property="name" column="name" javaType="String" jdbcType="VARCHAR"/>
|
|
|
+ <result property="type" column="type" javaType="String" jdbcType="VARCHAR"/>
|
|
|
+ <result property="template" column="template" javaType="String" jdbcType="CLOB"/>
|
|
|
+ <result property="script" column="script" javaType="String" jdbcType="CLOB"/>
|
|
|
+ <result property="scriptLanguage" column="script_lang" javaType="String" jdbcType="VARCHAR"/>
|
|
|
+ <result property="creatorId" column="creator_id" javaType="String" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createTime" column="create_time" javaType="Date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="status" column="status" javaType="org.hswebframework.web.commons.entity.DataStatusEnum" jdbcType="INTEGER"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!--用于动态生成sql所需的配置-->
|
|
|
+ <sql id="config">
|
|
|
+ <bind name="resultMapId" value="'TemplateResultMap'"/>
|
|
|
+ <bind name="tableName" value="'s_dashboard_conf'"/>
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <insert id="insert" parameterType="org.hswebframework.web.dashboard.DashBoardConfigEntity">
|
|
|
+ <include refid="config"/>
|
|
|
+ <include refid="BasicMapper.buildInsertSql"/>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <delete id="deleteByPk" parameterType="String">
|
|
|
+ delete from s_dashboard_conf where u_id =#{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="delete" parameterType="org.hswebframework.web.commons.entity.Entity">
|
|
|
+ <include refid="config"/>
|
|
|
+ <include refid="BasicMapper.buildDeleteSql"/>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <update id="update" parameterType="org.hswebframework.web.commons.entity.Entity">
|
|
|
+ <include refid="config"/>
|
|
|
+ <include refid="BasicMapper.buildUpdateSql"/>
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="query" parameterType="org.hswebframework.web.commons.entity.Entity" resultMap="DashBoardConfigEntityResultMap">
|
|
|
+ <include refid="config"/>
|
|
|
+ <include refid="BasicMapper.buildSelectSql"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="count" parameterType="org.hswebframework.web.commons.entity.Entity" resultType="int">
|
|
|
+ <include refid="config"/>
|
|
|
+ <include refid="BasicMapper.buildTotalSql"/>
|
|
|
+ </select>
|
|
|
+</mapper>
|