3.修改收货地址
3.1 回显收货地址
1.回显收货地址-持久层
在AddressMapper接口中定义方法:
Address selectAddressById(Integer id);
在AddressMapper.xml中,定义select
节点,完成查询
<select id="selectAddressById" resultType="....">
select
id,uid,
recv_name as recvName,
.....
from
t_address
where
id=#{id}
</select>
测试:
2.回显收货地址-业务层
在IAddressService接口中定义方法
Address getAddressById(Integer id);
在AddressService类中实现该方法,返回持久层方法的结果
测试:
3.回显收货地址-控制器层
请求url