Commit 42560020 by zhengxj

finish 修正sql on 20190123 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@16975 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 2abb8d31
......@@ -83,14 +83,26 @@
select
<include refid="Base_Column_List" />
from sys_order
where id = #{id,jdbcType=INTEGER}
and order_sn = #{orderSn,jdbcType=VARCHAR}
<where>
<if test="id != null">
and id = #{id,jdbcType=INTEGER}
</if>
<if test="orderSn != null">
and order_sn = #{orderSn,jdbcType=VARCHAR}
</if>
</where>
</select>
<delete id="deleteByPrimaryKey" parameterType="map">
delete from sys_order
where id = #{id,jdbcType=INTEGER}
and order_sn = #{orderSn,jdbcType=VARCHAR}
</delete>
<delete id="deleteByPrimaryKey" parameterType="map">
delete from sys_order
<where>
<if test="id != null">
and id = #{id,jdbcType=INTEGER}
</if>
<if test="orderSn != null">
and order_sn = #{orderSn,jdbcType=VARCHAR}
</if>
</where>
</delete>
<insert id="insert" parameterType="com.glsx.ordercenter.pojo.SysOrder">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
......@@ -356,36 +368,48 @@
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
and order_sn = #{orderSn,jdbcType=VARCHAR}
<where>
<if test="id != null">
and id = #{id,jdbcType=INTEGER}
</if>
<if test="orderSn != null">
and order_sn = #{orderSn,jdbcType=VARCHAR}
</if>
</where>
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.ordercenter.pojo.SysOrder">
update sys_order
set active_status = #{activeStatus,jdbcType=TINYINT},
canceled = #{canceled,jdbcType=TINYINT},
order_type = #{orderType,jdbcType=TINYINT},
shop_id = #{shopId,jdbcType=INTEGER},
contact = #{contact,jdbcType=VARCHAR},
phone_number = #{phoneNumber,jdbcType=INTEGER},
car_brand = #{carBrand,jdbcType=VARCHAR},
car_type = #{carType,jdbcType=VARCHAR},
vin_no = #{vinNo,jdbcType=VARCHAR},
car_color = #{carColor,jdbcType=VARCHAR},
install_date = #{installDate,jdbcType=TIMESTAMP},
service_type = #{serviceType,jdbcType=VARCHAR},
car_owner = #{carOwner,jdbcType=VARCHAR},
car_owner_phone = #{carOwnerPhone,jdbcType=INTEGER},
cancel_time = #{cancelTime,jdbcType=TIMESTAMP},
active_status_array = #{activeStatusArray,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=INTEGER},
mechanic_id = #{mechanicId,jdbcType=INTEGER},
repair_reason = #{repairReason,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
and order_sn = #{orderSn,jdbcType=VARCHAR}
update sys_order
set active_status = #{activeStatus,jdbcType=TINYINT},
canceled = #{canceled,jdbcType=TINYINT},
order_type = #{orderType,jdbcType=TINYINT},
shop_id = #{shopId,jdbcType=INTEGER},
contact = #{contact,jdbcType=VARCHAR},
phone_number = #{phoneNumber,jdbcType=INTEGER},
car_brand = #{carBrand,jdbcType=VARCHAR},
car_type = #{carType,jdbcType=VARCHAR},
vin_no = #{vinNo,jdbcType=VARCHAR},
car_color = #{carColor,jdbcType=VARCHAR},
install_date = #{installDate,jdbcType=TIMESTAMP},
service_type = #{serviceType,jdbcType=VARCHAR},
car_owner = #{carOwner,jdbcType=VARCHAR},
car_owner_phone = #{carOwnerPhone,jdbcType=INTEGER},
cancel_time = #{cancelTime,jdbcType=TIMESTAMP},
active_status_array = #{activeStatusArray,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=INTEGER},
mechanic_id = #{mechanicId,jdbcType=INTEGER},
repair_reason = #{repairReason,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR}
<where>
<if test="id != null">
and id = #{id,jdbcType=INTEGER}
</if>
<if test="orderSn != null">
and order_sn = #{orderSn,jdbcType=VARCHAR}
</if>
</where>
</update>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!