| <?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.asrs.mapper.LocRuleMapper"> | 
|   | 
|     <!-- 通用查询映射结果 --> | 
|     <resultMap id="BaseResultMap" type="com.zy.asrs.entity.LocRule"> | 
|         <id column="id" property="id" /> | 
|         <result column="matnr" property="matnr" /> | 
|         <result column="specs" property="specs" /> | 
|         <result column="model" property="model" /> | 
|         <result column="cstmr" property="cstmr" /> | 
|         <result column="batch" property="batch" /> | 
|         <result column="other" property="other" /> | 
|         <result column="row_beg" property="rowBeg" /> | 
|         <result column="row_end" property="rowEnd" /> | 
|         <result column="bay_beg" property="bayBeg" /> | 
|         <result column="bay_end" property="bayEnd" /> | 
|         <result column="lev_beg" property="levBeg" /> | 
|         <result column="lev_end" property="levEnd" /> | 
|         <result column="limit" property="limit" /> | 
|         <result column="status" property="status" /> | 
|         <result column="create_by" property="createBy" /> | 
|         <result column="create_time" property="createTime" /> | 
|         <result column="update_by" property="updateBy" /> | 
|         <result column="update_time" property="updateTime" /> | 
|         <result column="memo" property="memo" /> | 
|         <result column="mixed" property="mixed" /> | 
|         <result column="keep_go" property="keepGo" /> | 
|   | 
|     </resultMap> | 
|   | 
|     <select id="selectByMatnr" resultMap="BaseResultMap"> | 
|         select * from asr_loc_rule | 
|         where matnr = #{matnr} | 
|         and mixed = 0 | 
|         and status = 1 | 
|     </select> | 
|   | 
|     <select id="selectByMixed" resultMap="BaseResultMap"> | 
|         select * from asr_loc_rule | 
|         where mixed = #{mixed} | 
|         and status = 1 | 
|     </select> | 
|   | 
|     <update id="updateKeepGoByMatnr"> | 
|         update asr_loc_rule set keep_go = #{keepGo} where matnr = #{matnr} | 
|     </update> | 
|   | 
|     <update id="updateKeepGoByMixed"> | 
|         update asr_loc_rule set keep_go = #{keepGo} where mixed = 1 | 
|     </update> | 
|   | 
| </mapper> |