package com.example.mapper; import com.example.pojo.Policy; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import org.w3c.dom.Text; import java.util.List; @Mapper public interface PolicyMapper { @Select("select id,name from jixian.policy") List<Policy> getAll(); @Select("select text from policy where id=#{id}") String getById(int id); @Select("select id,name from policy where name like concat('%',#{name},'%')") List<Policy> getByName(String name); @Select("select id,name from policy where name not like concat('%','省','%')") List<Policy> getNation(); @Select("select id,name from policy where name like concat('%','河北省','%')") List<Policy> getHebei(); @Select("select id,name from policy where name not like concat('%','河北省','%') and name like concat('%','省','%')") List<Policy> getWaisheng(); }
标签:name,List,6.16,Select,policy,id,select From: https://www.cnblogs.com/zzqq1314/p/18253420