| | |
| | | import com.yeshi.fanli.entity.order.OrderMoneyDailyCount;
|
| | | import com.yeshi.fanli.entity.order.OrderMoneyDailyCount.SourceTypeEnum;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
|
| | | import com.yeshi.fanli.service.inter.money.TeamEincomeRecordService;
|
| | |
| | | return new JsonPrimitive("");
|
| | | } else {
|
| | | // 保留2位小数
|
| | | value = value.setScale(2);
|
| | | value = value.setScale(2, BigDecimal.ROUND_DOWN);
|
| | | return new JsonPrimitive(value.toString());
|
| | | }
|
| | | }
|
| | |
| | | object.put("list", gson.toJson(list));
|
| | | out.print(JsonUtil.loadTrueResult(object));
|
| | | } catch (ParseException e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "查询失败"));
|
| | | e.printStackTrace();
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | 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);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | @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);
|
| | | // 保留3位小数
|
| | | value = value.setScale(3,RoundingMode.DOWN);
|
| | | return new JsonPrimitive(value.toString());
|
| | | }
|
| | | }
|
| | |
| | | teamDividentsVO.setSubsidy(BigDecimal.ZERO);
|
| | | teamDividentsVO.setDividents(BigDecimal.ZERO);
|
| | | }
|
| | | object.put("subsidy", teamDividentsVO.getSubsidy().setScale(3).toString());
|
| | | object.put("dividents", teamDividentsVO.getDividents().setScale(3).toString());
|
| | | object.put("subsidy", teamDividentsVO.getSubsidy().setScale(2,RoundingMode.DOWN).toString());
|
| | | object.put("dividents", teamDividentsVO.getDividents().setScale(2, RoundingMode.DOWN).toString());
|
| | | }
|
| | | |
| | |
|
| | | object.put("count", count);
|
| | | 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);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("统计失败"));
|
| | | e.printStackTrace();
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | List<OrderRankingVO> list = orderMoneyDailyCountService.getRankingByOrderNum(uid, minDate, maxDate);
|
| | | if (list.size() > 0) {
|
| | | for (OrderRankingVO vo: list) {
|
| | | for (int i = 0; i < list.size(); i ++) {
|
| | | OrderRankingVO vo = list.get(i);
|
| | | UserInfo user = userInfoService.getUserByIdWithMybatis(vo.getUid());
|
| | | if (user == null) {
|
| | | list.remove(i);
|
| | | i--;
|
| | | continue;
|
| | | }
|
| | | vo.setNickName(user.getNickName());
|
| | | vo.setPortrait(user.getPortrait());
|
| | | }
|
| | |
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("统计失败"));
|
| | | e.printStackTrace();
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | | }
|