You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
291 lines
11 KiB
291 lines
11 KiB
<?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.ccsens.logistics.persist.mapper.LogisticsEquipmentMapper">
|
|
<resultMap id="BaseResultMap" type="com.ccsens.logistics.bean.po.LogisticsEquipment">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="equipment_number" jdbcType="INTEGER" property="equipmentNumber" />
|
|
<result column="equipment_type" jdbcType="TINYINT" property="equipmentType" />
|
|
<result column="warehouse_id" jdbcType="BIGINT" property="warehouseId" />
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
|
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
|
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
|
|
<result column="equipment_location" jdbcType="VARCHAR" property="equipmentLocation" />
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
</resultMap>
|
|
<sql id="Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
<choose>
|
|
<when test="criterion.noValue">
|
|
and ${criterion.condition}
|
|
</when>
|
|
<when test="criterion.singleValue">
|
|
and ${criterion.condition} #{criterion.value}
|
|
</when>
|
|
<when test="criterion.betweenValue">
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
</when>
|
|
<when test="criterion.listValue">
|
|
and ${criterion.condition}
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
<choose>
|
|
<when test="criterion.noValue">
|
|
and ${criterion.condition}
|
|
</when>
|
|
<when test="criterion.singleValue">
|
|
and ${criterion.condition} #{criterion.value}
|
|
</when>
|
|
<when test="criterion.betweenValue">
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
</when>
|
|
<when test="criterion.listValue">
|
|
and ${criterion.condition}
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Base_Column_List">
|
|
id, name, equipment_number, equipment_type, warehouse_id, created_at, updated_at,
|
|
rec_status, equipment_location, remark
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipmentExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from t_logistics_equipment
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
<if test="orderByClause != null">
|
|
order by ${orderByClause}
|
|
</if>
|
|
</select>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from t_logistics_equipment
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from t_logistics_equipment
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipmentExample">
|
|
delete from t_logistics_equipment
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipment">
|
|
insert into t_logistics_equipment (id, name, equipment_number,
|
|
equipment_type, warehouse_id, created_at,
|
|
updated_at, rec_status, equipment_location,
|
|
remark)
|
|
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{equipmentNumber,jdbcType=INTEGER},
|
|
#{equipmentType,jdbcType=TINYINT}, #{warehouseId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
|
|
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{equipmentLocation,jdbcType=VARCHAR},
|
|
#{remark,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipment">
|
|
insert into t_logistics_equipment
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="name != null">
|
|
name,
|
|
</if>
|
|
<if test="equipmentNumber != null">
|
|
equipment_number,
|
|
</if>
|
|
<if test="equipmentType != null">
|
|
equipment_type,
|
|
</if>
|
|
<if test="warehouseId != null">
|
|
warehouse_id,
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at,
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at,
|
|
</if>
|
|
<if test="recStatus != null">
|
|
rec_status,
|
|
</if>
|
|
<if test="equipmentLocation != null">
|
|
equipment_location,
|
|
</if>
|
|
<if test="remark != null">
|
|
remark,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="equipmentNumber != null">
|
|
#{equipmentNumber,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="equipmentType != null">
|
|
#{equipmentType,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="warehouseId != null">
|
|
#{warehouseId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="createdAt != null">
|
|
#{createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
#{updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="recStatus != null">
|
|
#{recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="equipmentLocation != null">
|
|
#{equipmentLocation,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="remark != null">
|
|
#{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipmentExample" resultType="java.lang.Long">
|
|
select count(*) from t_logistics_equipment
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update t_logistics_equipment
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.name != null">
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.equipmentNumber != null">
|
|
equipment_number = #{record.equipmentNumber,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="record.equipmentType != null">
|
|
equipment_type = #{record.equipmentType,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.warehouseId != null">
|
|
warehouse_id = #{record.warehouseId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.createdAt != null">
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.updatedAt != null">
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.recStatus != null">
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.equipmentLocation != null">
|
|
equipment_location = #{record.equipmentLocation,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.remark != null">
|
|
remark = #{record.remark,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update t_logistics_equipment
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
equipment_number = #{record.equipmentNumber,jdbcType=INTEGER},
|
|
equipment_type = #{record.equipmentType,jdbcType=TINYINT},
|
|
warehouse_id = #{record.warehouseId,jdbcType=BIGINT},
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT},
|
|
equipment_location = #{record.equipmentLocation,jdbcType=VARCHAR},
|
|
remark = #{record.remark,jdbcType=VARCHAR}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipment">
|
|
update t_logistics_equipment
|
|
<set>
|
|
<if test="name != null">
|
|
name = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="equipmentNumber != null">
|
|
equipment_number = #{equipmentNumber,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="equipmentType != null">
|
|
equipment_type = #{equipmentType,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="warehouseId != null">
|
|
warehouse_id = #{warehouseId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="recStatus != null">
|
|
rec_status = #{recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="equipmentLocation != null">
|
|
equipment_location = #{equipmentLocation,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="remark != null">
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipment">
|
|
update t_logistics_equipment
|
|
set name = #{name,jdbcType=VARCHAR},
|
|
equipment_number = #{equipmentNumber,jdbcType=INTEGER},
|
|
equipment_type = #{equipmentType,jdbcType=TINYINT},
|
|
warehouse_id = #{warehouseId,jdbcType=BIGINT},
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
rec_status = #{recStatus,jdbcType=TINYINT},
|
|
equipment_location = #{equipmentLocation,jdbcType=VARCHAR},
|
|
remark = #{remark,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper>
|