yujian
2020-05-25 758a59e77aba29b858698808fedd31c569955357
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserMoneyControllerV2.java
@@ -114,7 +114,7 @@
               return new JsonPrimitive("");
            } else {
               // 保留2位小数
               value = value.setScale(2);
               value = value.setScale(2, BigDecimal.ROUND_DOWN);
               return new JsonPrimitive(value.toString());
            }
         }
@@ -484,7 +484,9 @@
         object.put("list", gson.toJson(list));
         out.print(JsonUtil.loadTrueResult(object));
      } catch (ParseException e) {
         out.print(JsonUtil.loadFalseResult(1, "查询失败"));
         e.printStackTrace();
         LogHelper.errorDetailInfo(e);
      }
   }
@@ -736,8 +738,9 @@
         object.put("list", gson.toJson(list));
         JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(object));
      } catch (ParseException e) {
         e.printStackTrace();
         JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("统计失败"));
         e.printStackTrace();
         LogHelper.errorDetailInfo(e);
      }
   }
@@ -790,10 +793,10 @@
            @Override
            public JsonElement serialize(BigDecimal value, Type theType, JsonSerializationContext context) {
               if (value == null) {
                  return new JsonPrimitive("0.000");
                  return new JsonPrimitive("0.00");
               } else {
                  // 保留2位小数
                  value = value.setScale(3);
                  value = value.setScale(2);
                  return new JsonPrimitive(value.toString());
               }
            }
@@ -818,8 +821,9 @@
         object.put("list", gson.toJson(list));
         JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(object));
      } catch (Exception e) {
         e.printStackTrace();
         JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
         e.printStackTrace();
         LogHelper.errorDetailInfo(e);
      }
   }