| | |
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | | import com.yeshi.fanli.vo.money.IncomeDetailVO;
|
| | | import com.yeshi.fanli.vo.money.MoneyPredictVO;
|
| | | import com.yeshi.fanli.vo.money.MoneyStatisticVO;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | /**
|
| | |
| | | list = new ArrayList<>();
|
| | | }
|
| | |
|
| | | |
| | | JSONArray JSONArray = new JSONArray();
|
| | | for (Extract extract: list) {
|
| | | |
| | | Date receiveTime = extract.getReceiveTime();
|
| | | if (receiveTime == null) {
|
| | | receiveTime = new Date(extract.getExtractTime());
|
| | | }
|
| | | |
| | | |
| | | |
| | | GsonBuilder builder = new GsonBuilder();
|
| | | builder.registerTypeAdapter(BigDecimal.class, new JsonSerializer<BigDecimal>() {
|
| | | @Override
|
| | | public JsonElement serialize(BigDecimal value, Type theType, JsonSerializationContext context) {
|
| | | if (value == null) {
|
| | | return new JsonPrimitive("");
|
| | | } else {
|
| | | // 保留2位小数
|
| | | value = value.setScale(2);
|
| | | return new JsonPrimitive(value.toString());
|
| | | }
|
| | | }
|
| | | });
|
| | | String account = "支付宝:" + UserUtil.filterAlipayAccount(extract.getAccount());
|
| | | account = account + "-姓名:"+ UserUtil.filterAlipayName(extract.getName());
|
| | |
|
| | | JSONObject object = new JSONObject();
|
| | | object.put("count", list.size());
|
| | | object.put("list", builder.create().toJson(list));
|
| | | out.print(JsonUtil.loadTrueResult(object));
|
| | | object.put("title", "你于"+ TimeUtil.formatDate(receiveTime) +"提现成功");
|
| | | object.put("account", account);
|
| | | object.put("money","¥" + extract.getMoney().setScale(2).toString());
|
| | | JSONArray.add(object);
|
| | | }
|
| | | |
| | | JSONObject json = new JSONObject();
|
| | | json.put("count", extractService.countExtractSucceedRecord(uid));
|
| | | json.put("list", JSONArray);
|
| | | out.print(JsonUtil.loadTrueResult(json));
|
| | | }
|
| | |
|
| | |
|