| | |
| | | @Override |
| | | public R insert(UnionShippingAddressDto item) |
| | | { |
| | | if(StringUtils.equals("true",item.getIsDefault())) |
| | | if(StringUtils.equals("true",item.getIsDefault()+"")) |
| | | { |
| | | UnionShippingAddress unionShippingAddress=baseMapper.getDefaultData(item.getUserId()); |
| | | if(unionShippingAddress!=null) |
| | |
| | | @Override |
| | | public R update(UnionShippingAddressDto item) |
| | | { |
| | | |
| | | if(StringUtils.equals("true",item.getIsDefault()+"")) |
| | | { |
| | | UnionShippingAddress unionShippingAddress=baseMapper.getDefaultData(item.getUserId()); |
| | | if(unionShippingAddress!=null) |
| | | { |
| | | UnionShippingAddressDto dto=new UnionShippingAddressDto(); |
| | | dto.setId(unionShippingAddress.getId()); |
| | | dto.setIsDefault("false"); |
| | | baseMapper.update(dto); |
| | | } |
| | | } |
| | | |
| | | |
| | | int num= baseMapper.update(item); |
| | | if(num>0) |
| | | { |