| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.oying.utils.PageUtil; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | |
| | | import com.oying.utils.PageResult; |
| | | |
| | |
| | | @Override |
| | | public List<UserAddress> queryAll(UserAddressQueryCriteria criteria) { |
| | | return userAddressMapper.findAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | public List<UserAddress> queryUserAddress(double longitude, double latitude) { |
| | | UserAddressQueryCriteria criteria = new UserAddressQueryCriteria(); |
| | | criteria.setUserId(SecurityUtils.getCurrentUserId()); |
| | | criteria.setLongitude(longitude); |
| | | criteria.setLatitude(latitude); |
| | | return queryAll(criteria); |
| | | } |
| | | |
| | | @Override |
| | | public UserAddress getById(Long addressId, Double longitude, Double latitude) { |
| | | return userAddressMapper.getById(addressId, SecurityUtils.getCurrentUserId(), longitude, latitude); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put("城市", userAddress.getCity()); |
| | | map.put("区县", userAddress.getDistrict()); |
| | | map.put("街道", userAddress.getStreet()); |
| | | map.put("短地址", userAddress.getShortAddress()); |
| | | map.put("详细地址", userAddress.getDetail()); |
| | | map.put("经度", userAddress.getLongitude()); |
| | | map.put("纬度", userAddress.getLatitude()); |