|
@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<sql id="selectStockInfoVo"> |
|
|
<sql id="selectStockInfoVo"> |
|
|
select stock_id, StockNO, Stockname, stockAddr, stockmanager,stock_manager_phone, stockmemo, |
|
|
select stock_id,StockNo, Stockname, stockAddr, stockmanager,stock_manager_phone, stockmemo, |
|
|
defalt_itemclass, first_add_time, update_info_time from stock_info |
|
|
defalt_itemclass, first_add_time, update_info_time from stock_info |
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
@ -26,10 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<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> |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
@ -52,21 +52,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
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="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="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(), |
|
|
</trim> |
|
|
</trim> |
|
@ -76,11 +76,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
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="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), |
|
|
</trim> |
|
|
</trim> |
|
|