| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:mysql://localhost:3306/ard-uav?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://192.168.1.15:3306/ard-uav?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: root |
| | | password: password |
| | | # 从库数据源 |
| | | slave: |
| | | # 从数据源开关/默认关闭 |
| | |
| | | |
| | | double lat = coordinates.get(0).getLat(); |
| | | double meterPerDegree = 111000 * Math.cos(Math.toRadians(lat)); |
| | | return area * meterPerDegree * 111000; |
| | | double result = area * meterPerDegree * 111000; |
| | | // 保留2位小数(平方米) |
| | | return Math.round(result * 100) / 100.0; |
| | | } |
| | | |
| | | /** |
| | |
| | | <update id="updateArdDeptRegion" parameterType="ArdDeptRegion"> |
| | | UPDATE ard_dept_region |
| | | <set> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | <if test="regionName != null">region_name = #{regionName},</if> |
| | | <if test="regionColor != null">region_color = #{regionColor},</if> |
| | | <if test="boundaryWkt != null">region_boundary = ST_GeomFromText(#{boundaryWkt}, 4326),</if> |