|
@@ -20,6 +20,7 @@
|
|
|
<result column="detailedImage" property="detailedImage"/>
|
|
|
<result column="contract" property="contract"/>
|
|
|
<result column="subtitle" property="subtitle"/>
|
|
|
+ <result column="customerId" property="customerId"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="get" resultMap="result">
|
|
@@ -44,6 +45,9 @@
|
|
|
<if test="productLevelId != 0">
|
|
|
and productLevelId = #{productLevelId}
|
|
|
</if>
|
|
|
+ <if test="customerId != null">
|
|
|
+ and customerId = #{customerId}
|
|
|
+ </if>
|
|
|
and deleteState != 1
|
|
|
</where>
|
|
|
</select>
|
|
@@ -66,6 +70,9 @@
|
|
|
<if test="productLevelId != 0">
|
|
|
and productLevelId = #{productLevelId}
|
|
|
</if>
|
|
|
+ <if test="customerId != null">
|
|
|
+ and customerId = #{customerId}
|
|
|
+ </if>
|
|
|
and deleteState != 1
|
|
|
</where>
|
|
|
</select>
|
|
@@ -88,14 +95,17 @@
|
|
|
<if test="p.productLevelId != 0">
|
|
|
and productLevelId = #{p.productLevelId}
|
|
|
</if>
|
|
|
+ <if test="customerId != null">
|
|
|
+ and customerId = #{customerId}
|
|
|
+ </if>
|
|
|
and deleteState != 1
|
|
|
</where>
|
|
|
order by createTime desc limit #{currIndex} , #{pageSize}
|
|
|
</select>
|
|
|
|
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
|
- INSERT INTO workark_product (organizationId, type, productLevelId, createTime, name, price, intro, listDisplayImage, rotatingImages, detailedImage, contract, subtitle)
|
|
|
- VALUES (#{organizationId}, #{type}, #{productLevelId}, now(), #{name}, #{price}, #{intro}, #{listDisplayImage}, #{rotatingImages}, #{detailedImage}, #{contract}, #{subtitle})
|
|
|
+ INSERT INTO workark_product (organizationId, type, productLevelId, createTime, name, price, intro, listDisplayImage, rotatingImages, detailedImage, contract, subtitle, customerId)
|
|
|
+ VALUES (#{organizationId}, #{type}, #{productLevelId}, now(), #{name}, #{price}, #{intro}, #{listDisplayImage}, #{rotatingImages}, #{detailedImage}, #{contract}, #{subtitle}, #{customerId})
|
|
|
</insert>
|
|
|
|
|
|
<update id="update" parameterType="com.bosshand.virgo.api.workark.model.Product">
|
|
@@ -114,6 +124,7 @@
|
|
|
<if test="detailedImage!=null">detailedImage=#{detailedImage},</if>
|
|
|
<if test="contract!=null">contract=#{contract},</if>
|
|
|
<if test="subtitle!=null">subtitle=#{subtitle},</if>
|
|
|
+ <if test="customerId!=null">customerId=#{customerId},</if>
|
|
|
</trim>
|
|
|
WHERE id=#{id}
|
|
|
</update>
|