| | |
| | | <result property="lastTaskId" column="last_task_id" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="deptId" column="dept_id" /> |
| | | <result property="boxAliasName" column="box_alias_name" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectArdServerInfo" resultType="com.ard.work.domain.entity.ArdServerInfo"> |
| | | select * from ard_server_info where id = #{serverId} |
| | | select * from ard_server where id = #{serverId} |
| | | </select> |
| | | |
| | | <sql id="selectArdDroneVo"> |
| | |
| | | c.last_task_id, |
| | | c.server_id, |
| | | c.user_id, |
| | | c.dept_id, |
| | | c.box_alias_name |
| | | from ard_drone_info c |
| | | c.dept_id |
| | | from ard_drone c |
| | | left join sys_dept d on d.dept_id = c.dept_id |
| | | left join sys_user u on u.user_id = c.user_id |
| | | </sql> |
| | |
| | | where box_sn = #{boxSn} |
| | | </select> |
| | | <insert id="insertArdDrone" parameterType="ArdDroneInfo"> |
| | | insert into ard_drone_info |
| | | insert into ard_drone |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="boxSn != null">box_sn,</if> |
| | |
| | | <if test="serverId != null">server_id,</if> |
| | | <if test="userId != null">user_id,</if> |
| | | <if test="deptId != null">dept_id,</if> |
| | | <if test="boxAliasName != null">box_alias_name,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | |
| | | <if test="serverId != null">#{serverId},</if> |
| | | <if test="userId != null">#{userId},</if> |
| | | <if test="deptId != null">#{deptId},</if> |
| | | <if test="boxAliasName != null">#{boxAliasName},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | |
| | | </insert> |
| | | |
| | | <update id="updateArdDrone" parameterType="ArdDroneInfo"> |
| | | update ard_drone_info |
| | | update ard_drone |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="boxSn != null">box_sn = #{boxSn},</if> |
| | | <if test="boxName != null">box_name = #{boxName},</if> |
| | |
| | | <if test="serverId != null">server_id = #{serverId},</if> |
| | | <if test="userId != null">user_id = #{userId},</if> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | <if test="boxAliasName != null">box_alias_name = #{boxAliasName},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteArdDroneById" parameterType="String"> |
| | | delete from ard_drone_info where id = #{id} |
| | | delete from ard_drone where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdDroneByIds" parameterType="String"> |
| | | delete from ard_drone_info where id in |
| | | delete from ard_drone where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <insert id="insertArdDroneLs" parameterType="java.util.List"> |
| | | insert into ard_drone_info( |
| | | insert into ard_drone( |
| | | id, |
| | | box_sn, |
| | | box_name, |
| | |
| | | server_id, |
| | | user_id, |
| | | dept_id, |
| | | box_alias_name, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | |
| | | #{item.serverId}, |
| | | #{item.userId}, |
| | | #{item.deptId}, |
| | | #{item.boxAliasName}, |
| | | #{item.createBy}, |
| | | #{item.createTime}, |
| | | #{item.updateBy}, |
| | |
| | | </insert> |
| | | |
| | | <update id="updateDroneStatus"> |
| | | update ard_drone_info |
| | | update ard_drone |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="onLine != null">on_line = #{onLine},</if> |
| | | </trim> |