Browse Source

[feat] 修改仓库mapper

dev
zhangsiqi 4 months ago
parent
commit
d68c3dfe1f
  1. 28
      ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml

28
ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml

@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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
</sql>
@ -26,10 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectStockInfoVo"/>
<where>
<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="stockmanager != null and stockmanager != ''"> and stockmanager = #{stockmanager}</if>
<if test="stockmemo != null and stockmemo != ''"> and stockmemo = #{stockmemo}</if>
<if test="stockManager != null and stockManager != ''"> and stockmanager = #{stockManager}</if>
<if test="stockMemo != null and stockMemo != ''"> and stockmemo = #{stockMemo}</if>
</where>
</select>
@ -52,21 +52,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into stock_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<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="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>
first_add_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="StockNO != null and StockNO != ''">#{stockNO},</if>
<if test="Stockname != null and Stockname != ''">#{stockname},</if>
<if test="stockNO != null and stockNO != ''">#{stockNO},</if>
<if test="stockName != null and stockName != ''">#{stockName},</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>
now(),
</trim>
@ -76,11 +76,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update stock_info
<trim prefix="SET" suffixOverrides=",">
<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="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>
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
</trim>

Loading…
Cancel
Save