初次提交
This commit is contained in:
165
file-center/src/main/resources/mapper/CameraMapper.xml
Normal file
165
file-center/src/main/resources/mapper/CameraMapper.xml
Normal file
@ -0,0 +1,165 @@
|
||||
<?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.ho.filecenter.mapper.CameraMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.filecenter.entity.Camera">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="groupId" column="group_id" jdbcType="INTEGER"/>
|
||||
<result property="stationId" column="station_id" jdbcType="INTEGER"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="address" column="address" jdbcType="VARCHAR"/>
|
||||
<result property="appkey" column="appkey" jdbcType="VARCHAR"/>
|
||||
<result property="appSecret" column="app_secret" jdbcType="VARCHAR"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="validateCode" column="validate_code" jdbcType="VARCHAR"/>
|
||||
<result property="deviceSerial" column="device_serial" jdbcType="VARCHAR"/>
|
||||
<result property="accessToken" column="access_token" jdbcType="VARCHAR"/>
|
||||
<result property="appTime" column="app_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,group_id,station_id,
|
||||
name,address,appkey,
|
||||
app_secret,code,validate_code,
|
||||
device_serial,access_token,app_time
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from camera
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectByCondition" resultType="com.ho.filecenter.entity.Camera">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from camera
|
||||
<where>
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
name LIKE concat('%',#{name},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete
|
||||
from camera
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByIds">
|
||||
delete
|
||||
from camera
|
||||
<where>
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
and id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.filecenter.entity.Camera"
|
||||
useGeneratedKeys="true">
|
||||
insert into camera
|
||||
( id, group_id, station_id
|
||||
, name, address, appkey
|
||||
, app_secret, code, validate_code
|
||||
, device_serial, access_token, app_time)
|
||||
values ( #{id,jdbcType=INTEGER}, #{groupId,jdbcType=INTEGER}, #{stationId,jdbcType=INTEGER}
|
||||
, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{appkey,jdbcType=VARCHAR}
|
||||
, #{appSecret,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{validateCode,jdbcType=VARCHAR}
|
||||
, #{deviceSerial,jdbcType=VARCHAR}, #{accessToken,jdbcType=VARCHAR}, #{appTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ho.filecenter.entity.Camera"
|
||||
useGeneratedKeys="true">
|
||||
insert into camera
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="appkey != null">appkey,</if>
|
||||
<if test="appSecret != null">app_secret,</if>
|
||||
<if test="code != null">code,</if>
|
||||
<if test="validateCode != null">validate_code,</if>
|
||||
<if test="deviceSerial != null">device_serial,</if>
|
||||
<if test="accessToken != null">access_token,</if>
|
||||
<if test="appTime != null">app_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id,jdbcType=INTEGER},</if>
|
||||
<if test="groupId != null">#{groupId,jdbcType=INTEGER},</if>
|
||||
<if test="stationId != null">#{stationId,jdbcType=INTEGER},</if>
|
||||
<if test="name != null">#{name,jdbcType=VARCHAR},</if>
|
||||
<if test="address != null">#{address,jdbcType=VARCHAR},</if>
|
||||
<if test="appkey != null">#{appkey,jdbcType=VARCHAR},</if>
|
||||
<if test="appSecret != null">#{appSecret,jdbcType=VARCHAR},</if>
|
||||
<if test="code != null">#{code,jdbcType=VARCHAR},</if>
|
||||
<if test="validateCode != null">#{validateCode,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceSerial != null">#{deviceSerial,jdbcType=VARCHAR},</if>
|
||||
<if test="accessToken != null">#{accessToken,jdbcType=VARCHAR},</if>
|
||||
<if test="appTime != null">#{appTime,jdbcType=TIMESTAMP},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ho.filecenter.entity.Camera">
|
||||
update camera
|
||||
<set>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="address != null">
|
||||
address = #{address,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="appkey != null">
|
||||
appkey = #{appkey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="appSecret != null">
|
||||
app_secret = #{appSecret,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="validateCode != null">
|
||||
validate_code = #{validateCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceSerial != null">
|
||||
device_serial = #{deviceSerial,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="accessToken != null">
|
||||
access_token = #{accessToken,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="appTime != null">
|
||||
app_time = #{appTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.filecenter.entity.Camera">
|
||||
update camera
|
||||
set group_id = #{groupId,jdbcType=INTEGER},
|
||||
station_id = #{stationId,jdbcType=INTEGER},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
address = #{address,jdbcType=VARCHAR},
|
||||
appkey = #{appkey,jdbcType=VARCHAR},
|
||||
app_secret = #{appSecret,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
validate_code = #{validateCode,jdbcType=VARCHAR},
|
||||
device_serial = #{deviceSerial,jdbcType=VARCHAR},
|
||||
access_token = #{accessToken,jdbcType=VARCHAR},
|
||||
app_time = #{appTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
180
file-center/src/main/resources/mapper/CardInfoMapper.xml
Normal file
180
file-center/src/main/resources/mapper/CardInfoMapper.xml
Normal file
@ -0,0 +1,180 @@
|
||||
<?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.ho.filecenter.mapper.CardInfoMapper">
|
||||
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.filecenter.entity.CardInfo">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="card" column="card" jdbcType="VARCHAR"/>
|
||||
<result property="flowMonitorId" column="flow_monitor_id" jdbcType="INTEGER"/>
|
||||
<result property="stationId" column="station_id" jdbcType="INTEGER"/>
|
||||
<result property="packageType" column="package_type" jdbcType="INTEGER"/>
|
||||
<result property="cardStatus" column="card_status" jdbcType="INTEGER"/>
|
||||
<result property="openDate" column="open_date" jdbcType="VARCHAR"/>
|
||||
<result property="activationDate" column="activation_date" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,card,flow_monitor_id,
|
||||
station_id,package_type,card_status,
|
||||
open_date,activation_date
|
||||
</sql>
|
||||
|
||||
<delete id="deleteByPrimaryKey">
|
||||
delete
|
||||
from card_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<select id="selectByFlowId" resultType="com.ho.filecenter.entity.CardInfo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from card_info
|
||||
where flow_monitor_id = #{id}
|
||||
</select>
|
||||
<select id="selectByCondition" resultType="com.ho.filecenter.entity.CardInfo">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
from `card_info`
|
||||
<where>
|
||||
<if test="flowMonitorId != null ">
|
||||
flow_monitor_id = #{flowMonitorId}
|
||||
</if>
|
||||
<if test="stationId != null ">
|
||||
station_id = #{stationId}
|
||||
</if>
|
||||
<if test="card != null">
|
||||
and card = #{card}
|
||||
</if>
|
||||
<if test="packageType != null">
|
||||
and package_type= # {packageType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByCardTotal" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from card_info
|
||||
where flow_monitor_id = #{flowMonitorId}
|
||||
</select>
|
||||
|
||||
<select id="selectByFlowCardList" resultType="com.ho.filecenter.entity.CardInfo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from card_info
|
||||
where flow_monitor_id = #{flowMonitorId}
|
||||
LIMIT #{offset}, #{pageSize}
|
||||
</select>
|
||||
|
||||
<select id="selectAll" resultType="com.ho.filecenter.entity.CardInfo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from card_info
|
||||
<if test="card != null">
|
||||
card = #{card},
|
||||
</if>
|
||||
<if test="packageType != null">
|
||||
package_type = #{packageType},
|
||||
</if>
|
||||
<if test="flowMonitorId != null">
|
||||
flow_monitor_id = #{flowMonitorId},
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId},
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultType="com.ho.filecenter.entity.CardInfo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from card_info
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectByCard" resultType="com.ho.filecenter.entity.CardInfo">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from card_info
|
||||
where card = #{card}
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.filecenter.entity.CardInfo"
|
||||
useGeneratedKeys="true">
|
||||
insert into card_info
|
||||
(id, card, flow_monitor_id, station_id,
|
||||
package_type, card_status)
|
||||
values ( #{id}, #{card}, #{flowMonitorId}, #{stationId}
|
||||
, #{packageType}, #{cardStatus})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ho.filecenter.entity.CardInfo"
|
||||
useGeneratedKeys="true">
|
||||
insert into card_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="card != null">card,</if>
|
||||
<if test="flowMonitorId != null">flow_monitor_id,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="packageType != null">package_type,</if>
|
||||
<if test="cardStatus != null">card_status,</if>
|
||||
<if test="openDate != null">open_date,</if>
|
||||
<if test="activationDate != null">activation_date</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="card != null">#{card},</if>
|
||||
<if test="flowMonitorId != null">#{flowMonitorId},</if>
|
||||
<if test="stationId != null">#{stationId},</if>
|
||||
<if test="packageType != null">#{packageType},</if>
|
||||
<if test="cardStatus != null">#{cardStatus},</if>
|
||||
<if test="openDate != null">#{openDate},</if>
|
||||
<if test="activationDate != null">#{activationDate}</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ho.filecenter.entity.CardInfo">
|
||||
update card_info
|
||||
<set>
|
||||
<if test="card != null">
|
||||
card = #{card},
|
||||
</if>
|
||||
<if test="flowMonitorId != null">
|
||||
flow_monitor_id = #{flowMonitorId},
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId},
|
||||
</if>
|
||||
<if test="stationId == null">
|
||||
station_id = null,
|
||||
</if>
|
||||
<if test="packageType != null">
|
||||
package_type = #{packageType},
|
||||
</if>
|
||||
<if test="cardStatus != null">
|
||||
card_status = #{cardStatus},
|
||||
</if>
|
||||
<if test="openDate != null">
|
||||
open_date = #{openDate},
|
||||
</if>
|
||||
<if test="activationDate != null">
|
||||
activation_date = #{activationDate}
|
||||
</if>
|
||||
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.filecenter.entity.CardInfo">
|
||||
update card_info
|
||||
set flow_monitor_id = #{flowMonitorId},
|
||||
card = #{card},
|
||||
station_id = #{stationId},
|
||||
package_type = #{packageType},
|
||||
card_status = #{cardStatus},
|
||||
open_date = #{openDate},
|
||||
activation_date = #{activationDate}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
134
file-center/src/main/resources/mapper/CityMapper.xml
Normal file
134
file-center/src/main/resources/mapper/CityMapper.xml
Normal file
@ -0,0 +1,134 @@
|
||||
<?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.ho.filecenter.mapper.CityMapper">
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,cityEn,cityZh,
|
||||
provinceEn,provinceZh,countryEn,
|
||||
countryZh,leaderEn,leaderZh,
|
||||
lat,lon
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from city
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
|
||||
<select id="selectByPrimaryKey" resultType="com.ho.filecenter.entity.City">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from city
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<select id="selectByProvinceAndCity" resultType="com.ho.filecenter.entity.City">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from city
|
||||
<where>
|
||||
<if test="cityzh != null">
|
||||
and cityZh = #{cityzh}
|
||||
</if>
|
||||
|
||||
<if test="provincezh != null">
|
||||
and provinceZh= #{provincezh}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.filecenter.entity.City" useGeneratedKeys="true">
|
||||
insert into city
|
||||
( id,cityEn,cityZh
|
||||
,provinceEn,provinceZh,countryEn
|
||||
,countryZh,leaderEn,leaderZh
|
||||
,lat,lon)
|
||||
values (#{id,jdbcType=VARCHAR},#{cityen,jdbcType=VARCHAR},#{cityzh,jdbcType=VARCHAR}
|
||||
,#{provinceen,jdbcType=VARCHAR},#{provincezh,jdbcType=VARCHAR},#{countryen,jdbcType=VARCHAR}
|
||||
,#{countryzh,jdbcType=VARCHAR},#{leaderen,jdbcType=VARCHAR},#{leaderzh,jdbcType=VARCHAR}
|
||||
,#{lat,jdbcType=VARCHAR},#{lon,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ho.filecenter.entity.City" useGeneratedKeys="true">
|
||||
insert into city
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="cityen != null">cityEn,</if>
|
||||
<if test="cityzh != null">cityZh,</if>
|
||||
<if test="provinceen != null">provinceEn,</if>
|
||||
<if test="provincezh != null">provinceZh,</if>
|
||||
<if test="countryen != null">countryEn,</if>
|
||||
<if test="countryzh != null">countryZh,</if>
|
||||
<if test="leaderen != null">leaderEn,</if>
|
||||
<if test="leaderzh != null">leaderZh,</if>
|
||||
<if test="lat != null">lat,</if>
|
||||
<if test="lon != null">lon,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id,jdbcType=VARCHAR},</if>
|
||||
<if test="cityen != null">#{cityen,jdbcType=VARCHAR},</if>
|
||||
<if test="cityzh != null">#{cityzh,jdbcType=VARCHAR},</if>
|
||||
<if test="provinceen != null">#{provinceen,jdbcType=VARCHAR},</if>
|
||||
<if test="provincezh != null">#{provincezh,jdbcType=VARCHAR},</if>
|
||||
<if test="countryen != null">#{countryen,jdbcType=VARCHAR},</if>
|
||||
<if test="countryzh != null">#{countryzh,jdbcType=VARCHAR},</if>
|
||||
<if test="leaderen != null">#{leaderen,jdbcType=VARCHAR},</if>
|
||||
<if test="leaderzh != null">#{leaderzh,jdbcType=VARCHAR},</if>
|
||||
<if test="lat != null">#{lat,jdbcType=VARCHAR},</if>
|
||||
<if test="lon != null">#{lon,jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ho.filecenter.entity.City">
|
||||
update city
|
||||
<set>
|
||||
<if test="cityen != null">
|
||||
cityEn = #{cityen,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cityzh != null">
|
||||
cityZh = #{cityzh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="provinceen != null">
|
||||
provinceEn = #{provinceen,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="provincezh != null">
|
||||
provinceZh = #{provincezh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="countryen != null">
|
||||
countryEn = #{countryen,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="countryzh != null">
|
||||
countryZh = #{countryzh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaderen != null">
|
||||
leaderEn = #{leaderen,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaderzh != null">
|
||||
leaderZh = #{leaderzh,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lat != null">
|
||||
lat = #{lat,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lon != null">
|
||||
lon = #{lon,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.filecenter.entity.City">
|
||||
update city
|
||||
set
|
||||
cityEn = #{cityen,jdbcType=VARCHAR},
|
||||
cityZh = #{cityzh,jdbcType=VARCHAR},
|
||||
provinceEn = #{provinceen,jdbcType=VARCHAR},
|
||||
provinceZh = #{provincezh,jdbcType=VARCHAR},
|
||||
countryEn = #{countryen,jdbcType=VARCHAR},
|
||||
countryZh = #{countryzh,jdbcType=VARCHAR},
|
||||
leaderEn = #{leaderen,jdbcType=VARCHAR},
|
||||
leaderZh = #{leaderzh,jdbcType=VARCHAR},
|
||||
lat = #{lat,jdbcType=VARCHAR},
|
||||
lon = #{lon,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
||||
119
file-center/src/main/resources/mapper/FlowMonitorMapper.xml
Normal file
119
file-center/src/main/resources/mapper/FlowMonitorMapper.xml
Normal file
@ -0,0 +1,119 @@
|
||||
<?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.ho.filecenter.mapper.FlowMonitorMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.filecenter.entity.FlowMonitor">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="groupId" column="group_id" jdbcType="VARCHAR"/>
|
||||
<result property="packageName" column="package_name" jdbcType="VARCHAR"/>
|
||||
<result property="packageType" column="package_type" jdbcType="INTEGER"/>
|
||||
<result property="singleOrGroup" column="single_or_group" jdbcType="INTEGER"/>
|
||||
<result property="totalFlow" column="total_flow" jdbcType="INTEGER"/>
|
||||
<result property="deleted" column="deleted" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,group_id,package_name,
|
||||
package_type,single_or_group,total_flow,
|
||||
deleted
|
||||
</sql>
|
||||
<delete id="deleteByPrimaryKey">
|
||||
delete
|
||||
from flow_monitor
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<select id="selectAll" resultType="com.ho.filecenter.entity.FlowMonitor">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM flow_monitor
|
||||
<where>
|
||||
<if test="packageName != null and packageName != ''">
|
||||
and package_name LIKE concat('%',#{packageName},'%')
|
||||
</if>
|
||||
<if test="packageType != null">
|
||||
and package_type = #{packageType}
|
||||
</if>
|
||||
and deleted =1
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultType="com.ho.filecenter.entity.FlowMonitor">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from flow_monitor
|
||||
where id = #{flowMonitorId}
|
||||
</select>
|
||||
|
||||
<select id="selectByPid" resultType="com.ho.filecenter.entity.FlowMonitor">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from flow_monitor
|
||||
where group_id = #{groupId}
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.filecenter.entity.FlowMonitor"
|
||||
useGeneratedKeys="true">
|
||||
insert into flow_monitor
|
||||
(id, package_name, package_type, deleted)
|
||||
values (#{id}, #{packageName}, #{packageType}, #{deleted})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ho.filecenter.entity.FlowMonitor"
|
||||
useGeneratedKeys="true">
|
||||
insert into flow_monitor
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="packageType != null">package_type,</if>
|
||||
<if test="packageName != null">package_name,</if>
|
||||
<if test="singleOrGroup != null">single_or_group,</if>
|
||||
<if test="totalFlow != null">total_flow,</if>
|
||||
<if test="deleted != null">deleted</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="groupId != null">#{groupId},</if>
|
||||
<if test="packageType != null">#{packageType},</if>
|
||||
<if test="packageName != null">#{packageName},</if>
|
||||
<if test="singleOrGroup != null">#{singleOrGroup},</if>
|
||||
<if test="totalFlow != null">#{totalFlow},</if>
|
||||
<if test="deleted != null">#{deleted}</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ho.filecenter.entity.FlowMonitor">
|
||||
update flow_monitor
|
||||
<set>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId},
|
||||
</if>
|
||||
<if test="packageName != null">
|
||||
package_name = #{packageName},
|
||||
</if>
|
||||
<if test="packageType != null">
|
||||
package_type = #{packageType},
|
||||
</if>
|
||||
<if test="singleOrGroup != null">
|
||||
single_or_group = #{singleOrGroup},
|
||||
</if>
|
||||
<if test="totalFlow != null">
|
||||
total_flow = #{totalFlow},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted}
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.filecenter.entity.FlowMonitor">
|
||||
update flow_monitor
|
||||
set package_name = #{packageName},
|
||||
package_type = #{packageType},
|
||||
deleted = #{deleted}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
166
file-center/src/main/resources/mapper/MediaFileMapper.xml
Normal file
166
file-center/src/main/resources/mapper/MediaFileMapper.xml
Normal file
@ -0,0 +1,166 @@
|
||||
<?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.ho.filecenter.mapper.MediaFileMapper">
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,user_id,group_id,
|
||||
dept_id,file_suffix,file_path,
|
||||
file_name,create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultType="com.ho.filecenter.entity.MediaFile">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from media_file
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectByInfo" resultType="com.ho.filecenter.entity.MediaFile">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from media_file
|
||||
<where>
|
||||
<if test="groupId != null">
|
||||
and group_id = #{groupId}
|
||||
</if>
|
||||
<if test="vo.fileName != null">
|
||||
and file_name LIKE concat('%',#{vo.fileName},'%')
|
||||
</if>
|
||||
</where>
|
||||
order by
|
||||
create_time desc
|
||||
</select>
|
||||
<select id="selectByPath" resultType="com.ho.filecenter.entity.MediaFile">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from media_file
|
||||
<where>
|
||||
<if test="directory != null ">
|
||||
file_path = #{directory}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectAll" resultType="com.ho.filecenter.entity.MediaFile">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from media_file
|
||||
<where>
|
||||
<if test="fileName != null">
|
||||
file_name LIKE concat('%',#{fileName},'%')
|
||||
</if>
|
||||
</where>
|
||||
order by
|
||||
create_time desc
|
||||
</select>
|
||||
<select id="selectByIds" resultType="com.ho.filecenter.entity.MediaFile">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from media_file
|
||||
<where>
|
||||
<if test="ids != null and ids.size != 0 ">
|
||||
id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from media_file
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
delete
|
||||
from media_file
|
||||
<where>
|
||||
<if test="ids != null and ids.size != 0">
|
||||
id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.filecenter.entity.MediaFile"
|
||||
useGeneratedKeys="true">
|
||||
insert into media_file
|
||||
( id, user_id, group_id
|
||||
, dept_id, file_suffix, file_path
|
||||
, file_name, create_time)
|
||||
values ( #{id,jdbcType=BIGINT}, #{userId,jdbcType=VARCHAR}, #{groupId,jdbcType=INTEGER}
|
||||
, #{deptId,jdbcType=INTEGER}, #{fileSuffix,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR}
|
||||
, #{fileName,jdbcType=VARCHAR}, #{createTime})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ho.filecenter.entity.MediaFile"
|
||||
useGeneratedKeys="true">
|
||||
insert into media_file
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="fileSuffix != null">file_suffix,</if>
|
||||
<if test="filePath != null">file_path,</if>
|
||||
<if test="fileName != null">file_name,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
||||
<if test="userId != null">#{userId,jdbcType=VARCHAR},</if>
|
||||
<if test="groupId != null">#{groupId,jdbcType=INTEGER},</if>
|
||||
<if test="deptId != null">#{deptId,jdbcType=INTEGER},</if>
|
||||
<if test="fileSuffix != null">#{fileSuffix,jdbcType=VARCHAR},</if>
|
||||
<if test="filePath != null">#{filePath,jdbcType=VARCHAR},</if>
|
||||
<if test="fileName != null">#{fileName,jdbcType=VARCHAR},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ho.filecenter.entity.MediaFile">
|
||||
update media_file
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
dept_id = #{deptId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="fileSuffix != null">
|
||||
file_suffix = #{fileSuffix,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="filePath != null">
|
||||
file_path = #{filePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileName != null">
|
||||
file_name = #{fileName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=DATE},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ho.filecenter.entity.MediaFile">
|
||||
update media_file
|
||||
set user_id = #{userId,jdbcType=VARCHAR},
|
||||
group_id = #{groupId,jdbcType=INTEGER},
|
||||
dept_id = #{deptId,jdbcType=INTEGER},
|
||||
file_suffix = #{fileSuffix,jdbcType=VARCHAR},
|
||||
file_path = #{filePath,jdbcType=VARCHAR},
|
||||
file_name = #{fileName,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=DATE}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
67
file-center/src/main/resources/mapper/OtaupgradMapper.xml
Normal file
67
file-center/src/main/resources/mapper/OtaupgradMapper.xml
Normal file
@ -0,0 +1,67 @@
|
||||
<?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.ho.filecenter.mapper.OtaupgradMapper">
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,station_id,src_id,
|
||||
device_name,file_name,version,
|
||||
update_cause,update_name,create_time,update_time
|
||||
</sql>
|
||||
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO otaupgrad
|
||||
(station_id,src_id,
|
||||
device_name,file_name,version,
|
||||
update_cause,update_name,create_time,update_time)
|
||||
VALUES
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.stationId},#{item.srcId},
|
||||
#{item.deviceName},#{item.fileName},#{item.version} ,
|
||||
#{item.updateCause},#{item.updateName},#{item.createTime},#{item.updateTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectAll" resultType="com.ho.filecenter.entity.Otaupgrad">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from otaupgrad
|
||||
<where>
|
||||
<if test="stationIdList != null and stationIdList.size !=0">
|
||||
and station_id in
|
||||
<foreach collection="stationIdList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="stationId != null">
|
||||
and station_id = #{stationId}
|
||||
</if>
|
||||
<if test="srcId != null">
|
||||
and src_id = #{srcId}
|
||||
</if>
|
||||
<if test="deviceName != null and deviceName != ''">
|
||||
and device_name LIKE concat('%',#{deviceName},'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
ORDER BY update_time DESC
|
||||
</select>
|
||||
|
||||
<!-- <select id="selectByStationIdAndSrcId" resultType="com.ho.filecenter.entity.Otaupgrad">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from otaupgrad
|
||||
where
|
||||
station_id =#{stationId}
|
||||
and src_id = #{srcId}
|
||||
ORDER BY create_time DESC
|
||||
LIMIT 1
|
||||
</select>-->
|
||||
|
||||
</mapper>
|
||||
219
file-center/src/main/resources/mapper/PowerDetailMapper.xml
Normal file
219
file-center/src/main/resources/mapper/PowerDetailMapper.xml
Normal file
@ -0,0 +1,219 @@
|
||||
<?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.ho.filecenter.mapper.PowerDetailMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.filecenter.entity.PowerDetail">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<id property="powerEndF" column="power_end_f" jdbcType="DECIMAL"/>
|
||||
<result property="pid" column="pid" jdbcType="INTEGER"/>
|
||||
<result property="groupId" column="group_id" jdbcType="INTEGER"/>
|
||||
<result property="tno" column="tno" jdbcType="VARCHAR"/>
|
||||
<result property="multiFactor" column="multi_factor" jdbcType="DECIMAL"/>
|
||||
<result property="powerStartJ" column="power_start_j" jdbcType="DECIMAL"/>
|
||||
<result property="powerStartF" column="power_start_f" jdbcType="DECIMAL"/>
|
||||
<result property="powerStartP" column="power_start_p" jdbcType="DECIMAL"/>
|
||||
<result property="powerStartG" column="power_start_g" jdbcType="DECIMAL"/>
|
||||
<result property="powerEndJ" column="power_end_j" jdbcType="DECIMAL"/>
|
||||
<result property="powerEndP" column="power_end_p" jdbcType="DECIMAL"/>
|
||||
<result property="powerEndG" column="power_end_g" jdbcType="DECIMAL"/>
|
||||
<result property="powerJ" column="power_j" jdbcType="DECIMAL"/>
|
||||
<result property="powerF" column="power_f" jdbcType="DECIMAL"/>
|
||||
<result property="powerP" column="power_p" jdbcType="DECIMAL"/>
|
||||
<result property="powerG" column="power_g" jdbcType="DECIMAL"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,group_id
|
||||
,power_end_f,pid, meter_point,
|
||||
tno,multi_factor,power_start_j,
|
||||
power_start_f,power_start_p,power_start_g,
|
||||
power_end_j,power_end_p,power_end_g,
|
||||
power_j,power_f,power_p,
|
||||
power_g,
|
||||
total_power_start,total_power_end,total_amount
|
||||
</sql>
|
||||
|
||||
<insert id="addBatch" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into power_detail (<include refid="Base_Column_List"/>)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.id},#{item.groupId},
|
||||
#{item.powerEndF},#{item.pid}, #{item.MeterPoint},
|
||||
#{item.tno},#{item.multiFactor},#{item.powerStartJ},
|
||||
#{item.powerStartF},#{item.powerStartP},#{item.powerStartG},
|
||||
#{item.powerEndJ},#{item.powerEndP},#{item.powerEndG},
|
||||
#{item.powerJ},#{item.powerF},#{item.powerP},
|
||||
#{item.powerG},
|
||||
#{item.totalPowerStart},#{item.totalPowerEnd},#{item.totalAmount}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into power_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="powerEndF != null">power_end_f,</if>
|
||||
<if test="pid != null">pid,</if>
|
||||
<if test="MeterPoint != null">meter_point,</if>
|
||||
<if test="tno != null">tno,</if>
|
||||
<if test="multiFactor != null">multi_factor,</if>
|
||||
<if test="powerStartJ != null">power_start_j,</if>
|
||||
<if test="powerStartF != null">power_start_f,</if>
|
||||
<if test="powerStartP != null">power_start_p,</if>
|
||||
<if test="powerStartG != null">power_start_g,</if>
|
||||
<if test="powerEndJ != null">power_end_j</if>
|
||||
<if test="powerEndF != null">power_end_f</if>
|
||||
<if test="powerEndP != null">power_end_p</if>
|
||||
<if test="powerEndG != null">power_end_g</if>
|
||||
<if test="powerJ != null">power_j</if>
|
||||
<if test="powerF != null">power_f</if>
|
||||
<if test="powerP != null">power_p</if>
|
||||
<if test="powerG != null">power_g</if>
|
||||
<if test="totalPowerStart != null">total_power_start</if>
|
||||
<if test="totalPowerEnd != null">total_power_end</if>
|
||||
<if test="totalAmount != null">total_amount</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="groupId != null">#{groupId},</if>
|
||||
<if test="powerEndF != null">#{powerEndF},</if>
|
||||
<if test="pid != null">#{pid},</if>
|
||||
<if test="MeterPoint != null">#{MeterPoint},</if>
|
||||
<if test="tno != null">#{tno},</if>
|
||||
<if test="multiFactor != null">#{multiFactor},</if>
|
||||
<if test="powerStartJ != null">#{powerStartJ},</if>
|
||||
<if test="powerStartF != null">#{powerStartF},</if>
|
||||
<if test="powerStartP != null">#{powerStartP},</if>
|
||||
<if test="powerStartG != null">#{powerStartG},</if>
|
||||
<if test="powerEndJ != null">#{powerEndJ},</if>
|
||||
<if test="powerEndF != null">#{powerEndF},</if>
|
||||
<if test="powerEndP != null">#{powerEndP},</if>
|
||||
<if test="powerEndG != null">#{powerEndG},</if>
|
||||
<if test="powerJ != null">#{powerJ},</if>
|
||||
<if test="powerF != null">#{powerF},</if>
|
||||
<if test="powerP != null">#{powerP},</if>
|
||||
<if test="powerG != null">#{powerG}</if>
|
||||
<if test="totalPowerStart != null">#{totalPowerStart}</if>
|
||||
<if test="totalPowerEnd != null">#{totalPowerEnd}</if>
|
||||
<if test="totalAmount != null">#{totalAmount}</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update power_detail
|
||||
<set>
|
||||
<if test="powerEndF != null">
|
||||
power_end_f = #{powerEndF},
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
pid = #{pid},
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId},
|
||||
</if>
|
||||
<if test="MeterPoint != null">
|
||||
meter_point = #{MeterPoint},
|
||||
</if>
|
||||
<if test="tno != null">
|
||||
tno = #{tno},
|
||||
</if>
|
||||
<if test="multiFactor != null">
|
||||
multi_factor = #{multiFactor},
|
||||
</if>
|
||||
<if test="powerStartJ != null">
|
||||
power_start_j = #{powerStartJ},
|
||||
</if>
|
||||
<if test="powerStartF != null">
|
||||
power_start_f = #{powerStartF},
|
||||
</if>
|
||||
<if test="powerStartP != null">
|
||||
power_start_p = #{powerStartP},
|
||||
</if>
|
||||
<if test="powerStartG != null">
|
||||
power_start_g = #{powerStartG},
|
||||
</if>
|
||||
<if test="powerEndJ!= null">
|
||||
power_end_j= #{powerEndJ},
|
||||
</if>
|
||||
<if test="powerEndF!= null">
|
||||
power_end_f= #{powerEndF},
|
||||
</if>
|
||||
<if test="powerEndP!= null">
|
||||
power_end_P= #{powerEndP},
|
||||
</if>
|
||||
<if test="powerEndG!= null">
|
||||
power_end_g= #{powerEndG},
|
||||
</if>
|
||||
|
||||
<if test="powerJ!= null">
|
||||
power_j = #{powerJ},
|
||||
</if>
|
||||
<if test="powerF!= null">
|
||||
power_f= #{powerF},
|
||||
</if>
|
||||
<if test="powerP!= null">
|
||||
power_p= #{powerP},
|
||||
</if>
|
||||
<if test="powerG!= null">
|
||||
power_g= #{powerG},
|
||||
</if>
|
||||
<if test="totalPowerStart != null">
|
||||
total_power_start = #{totalPowerStart},
|
||||
</if>
|
||||
<if test="totalPowerEnd != null">
|
||||
total_power_end = #{totalPowerEnd},
|
||||
</if>
|
||||
<if test="totalAmount != null">
|
||||
total_amount = #{totalAmount}
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteByPrimaryKey">
|
||||
delete
|
||||
from power_detail
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<select id="selectByPid" resultType="com.ho.filecenter.entity.PowerDetail">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from power_detail
|
||||
where pid= #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectDetails" resultType="com.ho.filecenter.entity.PowerDetail">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from power_detail
|
||||
where id= #{id}
|
||||
</select>
|
||||
|
||||
<delete id="deleteBatch">
|
||||
delete
|
||||
from power_detail
|
||||
<where>
|
||||
<if test="ids != null and ids.size !=0">
|
||||
and id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pids != null and pids.size !=0">
|
||||
and pid in
|
||||
<foreach collection="pids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
350
file-center/src/main/resources/mapper/PowerMapper.xml
Normal file
350
file-center/src/main/resources/mapper/PowerMapper.xml
Normal file
@ -0,0 +1,350 @@
|
||||
<?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.ho.filecenter.mapper.PowerMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.filecenter.entity.Power">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<id property="groupId" column="group_id" jdbcType="INTEGER"/>
|
||||
<result property="projectName" column="project_name" jdbcType="VARCHAR"/>
|
||||
<result property="settleMonth" column="settle_month" jdbcType="VARCHAR"/>
|
||||
<result property="meterMan" column="meter_man" jdbcType="VARCHAR"/>
|
||||
<result property="biCycle" column="bi_cycle" jdbcType="VARCHAR"/>
|
||||
<result property="checker" column="checker" jdbcType="VARCHAR"/>
|
||||
<result property="powerAll" column="power_all" jdbcType="DECIMAL"/>
|
||||
<result property="powerSelf" column="power_self" jdbcType="DECIMAL"/>
|
||||
<result property="powerUp" column="power_up" jdbcType="DECIMAL"/>
|
||||
<result property="consumeRatio" column="consume_ratio" jdbcType="VARCHAR"/>
|
||||
<result property="powerJ" column="power_j" jdbcType="DECIMAL"/>
|
||||
<result property="powerF" column="power_f" jdbcType="DECIMAL"/>
|
||||
<result property="powerP" column="power_p" jdbcType="DECIMAL"/>
|
||||
<result property="powerG" column="power_g" jdbcType="DECIMAL"/>
|
||||
<result property="powerSigle" column="power_sigle" jdbcType="DECIMAL"/>
|
||||
<result property="origPriceJ" column="orig_price_j" jdbcType="DECIMAL"/>
|
||||
<result property="origPriceF" column="orig_price_f" jdbcType="DECIMAL"/>
|
||||
<result property="origPriceP" column="orig_price_p" jdbcType="DECIMAL"/>
|
||||
<result property="origPriceG" column="orig_price_g" jdbcType="DECIMAL"/>
|
||||
<result property="origPriceSigle" column="orig_price_sigle" jdbcType="DECIMAL"/>
|
||||
<result property="discountPriceJ" column="discount_price_j" jdbcType="DECIMAL"/>
|
||||
<result property="discountPriceF" column="discount_price_f" jdbcType="DECIMAL"/>
|
||||
<result property="discountPriceP" column="discount_price_p" jdbcType="DECIMAL"/>
|
||||
<result property="discountPriceG" column="discount_price_g" jdbcType="DECIMAL"/>
|
||||
<result property="discountPriceSigle" column="discount_price_sigle" jdbcType="DECIMAL"/>
|
||||
<result property="feeJ" column="fee_j" jdbcType="DECIMAL"/>
|
||||
<result property="feeF" column="fee_f" jdbcType="DECIMAL"/>
|
||||
<result property="feeP" column="fee_p" jdbcType="DECIMAL"/>
|
||||
<result property="feeG" column="fee_g" jdbcType="DECIMAL"/>
|
||||
<result property="feeSigle" column="fee_sigle" jdbcType="DECIMAL"/>
|
||||
<result property="receivableFee" column="receivable_fee" jdbcType="DECIMAL"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="creator" column="creator" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,group_id
|
||||
,project_name,settle_month,
|
||||
meter_man,bi_cycle,checker,
|
||||
power_all,power_self,power_up,
|
||||
consume_ratio,power_j,power_f,
|
||||
power_p,power_g,power_sigle,
|
||||
orig_price_j,orig_price_f,orig_price_p,
|
||||
orig_price_g,orig_price_sigle,discount_price_j,
|
||||
discount_price_f,discount_price_p,discount_price_g,
|
||||
discount_price_sigle,fee_j,fee_f,
|
||||
fee_p,fee_g,fee_sigle,
|
||||
receivable_fee,create_time,creator
|
||||
</sql>
|
||||
|
||||
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into power
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="projectName != null">project_name,</if>
|
||||
<if test="settleMonth != null">settle_month,</if>
|
||||
<if test="meterMan != null">meter_man,</if>
|
||||
<if test="biCycle != null">bi_cycle,</if>
|
||||
<if test="checker != null">checker,</if>
|
||||
<if test="powerAll != null">power_all,</if>
|
||||
<if test="powerSelf != null">power_self,</if>
|
||||
<if test="powerUp != null">power_up,</if>
|
||||
<if test="consumeRatio != null">consume_ratio,</if>
|
||||
<if test="powerJ != null">power_j,</if>
|
||||
<if test="powerF != null">power_f,</if>
|
||||
<if test="powerP != null">power_p,</if>
|
||||
<if test="powerG != null">power_g,</if>
|
||||
<if test="powerSigle != null">power_sigle,</if>
|
||||
<if test="origPriceJ != null">orig_price_j,</if>
|
||||
<if test="origPriceF != null">orig_price_f,</if>
|
||||
<if test="origPriceP != null">orig_price_p,</if>
|
||||
<if test="origPriceG != null">orig_price_g,</if>
|
||||
<if test="origPriceSigle != null">orig_price_sigle,</if>
|
||||
<if test="discountPriceJ != null">discount_price_j,</if>
|
||||
<if test="discountPriceF != null">discount_price_f,</if>
|
||||
<if test="discountPriceP != null">discount_price_p,</if>
|
||||
<if test="discountPriceG != null">discount_price_g,</if>
|
||||
<if test="discountPriceSigle != null">discount_price_sigle,</if>
|
||||
<if test="feeJ != null">fee_j,</if>
|
||||
<if test="feeF != null">fee_f,</if>
|
||||
<if test="feeP != null">fee_p,</if>
|
||||
<if test="feeG != null">fee_g,</if>
|
||||
<if test="feeSigle != null">fee_sigle,</if>
|
||||
<if test="receivableFee != null">receivable_fee,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="creator != null">creator</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="groupId != null">#{groupId},</if>
|
||||
<if test="projectName != null">#{projectName},</if>
|
||||
<if test="settleMonth != null">#{settleMonth},</if>
|
||||
<if test="meterMan != null">#{meterMan},</if>
|
||||
<if test="biCycle != null">#{biCycle},</if>
|
||||
<if test="checker != null">#{checker},</if>
|
||||
<if test="powerAll != null">#{powerAll},</if>
|
||||
<if test="powerSelf != null">#{powerSelf},</if>
|
||||
<if test="powerUp != null">#{powerUp},</if>
|
||||
<if test="consumeRatio != null">#{consumeRatio},</if>
|
||||
<if test="powerJ != null">#{powerJ},</if>
|
||||
<if test="powerF != null">#{powerF},</if>
|
||||
<if test="powerP != null">#{powerP},</if>
|
||||
<if test="powerG != null">#{powerG},</if>
|
||||
<if test="powerSigle != null">#{powerSigle},</if>
|
||||
<if test="origPriceJ != null">#{origPriceJ},</if>
|
||||
<if test="origPriceF != null">#{origPriceF},</if>
|
||||
<if test="origPriceP != null">#{origPriceP},</if>
|
||||
<if test="origPriceG != null">#{origPriceG},</if>
|
||||
<if test="origPriceSigle != null">#{origPriceSigle},</if>
|
||||
<if test="discountPriceJ != null">#{discountPriceJ},</if>
|
||||
<if test="discountPriceF != null">#{discountPriceF},</if>
|
||||
<if test="discountPriceP != null">#{discountPriceP},</if>
|
||||
<if test="discountPriceG != null">#{discountPriceG},</if>
|
||||
<if test="discountPriceSigle != null">#{discountPriceSigle},</if>
|
||||
<if test="feeJ != null">#{feeJ},</if>
|
||||
<if test="feeF != null">#{feeF},</if>
|
||||
<if test="feeP != null">#{feeP},</if>
|
||||
<if test="feeG != null">#{feeG},</if>
|
||||
<if test="feeSigle != null">#{feeSigle},</if>
|
||||
<if test="receivableFee != null">#{receivableFee},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="creator != null">#{creator}</if>
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey">
|
||||
update power
|
||||
set group_id = #{groupId},
|
||||
project_name = #{projectName},
|
||||
settle_month = #{settleMonth},
|
||||
meter_man = #{meterMan},
|
||||
bi_cycle = #{biCycle},
|
||||
checker = #{checker},
|
||||
power_all = #{powerAll},
|
||||
power_self = #{powerSelf},
|
||||
power_up = #{powerUp},
|
||||
consume_ratio = #{consumeRatio},
|
||||
power_j = #{powerJ},
|
||||
power_f = #{powerF},
|
||||
power_p = #{powerP},
|
||||
power_g = #{powerG},
|
||||
power_sigle = #{powerSigle},
|
||||
orig_price_j = #{origPriceJ},
|
||||
orig_price_f = #{origPriceF},
|
||||
orig_price_p = #{origPriceP},
|
||||
orig_price_g = #{origPriceG},
|
||||
orig_price_sigle = #{origPriceSigle},
|
||||
discount_price_j = #{discountPriceJ},
|
||||
discount_price_f = #{discountPriceF},
|
||||
discount_price_p = #{discountPriceP},
|
||||
discount_price_g = #{discountPriceG},
|
||||
discount_price_sigle = #{discountPriceSigle},
|
||||
fee_j = #{feeJ},
|
||||
fee_f = #{feeF},
|
||||
fee_p = #{feeP},
|
||||
fee_g = #{feeG},
|
||||
fee_sigle = #{feeSigle},
|
||||
receivable_fee = #{receivableFee},
|
||||
create_time= #{createTime},
|
||||
creator= #{creator}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update power
|
||||
<set>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId},
|
||||
</if>
|
||||
<if test="projectName != null">
|
||||
project_name = #{projectName},
|
||||
</if>
|
||||
<if test="settleMonth != null">
|
||||
settle_month = #{settleMonth},
|
||||
</if>
|
||||
<if test="settleMonth != null">
|
||||
meter_man = #{meterMan},
|
||||
</if>
|
||||
<if test="settleMonth != null">
|
||||
bi_cycle = #{biCycle},
|
||||
</if>
|
||||
<if test="checker != null">
|
||||
checker = #{checker},
|
||||
</if>
|
||||
<if test="powerAll != null">
|
||||
power_all = #{powerAll},
|
||||
</if>
|
||||
<if test="powerSelf != null">
|
||||
power_self = #{powerSelf},
|
||||
</if>
|
||||
<if test="powerUp != null">
|
||||
power_up = #{powerUp},
|
||||
</if>
|
||||
|
||||
<if test="consumeRatio != null">
|
||||
consume_ratio = #{consumeRatio},
|
||||
</if>
|
||||
<if test="powerJ != null">
|
||||
power_j = #{powerJ},
|
||||
</if>
|
||||
<if test="powerF != null">
|
||||
power_f = #{powerF},
|
||||
</if>
|
||||
<if test="powerP != null">
|
||||
power_p = #{powerP},
|
||||
</if>
|
||||
<if test="powerG != null">
|
||||
power_g = #{powerG},
|
||||
</if>
|
||||
<if test="powerSigle != null">
|
||||
power_sigle = #{powerSigle},
|
||||
</if>
|
||||
<if test="consumeRatio != null">
|
||||
orig_price_j = #{origPriceJ},
|
||||
</if>
|
||||
<if test="consumeRatio != null">
|
||||
orig_price_f = #{origPriceF},
|
||||
</if>
|
||||
<if test="consumeRatio != null">
|
||||
orig_price_p = #{origPriceP},
|
||||
</if>
|
||||
<if test="consumeRatio != null">
|
||||
orig_price_g = #{origPriceG},
|
||||
</if>
|
||||
|
||||
<if test="origPriceSigle != null">
|
||||
orig_price_sigle = #{origPriceSigle},
|
||||
</if>
|
||||
<if test="discountPriceJ != null">
|
||||
discount_price_j = #{discountPriceJ},
|
||||
</if>
|
||||
<if test="discountPriceF != null">
|
||||
discount_price_f = #{discountPriceF},
|
||||
</if>
|
||||
<if test="discountPriceP != null">
|
||||
discount_price_p = #{discountPriceP},
|
||||
</if>
|
||||
<if test="discountPriceG != null">
|
||||
discount_price_g = #{discountPriceG},
|
||||
</if>
|
||||
<if test="discountPriceSigle != null">
|
||||
discount_price_sigle = #{discountPriceSigle},
|
||||
</if>
|
||||
<if test="feeJ != null">
|
||||
fee_j = #{feeJ},
|
||||
</if>
|
||||
<if test="feeF != null">
|
||||
fee_f = #{feeF},
|
||||
</if>
|
||||
<if test="feeP != null">
|
||||
fee_p = #{feeP},
|
||||
</if>
|
||||
<if test="feeG != null">
|
||||
fee_g = #{feeG},
|
||||
</if>
|
||||
<if test="feeSigle != null">
|
||||
fee_sigle = #{feeSigle},
|
||||
</if>
|
||||
<if test="receivableFee != null">
|
||||
receivable_fee = #{receivableFee},
|
||||
</if>
|
||||
<if test="createTime!= null">
|
||||
create_time= #{createTime},
|
||||
</if>
|
||||
<if test="creator!= null">
|
||||
creator= #{creator}
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<delete id="batchDeletes">
|
||||
<!--循环删除 -->
|
||||
delete
|
||||
from power
|
||||
<where>
|
||||
<if test="list != null and list.size !=0">
|
||||
and id in
|
||||
<foreach collection="list" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByPrimaryKey">
|
||||
delete
|
||||
from power
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
<select id="selectAll" resultType="com.ho.filecenter.entity.Power">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from power
|
||||
<where>
|
||||
<if test="groupId != null">
|
||||
and group_id = #{groupId}
|
||||
</if>
|
||||
<if test="settleMonth != null">
|
||||
and settle_month = #{settleMonth}
|
||||
</if>
|
||||
<if test="projectName != null">
|
||||
and project_name = #{projectName}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultType="com.ho.filecenter.entity.Power">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from power
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id= #{id}
|
||||
</if>
|
||||
<if test="settleMonth != null">
|
||||
and settle_month = #{settleMonth}
|
||||
</if>
|
||||
<if test="projectName != null">
|
||||
and project_name = #{projectName}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByMonthAndName" resultType="com.ho.filecenter.entity.Power">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from power
|
||||
where
|
||||
settle_month = #{settleMonth}
|
||||
and project_name = #{projectName}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,47 @@
|
||||
<?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.ho.filecenter.mapper.PvEleAnalysisMapper">
|
||||
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,group_id,`year`,
|
||||
`month`,theory_power,plan_power,
|
||||
real_power,create_time,creator
|
||||
</sql>
|
||||
|
||||
<select id="selectByParam" resultType="com.ho.filecenter.entity.PvEleAnalysis">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from pv_ele_analysis
|
||||
<where>
|
||||
<if test="pvEleAnalysis.id != null">
|
||||
and id = #{pvEleAnalysis.id}
|
||||
</if>
|
||||
<if test="pvEleAnalysis.groupId != null">
|
||||
and group_id = #{pvEleAnalysis.groupId}
|
||||
</if>
|
||||
<if test="pvEleAnalysis.year != null">
|
||||
and `year` = #{pvEleAnalysis.year}
|
||||
</if>
|
||||
<if test="pvEleAnalysis.month != null">
|
||||
and `month` = #{pvEleAnalysis.month}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertList" keyColumn="id" keyProperty="id" parameterType="java.util.List" useGeneratedKeys="true">
|
||||
insert into pv_ele_analysis (group_id,year,month,theory_power,plan_power,real_power,create_time,creator) values
|
||||
<foreach collection="pvEleAnalysisList" item="item" index="index" separator=",">
|
||||
(#{item.groupId},#{item.year},#{item.month},#{item.theoryPower},#{item.planPower},#{item.realPower},#{item.createTime},#{item.creator})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateList" keyColumn="id" keyProperty="id" parameterType="java.util.List" useGeneratedKeys="true">
|
||||
<foreach collection="pvEleAnalysisList" item="item" index="index" separator=";">
|
||||
update pv_ele_analysis set theory_power = #{item.theoryPower},plan_power = #{item.planPower}, real_power = #{item.realPower}
|
||||
where id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
103
file-center/src/main/resources/mapper/StandingBookMapper.xml
Normal file
103
file-center/src/main/resources/mapper/StandingBookMapper.xml
Normal file
@ -0,0 +1,103 @@
|
||||
<?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.ho.filecenter.mapper.StandingBookMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ho.filecenter.entity.StandingBook">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="stationId" column="station_id" jdbcType="INTEGER"/>
|
||||
<result property="deviceType" column="device_type" jdbcType="VARCHAR"/>
|
||||
<result property="deviceModel" column="device_model" jdbcType="VARCHAR"/>
|
||||
<result property="modelCode" column="model_code" jdbcType="VARCHAR"/>
|
||||
<result property="deviceNum" column="device_num" jdbcType="VARCHAR"/>
|
||||
<result property="factory" column="factory" jdbcType="VARCHAR"/>
|
||||
<result property="manufacturer" column="manufacturer" jdbcType="VARCHAR"/>
|
||||
<result property="warrantyPeriod" column="warranty_period" jdbcType="VARCHAR"/>
|
||||
<result property="notes" column="notes" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,station_id,device_type,device_model,
|
||||
model_code,device_num,factory,
|
||||
manufacturer,warranty_period,notes,
|
||||
create_time,update_time
|
||||
</sql>
|
||||
|
||||
|
||||
<insert id="addBatch" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into standing_book (<include refid="Base_Column_List"/>)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.id}
|
||||
,#{item.stationId},#{item.deviceType},#{item.deviceModel},
|
||||
#{item.modelCode},#{item.deviceNum},#{item.factory},
|
||||
#{item.manufacturer},#{item.warrantyPeriod},#{item.notes},
|
||||
#{item.createTime},#{item.updateTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from standing_book
|
||||
where id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteByStationId">
|
||||
delete
|
||||
from standing_book
|
||||
where station_id = #{stationId}
|
||||
</delete>
|
||||
|
||||
<select id="selectAll" resultType="com.ho.filecenter.entity.StandingBook">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from standing_book
|
||||
where station_id = #{id}
|
||||
</select>
|
||||
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update standing_book
|
||||
<set>
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type = #{deviceType},
|
||||
</if>
|
||||
<if test="deviceModel != null">
|
||||
device_model = #{deviceModel},
|
||||
</if>
|
||||
<if test="modelCode != null">
|
||||
model_code = #{modelCode},
|
||||
</if>
|
||||
<if test="deviceNum != null">
|
||||
device_num = #{deviceNum},
|
||||
</if>
|
||||
<if test="factory != null">
|
||||
factory = #{factory},
|
||||
</if>
|
||||
<if test="manufacturer != null">
|
||||
manufacturer = #{manufacturer},
|
||||
</if>
|
||||
<if test="warrantyPeriod != null">
|
||||
warranty_period = #{warrantyPeriod},
|
||||
</if>
|
||||
<if test="notes != null">
|
||||
notes = #{notes},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user