electripper/electripper-system/src/main/resources/mapper/system/EtOperatingAreaMapper.xml

110 lines
5.8 KiB
XML
Raw Normal View History

2024-05-23 17:24:41 +08:00
<?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.ruoyi.system.mapper.EtOperatingAreaMapper">
<resultMap type="EtOperatingArea" id="EtOperatingAreaResult">
<result property="areaId" column="area_id" />
<result property="areaName" column="area_name" />
<result property="boundary" column="boundary" />
<result property="boundaryStr" column="boundary_str" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="contact" column="contact" />
<result property="phone" column="phone" />
<result property="status" column="status" />
<result property="areaTime" column="area_time" />
<result property="servicePhone" column="service_phone" />
<result property="slogan" column="slogan" />
<result property="province" column="province" />
<result property="city" column="city" />
<result property="county" column="county" />
<result property="areaOutOutage" column="area_out_outage" />
<result property="parkingOutDispatch" column="parking_out_dispatch" />
<result property="areaOutDispatch" column="area_out_dispatch" />
<result property="noRidingOutage" column="no_riding_outage" />
<result property="authentication" column="authentication" />
<result property="msgSwitch" column="msg_switch" />
<result property="undercharge" column="undercharge" />
<result property="error" column="error" />
<result property="agreement" column="agreement" />
<result property="deposit" column="deposit" />
<result property="outage" column="outage" />
</resultMap>
<sql id="selectEtOperatingAreaVo">
select area_id, area_name, AsText(boundary) boundary,
boundary_str, longitude, latitude, create_by, create_time,
contact, phone, status, area_time, service_phone, slogan, province,city,
county, area_out_outage, parking_out_dispatch, area_out_dispatch,
no_riding_outage, authentication, msg_switch, undercharge, error, agreement, deposit, outage from et_operating_area
</sql>
<select id="selectEtOperatingAreaList" parameterType="EtOperatingArea" resultMap="EtOperatingAreaResult">
<include refid="selectEtOperatingAreaVo"/>
<where>
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
</where>
</select>
<select id="selectEtOperatingAreaByAreaId" parameterType="Long" resultMap="EtOperatingAreaResult">
<include refid="selectEtOperatingAreaVo"/>
where area_id = #{areaId}
</select>
<!-- <select id="selectAreaAll" resultMap="EtOperatingAreaResult">-->
<!-- <include refid="selectEtOperatingAreaVo"/>-->
<!-- </select>-->
<!-- <insert id="insertEtOperatingArea" parameterType="EtOperatingArea" useGeneratedKeys="true" keyProperty="areaId">-->
<!-- insert into et_operating_area-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="areaName != null">area_name,</if>-->
<!-- <if test="boundary != null">boundary,</if>-->
<!-- <if test="longitude != null">longitude,</if>-->
<!-- <if test="latitude != null">latitude,</if>-->
<!-- <if test="createBy != null">create_by,</if>-->
<!-- <if test="createTime != null">create_time,</if>-->
<!-- </trim>-->
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
<!-- <if test="areaName != null">#{areaName},</if>-->
<!-- <if test="boundary != null">#{boundary},</if>-->
<!-- <if test="longitude != null">#{longitude},</if>-->
<!-- <if test="latitude != null">#{latitude},</if>-->
<!-- <if test="createBy != null">#{createBy},</if>-->
<!-- <if test="createTime != null">#{createTime},</if>-->
<!-- </trim>-->
<!-- </insert>-->
<!-- <update id="updateEtOperatingArea" parameterType="EtOperatingArea">-->
<!-- update et_operating_area-->
<!-- <trim prefix="SET" suffixOverrides=",">-->
<!-- <if test="areaName != null">area_name = #{areaName},</if>-->
<!-- <if test="boundary != null">boundary = #{boundary},</if>-->
<!-- <if test="longitude != null">longitude = #{longitude},</if>-->
<!-- <if test="latitude != null">latitude = #{latitude},</if>-->
<!-- <if test="createBy != null">create_by = #{createBy},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<!-- </trim>-->
<!-- where area_id = #{areaId}-->
<!-- </update>-->
<!-- <select id="checkAreaNameUnique" parameterType="String" resultMap="EtOperatingAreaResult">-->
<!-- select area_id, area_name from et_operating_area where area_name = #{areaName} limit 1-->
<!-- </select>-->
<!-- <delete id="deleteEtOperatingAreaByAreaId" parameterType="Long">-->
<!-- delete from et_operating_area where area_id = #{areaId}-->
<!-- </delete>-->
<!-- <delete id="deleteEtOperatingAreaByAreaIds" parameterType="String">-->
<!-- delete from et_operating_area where area_id in-->
<!-- <foreach item="areaId" collection="array" open="(" separator="," close=")">-->
<!-- #{areaId}-->
<!-- </foreach>-->
<!-- </delete>-->
</mapper>