| | |
| | | <include refid="selectArdAppPositionVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectLastArdAppPositionByUserId" parameterType="String" resultMap="ArdAppPositionResult"> |
| | | <include refid="selectArdAppPositionVo"/> |
| | | where user_id = #{userId} |
| | | order by create_time desc |
| | | limit 1 |
| | | </select> |
| | | <insert id="insertArdAppPosition" parameterType="ArdAppPosition"> |
| | | insert into ard_app_position |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="getOnlineCommanderPosition" parameterType="java.lang.String" resultType="java.util.Map"> |
| | | select su.user_name as "userName",su.nick_name as "nickName", |
| | | aap.user_id as "userId",aap.longitude,aap.latitude,aap.altitude, |
| | | aap.speed,aap.bearing,aap.create_time as "createTime" |
| | | from ard_app_application aaa |
| | | inner join sys_user su on aaa.commander_id = su.user_id |
| | | inner join ard_app_position aap on su.user_id = aap.user_id |
| | | where aaa.soilder_id = #{soilderId} and aaa.application_type = 'Commander' |
| | | and aaa.state = '1' and su.app_online_state = '1' |
| | | order by aap.create_time desc limit 1 offset 0 |
| | | </select> |
| | | |
| | | <select id="getAPPPositionByUserIdAndTime" parameterType="java.lang.String" resultMap="ArdAppPositionResult"> |
| | | select * from ard_app_position aap |
| | | where aap.user_id = #{userId} and aap.create_time >= #{beginTime} |
| | | and aap.create_time <= #{endTime} order by aap.create_time asc |
| | | </select> |
| | | </mapper> |