|
|
@@ -4,21 +4,21 @@
|
|
|
<mapper namespace="cn.reghao.tnb.content.app.geo.db.mapper.GeoPointMapper">
|
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into geo_point
|
|
|
- (`geo`,`create_by`)
|
|
|
+ (`geo`,`title`,`create_by`,`create_at`)
|
|
|
values
|
|
|
- (point(#{longitude},#{latitude}), #{createBy})
|
|
|
+ (point(#{longitude},#{latitude}),#{title},#{createBy},#{createAt})
|
|
|
</insert>
|
|
|
<insert id="saveAll" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert ignore into geo_point
|
|
|
- (`geo`,`create_by`)
|
|
|
+ (`geo`,`title`,`create_by`,`create_at`)
|
|
|
values
|
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
|
- (point(#{item.longitude},#{item.latitude}), #{item.createBy})
|
|
|
+ (point(#{item.longitude},#{item.latitude}),#{item.title},#{item.createBy},#{item.createAt})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
<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
|
|
|
+ select id,create_time,x(geo) as longitude,y(geo) as latitude,title,create_by,create_at
|
|
|
from geo_point
|
|
|
order by id asc
|
|
|
limit 20
|