Преглед изворни кода

update content-service/geo

reghao пре 7 месеци
родитељ
комит
fb1a4658e9

+ 2 - 1
content/content-service/src/main/java/cn/reghao/tnb/content/app/geo/db/mapper/MallReplyMapper.java

@@ -3,6 +3,7 @@ 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.MallReply;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -12,7 +13,7 @@ import java.util.List;
  */
 @Mapper
 public interface MallReplyMapper extends BaseMapper<MallReply> {
-    void updateSetCup(String replyId, String cup);
+    void updateSetCup(@Param("replyId") String replyId, @Param("cup") String cup);
 
     List<MallReply> findByItemType(int itemType);
     List<MallReply> findByItemId(String itemId);

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

@@ -49,7 +49,7 @@
     <select id="findByWestGeoGroup" resultMap="mapMarker">
         select id, manufacturer as cup,x(geo) as lng,y(geo) as lat
         from geo_camera_photo
-        where `type`=#{itemType}
+        where `type`=#{itemType} and geo is not null
         group by geo
         order by shot_at desc
         limit #{pageSize}
@@ -58,7 +58,7 @@
         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
+        on photo.album_id=reply.reply_id and photo.geo is not null
         group by photo.album_id
         order by photo.id desc
         limit #{pageSize}
@@ -68,7 +68,7 @@
         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
+        on photo.album_id=reply.reply_id and photo.geo is not null
         and reply.item_type=#{itemType}
         group by photo.album_id
         order by photo.id desc
@@ -79,16 +79,16 @@
         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}
+        on photo.album_id=reply.reply_id and photo.id=#{id} and photo.geo is not null
     </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}
+        where id=#{id} and geo is not null
     </select>
     <select id="findAlbumMarkerInfo" resultType="cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo">
         select object_id as upload_id,album_id as item_id,channel_id,photo_url
         from geo_camera_photo
-        where id=#{id}
+        where id=#{id} and geo is not null
     </select>
 </mapper>

+ 1 - 1
content/content-service/src/test/java/cn/reghao/tnb/content/app/vod/service/GeoTest.java → content/content-service/src/test/java/cn/reghao/tnb/content/app/geo/service/GeoTest.java

@@ -1,4 +1,4 @@
-package cn.reghao.tnb.content.app.vod.service;
+package cn.reghao.tnb.content.app.geo.service;
 
 import cn.reghao.jutil.jdk.serializer.JsonConverter;
 import cn.reghao.jutil.jdk.text.TextFile;