|
|
@@ -1,5 +1,6 @@
|
|
|
package shop.alien.mapper;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
@@ -8,10 +9,14 @@ import org.apache.ibatis.annotations.Mapper;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
import org.apache.ibatis.annotations.Update;
|
|
|
+import org.apache.poi.ss.formula.functions.T;
|
|
|
import shop.alien.entity.store.LifeGroupBuyMain;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
+import shop.alien.entity.store.vo.LifeGroupBuyMainVo;
|
|
|
import shop.alien.entity.store.vo.LifeGroupBuyThaliVo;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @author youch
|
|
|
* @description 针对表【life_group_buy_main(团购主表)】的数据库操作Mapper
|
|
|
@@ -47,6 +52,63 @@ public interface LifeGroupBuyMainMapper extends BaseMapper<LifeGroupBuyMain> {
|
|
|
@Param("buyCount") int buyCount,
|
|
|
@Param("soldOutStatus") int soldOutStatus
|
|
|
);
|
|
|
+
|
|
|
+ @Select("SELECT\n" +
|
|
|
+ " g.id AS id,\n" +
|
|
|
+ " g.group_no AS group_no,\n" +
|
|
|
+ " g.group_type AS group_type,\n" +
|
|
|
+ " g.status AS status,\n" +
|
|
|
+ " g.approval_comments AS approval_comments,\n" +
|
|
|
+ " g.store_id AS store_id,\n" +
|
|
|
+ " g.image_id AS image_id,\n" +
|
|
|
+ " g.group_name AS group_name,\n" +
|
|
|
+ " g.start_time_type AS start_time_type,\n" +
|
|
|
+ " g.start_time_value AS start_time_value,\n" +
|
|
|
+ " g.end_time AS end_time,\n" +
|
|
|
+ " g.inventory_num AS inventory_num,\n" +
|
|
|
+ " g.quota_type AS quota_type,\n" +
|
|
|
+ " g.quota_value AS quota_value,\n" +
|
|
|
+ " g.original_price AS original_price,\n" +
|
|
|
+ " g.preferential_price AS preferential_price,\n" +
|
|
|
+ " g.effective_date_type AS effective_date_type,\n" +
|
|
|
+ " g.effective_date_value AS effective_date_value,\n" +
|
|
|
+ " g.disable_date_type AS disable_date_type,\n" +
|
|
|
+ " g.disable_date_value AS disable_date_value,\n" +
|
|
|
+ " g.write_off AS write_off,\n" +
|
|
|
+ " g.reservation_rules AS reservation_rules,\n" +
|
|
|
+ " g.use_rules AS use_rules,\n" +
|
|
|
+ " g.applicable_num AS applicable_num,\n" +
|
|
|
+ " g.other_rules AS other_rules,\n" +
|
|
|
+ " g.invoice_type AS invoice_type,\n" +
|
|
|
+ " g.invoice_describe AS invoice_describe,\n" +
|
|
|
+ " g.insured_flag AS insured_flag,\n" +
|
|
|
+ " g.insured_price AS insured_price,\n" +
|
|
|
+ " g.coupon_id AS coupon_id,\n" +
|
|
|
+ " g.delete_flag AS delete_flag,\n" +
|
|
|
+ " g.created_time AS created_time,\n" +
|
|
|
+ " g.updated_time AS updated_time,\n" +
|
|
|
+ " g.created_user_id AS created_user_id,\n" +
|
|
|
+ " g.updated_user_id AS updated_user_id,\n" +
|
|
|
+ " s.store_name AS store_name,\n" +
|
|
|
+ " s.store_address AS store_address,\n" +
|
|
|
+ " s.store_tel AS store_tel,\n" +
|
|
|
+ " ROUND(s.score_avg) AS scoreAvg,\n" +
|
|
|
+ " s.business_types_name AS businessName,\n" +
|
|
|
+ " s.query_address AS address,\n" +
|
|
|
+ " IFNULL(GROUP_CONCAT(img.img_url SEPARATOR ','), '') AS imagePaths\n" +
|
|
|
+ "FROM\n" +
|
|
|
+ " life_group_buy_main g\n" +
|
|
|
+ "LEFT JOIN store_info s \n" +
|
|
|
+ " ON g.store_id = s.id \n" +
|
|
|
+ " AND s.delete_flag = 0 \n" +
|
|
|
+ "LEFT JOIN store_img img \n" +
|
|
|
+ " ON FIND_IN_SET(img.id, g.image_id) > 0 \n" +
|
|
|
+ " AND img.delete_flag = 0\t\t \n" +
|
|
|
+ "WHERE\n" +
|
|
|
+ " g.delete_flag = 0\n" +
|
|
|
+ "GROUP BY\n" +
|
|
|
+ " g.id")
|
|
|
+ List<LifeGroupBuyMainVo> getLifeGroupInfo(@Param(Constants.WRAPPER) LambdaQueryWrapper<LifeGroupBuyMainVo> queryWrapper);
|
|
|
}
|
|
|
|
|
|
|