|
@@ -310,25 +310,20 @@
|
|
resultMap="ClassGradeUserGoodsVoResult">
|
|
resultMap="ClassGradeUserGoodsVoResult">
|
|
SELECT
|
|
SELECT
|
|
* ,
|
|
* ,
|
|
- (select `code` FROM goods g LEFT JOIN class_grade_goods c on g.goods_id = c.goods_id where c.grade_id =
|
|
|
|
- u.grade_id) as goods_code,
|
|
|
|
- (select `year` FROM goods g LEFT JOIN class_grade_goods c on g.goods_id = c.goods_id where c.grade_id =
|
|
|
|
- u.grade_id) as year,
|
|
|
|
- (select goods_name FROM goods g LEFT JOIN class_grade_goods c on g.goods_id = c.goods_id where c.grade_id =
|
|
|
|
- u.grade_id) as goods_name,
|
|
|
|
- (select b.business_name FROM course_business b LEFT JOIN goods g on b.id = g.business_id LEFT JOIN
|
|
|
|
- class_grade_goods c on g.goods_id = c.goods_id where c.grade_id = u.grade_id) as business_name,
|
|
|
|
- (select b.project_name FROM course_project_type b LEFT JOIN goods g on b.id = g.project_id LEFT JOIN
|
|
|
|
- class_grade_goods c on g.goods_id = c.goods_id where c.grade_id = u.grade_id) as project_name,
|
|
|
|
- (select b.school_name FROM school b LEFT JOIN goods g on b.id = g.school_id LEFT JOIN class_grade_goods c on
|
|
|
|
- g.goods_id = c.goods_id where c.grade_id = u.grade_id) as school_name,
|
|
|
|
- (select b.education_name FROM course_education_type b LEFT JOIN goods g on b.id = g.education_type_id LEFT JOIN
|
|
|
|
- class_grade_goods c on g.goods_id = c.goods_id where c.grade_id = u.grade_id) as education_name,
|
|
|
|
|
|
+ g.code as goods_code,
|
|
|
|
+ g.`year`,
|
|
|
|
+ g.goods_name,
|
|
|
|
+ (select b.business_name FROM course_business b where b.id = g.business_id) as business_name,
|
|
|
|
+ (select b.project_name FROM course_project_type b where b.id = g.project_id) as project_name,
|
|
|
|
+ (select b.school_name FROM school b where b.id = g.school_id) as school_name,
|
|
|
|
+ (select b.education_name FROM course_education_type b where b.id = g.education_type_id) as education_name,
|
|
(SELECT g.grade_code FROM class_grade g where u.grade_id = g.grade_id) as grade_code,
|
|
(SELECT g.grade_code FROM class_grade g where u.grade_id = g.grade_id) as grade_code,
|
|
(SELECT g.class_name FROM class_grade g where u.grade_id = g.grade_id) as grade_name,
|
|
(SELECT g.class_name FROM class_grade g where u.grade_id = g.grade_id) as grade_name,
|
|
(SELECT g.status FROM class_grade g where u.grade_id = g.grade_id) as grade_status
|
|
(SELECT g.status FROM class_grade g where u.grade_id = g.grade_id) as grade_status
|
|
FROM
|
|
FROM
|
|
class_grade_user u
|
|
class_grade_user u
|
|
|
|
+ LEFT JOIN order_goods og on og.order_goods_id = u.order_goods_id
|
|
|
|
+ LEFT JOIN goods g on g.goods_id = og.goods_id
|
|
where 1=1
|
|
where 1=1
|
|
<if test="status != null and status.size()!=0 ">
|
|
<if test="status != null and status.size()!=0 ">
|
|
AND u.status in
|
|
AND u.status in
|
|
@@ -346,25 +341,20 @@
|
|
resultMap="ClassGradeUserGoodsVoResult">
|
|
resultMap="ClassGradeUserGoodsVoResult">
|
|
SELECT
|
|
SELECT
|
|
* ,
|
|
* ,
|
|
- (select `code` FROM goods g LEFT JOIN class_grade_goods c on g.goods_id = c.goods_id where c.grade_id =
|
|
|
|
- u.grade_id) as goods_code,
|
|
|
|
- (select `year` FROM goods g LEFT JOIN class_grade_goods c on g.goods_id = c.goods_id where c.grade_id =
|
|
|
|
- u.grade_id) as year,
|
|
|
|
- (select goods_name FROM goods g LEFT JOIN class_grade_goods c on g.goods_id = c.goods_id where c.grade_id =
|
|
|
|
- u.grade_id) as goods_name,
|
|
|
|
- (select b.business_name FROM course_business b LEFT JOIN goods g on b.id = g.business_id LEFT JOIN
|
|
|
|
- class_grade_goods c on g.goods_id = c.goods_id where c.grade_id = u.grade_id) as business_name,
|
|
|
|
- (select b.project_name FROM course_project_type b LEFT JOIN goods g on b.id = g.project_id LEFT JOIN
|
|
|
|
- class_grade_goods c on g.goods_id = c.goods_id where c.grade_id = u.grade_id) as project_name,
|
|
|
|
- (select b.school_name FROM school b LEFT JOIN goods g on b.id = g.school_id LEFT JOIN class_grade_goods c on
|
|
|
|
- g.goods_id = c.goods_id where c.grade_id = u.grade_id) as school_name,
|
|
|
|
- (select b.education_name FROM course_education_type b LEFT JOIN goods g on b.id = g.education_type_id LEFT JOIN
|
|
|
|
- class_grade_goods c on g.goods_id = c.goods_id where c.grade_id = u.grade_id) as education_name,
|
|
|
|
|
|
+ g.code as goods_code,
|
|
|
|
+ g.`year`,
|
|
|
|
+ g.goods_name,
|
|
|
|
+ (select b.business_name FROM course_business b where b.id = g.business_id) as business_name,
|
|
|
|
+ (select b.project_name FROM course_project_type b where b.id = g.project_id) as project_name,
|
|
|
|
+ (select b.school_name FROM school b where b.id = g.school_id) as school_name,
|
|
|
|
+ (select b.education_name FROM course_education_type b where b.id = g.education_type_id) as education_name,
|
|
(SELECT g.grade_code FROM class_grade g where u.grade_id = g.grade_id) as grade_code,
|
|
(SELECT g.grade_code FROM class_grade g where u.grade_id = g.grade_id) as grade_code,
|
|
(SELECT g.class_name FROM class_grade g where u.grade_id = g.grade_id) as grade_name,
|
|
(SELECT g.class_name FROM class_grade g where u.grade_id = g.grade_id) as grade_name,
|
|
(SELECT g.status FROM class_grade g where u.grade_id = g.grade_id) as grade_status
|
|
(SELECT g.status FROM class_grade g where u.grade_id = g.grade_id) as grade_status
|
|
FROM
|
|
FROM
|
|
class_grade_user u
|
|
class_grade_user u
|
|
|
|
+ LEFT JOIN order_goods og on og.order_goods_id = u.order_goods_id
|
|
|
|
+ LEFT JOIN goods g on g.goods_id = og.goods_id
|
|
where 1=1
|
|
where 1=1
|
|
<if test="status != null and status.size()!=0 ">
|
|
<if test="status != null and status.size()!=0 ">
|
|
AND u.status in
|
|
AND u.status in
|