<update id="updateById">
update collection_shop
<trim prefix="set" suffixOverrides=",">
<if test="merchantId != null">
merchant_id = #{merchantId},
</if>
<if test="address != null and address != ''">
address = #{address},
</if>
<if test="name != null and name != ''">
`name` = #{name},
</if>
<if test="type != null">
`type` = #{type},
</if>
<if test="door != null and door != ''">
door = #{door},
</if>
<if test="openStatus != null">
open_status = #{openStatus},
</if>
<if test="openStatusDate != null and openStatusDate != ''">
open_status_date = #{openStatusDate},
</if>
<if test="shopType != null">
shop_type = #{shopType},
</if>
<if test="coverArea != null and coverArea != ''">
cover_area = #{coverArea},
</if>
<if test="rentMonthAmount != null and rentMonthAmount != ''">
rent_month_amount = #{rentMonthAmount},
</if>
<if test="longitude != null">
longitude = #{longitude},
</if>
<if test="latitude != null">
latitude = #{latitude},
</if>
<if test="provinceCode != null and provinceCode != 0">
province_code = #{provinceCode},
</if>
<if test="province != null and province != ''">
province = #{province},
</if>
<if test="cityCode != null and cityCode != 0">
city_code = #{cityCode},
</if>
<if test="city != null and city != ''">
city = #{city},
</if>
<if test="region != null and region != ''">
region = #{region},
</if>
<if test="regionCode != null">
region_code = #{regionCode},
</if>
<if test="status != null">
status = #{status},
</if>
<if test="gmtModifiedUid != null">
gmt_modified_uid = #{gmtModifiedUid},
</if>
<if test="gmtModifiedBy != null">
gmt_modified_by = #{gmtModifiedBy},
</if>
<if test="gmtModified != null">
gmt_modified = #{gmtModified},
</if>
</trim>
WHERE id = #{id}
</update>
<setting name="mapUnderscoreToCamelCase" value="true" />
<?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="menu.mysql">
<select id="selectMenu" resultType="org.me.menu.Menu">
select MENU_ID, MENU_NAME, PARENT_ID, URL, TITLE, LEAF, ORDER_SEQ
from mysql.MENU
order by ORDER_SEQ
</select>
</mapper>
本文使用 文章同步助手 同步
网友评论