jianjun 3 years ago
parent
commit
30889bf05a
  1. 4
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java
  2. 6
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java
  3. 6
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml

4
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java

@ -23,9 +23,9 @@ public interface GridInfoPingyinDao extends BaseDao<GridInfoPingyinEntity> {
List<GridInfoPingyinEntity> selectByGridCode(String gridCode); List<GridInfoPingyinEntity> selectByGridCode(String gridCode);
int updateSomeCol(@Param("id") Long id, int updateSomeCol(@Param("gridCode") String gridCode,
@Param("gridName")String gridName, @Param("gridName")String gridName,
@Param("gridLevel")Integer gridLevel, @Param("gridLevel")Integer gridLevel,
@Param("lng")BigDecimal lng, @Param("lng")BigDecimal lng,
@Param("lat")BigDecimal lat); @Param("lat")BigDecimal lat);
} }

6
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java

@ -94,7 +94,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl<GridInfoPingyinD
// 更新网格名称、网格层级、网格中心点的经度,网格中心点纬度 // 更新网格名称、网格层级、网格中心点的经度,网格中心点纬度
for (GridInfoPingyinEntity oigin : orginList) { for (GridInfoPingyinEntity oigin : orginList) {
baseDao.updateSomeCol(oigin.getId(), entity.getGridName(), entity.getGridLevel(), entity.getLng(), entity.getLat()); baseDao.updateSomeCol(oigin.getGridCode(), entity.getGridName(), entity.getGridLevel(), entity.getLng(), entity.getLat());
} }
} else { } else {
@ -167,7 +167,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl<GridInfoPingyinD
// 更新网格名称、网格层级、网格中心点的经度,网格中心点纬度 // 更新网格名称、网格层级、网格中心点的经度,网格中心点纬度
for (GridInfoPingyinEntity oigin : orginList) { for (GridInfoPingyinEntity oigin : orginList) {
baseDao.updateSomeCol(oigin.getId(), entity.getGridName(), entity.getGridLevel(), entity.getLng(), entity.getLat()); baseDao.updateSomeCol(oigin.getGridCode(), entity.getGridName(), entity.getGridLevel(), entity.getLng(), entity.getLat());
} }
} else { } else {
@ -180,4 +180,4 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl<GridInfoPingyinD
} }
} }

6
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml

@ -33,7 +33,7 @@
<select id="selectByGridCode" parameterType="java.lang.String" resultType="com.epmet.opendata.entity.GridInfoPingyinEntity"> <select id="selectByGridCode" parameterType="java.lang.String" resultType="com.epmet.opendata.entity.GridInfoPingyinEntity">
select g.* from grid_info_pingyin g select g.* from grid_info_pingyin g
where g.grid_code = #{gridCode} where g.grid_code = #{gridCode} and is_del = 'N'
</select> </select>
<update id="updateSomeCol" parameterType="map"> <update id="updateSomeCol" parameterType="map">
@ -42,6 +42,6 @@
grid_level = #{gridLevel}, grid_level = #{gridLevel},
lng = #{lng}, lng = #{lng},
lat = #{lat} lat = #{lat}
where id = #{id} where grid_code = #{gridCode} and is_del = 'N'
</update> </update>
</mapper> </mapper>

Loading…
Cancel
Save