Authored by chenchao

fix bug

... ... @@ -120,8 +120,8 @@ public class SellerService {
public boolean isSuperEntrySeller(int uid){
if(storedSellerService.isStoredSeller(uid)){
EntrySellerType est = getEntrySellerType(uid);
boolean result = Objects.equals(est.getCode(), EntrySellerType.SPECIAL_SUPER)
|| Objects.equals(est.getCode(), EntrySellerType.SUPER_ENTRY);
boolean result = Objects.equals(est, EntrySellerType.SPECIAL_SUPER)
|| Objects.equals(est, EntrySellerType.SUPER_ENTRY);
return result;
}
return false;
... ...
... ... @@ -22,7 +22,14 @@ public class SellerServiceTest extends BaseWebTest {
//exit entry
Assert.assertEquals(sellerService.getEntrySellerType(500031990), EntrySellerType.NOT_ENTRY);
Assert.assertEquals(sellerService.getEntrySellerType(500031424), EntrySellerType.COMMON);
Assert.assertEquals(sellerService.getEntrySellerType(666666), EntrySellerType.SUPER_ENTRY);
Assert.assertEquals(sellerService.getEntrySellerType(50000638), EntrySellerType.SUPER_ENTRY);
Assert.assertEquals(sellerService.getEntrySellerType(600033430), EntrySellerType.SPECIAL_SUPER);
}
@Test
public void testIsSuperEntrySeller(){
int uid = 50000638;
Assert.assertEquals(true, sellerService.isSuperEntrySeller(uid));
}
}
... ...