如何优化下面这块冗长重复的代码
public GameBaseResult<?> startPetPool(String petLevel,int hid){
PET_DRAW_POOL.clear();;
List<GiftPet> giftPets = new ArrayList<>();
LambdaQueryWrapper<PlayGift> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PlayGift::getPetDraw,1)
.eq(PlayGift::getState,GiftState.UP.getCode());
List<PlayGift> playGifts = playGiftMapper.selectList(queryWrapper);
playGifts.stream().forEach(g->{
int price = g.getPrice();
if (petLevel.equals(DrawLevel.FIVE.name())){
if (33440 == price){
setPool(hid,g,1,giftPets);
}else if (13140 == price){
setPool(hid,g,1,giftPets);
}else if (5200 == price){
setPool(hid,g,2,giftPets);
}else if (3340 == price){
setPool(hid,g,4,giftPets);
}else if (1314 == price){
setPool(hid,g,8,giftPets);
}else if (520 == price){
setPool(hid,g,20,giftPets);
}else if (223 == price){
setPool(hid,g,20,giftPets);
}else if (128 == price){
setPool(hid,g,40,giftPets);
}else if (52 == price){
setPool(hid,g,40,giftPets);
}else if (18 == price){
setPool(hid,g,84,giftPets);
}else if (10 == price){
setPool(hid,g,80,giftPets);
}else if (5 == price){
setPool(hid,g,80,giftPets);
}else if (2 == price){
setPool(hid,g,80,giftPets);
}
}else if (petLevel.equals(DrawLevel.THREE.name())){
if (5200 == price){
setPool(hid,g,1,giftPets);
}else if (3340 == price){
setPool(hid,g,2,giftPets);
}else if (1314 == price){
setPool(hid,g,4,giftPets);
}else if (520 == price){
setPool(hid,g,8,giftPets);
}else if (223 == price){
setPool(hid,g,20,giftPets);
}else if (128 == price){
setPool(hid,g,20,giftPets);
}else if (52 == price){
setPool(hid,g,20,giftPets);
}else if (18 == price){
setPool(hid,g,20,giftPets);
}else if (10 == price){
setPool(hid,g,40,giftPets);
}else if (5 == price){
setPool(hid,g,40,giftPets);
}else if (2 == price){
setPool(hid,g,40,giftPets);
}
}else if (petLevel.equals(DrawLevel.ONE.name())){
if (1314 == price){
setPool(hid,g,1,giftPets);
}else if (520 == price){
setPool(hid,g,4,giftPets);
}else if (223 == price){
setPool(hid,g,6,giftPets);
}else if (128 == price){
setPool(hid,g,10,giftPets);
}else if (52 == price){
setPool(hid,g,20,giftPets);
}else if (18 == price){
setPool(hid,g,20,giftPets);
}else if (10 == price){
setPool(hid,g,40,giftPets);
}else if (5 == price){
setPool(hid,g,40,giftPets);
}else if (2 == price){
setPool(hid,g,40,giftPets);
}
}
});
PET_DRAW_POOL.put(DRAW_KEY_PREFIX+hid,giftPets);
log.info("gift:{}",PET_DRAW_POOL.size());
return GameBaseResult.ok(PET_DRAW_POOL.get(DRAW_KEY_PREFIX+hid));
}