admin
2022-04-29 6cc97918a5a42e37a3c3867cc5b78a0b9fd43a24
app/src/main/java/com/yeshi/makemoney/app/controller/admin/goldcorn/GoldCornGetPriceAdminController.java
@@ -2,6 +2,7 @@
import com.google.gson.*;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornPriceCountType;
import com.yeshi.makemoney.app.vo.AcceptAdminData;
import com.yeshi.makemoney.app.vo.admin.goldcorn.GoldCornGetPriceAdminVO;
import net.sf.json.JSONArray;
@@ -47,6 +48,12 @@
            @Override
            public JsonElement serialize(GoldCornGetType value, Type type, JsonSerializationContext jsonSerializationContext) {
                return value == null ? new JsonPrimitive("") : new JsonPrimitive(value.getName());
            }
        }).registerTypeAdapter(GoldCornPriceCountType.class, new JsonSerializer<GoldCornPriceCountType>() {
            @Override
            public JsonElement serialize(GoldCornPriceCountType value, Type type, JsonSerializationContext jsonSerializationContext) {
                return value == null ? new JsonPrimitive("") : new JsonPrimitive(value.getName());
            }
        }).create();
@@ -110,11 +117,12 @@
    }
    @ResponseBody
    @RequestMapping("getPriceTypes")
    public String getPriceTypes(HttpSession session) {
    @RequestMapping("getCountTypeList")
    public String getCountTypeList() {
        JSONArray array = new JSONArray();
        for (GoldCornGetType type : GoldCornGetType.values()) {
        for (GoldCornPriceCountType type : GoldCornPriceCountType.values()) {
            JSONObject json = new JSONObject();
            json.put("key", type.name());
            json.put("value", type.getName());
@@ -122,6 +130,5 @@
        }
        return JsonUtil.loadTrueResult(array);
    }
}