|
@@ -21,18 +21,73 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="studyNum" column="study_num"/>
|
|
|
</resultMap>
|
|
|
|
|
|
- <select id="selectCountCourse" parameterType="com.zhongzheng.modules.user.bo.UserPlanEditBo" resultType="int">
|
|
|
- SELECT COUNT(c.source_id)
|
|
|
- FROM user_plan_cource c LEFT JOIN user_plan u ON u.plan_id = c.plan_id
|
|
|
- WHERE 1=1 and u.status=1
|
|
|
- <if test="courseId != null and courseId !=''">
|
|
|
- and c.source_id in
|
|
|
- <foreach collection="courseId" open="(" separator="," close=")" item="courseId">
|
|
|
- #{courseId}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="userId != null and userId !=''">
|
|
|
- and u.user_id = #{userId}
|
|
|
- </if>
|
|
|
+ <resultMap type="com.zhongzheng.modules.goods.vo.GoodsVo" id="GoodsResultVo">
|
|
|
+ <result property="goodsId" column="goods_id"/>
|
|
|
+ <result property="year" column="year"/>
|
|
|
+ <result property="supplyId" column="supply_id"/>
|
|
|
+ <result property="goodsType" column="goods_type"/>
|
|
|
+ <result property="educationTypeId" column="education_type_id"/>
|
|
|
+ <result property="businessId" column="business_id"/>
|
|
|
+ <result property="schoolId" column="school_id"/>
|
|
|
+ <result property="majorId" column="major_id"/>
|
|
|
+ <result property="goodsName" column="goods_name"/>
|
|
|
+ <result property="standPrice" column="stand_price"/>
|
|
|
+ <result property="lowestPrice" column="lowest_price"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="status" column="status"/>
|
|
|
+ <result property="validityStartTime" column="validity_start_time"/>
|
|
|
+ <result property="validityEndTime" column="validity_end_time"/>
|
|
|
+ <result property="studyStartTime" column="study_start_time"/>
|
|
|
+ <result property="studyEndTime" column="study_end_time"/>
|
|
|
+ <result property="certificateIds" column="certificate_ids"/>
|
|
|
+ <result property="introduce" column="introduce"/>
|
|
|
+ <result property="suitableObject" column="suitable_object"/>
|
|
|
+ <result property="buyNote" column="buy_note"/>
|
|
|
+ <result property="pcDetailHtml" column="pc_detail_html"/>
|
|
|
+ <result property="mobileDetailHtml" column="mobile_detail_html"/>
|
|
|
+ <result property="goodsStatus" column="goods_status"/>
|
|
|
+ <result property="coverUrl" column="cover_url"/>
|
|
|
+ <result property="classHours" column="class_hours"/>
|
|
|
+ <result property="standPriceJson" column="stand_price_json"/>
|
|
|
+ <result property="code" column="code"/>
|
|
|
+ <result property="projectId" column="project_id"/>
|
|
|
+ <result property="goodsAuditionConfig" column="goods_audition_config"/>
|
|
|
+ <result property="goodsPhotographConfig" column="goods_photograph_config"/>
|
|
|
+ <result property="goodsAuditionExamConfig" column="goods_audition_exam_config"/>
|
|
|
+ <result property="goodsPlayConfig" column="goods_play_config"/>
|
|
|
+ <result property="goodsExamConfig" column="goods_exam_config"/>
|
|
|
+
|
|
|
+ <result property="supplyName" column="supply_name"/>
|
|
|
+ <result property="educationName" column="education_name"/>
|
|
|
+ <result property="projectName" column="project_name"/>
|
|
|
+ <result property="businessName" column="business_name"/>
|
|
|
+ <result property="schoolName" column="school_name"/>
|
|
|
+ <result property="categoryName" column="category_name"/>
|
|
|
+ <result property="handoutsId" column="handouts_id"/>
|
|
|
+ <result property="templateType" column="template_type"/>
|
|
|
+ <result property="period" column="period"/>
|
|
|
+ <result property="makeStartTime" column="make_start_time"/>
|
|
|
+ <result property="makeEndTime" column="make_end_time"/>
|
|
|
+ <result property="studyCount" column="study_count"/>
|
|
|
+ <result property="makeGoodsName" column="make_goods_name"/>
|
|
|
+ <result property="makeGoodsCode" column="make_goods_code"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <select id="listGoods" parameterType="com.zhongzheng.modules.user.bo.UserPlanQueryBo" resultMap="GoodsResultVo">
|
|
|
+ SELECT
|
|
|
+ g.*
|
|
|
+ FROM
|
|
|
+ goods g
|
|
|
+ LEFT JOIN order_goods og ON g.goods_id = og.goods_id
|
|
|
+ LEFT JOIN `order` o ON o.order_sn = og.order_sn
|
|
|
+ WHERE
|
|
|
+ o.user_id = #{userId}
|
|
|
+ AND og.refund_status in (0,3)
|
|
|
+ and og.`status`= 1
|
|
|
+ and og.pay_status in(2,3)
|
|
|
+ and g.goods_type =1
|
|
|
</select>
|
|
|
</mapper>
|