|
|
@@ -36,11 +36,11 @@ public interface LifeUserOrderMapper extends BaseMapper<LifeUserOrder> {
|
|
|
@Select("with total_coupon as(\n" +
|
|
|
"-- 团购\n" +
|
|
|
"\tselect id coupon_id,2 coupon_type,lgbm.group_name coupon_name, SUBSTRING_INDEX(image_id, ',', 1) AS image_id,effective_date_type,effective_date_value \n" +
|
|
|
- "from life_group_buy_main lgbm where lgbm.delete_flag = 0\n" +
|
|
|
+ "from life_group_buy_main lgbm \n" +
|
|
|
"\tunion all\n" +
|
|
|
"-- 代金券\n" +
|
|
|
"\tselect id coupon_id,1 coupon_type,lc.name coupon_name, SUBSTRING_INDEX(image_path, ',', 1) AS image_id,0 effective_date_type,expiration_date effective_date_value \n" +
|
|
|
- "from life_coupon lc where lc.delete_flag = 0\n" +
|
|
|
+ "from life_coupon lc \n" +
|
|
|
")\n" +
|
|
|
"select luo.id,luo.buy_time,luo.status,luo.price,luo.final_price,luo.user_id,luo.store_id,luo.order_no,luo.pay_time,luo.cancel_time,luo.finish_time,luo.order_str,luo.expert_order_id,\n" +
|
|
|
"si.store_name,si.commission_rate,si.business_section store_type,si.store_status,si.business_status,\n" +
|
|
|
@@ -58,7 +58,7 @@ public interface LifeUserOrderMapper extends BaseMapper<LifeUserOrder> {
|
|
|
"left join store_info si on si.id = luo.store_id -- 查询店铺相关 \n" +
|
|
|
"left join life_user lu on lu.id = luo.user_id and lu.delete_flag = 0 -- 查询用户相关 \n" +
|
|
|
"left join order_coupon_middle ocm on ocm.order_id = luo.id and ocm.delete_flag = 0\n" +
|
|
|
- "inner join total_coupon tc on tc.coupon_id = ocm.coupon_id and tc.coupon_type = luo.coupon_type\n" +
|
|
|
+ "left join total_coupon tc on tc.coupon_id = ocm.coupon_id and tc.coupon_type = luo.coupon_type\n" +
|
|
|
"left join store_img simg on simg.id = tc.image_id and simg.delete_flag = 0 \n" +
|
|
|
"left join store_comment sc on sc.business_id = luo.id and sc.delete_flag = 0 and sc.business_type = 5\n" +
|
|
|
"left join life_discount_coupon_user ldcu on ldcu .id = luo.quan_id \n" +
|