|
@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="title" column="title" />
|
|
<result property="title" column="title" />
|
|
|
<result property="description" column="description" />
|
|
<result property="description" column="description" />
|
|
|
<result property="price" column="price" />
|
|
<result property="price" column="price" />
|
|
|
|
|
+ <result property="unit" column="unit" />
|
|
|
<result property="originalPrice" column="original_price" />
|
|
<result property="originalPrice" column="original_price" />
|
|
|
<result property="specifications" column="specifications" />
|
|
<result property="specifications" column="specifications" />
|
|
|
<result column="features" property="features"
|
|
<result column="features" property="features"
|
|
@@ -18,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="swiperImages" column="swiper_images" />
|
|
<result property="swiperImages" column="swiper_images" />
|
|
|
<result property="detailImages" column="detail_images" />
|
|
<result property="detailImages" column="detail_images" />
|
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
|
|
|
+ <result property="isRecommended" column="is_recommended" />
|
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createBy" column="create_by" />
|
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateBy" column="update_by" />
|
|
@@ -25,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectMallVo">
|
|
<sql id="selectMallVo">
|
|
|
- select id, product_category, title, description, price, original_price, specifications, features, usage_guide, swiper_images, detail_images, status, create_by, create_time, update_by, update_time from mall
|
|
|
|
|
|
|
+ select id, product_category, title, description, price, unit, original_price, specifications, features, usage_guide, swiper_images, detail_images, status, is_recommended, create_by, create_time, update_by, update_time from mall
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectMallList" parameterType="Mall" resultMap="MallResult">
|
|
<select id="selectMallList" parameterType="Mall" resultMap="MallResult">
|
|
@@ -35,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
<if test="description != null and description != ''"> and description = #{description}</if>
|
|
<if test="description != null and description != ''"> and description = #{description}</if>
|
|
|
<if test="price != null "> and price = #{price}</if>
|
|
<if test="price != null "> and price = #{price}</if>
|
|
|
|
|
+ <if test="unit != null and unit != '' "> and unit = #{unit}</if>
|
|
|
<if test="originalPrice != null "> and original_price = #{originalPrice}</if>
|
|
<if test="originalPrice != null "> and original_price = #{originalPrice}</if>
|
|
|
<if test="specifications != null and specifications != ''"> and specifications = #{specifications}</if>
|
|
<if test="specifications != null and specifications != ''"> and specifications = #{specifications}</if>
|
|
|
<if test="features != null and features != ''"> and features = #{features}</if>
|
|
<if test="features != null and features != ''"> and features = #{features}</if>
|
|
@@ -42,6 +45,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="swiperImages != null and swiperImages != ''"> and swiper_images = #{swiperImages}</if>
|
|
<if test="swiperImages != null and swiperImages != ''"> and swiper_images = #{swiperImages}</if>
|
|
|
<if test="detailImages != null and detailImages != ''"> and detail_images = #{detailImages}</if>
|
|
<if test="detailImages != null and detailImages != ''"> and detail_images = #{detailImages}</if>
|
|
|
<if test="status != null "> and status = #{status}</if>
|
|
<if test="status != null "> and status = #{status}</if>
|
|
|
|
|
+ <if test="isRecommended != null">and is_recommended = #{isRecommended}</if>
|
|
|
|
|
+ <if test="searchKeyword != null and searchKeyword != '' "> and title LIKE CONCAT('%', #{searchKeyword}, '%')</if>
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -57,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="title != null and title != ''">title,</if>
|
|
<if test="title != null and title != ''">title,</if>
|
|
|
<if test="description != null and description != ''">description,</if>
|
|
<if test="description != null and description != ''">description,</if>
|
|
|
<if test="price != null">price,</if>
|
|
<if test="price != null">price,</if>
|
|
|
|
|
+ <if test="unit != null and unit != ''">unit,</if>
|
|
|
<if test="originalPrice != null">original_price,</if>
|
|
<if test="originalPrice != null">original_price,</if>
|
|
|
<if test="specifications != null and specifications != ''">specifications,</if>
|
|
<if test="specifications != null and specifications != ''">specifications,</if>
|
|
|
<if test="features != null and features != ''">features,</if>
|
|
<if test="features != null and features != ''">features,</if>
|
|
@@ -64,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="swiperImages != null and swiperImages != ''">swiper_images,</if>
|
|
<if test="swiperImages != null and swiperImages != ''">swiper_images,</if>
|
|
|
<if test="detailImages != null">detail_images,</if>
|
|
<if test="detailImages != null">detail_images,</if>
|
|
|
<if test="status != null">status,</if>
|
|
<if test="status != null">status,</if>
|
|
|
|
|
+ <if test="isRecommended != null">#{is_recommended},</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
@@ -73,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="productCategory != null">#{productCategory},</if>
|
|
<if test="productCategory != null">#{productCategory},</if>
|
|
|
<if test="title != null and title != ''">#{title},</if>
|
|
<if test="title != null and title != ''">#{title},</if>
|
|
|
<if test="description != null and description != ''">#{description},</if>
|
|
<if test="description != null and description != ''">#{description},</if>
|
|
|
|
|
+ <if test="unit != null and unit != ''">#{unit},</if>
|
|
|
<if test="price != null">#{price},</if>
|
|
<if test="price != null">#{price},</if>
|
|
|
<if test="originalPrice != null">#{originalPrice},</if>
|
|
<if test="originalPrice != null">#{originalPrice},</if>
|
|
|
<if test="specifications != null and specifications != ''">#{specifications},</if>
|
|
<if test="specifications != null and specifications != ''">#{specifications},</if>
|
|
@@ -81,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="swiperImages != null and swiperImages != ''">#{swiperImages},</if>
|
|
<if test="swiperImages != null and swiperImages != ''">#{swiperImages},</if>
|
|
|
<if test="detailImages != null">#{detailImages},</if>
|
|
<if test="detailImages != null">#{detailImages},</if>
|
|
|
<if test="status != null">#{status},</if>
|
|
<if test="status != null">#{status},</if>
|
|
|
|
|
+ <if test="isRecommended != null">#{isRecommended},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
@@ -94,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="productCategory != null">product_category = #{productCategory},</if>
|
|
<if test="productCategory != null">product_category = #{productCategory},</if>
|
|
|
<if test="title != null and title != ''">title = #{title},</if>
|
|
<if test="title != null and title != ''">title = #{title},</if>
|
|
|
<if test="description != null and description != ''">description = #{description},</if>
|
|
<if test="description != null and description != ''">description = #{description},</if>
|
|
|
|
|
+ <if test="unit != null and unit != ''">unit = #{unit},</if>
|
|
|
<if test="price != null">price = #{price},</if>
|
|
<if test="price != null">price = #{price},</if>
|
|
|
<if test="originalPrice != null">original_price = #{originalPrice},</if>
|
|
<if test="originalPrice != null">original_price = #{originalPrice},</if>
|
|
|
<if test="specifications != null and specifications != ''">specifications = #{specifications},</if>
|
|
<if test="specifications != null and specifications != ''">specifications = #{specifications},</if>
|
|
@@ -102,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="swiperImages != null and swiperImages != ''">swiper_images = #{swiperImages},</if>
|
|
<if test="swiperImages != null and swiperImages != ''">swiper_images = #{swiperImages},</if>
|
|
|
<if test="detailImages != null">detail_images = #{detailImages},</if>
|
|
<if test="detailImages != null">detail_images = #{detailImages},</if>
|
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
|
|
|
+ <if test="isRecommended != null">is_recommended = #{isRecommended},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|