增加接口

This commit is contained in:
shuo.wang
2025-04-11 18:47:12 +08:00
parent 49862f9e62
commit cc996d8db6
7 changed files with 57 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
package com.cool.store.mapper;
import com.cool.store.entity.WarehouseInfoDO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
@@ -13,5 +14,5 @@ import java.util.List;
*/
public interface WarehouseInfoMapper extends Mapper<WarehouseInfoDO> {
List<WarehouseInfoDO> getAllAndActive();
List<WarehouseInfoDO> getAllAndActive(@Param("keyword") String keyword);
}

View File

@@ -13,5 +13,8 @@
</resultMap>
<select id="getAllAndActive" resultType="com.cool.store.entity.WarehouseInfoDO">
select * from xfsg_warehouse_info where deleted = 0
<if test="keyword != null and keyword != ''">
and ( warehouse_name like concat('%',#{keyword},'%'))
</if>
</select>
</mapper>