|
@@ -2,16 +2,13 @@ package shop.alien.mapper.second;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|
|
|
|
-import org.apache.ibatis.annotations.Mapper; // 引入 Mapper 注解
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
import shop.alien.entity.second.SecondGoods;
|
|
import shop.alien.entity.second.SecondGoods;
|
|
|
-import shop.alien.entity.second.SecondShield;
|
|
|
|
|
import shop.alien.entity.second.vo.SecondGoodsVo;
|
|
import shop.alien.entity.second.vo.SecondGoodsVo;
|
|
|
import shop.alien.entity.second.vo.SellGoodsVo;
|
|
import shop.alien.entity.second.vo.SellGoodsVo;
|
|
|
-import shop.alien.entity.store.StoreInfo;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
@@ -99,8 +96,12 @@ public interface SecondGoodsMapper extends BaseMapper<SecondGoods> {
|
|
|
"sg.*, " +
|
|
"sg.*, " +
|
|
|
"sgc1.category_name as categoryOneName, " +
|
|
"sgc1.category_name as categoryOneName, " +
|
|
|
"sgc2.category_name as categoryTwoName, "+
|
|
"sgc2.category_name as categoryTwoName, "+
|
|
|
- "ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(',#{currentLongitude},' ',#{currentLatitude} , ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(sg.position, ',', ' '), ')' ))) / 1000, 2) AS distance "+
|
|
|
|
|
|
|
+ "ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(',#{currentLongitude},' ',#{currentLatitude} , ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(sg.position, ',', ' '), ')' ))) / 1000, 2) AS distance, "+
|
|
|
|
|
+ "CONCAT('user_', u.user_phone) as user_phone"+
|
|
|
" FROM second_goods sg " +
|
|
" FROM second_goods sg " +
|
|
|
|
|
+ "inner join life_user u " +
|
|
|
|
|
+ "on u.id = sg.user_id " +
|
|
|
|
|
+ "and u.delete_flag = 0 " +
|
|
|
"left JOIN second_goods_category sgc1 " +
|
|
"left JOIN second_goods_category sgc1 " +
|
|
|
"on sg.category_one_id = sgc1.id " +
|
|
"on sg.category_one_id = sgc1.id " +
|
|
|
"left JOIN second_goods_category sgc2 " +
|
|
"left JOIN second_goods_category sgc2 " +
|