mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 19:53:26 +09:00
stock 쪽 해결
This commit is contained in:
@@ -2,18 +2,18 @@
|
||||
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTO Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.no1.wms.authority.StockMapper">
|
||||
<mapper namespace="com.no1.wms.stock.StockMapper">
|
||||
|
||||
<!-- select -->
|
||||
<select id="count" parameterType="map" resultType="com.no1.wms.stock.StockDto">
|
||||
select count(*) from wms.stock left join wms.warehouse on wms.stock.warehouse_id = wms.warehouse.id left join wms.product on wms.stock.product_id = wms.product.id
|
||||
<select id="count" parameterType="map" resultType="java.lang.Integer">
|
||||
select count(*) from stock left join warehouse on stock.warehouse_id = warehouse.id left join product on stock.product_id = product.id
|
||||
<where>
|
||||
<choose>
|
||||
<when test="searchn == 0"> wms.stock.activation = 1 and wms.warehouse.name like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 1"> wms.stock.activation = 1 and wms.product.name like concat('%',#{search},'%') </when>
|
||||
<when test="searchn == 0"> stock.activation = 1 and warehouse.name like concat('%',#{search},'%')</when>
|
||||
<when test="searchn == 1"> stock.activation = 1 and product.name like concat('%',#{search},'%') </when>
|
||||
</choose>
|
||||
</where>
|
||||
order by id desc limit #{start}, #{perPage}
|
||||
order by stock.id desc limit #{start}, #{perPage}
|
||||
</select>
|
||||
|
||||
<select id="list" parameterType="map" resultType="com.no1.wms.stock.StockDto">
|
||||
@@ -24,7 +24,7 @@
|
||||
<when test="searchn == 1"> wms.stock.activation = 1 and wms.product.name like concat('%',#{search},'%') </when>
|
||||
</choose>
|
||||
</where>
|
||||
order by id desc limit #{start}, #{perPage}
|
||||
order by stock.id desc limit #{start}, #{perPage}
|
||||
</select>
|
||||
|
||||
<select id="stockOne" parameterType="String" resultType="com.no1.wms.stock.StockDto">
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<!-- update -->
|
||||
<update id="updateStock" parameterType="com.no1.wms.stock.StockDto">
|
||||
update stock
|
||||
update stock
|
||||
set quantity = #{dto.quantity}
|
||||
where id = #{dto.id}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user