src/main/java/data/loadcache/WalletLoadCacheService.java
@@ -26,8 +26,8 @@ private RedisHandler redisHandler; public void loadcache() { // loadWallet(); // logger.info("完成Wallet数据加载redis"); loadWallet(); logger.info("完成Wallet数据加载redis"); loadWalletExtend(); logger.info("完成WalletExtend数据加载redis"); loadExchangeRate(); src/main/java/project/contract/internal/AdminContractOrderServiceImpl.java
@@ -66,6 +66,7 @@ queryString.append("AND (party.USERNAME like:username OR party.USERCODE like:username ) "); parameters.put("username","%"+username+"%"); } queryString.append(" GROUP BY orders.UUID "); queryString.append(" order by orders.CREATE_TIME desc "); Page page = this.pagedQueryDao.pagedQuerySQL(pageNo, pageSize, queryString.toString(), parameters); src/main/java/project/contract/internal/ContractOrderServiceImpl.java
@@ -429,8 +429,11 @@ if (!StringUtils.isNullOrEmpty(endTime)) { whereSql.append("AND DATE(CREATE_TIME)<=DATE('"+endTime+" 23:59:59') "); } if ("orders".equals(type)) { whereSql.append("ORDER BY CREATE_TIME DESC LIMIT ?,?"); } else if ("hisorders".equals(type)) { whereSql.append("ORDER BY CLOSE_TIME DESC LIMIT ?,?"); } params.add(page.getFirstElementNumber()); params.add(pageSize); src/main/java/project/party/NormalReg.java
@@ -30,6 +30,7 @@ */ protected String username; private String phone; /** * 密码 */ @@ -94,6 +95,15 @@ this.password = password; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getRolename() { return rolename; } src/main/java/project/project/web/admin/AdminContractOrderController.java
@@ -3,11 +3,12 @@ import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.MessageFormat; import java.util.Date; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.*; import javax.servlet.http.HttpServletRequest; @@ -116,7 +117,25 @@ String roleName = map.get("rolename").toString(); map.put("roleNameDesc", Constants.ROLE_MAP.containsKey(roleName) ? Constants.ROLE_MAP.get(roleName) : roleName); } Object createTimeObj = map.get("createTime"); ZonedDateTime berlinTime; if (createTimeObj instanceof String) { // 处理字符串格式 "2025-07-14T16:13:29" (ISO格式) berlinTime = LocalDateTime.parse((String) createTimeObj) .atZone(ZoneId.systemDefault()) .withZoneSameInstant(ZoneId.of("Europe/Berlin")); } else if (createTimeObj instanceof LocalDateTime) { // 处理 LocalDateTime 对象 berlinTime = ((LocalDateTime) createTimeObj) .atZone(ZoneId.systemDefault()) .withZoneSameInstant(ZoneId.of("Europe/Berlin")); } else { throw new IllegalArgumentException("不支持的日期类型"); } String formatted = berlinTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); map.put("createTime", formatted); double depositOpen = Double.parseDouble(map.get("deposit_open").toString()); double leverRate = Double.parseDouble(map.get("lever_rate").toString()); double tradeAvgPrice = Double.parseDouble(map.get("trade_avg_price").toString()); src/main/java/project/user/LocalNormalReg.java
@@ -5,20 +5,7 @@ public class LocalNormalReg extends SunLineReg { private static final long serialVersionUID = 6591426198060900449L; private String phone; private String em; public void setPhone(String phone){ this.phone = phone; } public String getPhone(){ return phone; } public void seEm(String em){ src/main/java/project/user/internal/LocalUserServiceImpl.java
@@ -281,6 +281,7 @@ secUser.getRoles().add(role); secUser.setUsername(reg.getUsername()); secUser.setPassword(reg.getPassword()); secUser.setPhone(reg.getPhone()); this.secUserService.saveUser(secUser); // usdt账户 src/main/java/project/web/admin/impl/user/AdminAgentServiceImpl.java
@@ -227,7 +227,9 @@ AgentNodes nodes = new AgentNodes(); nodes.setTags(agent.getPartyId().toString()); nodes.setHref(url + "?partyId=" + agent.getPartyId().toString()); logger.info("-----------------agent----------"+ agent.getPartyId()); Party party = this.partyService.cachePartyBy(agent.getPartyId(),true); logger.info("-----------------party----------"+party.toString()); String username = party.getUsername(); String name = party.getName(); if ((!StringUtils.isNullOrEmpty(loginPartyId)) && (!StringUtils.isNullOrEmpty(username)) src/main/java/project/web/admin/impl/user/AdminUserServiceImpl.java
@@ -223,19 +223,19 @@ public Page exchangePagedQuery(int pageNo, int pageSize, String name_para, String rolename, String checkedPartyId, Boolean online, String loginIp_para) { StringBuffer queryString = new StringBuffer( "SELECT party.UUID id, party.NAME name, party.USERNAME username, " "SELECT party.UUID id, party.NAME name,su.PHONE, party.USERNAME username, " + " party.LOGINAUTHORITY login_authority, party.WITHDRAW_LIMIT_AMOUNT withdraw_limit_amount, party.WITHDRAW_LIMIT_NOW_AMOUNT withdraw_limit_now_amount, " + " party.LAST_LOGIN_TIME last_loginTime, party.ENABLED enabled, party.ROLENAME rolename, party.CREATE_TIME create_time, " + " party.REMARKS remarks, wallet.USDT_MONEY money, party.USERCODE usercode, " + " party.REMARKS remarks, wallet.MONEY money, party.USERCODE usercode, " + " party_parent.USERNAME username_parent, party.LOGIN_IP login_ip, party.GIFT_USER gift_user, party.USER_LEVEL user_level, " + " party.REGSITER_USERCODE register_usercode" + " "); queryString.append( " FROM PAT_PARTY party LEFT JOIN PAT_USER_RECOM user ON user.PARTY_ID = party.UUID " + " LEFT JOIN T_WALLET_GATHER wallet ON wallet.PARTY_ID = party.UUID " + " LEFT JOIN T_WALLET wallet ON wallet.PARTY_ID = party.UUID " + " LEFT JOIN PAT_PARTY party_parent ON user.RECO_ID = party_parent.UUID " + " LEFT JOIN SCT_USER su ON party.UUID = su.PARTY_UUID" + " WHERE 1 = 1 "); Map<String, Object> parameters = new HashMap<String, Object>(); @@ -494,13 +494,14 @@ if (money_revise == 0 || coin_type == "") { return; } WalletGatherService walletGatherService = new WalletGatherServiceImpl(jdbcTemplate,redisHandler,walletService); WalletGather walletGather = walletGatherService.getWalletGatherByPartyId(partyId,null); if ("usdt".equals(coin_type)) { // 交易所修改usdt Party party = this.partyService.cachePartyBy(partyId, false); double amount_before = walletGather.getUsdtMoney(); if (Arith.add(money_revise, walletGather.getUsdtMoney()) < 0.0D) { Wallet wallet = this.walletService.saveWalletByPartyId(partyId); double amount_before = wallet.getMoney(); if (Arith.add(money_revise, wallet.getMoney()) < 0.0D) { throw new BusinessException("操作失败!修正后账户余额小于0。"); } @@ -510,14 +511,16 @@ if (!safeword_md5.equals(sysSafeword)) { throw new BusinessException("资金密码错误"); } //修改资金账户 walletGatherService.update(walletGather.getPartyId().toString(),coin_type,money_revise,"add"); // 更新金额 this.walletService.update(wallet.getPartyId().toString(), money_revise); // 账变日志 MoneyLog moneyLog = new MoneyLog(); moneyLog.setCategory(Constants.MONEYLOG_CATEGORY_COIN); moneyLog.setAmount_before(amount_before); moneyLog.setAmount(money_revise); moneyLog.setAmount_after(Arith.add(walletGather.getUsdtMoney(), money_revise)); moneyLog.setAmount_after(Arith.add(wallet.getMoney(), money_revise)); moneyLog.setPartyId(partyId); moneyLog.setWallettype(Constants.WALLET); moneyLog.setContent_type(Constants.MONEYLOG_CONTENT_RECHARGE); @@ -574,14 +577,9 @@ // 交易所修改btc、eth;DAPP修改质押账户(USDT)【USDT_DAPP】;DAPP演示用户修改DAPP余额【USDT_USER】; Party party = this.partyService.cachePartyBy(partyId, false); double amount_before = 0; if("btc".equals(coin_type)){ amount_before = walletGather.getBtcMoney(); }else if ("eth".equals(coin_type)){ amount_before = walletGather.getEthMoney(); } if (Arith.add(money_revise, amount_before) < 0.0D) { WalletExtend walletExtend = this.walletService.saveExtendByPara(partyId, coin_type); double amount_before = walletExtend.getAmount(); if (Arith.add(money_revise, walletExtend.getAmount()) < 0.0D) { throw new BusinessException("操作失败!修正后账户余额小于0。"); } @@ -592,19 +590,15 @@ if (!safeword_md5.equals(sysSafeword)) { throw new BusinessException("资金密码错误"); } walletGatherService.update(walletGather.getPartyId().toString(),coin_type,money_revise,"add"); double amount = 0; if("btc".equals(coin_type)){ amount = walletGather.getBtcMoney(); }else if ("eth".equals(coin_type)){ amount = walletGather.getEthMoney(); } this.walletService.updateExtend(walletExtend.getPartyId().toString(), coin_type, money_revise); // 账变日志 MoneyLog moneyLog = new MoneyLog(); moneyLog.setCategory(Constants.MONEYLOG_CATEGORY_COIN); moneyLog.setAmount_before(amount_before); moneyLog.setAmount(money_revise); moneyLog.setAmount_after(Arith.add(amount, money_revise)); moneyLog.setAmount_after(Arith.add(walletExtend.getAmount(), money_revise)); moneyLog.setPartyId(partyId); moneyLog.setWallettype(coin_type.toUpperCase()); moneyLog.setContent_type(Constants.MONEYLOG_CONTENT_RECHARGE); @@ -679,6 +673,7 @@ } } /** * DAPP/交易所 修改余额 减少 */ src/main/java/project/web/api/LocalUserController.java
@@ -395,6 +395,7 @@ String verifcode = request.getParameter("verifcode"); // 注册类型:1/手机;2/邮箱;3/用户名; String type = request.getParameter("type"); String phone = request.getParameter("phone").replace(" ", ""); // 资金密码选填,不填默认 000000 String safeword = request.getParameter("safeword").replace(" ", ""); String re_safeword = request.getParameter("re_safeword").replace(" ", ""); @@ -414,7 +415,9 @@ if (StringUtils.isEmptyString(username)) { throw new BusinessException("用户名不能为空"); } if (StringUtils.isEmptyString(phone)) { throw new BusinessException("手机号不能为空"); } if (StringUtils.isEmptyString(password)) { throw new BusinessException("登录密码不能为空"); } @@ -484,6 +487,7 @@ reg.setPassword(password); reg.setSafeword(safeword); reg.setReco_usercode(usercode); reg.setPhone(phone); this.localUserService.saveRegisterNoVerifcode(reg, type); src/main/java/security/SecUser.java
@@ -27,6 +27,9 @@ @Column(name="USERNAME") private String username;// 登陆用户名 @Column(name="PHONE") private String phone;// 手机号 @Column(name="PASSWORD") private String password;// 密码 @@ -104,6 +107,14 @@ this.username = username; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getPassword() { return password; }