|
|
@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="productSpec" column="product_spec" />
|
|
|
<result property="productImage" column="product_image" />
|
|
|
<result property="productDesc" column="product_desc" />
|
|
|
+ <result property="shopUrl" column="shop_url" />
|
|
|
<result property="farmName" column="farm_name" />
|
|
|
<result property="farmRegion" column="farm_region" />
|
|
|
<result property="farmImage" column="farm_image" />
|
|
|
@@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectBatchVo">
|
|
|
- select id, batch_no, product_name, product_spec, product_image, product_desc, farm_name, farm_region, farm_image, farm_intro, produce_date, package_date,start_planting_time, status, created_at, updated_at from batch
|
|
|
+ select id, batch_no, product_name, product_spec, product_image, product_desc, shop_url, farm_name, farm_region, farm_image, farm_intro, produce_date, package_date,start_planting_time, status, created_at, updated_at from batch
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectBatchList" parameterType="Batch" resultMap="BatchResult">
|
|
|
@@ -58,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="selectBatchById" parameterType="Long" resultMap="BatchResult">
|
|
|
- select id, batch_no, product_name, product_spec, product_image, product_desc, farm_id, field_id,
|
|
|
+ select id, batch_no, product_name, product_spec, product_image, product_desc, shop_url, farm_id, field_id,
|
|
|
farm_name, farm_region, farm_image, farm_intro, produce_date, package_date,start_planting_time, status, created_at, updated_at from batch
|
|
|
|
|
|
where id = #{id}
|
|
|
@@ -83,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="productSpec != null">product_spec,</if>
|
|
|
<if test="productImage != null">product_image,</if>
|
|
|
<if test="productDesc != null">product_desc,</if>
|
|
|
+ <if test="shopUrl != null">shop_url,</if>
|
|
|
<if test="farmId != null and farmId != ''">farm_id,</if>
|
|
|
<if test="fieldId != null and fieldId != ''">field_id,</if>
|
|
|
<if test="farmName != null and farmName != ''">farm_name,</if>
|
|
|
@@ -102,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="productSpec != null">#{productSpec},</if>
|
|
|
<if test="productImage != null">#{productImage},</if>
|
|
|
<if test="productDesc != null">#{productDesc},</if>
|
|
|
+ <if test="shopUrl != null">#{shopUrl},</if>
|
|
|
<if test="farmId != null and farmId != ''">#{farmId},</if>
|
|
|
<if test="fieldId != null and fieldId != ''">#{fieldId},</if>
|
|
|
<if test="farmName != null and farmName != ''">#{farmName},</if>
|
|
|
@@ -125,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="productSpec != null">product_spec = #{productSpec},</if>
|
|
|
<if test="productImage != null">product_image = #{productImage},</if>
|
|
|
<if test="productDesc != null">product_desc = #{productDesc},</if>
|
|
|
+ <if test="shopUrl != null">shop_url = #{shopUrl},</if>
|
|
|
<if test="farmId != null and farmId != ''">farm_id = #{farmId},</if>
|
|
|
<if test="fieldId != null and fieldId != ''">field_id = #{fieldId},</if>
|
|
|
<if test="farmName != null and farmName != ''">farm_name = #{farmName},</if>
|