创建 AddrService.java
This commit is contained in:
17
src/main/java/com/gao/finalhw/service/AddrService.java
Normal file
17
src/main/java/com/gao/finalhw/service/AddrService.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.gao.finalhw.service;
|
||||
|
||||
import com.gao.finalhw.mapper.AddressMapper;
|
||||
import com.gao.finalhw.model.Address;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AddrService {
|
||||
@Autowired
|
||||
AddressMapper addressMapper;
|
||||
|
||||
public Address getAddrById(int id) {
|
||||
Address result = addressMapper.selectById(id);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user