创建 AddrService.java
parent
98dfe79bcd
commit
05460ae359
|
|
@ -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