增加接口
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user