|
@@ -591,6 +591,67 @@
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="goodsProgressList" parameterType="com.zhongzheng.modules.course.bo.CourseQueryBo" resultMap="GoodsUserVo">
|
|
|
|
+ SELECT
|
|
|
|
+ g.*,
|
|
|
|
+ u.realname,
|
|
|
|
+ u.id_card,
|
|
|
|
+ u.telphone,
|
|
|
|
+ o.user_id,
|
|
|
|
+ og.order_goods_id,
|
|
|
|
+ og.grade_id,
|
|
|
|
+ og.create_time as open_goods_time
|
|
|
|
+ FROM
|
|
|
|
+ `order` o
|
|
|
|
+ LEFT JOIN `user` u ON u.user_id = o.user_id
|
|
|
|
+ LEFT JOIN order_goods og ON og.order_sn = o.order_sn
|
|
|
|
+ LEFT JOIN goods g on og.goods_id = g.goods_id
|
|
|
|
+ where 1=1
|
|
|
|
+ AND og.`status` = 1
|
|
|
|
+ AND og.refund_status in (0,3)
|
|
|
|
+ AND og.pay_status in (2,3,4)
|
|
|
|
+ <if test="educationTypeId != null and educationTypeId != ''">
|
|
|
|
+ AND g.education_type_id = #{educationTypeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
|
+ AND g.business_id = #{businessId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderGoodsId != null and orderGoodsId != ''">
|
|
|
|
+ AND og.order_goods_id = #{orderGoodsId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="goodsId != null and goodsId != ''">
|
|
|
|
+ AND og.goods_id = #{goodsId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldCompanyId != null and oldCompanyId != ''">
|
|
|
|
+ AND o.old_company_id = #{oldCompanyId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldInstitutionId != null and oldInstitutionId != ''">
|
|
|
|
+ AND o.old_institution_id = #{oldInstitutionId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="oldCustomerId != null and oldCustomerId != ''">
|
|
|
|
+ AND o.old_customer_id = #{oldCustomerId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
|
+ and o.user_id = #{userId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="realname != null and realname !='' ">
|
|
|
|
+ AND u.realname like concat('%', #{realname}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="idCard != null and idCard !='' ">
|
|
|
|
+ AND u.id_card = #{idCard,typeHandler=com.zhongzheng.common.type.EncryptHandler}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="telphone != null and telphone !='' ">
|
|
|
|
+ AND u.telphone = #{telphone,typeHandler=com.zhongzheng.common.type.EncryptHandler}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="studyFinishStatus != null and studyFinishStatus == 1">
|
|
|
|
+ AND (SELECT cgu.period_wait_time FROM class_grade_user cgu where cgu.`status`=1 and cgu.grade_id = og.grade_id and cgu.user_id = o.user_id and cgu.order_goods_id = og.order_goods_id) >0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="studyFinishStatus != null and studyFinishStatus == 2">
|
|
|
|
+ AND (SELECT cgu.period_wait_time FROM class_grade_user cgu where cgu.`status`=1 and cgu.grade_id = og.grade_id and cgu.user_id = o.user_id and cgu.order_goods_id = og.order_goods_id) is null
|
|
|
|
+ </if>
|
|
|
|
+ order by og.create_time desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<select id="goodsStudyProgressList" parameterType="com.zhongzheng.modules.course.bo.CourseQueryBo" resultMap="GoodsUserVo">
|
|
<select id="goodsStudyProgressList" parameterType="com.zhongzheng.modules.course.bo.CourseQueryBo" resultMap="GoodsUserVo">
|
|
SELECT
|
|
SELECT
|
|
g.*,
|
|
g.*,
|