首页>代码>spring boot+mybatis+layui构建的用户增删改查实例,支持分页查询,模糊查询>/SpringBootMybatisDemo/src/main/java/com/example/SpringBootMybatisDemo/service/impl/UserServiceImpl.java
package com.example.SpringBootMybatisDemo.service.impl;

import com.example.SpringBootMybatisDemo.entity.User;
import com.example.SpringBootMybatisDemo.mapper.UserMapper;
import com.example.SpringBootMybatisDemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 创建人:thj
 * 创建时间: 2018/6/25 14:09
 * 用途:
 */
@Service
public class UserServiceImpl implements UserService {


    @Autowired
    private UserMapper userMapper;


    @Override
    public List<User> getUserList(String name ,int page,int limit) {

        return userMapper.getUserList(name,page,limit);
    }


    @Override
    public User getUserById(Integer id) {
        return userMapper.getUserById(id);
    }
    @Override
    public int add(User user) {
        return userMapper.add(user);
    }

    @Override
    public int update(User user) {
        return userMapper.update(user);
    }

    @Override
    public int delete(Integer id) {
        return userMapper.delete(id);
    }

    @Override
    public int getUserCount() {
        return userMapper.getUserCount();

    }
}
最近下载更多
汤汤汤要学编程  LV11 2023年6月27日
iceboard  LV2 2023年5月31日
zhaoming200677  LV12 2022年12月3日
呵呵哈哈哈  LV10 2022年9月3日
lucuey  LV1 2022年7月8日
cab123123  LV8 2022年4月25日
菠萝蜜  LV3 2022年2月19日
微信网友_5822776429744128  LV6 2022年2月14日
Fireloli  LV9 2021年12月17日
9843637  LV9 2021年12月12日
最近浏览更多
沈从文  LV2 1月1日
skook7  LV2 2023年12月14日
592132324  LV4 2023年12月4日
fff2003  LV6 2023年11月17日
漫步的海星  LV4 2023年9月26日
asdfg01234  LV10 2023年7月31日
汤汤汤要学编程  LV11 2023年6月27日
fuyouou  LV5 2023年6月18日
neuwxr2015  LV8 2023年6月1日
iceboard  LV2 2023年5月31日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友