|
@@ -0,0 +1,185 @@
|
|
|
+<?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.zcxk.admin.dao.FacilitiesConfigMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.zcxk.admin.entity.FacilitiesConfig">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="pid" jdbcType="INTEGER" property="pid" />
|
|
|
+ <result column="facilities_type" jdbcType="VARCHAR" property="facilitiesType" />
|
|
|
+ <result column="aerial_view_3d" jdbcType="INTEGER" property="aerialView3d" />
|
|
|
+ <result column="site_photo_3d" jdbcType="INTEGER" property="sitePhoto3d" />
|
|
|
+ <result column="process_flow_chart" jdbcType="INTEGER" property="processFlowChart" />
|
|
|
+ <result column="process_site_photo" jdbcType="INTEGER" property="processSitePhoto" />
|
|
|
+ <result column="icon" jdbcType="VARCHAR" property="icon" />
|
|
|
+ <result column="site_id" jdbcType="INTEGER" property="siteId" />
|
|
|
+ <result column="base_info_num" jdbcType="INTEGER" property="baseInfoNum" />
|
|
|
+ <result column="label_info_num" jdbcType="INTEGER" property="labelInfoNum" />
|
|
|
+ <result column="facilities_num" jdbcType="INTEGER" property="facilitiesNum" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, pid, facilities_type, aerial_view_3d, site_photo_3d, process_flow_chart, process_site_photo,
|
|
|
+ icon, site_id, base_info_num, label_info_num
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from sc_facilities_config
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <select id="selectList" resultType="com.zcxk.admin.entity.FacilitiesConfig">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />,b.facilities_num
|
|
|
+ from sc_facilities_config a left join (select count(1)facilities_num ,facilities_config_id from sc_facilities_entity
|
|
|
+ group by facilities_config_id ) b on a.id=b.facilities_config_id
|
|
|
+
|
|
|
+ <where>
|
|
|
+ <if test="facilitiesType != null">
|
|
|
+ and facilities_type = #{facilitiesType,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="pid != null">
|
|
|
+ and pid = #{pid,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ delete from sc_facilities_config
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.zcxk.admin.entity.FacilitiesConfig" useGeneratedKeys="true">
|
|
|
+ insert into sc_facilities_config (pid, facilities_type, aerial_view_3d,
|
|
|
+ site_photo_3d, process_flow_chart, process_site_photo,
|
|
|
+ icon, site_id, base_info_num,
|
|
|
+ label_info_num, facilities_num)
|
|
|
+ values (#{pid,jdbcType=INTEGER}, #{facilitiesType,jdbcType=VARCHAR}, #{aerialView3d,jdbcType=INTEGER},
|
|
|
+ #{sitePhoto3d,jdbcType=INTEGER}, #{processFlowChart,jdbcType=INTEGER}, #{processSitePhoto,jdbcType=INTEGER},
|
|
|
+ #{icon,jdbcType=VARCHAR}, #{siteId,jdbcType=INTEGER}, #{baseInfoNum,jdbcType=INTEGER},
|
|
|
+ #{labelInfoNum,jdbcType=INTEGER}, #{facilitiesNum,jdbcType=INTEGER})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.zcxk.admin.entity.FacilitiesConfig" useGeneratedKeys="true">
|
|
|
+ insert into sc_facilities_config
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="pid != null">
|
|
|
+ pid,
|
|
|
+ </if>
|
|
|
+ <if test="facilitiesType != null">
|
|
|
+ facilities_type,
|
|
|
+ </if>
|
|
|
+ <if test="aerialView3d != null">
|
|
|
+ aerial_view_3d,
|
|
|
+ </if>
|
|
|
+ <if test="sitePhoto3d != null">
|
|
|
+ site_photo_3d,
|
|
|
+ </if>
|
|
|
+ <if test="processFlowChart != null">
|
|
|
+ process_flow_chart,
|
|
|
+ </if>
|
|
|
+ <if test="processSitePhoto != null">
|
|
|
+ process_site_photo,
|
|
|
+ </if>
|
|
|
+ <if test="icon != null">
|
|
|
+ icon,
|
|
|
+ </if>
|
|
|
+ <if test="siteId != null">
|
|
|
+ site_id,
|
|
|
+ </if>
|
|
|
+ <if test="baseInfoNum != null">
|
|
|
+ base_info_num,
|
|
|
+ </if>
|
|
|
+ <if test="labelInfoNum != null">
|
|
|
+ label_info_num,
|
|
|
+ </if>
|
|
|
+ <if test="facilitiesNum != null">
|
|
|
+ facilities_num,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="pid != null">
|
|
|
+ #{pid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="facilitiesType != null">
|
|
|
+ #{facilitiesType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aerialView3d != null">
|
|
|
+ #{aerialView3d,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sitePhoto3d != null">
|
|
|
+ #{sitePhoto3d,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="processFlowChart != null">
|
|
|
+ #{processFlowChart,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="processSitePhoto != null">
|
|
|
+ #{processSitePhoto,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="icon != null">
|
|
|
+ #{icon,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="siteId != null">
|
|
|
+ #{siteId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="baseInfoNum != null">
|
|
|
+ #{baseInfoNum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="labelInfoNum != null">
|
|
|
+ #{labelInfoNum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="facilitiesNum != null">
|
|
|
+ #{facilitiesNum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.zcxk.admin.entity.FacilitiesConfig">
|
|
|
+ update sc_facilities_config
|
|
|
+ <set>
|
|
|
+ <if test="pid != null">
|
|
|
+ pid = #{pid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="facilitiesType != null">
|
|
|
+ facilities_type = #{facilitiesType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aerialView3d != null">
|
|
|
+ aerial_view_3d = #{aerialView3d,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sitePhoto3d != null">
|
|
|
+ site_photo_3d = #{sitePhoto3d,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="processFlowChart != null">
|
|
|
+ process_flow_chart = #{processFlowChart,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="processSitePhoto != null">
|
|
|
+ process_site_photo = #{processSitePhoto,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="icon != null">
|
|
|
+ icon = #{icon,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="siteId != null">
|
|
|
+ site_id = #{siteId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="baseInfoNum != null">
|
|
|
+ base_info_num = #{baseInfoNum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="labelInfoNum != null">
|
|
|
+ label_info_num = #{labelInfoNum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="facilitiesNum != null">
|
|
|
+ facilities_num = #{facilitiesNum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.zcxk.admin.entity.FacilitiesConfig">
|
|
|
+ update sc_facilities_config
|
|
|
+ set pid = #{pid,jdbcType=INTEGER},
|
|
|
+ facilities_type = #{facilitiesType,jdbcType=VARCHAR},
|
|
|
+ aerial_view_3d = #{aerialView3d,jdbcType=INTEGER},
|
|
|
+ site_photo_3d = #{sitePhoto3d,jdbcType=INTEGER},
|
|
|
+ process_flow_chart = #{processFlowChart,jdbcType=INTEGER},
|
|
|
+ process_site_photo = #{processSitePhoto,jdbcType=INTEGER},
|
|
|
+ icon = #{icon,jdbcType=VARCHAR},
|
|
|
+ site_id = #{siteId,jdbcType=INTEGER},
|
|
|
+ base_info_num = #{baseInfoNum,jdbcType=INTEGER},
|
|
|
+ label_info_num = #{labelInfoNum,jdbcType=INTEGER},
|
|
|
+ facilities_num = #{facilitiesNum,jdbcType=INTEGER}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+</mapper>
|