parent
a376bb2626
commit
cf80a9cabc
@ -0,0 +1,61 @@
|
|||||||
|
<?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.szxc.mapper.SzxcJmCarMapper">
|
||||||
|
|
||||||
|
<resultMap type="SzxcJmCar" id="SzxcJmCarResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="jmId" column="jm_id" />
|
||||||
|
<result property="carId" column="car_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSzxcJmCarVo">
|
||||||
|
select id, jm_id, car_id from szxc_jm_car
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSzxcJmCarList" parameterType="SzxcJmCar" resultMap="SzxcJmCarResult">
|
||||||
|
<include refid="selectSzxcJmCarVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="jmId != null "> and jm_id = #{jmId}</if>
|
||||||
|
<if test="carId != null "> and car_id = #{carId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSzxcJmCarById" parameterType="Long" resultMap="SzxcJmCarResult">
|
||||||
|
<include refid="selectSzxcJmCarVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSzxcJmCar" parameterType="SzxcJmCar" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into szxc_jm_car
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="jmId != null">jm_id,</if>
|
||||||
|
<if test="carId != null">car_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="jmId != null">#{jmId},</if>
|
||||||
|
<if test="carId != null">#{carId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSzxcJmCar" parameterType="SzxcJmCar">
|
||||||
|
update szxc_jm_car
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="jmId != null">jm_id = #{jmId},</if>
|
||||||
|
<if test="carId != null">car_id = #{carId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSzxcJmCarById" parameterType="Long">
|
||||||
|
delete from szxc_jm_car where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSzxcJmCarByIds" parameterType="String">
|
||||||
|
delete from szxc_jm_car where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
<?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.szxc.mapper.SzxcJmHouseMapper">
|
||||||
|
|
||||||
|
<resultMap type="SzxcJmHouse" id="SzxcJmHouseResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="jmId" column="jm_id" />
|
||||||
|
<result property="houseId" column="house_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSzxcJmHouseVo">
|
||||||
|
select id, jm_id, house_id from szxc_jm_house
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSzxcJmHouseList" parameterType="SzxcJmHouse" resultMap="SzxcJmHouseResult">
|
||||||
|
<include refid="selectSzxcJmHouseVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="jmId != null "> and jm_id = #{jmId}</if>
|
||||||
|
<if test="houseId != null "> and house_id = #{houseId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSzxcJmHouseById" parameterType="Long" resultMap="SzxcJmHouseResult">
|
||||||
|
<include refid="selectSzxcJmHouseVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSzxcJmHouse" parameterType="SzxcJmHouse" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into szxc_jm_house
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="jmId != null">jm_id,</if>
|
||||||
|
<if test="houseId != null">house_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="jmId != null">#{jmId},</if>
|
||||||
|
<if test="houseId != null">#{houseId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSzxcJmHouse" parameterType="SzxcJmHouse">
|
||||||
|
update szxc_jm_house
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="jmId != null">jm_id = #{jmId},</if>
|
||||||
|
<if test="houseId != null">house_id = #{houseId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSzxcJmHouseById" parameterType="Long">
|
||||||
|
delete from szxc_jm_house where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSzxcJmHouseByIds" parameterType="String">
|
||||||
|
delete from szxc_jm_house where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in new issue