Merge remote-tracking branch 'origin/master'

This commit is contained in:
Suh
2024-01-08 09:59:32 +09:00
5 changed files with 41 additions and 15 deletions

View File

@@ -6,7 +6,7 @@
<!-- select -->
<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
select count(*) from stock left join warehouse on stock.warehouse_id = warehouse.id left join product on stock.product_id = product.id left join product_category on product.kan_code = product_category.kan_code
<where>
<choose>
<when test="searchn == 0"> stock.activation = 1 and warehouse.name like concat('%',#{search},'%')</when>
@@ -17,11 +17,11 @@
</select>
<select id="list" parameterType="map" resultType="com.no1.wms.stock.StockDto">
select * 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 * from stock left join warehouse on stock.warehouse_id = warehouse.id left join product on stock.product_id = product.id left join product_category on product.kan_code = product_category.kan_code
<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 stock.id desc limit #{start}, #{perPage}