info address
This commit is contained in:
		
							parent
							
								
									d0323646c5
								
							
						
					
					
						commit
						0e282e741b
					
				@ -88,13 +88,13 @@ func (a *FsAddressModel) SettingUserDefaultAddress(ctx context.Context, userId i
 | 
			
		||||
		now := time.Now().UTC()
 | 
			
		||||
 | 
			
		||||
		err = tx.Model(&FsAddress{}).Where(" `user_id` = ? and `status` = ? and `address_id` = ? ", userId, 1, addressId).
 | 
			
		||||
			UpdateColumn("ltime", now.Add(time.Hour*24*365)).
 | 
			
		||||
			UpdateColumn("ltime", now.Add(time.Hour*24*365*20)).
 | 
			
		||||
			UpdateColumn("utime", now).Error
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		err = tx.Where(" `user_id` = ? and `status` = ? and `address_id` != ? and `ltime` > ? ", userId, 1, addressId, now.Add(time.Hour*24*128)).
 | 
			
		||||
		err = tx.Where(" `user_id` = ? and `status` = ? and `address_id` != ? and `ltime` > ? ", userId, 1, addressId, now.Add(time.Hour*24*365)).
 | 
			
		||||
			UpdateColumn("ltime", now).Error
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			logx.Error(err)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user