|
@@ -8,23 +8,22 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import edu.travel.commodity.dto.BaseDto;
|
|
|
import edu.travel.commodity.dto.UpdateAddressDto;
|
|
|
-import edu.travel.commodity.entity.BaseCountry;
|
|
|
import edu.travel.commodity.entity.ShopAddress;
|
|
|
import edu.travel.commodity.mapper.ShopAddressMapper;
|
|
|
-import edu.travel.commodity.service.BaseCountryService;
|
|
|
import edu.travel.commodity.service.ShopAddressService;
|
|
|
import edu.travel.commodity.utils.PageUtil;
|
|
|
import edu.travel.commodity.utils.TokenData;
|
|
|
import edu.travel.commodity.vo.ShopAddressVo;
|
|
|
-import edu.travel.exception.BaseException;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import edu.travel.remote.BaseCountryRemoteController;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
|
|
|
@Service
|
|
|
public class ShopAddressServiceImpl extends ServiceImpl<ShopAddressMapper, ShopAddress> implements ShopAddressService {
|
|
|
- @Autowired
|
|
|
- private BaseCountryService baseCountryService;
|
|
|
+ @Resource
|
|
|
+ private BaseCountryRemoteController baseCountryRemoteController;
|
|
|
@Override
|
|
|
public Page<ShopAddressVo> getShopAddress(BaseDto dto) {
|
|
|
//当前登录对象
|
|
@@ -39,10 +38,10 @@ public class ShopAddressServiceImpl extends ServiceImpl<ShopAddressMapper, ShopA
|
|
|
@Override
|
|
|
public boolean updateAddressById(UpdateAddressDto param) {
|
|
|
if(!ObjectUtil.isEmpty(param.getCountryId())){
|
|
|
- BaseCountry byId = baseCountryService.getById(param.getCountryId());
|
|
|
- if(byId==null){
|
|
|
- throw new BaseException("国家不存在");
|
|
|
- }
|
|
|
+// BaseCountry byId = baseCountryService.getById(param.getCountryId());
|
|
|
+// if(byId==null){
|
|
|
+// throw new BaseException("国家不存在");
|
|
|
+// }
|
|
|
}
|
|
|
LambdaQueryWrapper<ShopAddress> query = Wrappers.<ShopAddress>lambdaQuery().eq(ShopAddress::getId, param.getId())
|
|
|
.eq(ShopAddress::getUserId, TokenData.getUserId());
|