|
@ -6,25 +6,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
|
<resultMap type="StockInfo" id="StockInfoResult"> |
|
|
<resultMap type="StockInfo" id="StockInfoResult"> |
|
|
<result property="stockId" column="stock_id" /> |
|
|
<result property="stockId" column="stock_id" /> |
|
|
<result property="StockNO" column="StockNO" /> |
|
|
<result property="stockNO" column="StockNO" /> |
|
|
<result property="Stockname" column="Stockname" /> |
|
|
<result property="stockName" column="Stockname" /> |
|
|
<result property="stockAddr" column="stockAddr" /> |
|
|
<result property="stockAddr" column="stockAddr" /> |
|
|
<result property="stockmanager" column="stockmanager" /> |
|
|
<result property="stockManager" column="stockmanager" /> |
|
|
<result property="stockmemo" column="stockmemo" /> |
|
|
<result property="stockMemo" column="stockmemo" /> |
|
|
|
|
|
<result property="stockManagerPhone" column="stock_manager_phone" /> |
|
|
<result property="defaltItemclass" column="defalt_itemclass" /> |
|
|
<result property="defaltItemclass" column="defalt_itemclass" /> |
|
|
<result property="firstAddTime" column="first_add_time" /> |
|
|
<result property="firstAddTime" column="first_add_time" /> |
|
|
<result property="updateInfoTime" column="update_info_time" /> |
|
|
<result property="updateInfoTime" column="update_info_time" /> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<sql id="selectStockInfoVo"> |
|
|
<sql id="selectStockInfoVo"> |
|
|
select stock_id, StockNO, Stockname, stockAddr, stockmanager, stockmemo, defalt_itemclass, first_add_time, update_info_time from stock_info |
|
|
select stock_id, StockNO, Stockname, stockAddr, stockmanager,stock_manager_phone, stockmemo, |
|
|
|
|
|
defalt_itemclass, first_add_time, update_info_time from stock_info |
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
|
<select id="selectStockInfoList" parameterType="StockInfo" resultMap="StockInfoResult"> |
|
|
<select id="selectStockInfoList" parameterType="StockInfo" resultMap="StockInfoResult"> |
|
|
<include refid="selectStockInfoVo"/> |
|
|
<include refid="selectStockInfoVo"/> |
|
|
<where> |
|
|
<where> |
|
|
<if test="StockNO != null and StockNO != ''"> and StockNO like concat('%', #{StockNO}, '%')</if> |
|
|
<if test="stockNO != null and stockNO != ''"> and StockNO like concat('%', #{stockNO}, '%')</if> |
|
|
<if test="Stockname != null and Stockname != ''"> and Stockname like concat('%', #{Stockname}, '%')</if> |
|
|
<if test="stockname != null and stockname != ''"> and Stockname like concat('%', #{stockname}, '%')</if> |
|
|
<if test="stockAddr != null and stockAddr != ''"> and stockAddr like concat('%', #{stockAddr}, '%')</if> |
|
|
<if test="stockAddr != null and stockAddr != ''"> and stockAddr like concat('%', #{stockAddr}, '%')</if> |
|
|
<if test="stockmanager != null and stockmanager != ''"> and stockmanager = #{stockmanager}</if> |
|
|
<if test="stockmanager != null and stockmanager != ''"> and stockmanager = #{stockmanager}</if> |
|
|
<if test="stockmemo != null and stockmemo != ''"> and stockmemo = #{stockmemo}</if> |
|
|
<if test="stockmemo != null and stockmemo != ''"> and stockmemo = #{stockmemo}</if> |
|
@ -49,19 +51,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<insert id="insertStockInfo" parameterType="StockInfo"> |
|
|
<insert id="insertStockInfo" parameterType="StockInfo"> |
|
|
insert into stock_info |
|
|
insert into stock_info |
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
<if test="StockNO != null and StockNO != ''">StockNO,</if> |
|
|
<if test="stockNO != null and stockNO != ''">StockNO,</if> |
|
|
<if test="Stockname != null and Stockname != ''">Stockname,</if> |
|
|
<if test="stockname != null and stockname != ''">Stockname,</if> |
|
|
<if test="stockAddr != null and stockAddr != ''">stockAddr,</if> |
|
|
<if test="stockAddr != null and stockAddr != ''">stockAddr,</if> |
|
|
<if test="stockmanager != null">stockmanager,</if> |
|
|
<if test="stockmanager != null">stockmanager,</if> |
|
|
|
|
|
<if test="stockManagerPhone != null">stock_manager_phone,</if> |
|
|
<if test="stockmemo != null">stockmemo,</if> |
|
|
<if test="stockmemo != null">stockmemo,</if> |
|
|
<if test="defaltItemclass != null">defalt_itemclass,</if> |
|
|
<if test="defaltItemclass != null">defalt_itemclass,</if> |
|
|
first_add_time, |
|
|
first_add_time, |
|
|
</trim> |
|
|
</trim> |
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
<if test="StockNO != null and StockNO != ''">#{StockNO},</if> |
|
|
<if test="StockNO != null and StockNO != ''">#{stockNO},</if> |
|
|
<if test="Stockname != null and Stockname != ''">#{Stockname},</if> |
|
|
<if test="Stockname != null and Stockname != ''">#{stockname},</if> |
|
|
<if test="stockAddr != null and stockAddr != ''">#{stockAddr},</if> |
|
|
<if test="stockAddr != null and stockAddr != ''">#{stockAddr},</if> |
|
|
<if test="stockmanager != null">#{stockmanager},</if> |
|
|
<if test="stockmanager != null">#{stockmanager},</if> |
|
|
|
|
|
<if test="stockManagerPhone != null">#{stockManagerPhone},</if> |
|
|
<if test="stockmemo != null">#{stockmemo},</if> |
|
|
<if test="stockmemo != null">#{stockmemo},</if> |
|
|
<if test="defaltItemclass != null">#{defaltItemclass},</if> |
|
|
<if test="defaltItemclass != null">#{defaltItemclass},</if> |
|
|
now(), |
|
|
now(), |
|
@ -71,10 +75,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<update id="updateStockInfo" parameterType="StockInfo"> |
|
|
<update id="updateStockInfo" parameterType="StockInfo"> |
|
|
update stock_info |
|
|
update stock_info |
|
|
<trim prefix="SET" suffixOverrides=","> |
|
|
<trim prefix="SET" suffixOverrides=","> |
|
|
<if test="StockNO != null and StockNO != ''">StockNO = #{StockNO},</if> |
|
|
<if test="stockNO != null and stockNO != ''">StockNO = #{stockNO},</if> |
|
|
<if test="Stockname != null and Stockname != ''">Stockname = #{Stockname},</if> |
|
|
<if test="stockname != null and stockname != ''">Stockname = #{stockname},</if> |
|
|
<if test="stockAddr != null and stockAddr != ''">stockAddr = #{stockAddr},</if> |
|
|
<if test="stockAddr != null and stockAddr != ''">StockAddr = #{stockAddr},</if> |
|
|
<if test="stockmanager != null">stockmanager = #{stockmanager},</if> |
|
|
<if test="stockmanager != null">stockmanager = #{stockmanager},</if> |
|
|
|
|
|
<if test="stockManagerPhone != null">stock_manager_phone = #{stockManagerPhone},</if> |
|
|
<if test="stockmemo != null">stockmemo = #{stockmemo},</if> |
|
|
<if test="stockmemo != null">stockmemo = #{stockmemo},</if> |
|
|
<if test="defaltItemclass != null">defalt_itemclass = #{defaltItemclass},</if> |
|
|
<if test="defaltItemclass != null">defalt_itemclass = #{defaltItemclass},</if> |
|
|
update_info_time = CONCAT_WS(',',NOW(),update_info_time), |
|
|
update_info_time = CONCAT_WS(',',NOW(),update_info_time), |
|
|