class UserGoodsOrderService implements IUserGoodsOrderService {

	@Override
	public synchronized void batchUpdate(Set<UserGoodsOrderPo> set) throws Exception{
		if(null != set){
			List<UserGoodsOrderPo> UserGoodsOrderPos = new ArrayList<UserGoodsOrderPo>();
			for (UserGoodsOrderPo userGoodsOrder : set) {
				if(StringUtils.isNotBlank(userGoodsOrder.getShopCartGoodsCookieId())){
				   logger.info("Update action，BusinessOperationType"+ userGoodsOrder.getBusinessOperationType());	
				   UserGoodsOrderPo po = userGoodsOrderDao.findBy(userGoodsOrder.getShopCartGoodsCookieId());   
				   if(null != po){
					   logger.info("Update before UserGoodsOrderPo:"+po);
					   convertUpdateUserGoodsOrder(userGoodsOrder, po);	
					   logger.info("Updata UserGoodsOrderPo:"+po);
					   UserGoodsOrderPos.add(po);		   
				   }
				   else{
					   logger.warn("WARN...! " + userGoodsOrder);
					   userGoodsOrderDao.save(userGoodsOrder);
				   }
				}
				else{
					logger.warn("Update UserGoodsOrderPo Entity then GoodsCookieId and ShopCartCookieId is not null.");
				}
			}
			logger.info("正在 Update "+ UserGoodsOrderPos.size() +" UserGoodsOrderPo");
			try {
				 userGoodsOrderDao.save(UserGoodsOrderPos);
			} catch (IllegalArgumentException e) {
				logger.error("批量更新失败，失败原因："+e.getMessage(),e);
			}
		}
	}

}