| <?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.zy.acs.manager.fake.AgvDetailMapper"> | 
|   | 
|     <!-- 关联查询sql --> | 
|     <sql id="selectSql"> | 
|         SELECT a.* | 
|         FROM man_agv_detail a | 
|         <where> | 
|             AND a.deleted = 0 | 
|             <if test="param.id != null"> | 
|                 AND a.id = #{param.id} | 
|             </if> | 
|             <if test="param.agvId != null"> | 
|                 AND a.agv_id = #{param.agvId} | 
|             </if> | 
|             <if test="param.status != null"> | 
|                 AND a.status = #{param.status} | 
|             </if> | 
|             <if test="param.keywords != null"> | 
|                 AND ( | 
|                 a.memo LIKE CONCAT('%', #{param.keywords}, '%') | 
|                 OR a.memo LIKE CONCAT('%', #{param.keywords}, '%') | 
|                 ) | 
|             </if> | 
|         </where> | 
|     </sql> | 
|   | 
|     <update id="updatePosCode"> | 
|         update man_agv_detail | 
|         set code = #{codeId}, | 
|         last_code = null, | 
|         pos = 1 | 
|         where 1=1 | 
|         and id = #{id} | 
|     </update> | 
|   | 
|     <update id="updateUnPosCode"> | 
|         update man_agv_detail | 
|         set last_code = #{lastCode}, | 
|         code = null, | 
|         pos = 0 | 
|         where 1=1 | 
|         and id = #{id} | 
|     </update> | 
|   | 
| </mapper> |