Commit fcb48943 authored by Kengxxiao's avatar Kengxxiao Committed by Melledy
Browse files

fix shop config issue

parent 275fcc7d
...@@ -23,6 +23,8 @@ public class ShopInfo { ...@@ -23,6 +23,8 @@ public class ShopInfo {
private int disableType = 0; private int disableType = 0;
private int secondarySheetId = 0; private int secondarySheetId = 0;
private String refreshType;
public enum ShopRefreshType { public enum ShopRefreshType {
NONE(0), NONE(0),
SHOP_REFRESH_DAILY(1), SHOP_REFRESH_DAILY(1),
...@@ -179,9 +181,14 @@ public class ShopInfo { ...@@ -179,9 +181,14 @@ public class ShopInfo {
} }
public ShopRefreshType getShopRefreshType() { public ShopRefreshType getShopRefreshType() {
if (shopRefreshType == null) if (refreshType == null)
return ShopRefreshType.NONE; return ShopRefreshType.NONE;
return shopRefreshType; return switch (refreshType) {
case "SHOP_REFRESH_DAILY" -> ShopInfo.ShopRefreshType.SHOP_REFRESH_DAILY;
case "SHOP_REFRESH_WEEKLY" -> ShopInfo.ShopRefreshType.SHOP_REFRESH_WEEKLY;
case "SHOP_REFRESH_MONTHLY" -> ShopInfo.ShopRefreshType.SHOP_REFRESH_MONTHLY;
default -> ShopInfo.ShopRefreshType.NONE;
};
} }
public void setShopRefreshType(ShopRefreshType shopRefreshType) { public void setShopRefreshType(ShopRefreshType shopRefreshType) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment