| | |
| | | |
| | | @Override |
| | | public JsonElement serialize(Date date, Type type, JsonSerializationContext jsonSerializationContext) { |
| | | return date == null ? new JsonPrimitive("") : new JsonPrimitive(TimeUtil.getGernalTime(date.getTime(), "yyyy.MM.dd HH:mm")); |
| | | return date == null ? new JsonPrimitive("") : new JsonPrimitive(TimeUtil.getGernalTime(date.getTime(), "yyyy.MM.dd HH:mm:ss")); |
| | | } |
| | | }).registerTypeAdapter(GoldCornGetType.class, new JsonSerializer<GoldCornGetType>() { |
| | | |
| | |
| | | data.put("list", gson.toJson(list)); |
| | | data.put("count", count); |
| | | return JsonUtil.loadTrueResult(data); |
| | | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping("delete") |
| | | public String delete(String ids) { |
| | | Type type = new TypeToken<List<String>>() { |
| | | }.getType(); |
| | | List<String> idList = new Gson().fromJson(ids, type); |
| | | goldCornGetRecordService.delete(idList); |
| | | return JsonUtil.loadTrueResult(""); |
| | | |
| | | } |
| | | |