|
@@ -24,11 +24,6 @@
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultWrapper" type="com.diagbot.entity.wrapper.OpendProductWrapper">
|
|
|
<id column="id" property="id"/>
|
|
|
- <result column="is_deleted" property="isDeleted"/>
|
|
|
- <result column="gmt_create" property="gmtCreate"/>
|
|
|
- <result column="gmt_modified" property="gmtModified"/>
|
|
|
- <result column="creator" property="creator"/>
|
|
|
- <result column="modifier" property="modifier"/>
|
|
|
<result column="product_id" property="productId"/>
|
|
|
<result column="user_id" property="userId"/>
|
|
|
<result column="start_time" property="startTime"/>
|
|
@@ -202,13 +197,14 @@
|
|
|
AND a.product_id = #{productId}
|
|
|
</update>
|
|
|
|
|
|
- <select id="getByProductId" parameterType="com.diagbot.entity.OpenedProductsIndex"
|
|
|
- resultMap="BaseResultWrapper">
|
|
|
+ <select id="getByProductId" resultType="com.diagbot.entity.wrapper.OpendProductWrapper">
|
|
|
SELECT a.*,b.time order_time from diag_opened_products a
|
|
|
LEFT JOIN diag_product_order b ON a.order_id =b.id
|
|
|
WHERE product_id =#{opend.productId} AND a.is_deleted='N'
|
|
|
- <if test="opend.serviceStatus != null and opend.serviceStatus != ''">
|
|
|
- and t.service_status=#{opend.serviceStatus}
|
|
|
+ <if test="opend.userId != null and opend.userId.size > 0">
|
|
|
+ <foreach item="opend.userId" collection="opend.userId" open="and(" separator="or" close=")">
|
|
|
+ a.user_id = #{opend.userId}
|
|
|
+ </foreach>
|
|
|
</if>
|
|
|
ORDER BY b.time desc
|
|
|
</select>
|