|
@@ -0,0 +1,193 @@
|
|
|
|
+<?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.boman.report.mapper.StatisticReportMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="generator.StatisticReport">
|
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
|
+ <result column="report_name" jdbcType="VARCHAR" property="reportName" />
|
|
|
|
+ <result column="report_id" jdbcType="VARCHAR" property="reportId" />
|
|
|
|
+ <result column="template_name" jdbcType="VARCHAR" property="templateName" />
|
|
|
|
+ <result column="start_time" jdbcType="DATE" property="startTime" />
|
|
|
|
+ <result column="end_time" jdbcType="DATE" property="endTime" />
|
|
|
|
+ <result column="report_status" jdbcType="VARCHAR" property="reportStatus" />
|
|
|
|
+ <result column="status" jdbcType="CHAR" property="status" />
|
|
|
|
+ <result column="rep_upload_file" jdbcType="VARCHAR" property="repUploadFile" />
|
|
|
|
+ <result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
|
+ <result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
+ <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
|
|
|
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
+ id, report_name, report_id, template_name, start_time, end_time, report_status, `status`,
|
|
|
|
+ rep_upload_file, remark, create_by, create_time, update_by, update_time
|
|
|
|
+ </sql>
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
+ from statistic_report
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </select>
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
|
+ delete from statistic_report
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </delete>
|
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="generator.StatisticReport" useGeneratedKeys="true">
|
|
|
|
+ insert into statistic_report (report_name, report_id, template_name,
|
|
|
|
+ start_time, end_time, report_status,
|
|
|
|
+ `status`, rep_upload_file, remark,
|
|
|
|
+ create_by, create_time, update_by,
|
|
|
|
+ update_time)
|
|
|
|
+ values (#{reportName,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{templateName,jdbcType=VARCHAR},
|
|
|
|
+ #{startTime,jdbcType=DATE}, #{endTime,jdbcType=DATE}, #{reportStatus,jdbcType=VARCHAR},
|
|
|
|
+ #{status,jdbcType=CHAR}, #{repUploadFile,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
|
|
|
+ #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
|
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP})
|
|
|
|
+ </insert>
|
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="generator.StatisticReport" useGeneratedKeys="true">
|
|
|
|
+ insert into statistic_report
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="reportName != null">
|
|
|
|
+ report_name,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="reportId != null">
|
|
|
|
+ report_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="templateName != null">
|
|
|
|
+ template_name,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
+ start_time,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
+ end_time,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="reportStatus != null">
|
|
|
|
+ report_status,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ `status`,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="repUploadFile != null">
|
|
|
|
+ rep_upload_file,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null">
|
|
|
|
+ remark,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createBy != null">
|
|
|
|
+ create_by,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
+ create_time,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy != null">
|
|
|
|
+ update_by,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ update_time,
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="reportName != null">
|
|
|
|
+ #{reportName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="reportId != null">
|
|
|
|
+ #{reportId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="templateName != null">
|
|
|
|
+ #{templateName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
+ #{startTime,jdbcType=DATE},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
+ #{endTime,jdbcType=DATE},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="reportStatus != null">
|
|
|
|
+ #{reportStatus,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ #{status,jdbcType=CHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="repUploadFile != null">
|
|
|
|
+ #{repUploadFile,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null">
|
|
|
|
+ #{remark,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createBy != null">
|
|
|
|
+ #{createBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy != null">
|
|
|
|
+ #{updateBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="generator.StatisticReport">
|
|
|
|
+ update statistic_report
|
|
|
|
+ <set>
|
|
|
|
+ <if test="reportName != null">
|
|
|
|
+ report_name = #{reportName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="reportId != null">
|
|
|
|
+ report_id = #{reportId,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="templateName != null">
|
|
|
|
+ template_name = #{templateName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
+ start_time = #{startTime,jdbcType=DATE},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
+ end_time = #{endTime,jdbcType=DATE},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="reportStatus != null">
|
|
|
|
+ report_status = #{reportStatus,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ `status` = #{status,jdbcType=CHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="repUploadFile != null">
|
|
|
|
+ rep_upload_file = #{repUploadFile,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null">
|
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createBy != null">
|
|
|
|
+ create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateBy != null">
|
|
|
|
+ update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="generator.StatisticReport">
|
|
|
|
+ update statistic_report
|
|
|
|
+ set report_name = #{reportName,jdbcType=VARCHAR},
|
|
|
|
+ report_id = #{reportId,jdbcType=VARCHAR},
|
|
|
|
+ template_name = #{templateName,jdbcType=VARCHAR},
|
|
|
|
+ start_time = #{startTime,jdbcType=DATE},
|
|
|
|
+ end_time = #{endTime,jdbcType=DATE},
|
|
|
|
+ report_status = #{reportStatus,jdbcType=VARCHAR},
|
|
|
|
+ `status` = #{status,jdbcType=CHAR},
|
|
|
|
+ rep_upload_file = #{repUploadFile,jdbcType=VARCHAR},
|
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
+ create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
+ update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </update>
|
|
|
|
+</mapper>
|