创建 UserInfoService.java

master
wangsiyuan 2024-01-18 21:20:30 +08:00
parent bcd373a21d
commit 4c470ac721
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package com.gao.finalhw.service;
import com.gao.finalhw.controller.UserController;
import com.gao.finalhw.mapper.UserInfoMapper;
import com.gao.finalhw.model.UserInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserInfoService {
private final Logger logger = LoggerFactory.getLogger(UserInfoService.class);
@Autowired
UserInfoMapper userInfoMapper;
public UserInfo getUserInfo(int id){
UserInfo result = userInfoMapper.selectById(id);
logger.info("select user info result: {}",result);
return result;
}
}