86 lines
3.8 KiB
XML
86 lines
3.8 KiB
XML
<?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.evotech.hd.cloud.dao.BatteryStationDao">
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.evotech.hd.common.core.entity.cloud.BatteryStation">
|
|
<id column="pk_id" property="pkId" />
|
|
<result column="proxy_id" property="proxyId" />
|
|
<result column="name" property="name" />
|
|
<result column="code" property="code" />
|
|
<result column="status" property="status" />
|
|
<result column="type" property="type" />
|
|
<result column="address" property="address" />
|
|
<result column="address_province" property="addressProvince" />
|
|
<result column="address_city" property="addressCity" />
|
|
<result column="address_area" property="addressArea" />
|
|
<result column="register_date" property="registerDate" />
|
|
<result column="contacts" property="contacts" />
|
|
<result column="phone" property="phone" />
|
|
<result column="del_flag" property="delFlag" />
|
|
<result column="active_date" property="activeDate" />
|
|
<result column="location_point" property="locationPoint" />
|
|
<result column="open_all_day" property="openAllDay" />
|
|
<result column="td_quantity" property="tdQuantity" />
|
|
<result column="jqr_quantity" property="jqrQuantity" />
|
|
<result column="cdj_quantity" property="cdjQuantity" />
|
|
<result column="dcc_quantity" property="dccQuantity" />
|
|
<result column="dc_quantity" property="dcQuantity" />
|
|
<result column="ctime" property="ctime" />
|
|
<result column="creater" property="creater" />
|
|
<result column="uptime" property="uptime" />
|
|
<result column="updater" property="updater" />
|
|
<result column="store_id" property="storeId" />
|
|
<result column="org_code" property="orgCode" />
|
|
<collection property="dcList"
|
|
select="com.evotech.hd.cloud.dao.BatteryStationDcDao.getDcByStationCode"
|
|
column="code">
|
|
</collection>
|
|
<collection property="dccList"
|
|
select="com.evotech.hd.cloud.dao.BatteryStationDccDao.getDccByStationCode"
|
|
column="code">
|
|
</collection>
|
|
<collection property="djList"
|
|
select="com.evotech.hd.cloud.dao.BatteryStationDjDao.getDjByStationCode"
|
|
column="code">
|
|
</collection>
|
|
<collection property="robotList"
|
|
select="com.evotech.hd.cloud.dao.BatteryStationRobotDao.getRobotByStationCode"
|
|
column="code">
|
|
</collection>
|
|
</resultMap>
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
pk_id, proxy_id, name, code, status, type, address, address_province, address_city, address_area, register_date, contacts, phone, del_flag, active_date, location_point, open_all_day, td_quantity, jqr_quantity, cdj_quantity, dcc_quantity, dc_quantity, ctime, creater, uptime, updater
|
|
</sql>
|
|
|
|
|
|
<select id="listStation" resultMap="BaseResultMap">
|
|
select
|
|
a.*
|
|
From
|
|
yt_t_battery_station a
|
|
where
|
|
del_flag = 0
|
|
<if test="plbsr.proxyId != null and plbsr.proxyId != '' ">
|
|
and a.proxy_id = #{plbsr.proxyId}
|
|
</if>
|
|
<if test="plbsr.name != null and plbsr.name != '' ">
|
|
and a.name like CONCAT('%', #{plbsr.name}, '%')
|
|
</if>
|
|
<if test="plbsr.code != null and plbsr.code != '' ">
|
|
and a.code like CONCAT('%', #{plbsr.code}, '%')
|
|
</if>
|
|
|
|
<if test="plbsr.status != null ">
|
|
and a.status = #{plbsr.status}
|
|
</if>
|
|
<if test="plbsr.type != null ">
|
|
and a.type = #{plbsr.type}
|
|
</if>
|
|
order by a.pk_id desc
|
|
</select>
|
|
|
|
</mapper>
|