Procházet zdrojové kódy

将 MallReplyPhoto 合并到 CameraPhoto

reghao před 1 rokem
rodič
revize
f5e7d20a63

+ 1 - 1
content/content-service/src/main/java/cn/reghao/tnb/content/app/geo/MapController.java

@@ -70,7 +70,7 @@ public class MapController {
 
     @ApiOperation(value = "获取地图中标记点的详情", notes = "N")
     @GetMapping(value = "/marker", produces = MediaType.APPLICATION_JSON_VALUE)
-    public String getMarkerInfo(@RequestParam("id") String id) {
+    public String getMarkerInfo(@RequestParam("id") int id) {
         MarkerInfo markerInfo = mapService.getMarkerInfo(id);
         return WebResult.success(markerInfo);
     }

+ 5 - 5
content/content-service/src/main/java/cn/reghao/tnb/content/app/geo/db/mapper/CameraPhotoMapper.java

@@ -17,9 +17,9 @@ import java.util.List;
 public interface CameraPhotoMapper extends BaseMapper<CameraPhoto> {
     void updateSetAlbumId(@Param("objectId") String objectId, @Param("albumId") Long albumId);
 
-    List<MapMarker> findByGeoGroup(int pageSize);
-    List<MapMarker> findByWestGeoGroup(int pageSize);
-    List<MapMarker> findByAlbumId(int pageSize, long albumId);
-    MarkerInfo findMarkerInfoById(String id);
-    CameraPhoto findByObjectId(String objectId);
+    List<MapMarker> findByWestGeoGroup(int pageSize, int itemType);
+    List<MapMarker> findAllByReplyIdGroup(int pageSize);
+    List<MapMarker> findByWestChina(int pageSize, int itemType);
+    MarkerInfo findMarkerInfoById(int id);
+    MarkerInfo findMarkerInfo(int id);
 }

+ 0 - 26
content/content-service/src/main/java/cn/reghao/tnb/content/app/geo/db/mapper/MallReplyPhotoMapper.java

@@ -1,26 +0,0 @@
-package cn.reghao.tnb.content.app.geo.db.mapper;
-
-import cn.reghao.jutil.jdk.db.BaseMapper;
-import cn.reghao.tnb.content.app.geo.model.po.GeoScope;
-import cn.reghao.tnb.content.app.geo.model.po.MallReplyPhoto;
-import cn.reghao.tnb.content.app.geo.model.vo.MapMarker;
-import cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @author reghao
- * @date 2023-08-27 13:23:13
- */
-@Mapper
-public interface MallReplyPhotoMapper extends BaseMapper<MallReplyPhoto> {
-    List<MapMarker> findAllByReplyIdGroup(int pageSize);
-    List<MapMarker> findByReplyIdGroup(int pageSize, int itemType);
-    List<MapMarker> findByGeoScope(@Param("pageSize") int pageSize,
-                                   @Param("itemType") int itemType,
-                                   @Param("geoScope") GeoScope geoScope);
-    List<MapMarker> findByWestChina(int pageSize, int itemType);
-    MarkerInfo findMarkerInfoById(int id);
-}

+ 3 - 1
content/content-service/src/main/java/cn/reghao/tnb/content/app/geo/model/po/CameraPhoto.java

@@ -17,6 +17,7 @@ import java.time.LocalDateTime;
 @Setter
 @Getter
 public class CameraPhoto extends BaseObject<Integer> {
+    private Integer type;
     private Long albumId;
     private String objectId;
     private Integer channelId;
@@ -29,7 +30,8 @@ public class CameraPhoto extends BaseObject<Integer> {
     private BigDecimal latitude;
 
     public CameraPhoto(MallReplyPhotoDto mallReplyPhotoDto) {
-        this.albumId = 0L;
+        this.type = 2;
+        this.albumId = Long.parseLong(mallReplyPhotoDto.getReplyId());
         this.objectId = mallReplyPhotoDto.getUploadId();
         this.channelId = mallReplyPhotoDto.getChannelId();
         this.photoUrl = mallReplyPhotoDto.getPhotoUrl();

+ 0 - 44
content/content-service/src/main/java/cn/reghao/tnb/content/app/geo/model/po/MallReplyPhoto.java

@@ -1,44 +0,0 @@
-package cn.reghao.tnb.content.app.geo.model.po;
-
-import cn.reghao.jutil.jdk.db.BaseObject;
-import cn.reghao.tnb.content.api.dto.geo.MallReplyPhotoDto;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-
-/**
- * @author reghao
- * @date 2023-08-31 16:56:59
- */
-@NoArgsConstructor
-@Setter
-@Getter
-public class MallReplyPhoto extends BaseObject<Integer> {
-    private String replyId;
-    private String uploadId;
-    private Integer channelId;
-    private String photoUrl;
-    private String manufacturer;
-    private String model;
-    private String software;
-    private LocalDateTime shotAt;
-    private BigDecimal longitude;
-    private BigDecimal latitude;
-    private transient GeoPoint geoPoint;
-    //private String geohash;
-
-    public MallReplyPhoto(MallReplyPhotoDto mallReplyPhotoDto) {
-        this.replyId = mallReplyPhotoDto.getReplyId();
-        this.uploadId = mallReplyPhotoDto.getUploadId();
-        this.channelId = mallReplyPhotoDto.getChannelId();
-        this.photoUrl = mallReplyPhotoDto.getPhotoUrl();
-        this.manufacturer = mallReplyPhotoDto.getManufacturer();
-        this.model = mallReplyPhotoDto.getModel();
-        this.software = mallReplyPhotoDto.getSoftware();
-        this.longitude = BigDecimal.valueOf(mallReplyPhotoDto.getLongitude());
-        this.latitude = BigDecimal.valueOf(mallReplyPhotoDto.getLatitude());
-    }
-}

+ 28 - 45
content/content-service/src/main/java/cn/reghao/tnb/content/app/geo/service/MapService.java

@@ -9,7 +9,6 @@ import cn.reghao.tnb.content.app.geo.db.mapper.*;
 import cn.reghao.tnb.content.app.geo.model.po.CameraPhoto;
 import cn.reghao.tnb.content.app.geo.model.po.GeoPoint;
 import cn.reghao.tnb.content.app.geo.model.po.MallReply;
-import cn.reghao.tnb.content.app.geo.model.po.MallReplyPhoto;
 import cn.reghao.tnb.content.app.geo.model.vo.MapMarker;
 import cn.reghao.tnb.content.app.geo.model.vo.MapPoint;
 import cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo;
@@ -23,7 +22,6 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
 /**
@@ -37,15 +35,13 @@ public class MapService {
     private OssService ossService;
 
     private final MallReplyMapper mallReplyMapper;
-    private final MallReplyPhotoMapper mallReplyPhotoMapper;
     private final GeoItemMapper geoItemMapper;
     private final GeoPointMapper geoPointMapper;
     private final CameraPhotoMapper cameraPhotoMapper;
 
-    public MapService(MallReplyMapper mallReplyMapper, MallReplyPhotoMapper mallReplyPhotoMapper,
-                      GeoItemMapper geoItemMapper, GeoPointMapper geoPointMapper, CameraPhotoMapper cameraPhotoMapper) {
+    public MapService(MallReplyMapper mallReplyMapper, GeoItemMapper geoItemMapper,
+                      GeoPointMapper geoPointMapper, CameraPhotoMapper cameraPhotoMapper) {
         this.mallReplyMapper = mallReplyMapper;
-        this.mallReplyPhotoMapper = mallReplyPhotoMapper;
         this.geoItemMapper = geoItemMapper;
         this.geoPointMapper = geoPointMapper;
         this.cameraPhotoMapper = cameraPhotoMapper;
@@ -65,22 +61,23 @@ public class MapService {
         }
 
         mallReply = new MallReply(mallReplyDto);
-        List<MallReplyPhoto> list = mallReplyDto.getPhotos().stream()
+        List<CameraPhoto> list = mallReplyDto.getPhotos().stream()
                 .map(mallReplyPhotoDto -> {
-                    MallReplyPhoto mallReplyPhoto = new MallReplyPhoto(mallReplyPhotoDto);
+                    CameraPhoto cameraPhoto = new CameraPhoto(mallReplyPhotoDto);
                     try {
                         String shotAtStr = mallReplyPhotoDto.getShotAt();
                         if (shotAtStr != null) {
                             LocalDateTime shotAt = DateTimeConverter.localDateTime2(mallReplyPhotoDto.getShotAt());
-                            mallReplyPhoto.setShotAt(shotAt);
+                            cameraPhoto.setShotAt(shotAt);
                         }
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
 
-                    return mallReplyPhoto;
+                    return cameraPhoto;
                 })
                 .collect(Collectors.toList());
+
         if (!list.isEmpty()) {
             saveTmallReply(mallReply, list);
         }
@@ -100,33 +97,31 @@ public class MapService {
             }
             return cameraPhoto;
         }).collect(Collectors.toList());
+
         if (!locations.isEmpty()) {
             cameraPhotoMapper.saveAll(locations);
         }
     }
 
     @Transactional(rollbackFor = Exception.class)
-    public void saveTmallReply(MallReply mallReply, List<MallReplyPhoto> list) {
+    public void saveTmallReply(MallReply mallReply, List<CameraPhoto> list) {
         mallReplyMapper.save(mallReply);
-        mallReplyPhotoMapper.saveAll(list);
+        cameraPhotoMapper.saveAll(list);
     }
 
     public List<MapMarker> getMapMarkers(int itemType) {
         int pageSize = 1000;
         if (itemType == 1) {
-            List<MapMarker> list = mallReplyPhotoMapper.findAllByReplyIdGroup(pageSize);
-            //List<MapMarker> list = mallReplyPhotoMapper.findAllByGeoScope(pageSize, geoScope.getId());
+            List<MapMarker> list = cameraPhotoMapper.findAllByReplyIdGroup(pageSize);
             return list;
         } else if (itemType == 2) {
-            List<MapMarker> list = mallReplyPhotoMapper.findByWestChina(pageSize, itemType);
-            //List<MapMarker> list = mallReplyPhotoMapper.findByGeoScope(pageSize, itemType, geoScope1);
-            //setMarkTitle(list);
+            List<MapMarker> list = cameraPhotoMapper.findByWestChina(pageSize, itemType);
             return list;
         } else if (itemType == 3) {
-            List<MapMarker> list = cameraPhotoMapper.findByWestGeoGroup(pageSize);
+            List<MapMarker> list = cameraPhotoMapper.findByWestGeoGroup(pageSize, itemType);
             return list;
         } else if (itemType == 4) {
-            List<MapMarker> list = cameraPhotoMapper.findByAlbumId(pageSize, 0);
+            List<MapMarker> list = cameraPhotoMapper.findByWestGeoGroup(pageSize, itemType);
             list.forEach(mapMarker -> {
                 String objectId = mapMarker.getId();
             });
@@ -136,14 +131,22 @@ public class MapService {
         return Collections.emptyList();
     }
 
-    public MarkerInfo getMarkerInfo(String id) {
+    public MarkerInfo getMarkerInfo(int id) {
+        CameraPhoto cameraPhoto = cameraPhotoMapper.findById(id);
+        if (cameraPhoto == null) {
+            return null;
+        }
+        
+        int type = cameraPhoto.getType();
         MarkerInfo markerInfo;
-        if (isInteger(id)) {
-            markerInfo = mallReplyPhotoMapper.findMarkerInfoById(Integer.parseInt(id));
+        if (type == 1) {
+            markerInfo = cameraPhotoMapper.findMarkerInfo(id);
+        } else if (type == 2) {
+            markerInfo = cameraPhotoMapper.findMarkerInfoById(id);    
         } else {
-            markerInfo = cameraPhotoMapper.findMarkerInfoById(id);
+            markerInfo = cameraPhotoMapper.findMarkerInfo(id);
         }
-
+        
         int channelId = markerInfo.getChannelId();
         if (channelId != 0) {
             String uploadId = markerInfo.getUploadId();
@@ -159,12 +162,7 @@ public class MapService {
 
         return markerInfo;
     }
-
-    private boolean isInteger(String str) {
-        Pattern pattern = Pattern.compile("^[-+]?[\\d]*$");
-        return pattern.matcher(str).matches();
-    }
-
+    
     public List<SelectOption> getGeoItems() {
         return geoItemMapper.findAll().stream()
                 .map(geoItem -> {
@@ -174,21 +172,6 @@ public class MapService {
                 }).collect(Collectors.toList());
     }
 
-    public MarkerInfo getMarkerInfo(int id) {
-        MarkerInfo markerInfo = mallReplyPhotoMapper.findMarkerInfoById(id);
-        int channelId = markerInfo.getChannelId();
-        String uploadId = markerInfo.getUploadId();
-        try {
-            String signedUrl = ossService.getSignedUrl(channelId, uploadId);
-            if (signedUrl != null) {
-                markerInfo.setPhotoUrl(signedUrl);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return markerInfo;
-    }
-
     public void addGeoPoint(MapPoint mapPoint) {
         GeoPoint geoPoint = new GeoPoint(mapPoint);
         geoPointMapper.save(geoPoint);

+ 42 - 32
content/content-service/src/main/resources/mapper/geo/CameraPhotoMapper.xml

@@ -4,16 +4,16 @@
 <mapper namespace="cn.reghao.tnb.content.app.geo.db.mapper.CameraPhotoMapper">
     <insert id="save" useGeneratedKeys="true" keyProperty="id">
         insert into geo_camera_photo
-        (`album_id`,`object_id`,`channel_id`,`photo_url`,`manufacturer`,`model`,`software`,`shot_at`,`geo`)
+        (`type`,`album_id`,`object_id`,`channel_id`,`photo_url`,`manufacturer`,`model`,`software`,`shot_at`,`geo`)
         values 
-        (#{albumId},#{objectId},#{channelId},#{photoUrl},#{manufacturer},#{model},#{software},#{shotAt},point(#{longitude},#{latitude}))
+        (#{type},#{albumId},#{objectId},#{channelId},#{photoUrl},#{manufacturer},#{model},#{software},#{shotAt},point(#{longitude},#{latitude}))
     </insert>
     <insert id="saveAll" useGeneratedKeys="true" keyProperty="id">
         insert ignore into geo_camera_photo
-        (`album_id`,`object_id`,`channel_id`,`photo_url`,`manufacturer`,`model`,`software`,`shot_at`,`geo`)
+        (`type`,`album_id`,`object_id`,`channel_id`,`photo_url`,`manufacturer`,`model`,`software`,`shot_at`,`geo`)
         values
         <foreach collection="list" item="item" index="index" separator=",">
-            (#{item.albumId},#{item.objectId},#{item.channelId},#{item.photoUrl},#{item.manufacturer},#{item.model},#{item.software},#{item.shotAt},point(#{item.longitude},#{item.latitude}))
+            (#{item.type},#{item.albumId},#{item.objectId},#{item.channelId},#{item.photoUrl},#{item.manufacturer},#{item.model},#{item.software},#{item.shotAt},point(#{item.longitude},#{item.latitude}))
         </foreach>
     </insert>
 
@@ -28,52 +28,62 @@
         where id=#{id}
     </delete>
 
+    <select id="findById" resultType="cn.reghao.tnb.content.app.geo.model.po.CameraPhoto">
+        select *
+        from geo_camera_photo
+        where id=#{id}
+    </select>
+    <select id="findAll" resultType="cn.reghao.tnb.content.app.geo.model.po.CameraPhoto">
+        select *
+        from geo_camera_photo
+    </select>
+
     <resultMap id="mapMarker" type="cn.reghao.tnb.content.app.geo.model.vo.MapMarker">
         <result property="id" column="id"/>
-        <result property="title" column="title"/>
+        <result property="title" column="cup"/>
         <association property="position" javaType="cn.reghao.tnb.content.app.geo.model.vo.MapPoint">
             <result property="lng" column="lng"/>
             <result property="lat" column="lat"/>
         </association>
     </resultMap>
-    <select id="findByGeoGroup" resultMap="mapMarker">
-        select object_id as id, manufacturer as title,x(geo) as lng,y(geo) as lat
+    <select id="findByWestGeoGroup" resultMap="mapMarker">
+        select id, manufacturer as title,x(geo) as lng,y(geo) as lat
         from geo_camera_photo
-        where album_id=0
+        where `type`=#{itemType}
         group by geo
         order by shot_at desc
         limit #{pageSize}
     </select>
-    <select id="findByWestGeoGroup" resultMap="mapMarker">
-        select object_id as id, manufacturer as title,x(geo) as lng,y(geo) as lat
-        from geo_camera_photo
-        where album_id=0
-        group by geo
-        order by shot_at desc
+    <select id="findAllByReplyIdGroup" resultMap="mapMarker">
+        select photo.id,photo.manufacturer as cup,photo.photo_url,x(photo.geo) as lng,y(photo.geo) as lat
+        from geo_camera_photo photo
+        inner join geo_mall_reply reply
+        on photo.album_id=reply.reply_id
+        group by photo.album_id
+        order by photo.id desc
         limit #{pageSize}
     </select>
-    <select id="findByAlbumId" resultMap="mapMarker">
-        select object_id as id, manufacturer as title,x(geo) as lng,y(geo) as lat
-        from geo_camera_photo
-        where album_id!=0
-        group by geo
-        order by shot_at desc
+    <!-- 由西向东升序 -->
+    <select id="findByWestChina" resultMap="mapMarker">
+        select photo.id,reply.cup,photo.photo_url,x(photo.geo) as lng,y(photo.geo) as lat
+        from geo_camera_photo photo
+        inner join geo_mall_reply reply
+        on photo.album_id=reply.reply_id
+        and reply.item_type=#{itemType}
+        group by photo.album_id
+        order by photo.id desc
         limit #{pageSize}
     </select>
-
     <select id="findMarkerInfoById" resultType="cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo">
-        select object_id as upload_id,channel_id,photo_url,
-        manufacturer as item_id, model as sku, date_format(shot_at,'%Y-%m-%d %H:%i:%s') as replyContent
-        from geo_camera_photo
-        where object_id=#{id}
+        select reply.item_id,reply.reply_id,reply.extra as sku,reply.reply_content,reply.append_content,
+        photo.object_id as upload_id,photo.channel_id,photo.photo_url
+        from geo_camera_photo photo
+        inner join geo_mall_reply reply
+        on photo.album_id=reply.reply_id and photo.id=#{id}
     </select>
-    <select id="findByObjectId" resultType="cn.reghao.tnb.content.app.geo.model.po.CameraPhoto">
-        select *
-        from geo_camera_photo
-        where object_id=#{objectId}
-    </select>
-    <select id="findAll" resultType="cn.reghao.tnb.content.app.geo.model.po.CameraPhoto">
-        select *
+    <select id="findMarkerInfo" resultType="cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo">
+        select object_id as upload_id,channel_id,photo_url
         from geo_camera_photo
+        where id=#{id}
     </select>
 </mapper>

+ 0 - 9
content/content-service/src/main/resources/mapper/geo/GeoPointMapper.xml

@@ -17,15 +17,6 @@
         </foreach>
     </insert>
 
-    <resultMap id="photoGeo" type="cn.reghao.tnb.content.app.geo.model.po.MallReplyPhoto">
-        <result property="id" column="id"/>
-        <result property="replyId" column="reply_id"/>
-        <result property="photoUrl" column="photo_url"/>
-        <association property="geoPoint" javaType="cn.reghao.tnb.content.app.geo.model.vo.MapPoint">
-            <result property="lng" column="lng"/>
-            <result property="lat" column="lat"/>
-        </association>
-    </resultMap>
     <select id="findAll" resultType="cn.reghao.tnb.content.app.geo.model.po.GeoPoint">
         select id,create_time,x(geo) as longitude,y(geo) as latitude,create_by
         from geo_point

+ 0 - 91
content/content-service/src/main/resources/mapper/geo/MallReplyPhotoMapper.xml

@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="cn.reghao.tnb.content.app.geo.db.mapper.MallReplyPhotoMapper">
-    <insert id="save" useGeneratedKeys="true" keyProperty="id">
-        insert into geo_mall_reply_photo
-        (`reply_id`,`upload_id`,`channel_id`,`photo_url`,`manufacturer`,`model`,`software`,`shot_at`,`geo`)
-        values
-        (#{replyId},#{uploadId},#{channelId},#{photoUrl},#{manufacturer},#{model},#{software},#{shotAt},point(#{longitude},#{latitude}))
-    </insert>
-    <insert id="saveAll" useGeneratedKeys="true" keyProperty="id">
-        insert ignore into geo_mall_reply_photo
-        (`reply_id`,`upload_id`,`channel_id`,`photo_url`,`manufacturer`,`model`,`software`,`shot_at`,`geo`)
-        values
-        <foreach collection="list" item="item" index="index" separator=",">
-            (#{item.replyId},#{item.uploadId},#{item.channelId},#{item.photoUrl},#{item.manufacturer},#{item.model},#{item.software},#{item.shotAt},point(#{item.longitude},#{item.latitude}))
-        </foreach>
-    </insert>
-
-    <resultMap id="photoGeo" type="cn.reghao.tnb.content.app.geo.model.po.MallReplyPhoto">
-        <result property="id" column="id"/>
-        <result property="replyId" column="reply_id"/>
-        <result property="photoUrl" column="photo_url"/>
-        <association property="geoPoint" javaType="cn.reghao.tnb.content.app.geo.model.vo.MapPoint">
-            <result property="lng" column="lng"/>
-            <result property="lat" column="lat"/>
-        </association>
-    </resultMap>
-    <select id="findAll" resultMap="photoGeo">
-        select id,reply_id,photo_url,x(geo) as lng,y(geo) as lat
-        from geo_mall_reply_photo
-    </select>
-    <select id="findMarkerInfoById" resultType="cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo">
-        select reply.item_id,reply.reply_id,reply.extra as sku,reply.reply_content,reply.append_content,
-        photo.upload_id,photo.channel_id,photo.photo_url
-        from geo_mall_reply_photo photo
-        inner join geo_mall_reply reply
-        on photo.reply_id=reply.reply_id and photo.id=#{id}
-    </select>
-
-    <resultMap id="mapMarker" type="cn.reghao.tnb.content.app.geo.model.vo.MapMarker">
-        <result property="id" column="id"/>
-        <result property="title" column="cup"/>
-        <association property="position" javaType="cn.reghao.tnb.content.app.geo.model.vo.MapPoint">
-            <result property="lng" column="lng"/>
-            <result property="lat" column="lat"/>
-        </association>
-    </resultMap>
-    <select id="findAllByReplyIdGroup" resultMap="mapMarker">
-        select photo.id,photo.manufacturer as cup,photo.photo_url,x(photo.geo) as lng,y(photo.geo) as lat
-        from geo_mall_reply_photo photo
-        inner join geo_mall_reply reply
-        on photo.reply_id=reply.reply_id
-        group by photo.reply_id
-        order by photo.id desc
-        limit #{pageSize}
-    </select>
-    <select id="findByReplyIdGroup" resultMap="mapMarker">
-        select photo.id,photo.manufacturer as cup,photo.photo_url,x(photo.geo) as lng,y(photo.geo) as lat
-        from geo_mall_reply_photo photo
-        inner join geo_mall_reply reply
-        on photo.reply_id=reply.reply_id and x(photo.geo)>0.0000 and reply.item_type=#{itemType}
-        group by photo.reply_id
-        order by photo.id desc
-        limit #{pageSize}
-    </select>
-    <!-- 根据中国东西南北位置返回 -->
-    <select id="findByGeoScope" resultMap="mapMarker">
-        select photo.id,reply.username as cup,photo.photo_url,x(photo.geo) as lng,y(photo.geo) as lat
-        from geo_mall_reply_photo photo
-        inner join geo_mall_reply reply
-        on photo.reply_id=reply.reply_id
-        and x(photo.geo)>#{geoScope.lngStart} and x(photo.geo)&lt;#{geoScope.lngEnd}
-        and y(photo.geo)>#{geoScope.latStart} and y(photo.geo)&lt;#{geoScope.latEnd}
-        and reply.item_type=#{itemType}
-        group by photo.reply_id
-        order by x(photo.geo) desc
-        limit #{pageSize}
-    </select>
-    <!-- 由西向东升序 -->
-    <select id="findByWestChina" resultMap="mapMarker">
-        select photo.id,reply.cup,photo.photo_url,x(photo.geo) as lng,y(photo.geo) as lat
-        from geo_mall_reply_photo photo
-        inner join geo_mall_reply reply
-        on photo.reply_id=reply.reply_id
-        and reply.item_type=#{itemType}
-        group by photo.reply_id
-        order by photo.id desc
-        limit #{pageSize}
-    </select>
-</mapper>