Helius
2021-12-15 ccf8413a33e85589d0ed219bd1a0aff88e6a1e39
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?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="com.xzx.gc.order.mapper.JhyInfoMapper">
 
    <select id="selectJhyInfoByUserId" resultType="com.xzx.gc.entity.JhyInfo">
        select * from xzx_jhy_info where user_id=#{userId}
    </select>
 
 
    <select id="selectJhyInfoListInAddressRange" resultType="com.xzx.gc.entity.JhyInfo">
        select * from xzx_jhy_info a
        where 6000 > lat_lng_distance(a.lat, a.lon, (select latitude from xzx_user_address_info where address_id=#{addressId}), (select longitude from xzx_user_address_info where address_id=#{addressId}))*1000
          and status = 2
    </select>
</mapper>