PointsMapper.xml 1.45 KB
<?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.huaheng.pc.general.container.mapper.PointsMapper">


    <select id="selectEntity" resultType="com.huaheng.api.ACS.domain.Points">
      SELECT * FROM points where warehouseCode=#{warehouseCode} and goodsShelfNo like CONCAT('%',#{goodsShelfNo},'%')
        <if test="isLocked != null and isLocked != '' ">
            AND isLocked = #{isLocked}
        </if>
    </select>

    <select id="selectFirstEntity" resultType="com.huaheng.api.ACS.domain.Points">
      SELECT * FROM points where goodsShelfNo=#{goodsShelfNo}
    </select>

    <update id="updatePoints">
         UPDATE points
         <set>
        <if test="isLocked != null">
            isLocked = #{isLocked, jdbcType=INTEGER},
        </if>
        <if test="oIntX != null">
            oIntX = #{oIntX, jdbcType=VARCHAR},
        </if>
         <if test="oIntY != null">
              oIntX = #{oIntY, jdbcType=VARCHAR},
          </if>
         </set>
         where goodsShelfNo=#{goodsShelfNo}
    </update>

    <select id="selectShlfno" resultType="java.util.HashMap">
      SELECT goodsShelfNo FROM points group by goodsShelfNo asc
    </select>

    <select id="getFirstEntity" resultType="com.huaheng.api.ACS.domain.Points">
      SELECT * FROM points where isLocked=1 and warehouseCode=#{warehouseCode} limit 1
    </select>
    
</mapper>