mybatis-plus-boot-starter
mybatis-plus-boot-starter
public interface UserMapper extends BaseMapper3.编写service
public interface UserService extends IService4.编写ServiceImpl
public class UserServiceImpl extends ServiceImplimplements UserService{ }
5.查询方法
QueryWrapperwrapper = new QueryWrapper<>(); //等于 wrapper.eq("user_id",userId); //模糊查询 wrapper.like("username","%张%");
mysql中模糊查询时可用concat
select userName from user where userName LIKE CONCAt(’%’, ‘张’, ‘%’)



