版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/helloworld_1996/article/details/82320712
package com.hao.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hao.dto.Student;
import com.hao.mapper.IStudentMapper;
import com.hao.service.IStudentService;
@Service
public class StudentServiceImpl implements IStudentService{
@Autowired
private IStudentMapper iStudentMapper;
public List<Student> findStudentList() {
// TODO Auto-generated method stub
List<Student> findStudentList = iStudentMapper.findStudentList();
for (Student student : findStudentList) {
String substring = student.getBirthday().substring(0, 10);
student.setBirthday(substring);
}
return findStudentList;
}
public Student getObj(Integer id) {
// TODO Auto-generated method stub
Student student = new Student();
student.setId(id);
Student s = iStudentMapper.getObj(student);
return s;
}
}
心软是一种不公平的善良,成全了别人,委屈了自己,却被别人当成了傻逼。