package com.iamberry.wechat.core.entity;

import java.util.Comparator;

import com.iamberry.wechat.core.entity.reback.StoreStatiscInfo;

public class ComparatorUtil implements Comparator{

	@Override
	public int compare(Object arg0, Object arg1) {
		// TODO Auto-generated method stub
		StoreStatiscInfo storeStatiscInfo0 = (StoreStatiscInfo)arg0;
		StoreStatiscInfo storeStatiscInfo1 = (StoreStatiscInfo)arg1;
		if (storeStatiscInfo0.getNum() == null) {
			storeStatiscInfo0.setNum(0);
		}
		if (storeStatiscInfo1.getNum() == null) {
			storeStatiscInfo1.setNum(0);
		}
		int flag = storeStatiscInfo1.getNum().compareTo(storeStatiscInfo0.getNum());
		return flag;
	}

}
