From 5e7be1e46d5d1787519189f23fb60bdeb775a7e7 Mon Sep 17 00:00:00 2001
From: 郑永安 <zyazyz250@sina.com>
Date: 星期五, 18 八月 2023 14:04:35 +0800
Subject: [PATCH] Msg

---
 src/main/java/com/gk/hotwork/Mapper/mybatis/SafetyFacilityInspectionMapper.xml |  208 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 208 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetyFacilityInspectionMapper.xml b/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetyFacilityInspectionMapper.xml
new file mode 100644
index 0000000..49ab1f9
--- /dev/null
+++ b/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetyFacilityInspectionMapper.xml
@@ -0,0 +1,208 @@
+<?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.gk.hotwork.Mapper.SafetyFacilityInspectionMapper" >
+  <resultMap id="BaseResultMap" type="com.gk.hotwork.Domain.SafetyFacilityInspection" >
+    <!--          -->
+    <id column="id" property="id" jdbcType="BIGINT" />
+    <result column="valid_flag" property="validFlag" jdbcType="TINYINT" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="create_by" property="createBy" jdbcType="VARCHAR" />
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="submit_date" property="submitDate" jdbcType="TIMESTAMP" />
+    <result column="type" property="type" jdbcType="INTEGER" />
+    <result column="project_name" property="projectName" jdbcType="VARCHAR" />
+    <result column="progress" property="progress" jdbcType="INTEGER" />
+    <result column="expert" property="expert" jdbcType="VARCHAR" />
+    <result column="contact" property="contact" jdbcType="VARCHAR" />
+    <result column="telephone" property="telephone" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    <!--          -->
+    id, valid_flag, create_time, create_by, update_time, submit_date, type, project_name, 
+    progress, expert, contact, telephone
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    <!--          -->
+    select 
+    <include refid="Base_Column_List" />
+    from safety_facility_inspection
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    <!--          -->
+    delete from safety_facility_inspection
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.gk.hotwork.Domain.SafetyFacilityInspection" >
+    <!--          -->
+    insert into safety_facility_inspection (id, valid_flag, create_time, 
+      create_by, update_time, submit_date, 
+      type, project_name, progress, 
+      expert, contact, telephone
+      )
+    values (#{id,jdbcType=BIGINT}, #{validFlag,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{submitDate,jdbcType=TIMESTAMP}, 
+      #{type,jdbcType=INTEGER}, #{projectName,jdbcType=VARCHAR}, #{progress,jdbcType=INTEGER}, 
+      #{expert,jdbcType=VARCHAR}, #{contact,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.gk.hotwork.Domain.SafetyFacilityInspection" >
+    <!--          -->
+    insert into safety_facility_inspection
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="validFlag != null" >
+        valid_flag,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="createBy != null" >
+        create_by,
+      </if>
+      <if test="updateTime != null" >
+        update_time,
+      </if>
+      <if test="submitDate != null" >
+        submit_date,
+      </if>
+      <if test="type != null" >
+        type,
+      </if>
+      <if test="projectName != null" >
+        project_name,
+      </if>
+      <if test="progress != null" >
+        progress,
+      </if>
+      <if test="expert != null" >
+        expert,
+      </if>
+      <if test="contact != null" >
+        contact,
+      </if>
+      <if test="telephone != null" >
+        telephone,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="validFlag != null" >
+        #{validFlag,jdbcType=TINYINT},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createBy != null" >
+        #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="submitDate != null" >
+        #{submitDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="type != null" >
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="projectName != null" >
+        #{projectName,jdbcType=VARCHAR},
+      </if>
+      <if test="progress != null" >
+        #{progress,jdbcType=INTEGER},
+      </if>
+      <if test="expert != null" >
+        #{expert,jdbcType=VARCHAR},
+      </if>
+      <if test="contact != null" >
+        #{contact,jdbcType=VARCHAR},
+      </if>
+      <if test="telephone != null" >
+        #{telephone,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gk.hotwork.Domain.SafetyFacilityInspection" >
+    <!--          -->
+    update safety_facility_inspection
+    <set >
+      <if test="validFlag != null" >
+        valid_flag = #{validFlag,jdbcType=TINYINT},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createBy != null" >
+        create_by = #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null" >
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="submitDate != null" >
+        submit_date = #{submitDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="type != null" >
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="projectName != null" >
+        project_name = #{projectName,jdbcType=VARCHAR},
+      </if>
+      <if test="progress != null" >
+        progress = #{progress,jdbcType=INTEGER},
+      </if>
+      <if test="expert != null" >
+        expert = #{expert,jdbcType=VARCHAR},
+      </if>
+      <if test="contact != null" >
+        contact = #{contact,jdbcType=VARCHAR},
+      </if>
+      <if test="telephone != null" >
+        telephone = #{telephone,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gk.hotwork.Domain.SafetyFacilityInspection" >
+    <!--          -->
+    update safety_facility_inspection
+    set valid_flag = #{validFlag,jdbcType=TINYINT},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      create_by = #{createBy,jdbcType=VARCHAR},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      submit_date = #{submitDate,jdbcType=TIMESTAMP},
+      type = #{type,jdbcType=INTEGER},
+      project_name = #{projectName,jdbcType=VARCHAR},
+      progress = #{progress,jdbcType=INTEGER},
+      expert = #{expert,jdbcType=VARCHAR},
+      contact = #{contact,jdbcType=VARCHAR},
+      telephone = #{telephone,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  
+  <select id="selectPages" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />   
+    from safety_facility_inspection
+    where valid_flag = 1 
+    <if test="params.submitDateStartTime != null  and params.submitDateStartTime != ''">
+      and submit_date &gt;=#{params.submitDateStartTime,jdbcType=VARCHAR} 
+    </if>
+    <if test="params.submitDateEndTime != null  and params.submitDateEndTime != ''">
+      and submit_date &lt;=#{params.submitDateEndTime,jdbcType=VARCHAR} 
+    </if>
+    <if test="params.expert != null">
+      and expert = #{params.expert,jdbcType=VARCHAR}
+    </if>
+    <if test="params.progress != null">
+      and progress = #{params.progress,jdbcType=INTEGER}
+    </if>
+    ORDER BY
+    type,
+    create_time DESC
+  </select>
+  
+</mapper>
\ No newline at end of file

--
Gitblit v1.9.2