|
|
|
@ -32,6 +32,12 @@ public class ReceiveAddressServiceImpl extends ServiceImpl<ReceiveAddressMapper,
|
|
|
|
|
receiveAddress.setId(uuid);
|
|
|
|
|
receiveAddress.setCreateDate(new Date());
|
|
|
|
|
receiveAddress.setModifyDate(new Date());
|
|
|
|
|
if(receiveAddress.getIsDefault()){
|
|
|
|
|
String miniUserId = receiveAddress.getMiniUserId();
|
|
|
|
|
ReceiveAddress other = new ReceiveAddress();
|
|
|
|
|
other.setIsDefault(false);
|
|
|
|
|
receiveAddressMapper.update(other,new EntityWrapper<ReceiveAddress>().eq("mini_user_id", miniUserId));
|
|
|
|
|
}
|
|
|
|
|
receiveAddressMapper.insert(receiveAddress);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|