Commit 739100f2 by chaizheng

大搜车工单需求

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@26576 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 7a8c2d53
......@@ -9,9 +9,10 @@
<result column="install_location" jdbcType="VARCHAR" property="installLocation" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="deviceTypeName" jdbcType="VARCHAR" property="deviceTypeName" />
<result column="repair_type" jdbcType="INTEGER" property="repairType" />
</resultMap>
<sql id="Base_Column_List">
id, order_id, device_no, device_type, install_location, sort
id, order_id, device_no, device_type, install_location, sort, repair_type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -28,9 +29,9 @@
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_order_device (order_id, device_no, device_type,
install_location, sort)
install_location, sort, repair_type)
values (#{orderId,jdbcType=INTEGER}, #{deviceNo,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR},
#{installLocation,jdbcType=VARCHAR}, #{sort})
#{installLocation,jdbcType=VARCHAR}, #{sort}, #{repairType})
</insert>
<insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
......@@ -53,6 +54,9 @@
<if test="sort != null">
sort,
</if>
<if test="repairType != null">
repair_type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">
......@@ -70,6 +74,9 @@
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="repairType != null">
repair_type = #{repairType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice">
......@@ -90,6 +97,9 @@
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="repairType != null">
repair_type = #{repairType,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
......@@ -106,7 +116,7 @@
<select id="getOrderDeviceList" parameterType="com.glsx.ordercenter.pojo.SysOrderDevice" resultMap="BaseResultMap">
select
sod.id, sod.order_id, sod.device_no, sod.device_type, sod.install_location, sod.sort,
sdd.data_value as deviceTypeName
sod.repair_type, sdd.data_value as deviceTypeName
from sys_order_device sod
LEFT JOIN sys_dict_data sdd ON sod.device_type = sdd.data_key
where order_id = #{orderId,jdbcType=INTEGER}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!