123
This commit is contained in:
1 parent
8d2c4e0159
commit
05b5a3d3cc
43 files changed
+428
-4722
No files matched your search
@@ -20,7 +20,6 @@ import org.springframework.context.annotation.Bean;
|
||||
})
|
||||
public class RuoYiApplication {
|
||||
public static void main(String[] args) {// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
System.setProperty("hazelcast.config", "D:\\myprojects\\yuyue\\RuoYi-Vue\\luqj-cache\\src\\main\\resources\\hazelcast-default1.xml");
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
package com.ruoyi.task;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.*;
|
||||
import com.ruoyi.system.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.tron.trident.core.ApiWrapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Slf4j
|
||||
@Component("AggregationTask")
|
||||
public class AggregationTask {
|
||||
@Autowired
|
||||
private IUsdtAggregationTaskService usdtAggregationTaskService;
|
||||
@Autowired
|
||||
private IUsdtAggregationTaskItemService usdtAggregationTaskItemService;
|
||||
@Autowired
|
||||
private ITronService tronService;
|
||||
@Autowired
|
||||
private IUsdtFundFlowService usdtFundFlowService;
|
||||
@Autowired
|
||||
private IWalletAddressService walletAddressService;
|
||||
@Autowired
|
||||
private IWeb3WalletService web3WalletService;
|
||||
|
||||
@Scheduled(cron = "0 */10 * * * ?")
|
||||
// @Scheduled(cron = "0/10 * * * * ?")
|
||||
public void execute() {
|
||||
// com.license.LicenseBootstrap.init();
|
||||
List<UsdtAggregationTaskPlus> taskPluses = this.usdtAggregationTaskService.getListByStatusAndLtExeTime(0, new Date());
|
||||
for (UsdtAggregationTaskPlus taskPlus : taskPluses) {
|
||||
Web3WalletPlus web3Wallet = this.web3WalletService.getById(taskPlus.getUserId());
|
||||
if (web3Wallet == null) {
|
||||
web3Wallet = new Web3WalletPlus();
|
||||
web3Wallet.setId(taskPlus.getUserId());
|
||||
web3Wallet.setPassword(UUID.randomUUID().toString());
|
||||
web3Wallet.setEthBalance(new BigDecimal(0));
|
||||
web3Wallet.setTrxBalance(new BigDecimal(0));
|
||||
web3Wallet.setUsdtBalance(new BigDecimal(0));
|
||||
web3Wallet.setCreatedAt(new Date());
|
||||
web3Wallet.setUpdatedAt(new Date());
|
||||
this.web3WalletService.save(web3Wallet);
|
||||
}
|
||||
List<UsdtAggregationTaskItemPlus> itemPluses = this.usdtAggregationTaskItemService.getListByStatusAndParentId(0, taskPlus.getId());
|
||||
int success = 0;
|
||||
for (UsdtAggregationTaskItemPlus itemPlus : itemPluses) {
|
||||
WalletAddressPlus walletAddressPlus = walletAddressService.getByTokenAndAppId(itemPlus.getTokenAddress(), itemPlus.getAppId());
|
||||
if (walletAddressPlus.getUpdatedAt().getTime() < itemPlus.getCreatedAt().getTime()) {
|
||||
itemPlus.setStatus(0);
|
||||
itemPlus.setRemark("等待钱包更新");
|
||||
usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
continue;
|
||||
}
|
||||
ApiWrapper api = tronService.buildApiWrapper(walletAddressPlus.getTokenKey());
|
||||
try {
|
||||
if (walletAddressPlus.getEnergyNum() < tronService.defaultEstimateEnergy()) {
|
||||
itemPlus.setStatus(0);
|
||||
itemPlus.setRemark("能量不足,需要手续费");
|
||||
usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
continue;
|
||||
}
|
||||
long bandwidth = tronService.defaultEstimateBandwidth();
|
||||
if (bandwidth > walletAddressPlus.getBandwidthNum()) {
|
||||
itemPlus.setStatus(0);
|
||||
itemPlus.setRemark("带宽不足需要手续费");
|
||||
usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
continue;
|
||||
}
|
||||
if (bandwidth > walletAddressPlus.getBandwidthStakedNum()
|
||||
&& bandwidth > (walletAddressPlus.getBandwidthNum() - walletAddressPlus.getBandwidthStakedNum())) {
|
||||
itemPlus.setStatus(0);
|
||||
itemPlus.setRemark("代理|免费带宽不足需要手续费");
|
||||
usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
continue;
|
||||
}
|
||||
if (walletAddressPlus.getWithdrawUsdtBalance().subtract(itemPlus.getOpeAmount()).doubleValue() < 0) {
|
||||
itemPlus.setStatus(2);
|
||||
itemPlus.setRemark("超额或者重复提现,请排查");
|
||||
usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
continue;
|
||||
}
|
||||
String result = this.tronService.usdtTrans(api, itemPlus.getTokenAddress(), itemPlus.getDistTokenAddress(), itemPlus.getOpeAmount().toString());
|
||||
//验证是否成功 TODO
|
||||
if (StringUtils.isNotEmpty(result)) {
|
||||
itemPlus.setStatus(1);
|
||||
itemPlus.setRemark(result);
|
||||
walletAddressPlus.setWithdrawUsdtBalance(walletAddressPlus.getWithdrawUsdtBalance().subtract(itemPlus.getOpeAmount()));
|
||||
web3Wallet.setUsdtBalance(web3Wallet.getUsdtBalance().subtract(itemPlus.getOpeAmount()));
|
||||
|
||||
UsdtFundFlowPlus shFlow = new UsdtFundFlowPlus();
|
||||
shFlow.setAppId(itemPlus.getAppId());
|
||||
shFlow.setAmount(itemPlus.getOpeAmount());
|
||||
shFlow.setOrderId(itemPlus.getId());
|
||||
shFlow.setOpType(2);
|
||||
shFlow.setUserId(itemPlus.getUserId());
|
||||
shFlow.setToken(itemPlus.getTokenAddress());
|
||||
shFlow.setRemark("归集成功");
|
||||
shFlow.setCreatedAt(new Date());
|
||||
shFlow.setUpdatedAt(new Date());
|
||||
this.usdtFundFlowService.save(shFlow);
|
||||
|
||||
this.web3WalletService.updateById(web3Wallet);
|
||||
this.walletAddressService.updateById(walletAddressPlus);
|
||||
success++;
|
||||
} else {
|
||||
itemPlus.setStatus(0);
|
||||
itemPlus.setRemark("归集失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
itemPlus.setStatus(0);
|
||||
itemPlus.setRemark(e.getMessage());
|
||||
}
|
||||
itemPlus.setUpdatedAt(new Date());
|
||||
this.usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
api.close();
|
||||
}
|
||||
if (success == itemPluses.size() && itemPluses.size() > 0) {
|
||||
taskPlus.setStatus(1);
|
||||
this.usdtAggregationTaskService.updateById(taskPlus);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
package com.ruoyi.task;
|
||||
|
||||
import com.ruoyi.system.domain.*;
|
||||
import com.ruoyi.system.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
@Component("splitAccountsTask")
|
||||
public class SplitAccountsTask {
|
||||
@Autowired
|
||||
private IUsdtOrdersService usdtOrdersService;
|
||||
@Autowired
|
||||
private IUsdtUserSettlementConfigurationService usdtUserSettlementConfigurationService;
|
||||
@Autowired
|
||||
private IUsdtFundFlowService usdtFundFlowService;
|
||||
@Autowired
|
||||
private IWalletAddressService walletAddressService;
|
||||
@Autowired
|
||||
private IWeb3WalletService web3WalletService;
|
||||
// @Scheduled(cron = "0/10 * * * * ?")
|
||||
@Scheduled(cron = "0 */10 * * * ?")
|
||||
public void execute() {
|
||||
// com.license.LicenseBootstrap.init();
|
||||
List<UsdtOrdersPlus> list = usdtOrdersService.getWillSettlement(1000);
|
||||
Map<Long, UsdtUserSettlementConfigurationPlus> configMap = new HashMap<Long, UsdtUserSettlementConfigurationPlus>();
|
||||
List<UsdtFundFlowPlus> fundFlows = new ArrayList<UsdtFundFlowPlus>();
|
||||
List<Long> ids = new ArrayList<>();
|
||||
Map<Long, Web3WalletPlus> web3WalletMap = new HashMap<>();
|
||||
for (UsdtOrdersPlus usdtOrdersPlus : list) {
|
||||
WalletAddressPlus walletAddressPlus = walletAddressService.getByTokenAndAppId(usdtOrdersPlus.getToken(),usdtOrdersPlus.getAppId()
|
||||
,WalletAddressPlus::getId,WalletAddressPlus::getWithdrawUsdtBalance);
|
||||
if(walletAddressPlus.getWithdrawUsdtBalance() == null){
|
||||
walletAddressPlus.setWithdrawUsdtBalance(new BigDecimal(0));
|
||||
}
|
||||
UsdtUserSettlementConfigurationPlus config = configMap.getOrDefault(usdtOrdersPlus.getUserId(), usdtUserSettlementConfigurationService.getByUserId(usdtOrdersPlus.getUserId()));
|
||||
BigDecimal yj = usdtOrdersPlus.getActualAmount().multiply(config.getCommissionRate());
|
||||
UsdtFundFlowPlus yjFlow = new UsdtFundFlowPlus();
|
||||
yjFlow.setAppId(usdtOrdersPlus.getAppId());
|
||||
yjFlow.setAmount(yj);
|
||||
yjFlow.setOrderId(usdtOrdersPlus.getId());
|
||||
yjFlow.setOpType(1);
|
||||
yjFlow.setUserId(usdtOrdersPlus.getUserId());
|
||||
yjFlow.setToken(usdtOrdersPlus.getToken());
|
||||
|
||||
Web3WalletPlus web3Wallet = web3WalletMap.get(usdtOrdersPlus.getUserId());
|
||||
if (web3Wallet == null) {
|
||||
web3Wallet = new Web3WalletPlus();
|
||||
web3Wallet.setId(usdtOrdersPlus.getUserId());
|
||||
web3Wallet.setPassword(UUID.randomUUID().toString());
|
||||
web3Wallet.setEthBalance(new BigDecimal(0));
|
||||
web3Wallet.setTrxBalance(new BigDecimal(0));
|
||||
web3Wallet.setUsdtBalance(new BigDecimal(0));
|
||||
web3Wallet.setCreatedAt(new Date());
|
||||
web3Wallet.setUpdatedAt(new Date());
|
||||
this.web3WalletService.save(web3Wallet);
|
||||
} else {
|
||||
web3Wallet.setUpdatedAt(new Date());
|
||||
}
|
||||
web3Wallet.setUsdtBalance(web3Wallet.getUsdtBalance().add(usdtOrdersPlus.getActualAmount().subtract(yj)));
|
||||
web3WalletMap.put(usdtOrdersPlus.getUserId(), web3Wallet);
|
||||
|
||||
UsdtFundFlowPlus shFlow = new UsdtFundFlowPlus();
|
||||
shFlow.setAppId(usdtOrdersPlus.getAppId());
|
||||
shFlow.setAmount(usdtOrdersPlus.getActualAmount().subtract(yj));
|
||||
shFlow.setOrderId(usdtOrdersPlus.getId());
|
||||
shFlow.setOpType(0);
|
||||
shFlow.setUserId(usdtOrdersPlus.getUserId());
|
||||
shFlow.setToken(usdtOrdersPlus.getToken());
|
||||
walletAddressPlus.setWithdrawUsdtBalance(walletAddressPlus.getWithdrawUsdtBalance().add(shFlow.getAmount()));
|
||||
fundFlows.add(yjFlow);
|
||||
fundFlows.add(shFlow);
|
||||
ids.add(usdtOrdersPlus.getId());
|
||||
this.walletAddressService.updateWithdrawUsdtBalanceById(walletAddressPlus.getId(),walletAddressPlus.getWithdrawUsdtBalance());
|
||||
}
|
||||
Iterator<Map.Entry<Long, Web3WalletPlus>> iterator = web3WalletMap.entrySet().iterator();
|
||||
List<Web3WalletPlus> updates = new ArrayList<>();
|
||||
while (iterator.hasNext()) {
|
||||
updates.add(iterator.next().getValue());
|
||||
}
|
||||
if (!updates.isEmpty()) {
|
||||
web3WalletService.updateBatchById(updates);
|
||||
}
|
||||
if (!fundFlows.isEmpty()) {
|
||||
usdtFundFlowService.saveBatch(fundFlows);
|
||||
}
|
||||
if (!ids.isEmpty()) {
|
||||
this.usdtOrdersService.updateSettlementStatusByIds(ids, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
package com.ruoyi.task;
|
||||
|
||||
import com.ruoyi.system.domain.WalletAddressPlus;
|
||||
import com.ruoyi.system.domain.vo.EnergyAndBandwidthVo;
|
||||
import com.ruoyi.system.service.ITronService;
|
||||
import com.ruoyi.system.service.IWalletAddressService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.tron.trident.core.ApiWrapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@Slf4j
|
||||
@Component("WalletAddressTask")
|
||||
public class WalletAddressTask {
|
||||
@Autowired
|
||||
private ITronService tronService;
|
||||
@Autowired
|
||||
private IWalletAddressService walletAddressService;
|
||||
// @Scheduled(cron = "0/5 * * * * ?")
|
||||
@Scheduled(cron = "0 */10 * * * ?")
|
||||
public void execute() {
|
||||
// com.license.LicenseBootstrap.init();
|
||||
List<WalletAddressPlus> walletAddressPluses = walletAddressService.list();
|
||||
for (WalletAddressPlus walletAddressPlus : walletAddressPluses) {
|
||||
ApiWrapper api = tronService.buildApiWrapper(walletAddressPlus.getTokenKey());
|
||||
BigDecimal amout = tronService.getUsdtBalance(api,walletAddressPlus.getToken());
|
||||
walletAddressPlus.setUsdtBalance(amout);
|
||||
amout = tronService.getTRxBalance(api,walletAddressPlus.getToken());
|
||||
walletAddressPlus.setTrxBalance(amout);
|
||||
EnergyAndBandwidthVo energyAndBandwidthVo = tronService.energyAndBandwidth(walletAddressPlus.getToken());
|
||||
walletAddressPlus.setEnergyNum(energyAndBandwidthVo.getEnergy().longValue());
|
||||
walletAddressPlus.setBandwidthNum(energyAndBandwidthVo.getBandwidth().longValue());
|
||||
amout = tronService.votedBalance(api,walletAddressPlus.getToken());
|
||||
walletAddressPlus.setVotedNum(amout.longValue());
|
||||
amout = tronService.stakedTrxBalance(api,walletAddressPlus.getToken(),1);
|
||||
walletAddressPlus.setEnergyStakedTrxNum(amout.longValue());
|
||||
amout = tronService.stakedTrxBalance(api,walletAddressPlus.getToken(),0);
|
||||
walletAddressPlus.setBandwidthStakedTrxNum(amout.longValue());
|
||||
energyAndBandwidthVo = tronService.allDelegatedDnergyAndBandwidth(walletAddressPlus.getToken());
|
||||
walletAddressPlus.setAcquiredDelegatedBandwidthValue(energyAndBandwidthVo.getAcquiredBandwidth());
|
||||
walletAddressPlus.setAcquiredDelegatedEnergyValue(energyAndBandwidthVo.getAcquiredEnergy());
|
||||
walletAddressPlus.setDelegatedBandwidthValue(energyAndBandwidthVo.getDelegateBandwidth());
|
||||
walletAddressPlus.setDelegatedEnergyValue(energyAndBandwidthVo.getDelegateEnergy());
|
||||
walletAddressPlus.setBandwidthStakedNum(energyAndBandwidthVo.getBandwidthStakedNum());
|
||||
|
||||
amout = tronService.delegatedStakedTrxBalance(api,walletAddressPlus.getToken(),1);
|
||||
walletAddressPlus.setDelegatedEnergyTrxNum(amout.longValue());
|
||||
amout = tronService.delegatedStakedTrxBalance(api,walletAddressPlus.getToken(),0);
|
||||
walletAddressPlus.setDelegatedBandwidthTrxNum(amout.longValue());
|
||||
|
||||
amout = tronService.acquiredDelegatedStakedTrxBalance(api,walletAddressPlus.getToken(),1);
|
||||
walletAddressPlus.setAcquiredDelegatedEnergyTrxNum(amout.longValue());
|
||||
amout = tronService.acquiredDelegatedStakedTrxBalance(api,walletAddressPlus.getToken(),0);
|
||||
walletAddressPlus.setAcquiredDelegatedBandwidthTrxNum(amout.longValue());
|
||||
|
||||
amout = tronService.voteBalance(api,walletAddressPlus.getToken());
|
||||
walletAddressPlus.setVoteNum(amout.longValue()+walletAddressPlus.getDelegatedBandwidthTrxNum()+ walletAddressPlus.getDelegatedEnergyTrxNum());
|
||||
|
||||
walletAddressPlus.setStakedTrxNum(walletAddressPlus.getVoteNum());
|
||||
|
||||
if(walletAddressPlus.getStakedTrxNum() != energyAndBandwidthVo.getStakedTrxNum().longValue()){
|
||||
log.error("please check stakedTrxNum is true");
|
||||
walletAddressPlus.setStakedTrxNum(energyAndBandwidthVo.getStakedTrxNum());
|
||||
walletAddressPlus.setVoteNum(walletAddressPlus.getStakedTrxNum());
|
||||
}
|
||||
walletAddressPlus.setUpdatedAt(new Date());
|
||||
walletAddressService.updateById(walletAddressPlus);
|
||||
api.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package com.ruoyi.web.core.config;
|
||||
|
||||
|
||||
import org.apache.catalina.connector.Connector;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* Create by IntelliJ IDEA
|
||||
*
|
||||
* @author chenlei
|
||||
* @dateTime 2019/5/23 18:09
|
||||
* @description TomcatConfig
|
||||
*/
|
||||
//@Configuration
|
||||
public class TomcatConfig {
|
||||
@Value("${server.http.port:8085}")
|
||||
private Integer httpPort;
|
||||
// @Bean
|
||||
// public ServletWebServerFactory webServerFactory() {
|
||||
// TomcatServletWebServerFactory fa = new TomcatServletWebServerFactory();
|
||||
// fa.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "[]{}"));
|
||||
// return fa;
|
||||
// }
|
||||
|
||||
|
||||
// @Bean
|
||||
// public Connector connector(){
|
||||
// Connector connector=new Connector("org.apache.coyote.http11.Http11NioProtocol");
|
||||
// connector.setScheme("http");
|
||||
// connector.setPort(80);
|
||||
// connector.setSecure(false);
|
||||
// connector.setRedirectPort(443);
|
||||
// return connector;
|
||||
// }
|
||||
//
|
||||
// @Bean
|
||||
// public TomcatServletWebServerFactory tomcatServletWebServerFactory(Connector connector){
|
||||
// TomcatServletWebServerFactory tomcat=new TomcatServletWebServerFactory(){
|
||||
// @Override
|
||||
// protected void postProcessContext(Context context) {
|
||||
// SecurityConstraint securityConstraint=new SecurityConstraint();
|
||||
// securityConstraint.setUserConstraint("CONFIDENTIAL");
|
||||
// SecurityCollection collection=new SecurityCollection();
|
||||
// collection.addPattern("/*");
|
||||
// securityConstraint.addCollection(collection);
|
||||
// context.addConstraint(securityConstraint);
|
||||
// }
|
||||
// };
|
||||
// connector.setProperty("relaxedQueryChars", "[]{}");
|
||||
// tomcat.addAdditionalTomcatConnectors(connector);
|
||||
// return tomcat;
|
||||
// }
|
||||
|
||||
/* --------------------请按照自己spring boot版本选择 start--------------------- */
|
||||
|
||||
// 这是spring boot 2.0.X版本的 添加这个,上一个就不用添加了
|
||||
@Bean
|
||||
public ServletWebServerFactory servletContainer() {
|
||||
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
|
||||
tomcat.addAdditionalTomcatConnectors(createStandardConnector()); // 添加http
|
||||
return tomcat;
|
||||
}
|
||||
|
||||
/* --------------------请按照自己spring boot版本选择 end--------------------- */
|
||||
|
||||
|
||||
// 配置http
|
||||
private Connector createStandardConnector() {
|
||||
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
|
||||
connector.setPort(httpPort);
|
||||
return connector;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.select.Ids;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.UsdtFundFlow;
|
||||
import com.ruoyi.system.domain.UsdtFundFlowPlus;
|
||||
import com.ruoyi.system.service.IUsdtFundFlowService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资金流水Controller
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/usdt_flow")
|
||||
public class UsdtFundFlowController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IUsdtFundFlowService usdtFundFlowService;
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtFundFlowPlus> list = usdtFundFlowService.getByIds(ids.getLongIds(),false,UsdtFundFlowPlus::getRemark,UsdtFundFlowPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtFundFlowPlus> list = usdtFundFlowService.getByIds(ids.getLongIds(),true,UsdtFundFlowPlus::getUserId,UsdtFundFlowPlus::getRemark,UsdtFundFlowPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtFundFlowService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtFundFlowService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
startPage();
|
||||
List<UsdtFundFlow> list = usdtFundFlowService.selectUsdtFundFlowList(usdtFundFlow,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
startPage();
|
||||
List<UsdtFundFlow> list = usdtFundFlowService.selectUsdtFundFlowList(usdtFundFlow,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:export')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
List<UsdtFundFlow> list = usdtFundFlowService.selectUsdtFundFlowList(usdtFundFlow,false);
|
||||
ExcelUtil<UsdtFundFlow> util = new ExcelUtil<UsdtFundFlow>(UsdtFundFlow.class);
|
||||
return util.exportExcel(list, "usdt_flow");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资金流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtFundFlowService.selectUsdtFundFlowById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取资金流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtFundFlowService.selectUsdtFundFlowById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:add')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.insertUsdtFundFlow(usdtFundFlow,false));
|
||||
}
|
||||
/**
|
||||
* 新增资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-add')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.insertUsdtFundFlow(usdtFundFlow,true));
|
||||
}
|
||||
/**
|
||||
* 修改资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:edit')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.updateUsdtFundFlow(usdtFundFlow,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-edit')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.updateUsdtFundFlow(usdtFundFlow,true));
|
||||
}
|
||||
/**
|
||||
* 删除资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:remove')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.deleteUsdtFundFlowByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-remove')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.deleteUsdtFundFlowByIds(ids,true));
|
||||
}
|
||||
}
|
||||
-170
@@ -1,170 +0,0 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.select.Ids;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfiguration;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus;
|
||||
import com.ruoyi.system.service.IUsdtUserSettlementConfigurationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商户配置Controller
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/usdt_user_configuration")
|
||||
public class UsdtUserSettlementConfigurationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IUsdtUserSettlementConfigurationService usdtUserSettlementConfigurationService;
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtUserSettlementConfigurationPlus> list = usdtUserSettlementConfigurationService.getByIds(ids.getLongIds(),false,UsdtUserSettlementConfigurationPlus::getRemark,UsdtUserSettlementConfigurationPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtUserSettlementConfigurationPlus> list = usdtUserSettlementConfigurationService.getByIds(ids.getLongIds(),true,UsdtUserSettlementConfigurationPlus::getUserId,UsdtUserSettlementConfigurationPlus::getRemark,UsdtUserSettlementConfigurationPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtUserSettlementConfigurationService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtUserSettlementConfigurationService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询商户配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
startPage();
|
||||
List<UsdtUserSettlementConfiguration> list = usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询商户配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
startPage();
|
||||
List<UsdtUserSettlementConfiguration> list = usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出商户配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:export')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
List<UsdtUserSettlementConfiguration> list = usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration,false);
|
||||
ExcelUtil<UsdtUserSettlementConfiguration> util = new ExcelUtil<UsdtUserSettlementConfiguration>(UsdtUserSettlementConfiguration.class);
|
||||
return util.exportExcel(list, "usdt_user_configuration");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商户配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取商户配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增商户配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:add')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.insertUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,false));
|
||||
}
|
||||
/**
|
||||
* 新增商户配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-add')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.insertUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,true));
|
||||
}
|
||||
/**
|
||||
* 修改商户配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:edit')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.updateUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-edit')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.updateUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,true));
|
||||
}
|
||||
/**
|
||||
* 删除商户配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:remove')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.deleteUsdtUserSettlementConfigurationByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除商户配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-remove')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.deleteUsdtUserSettlementConfigurationByIds(ids,true));
|
||||
}
|
||||
}
|
||||
@@ -1,168 +0,0 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.select.Ids;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.UserAuth;
|
||||
import com.ruoyi.system.domain.UserAuthPlus;
|
||||
import com.ruoyi.system.service.IUserAuthService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户授权Controller
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/auth" )
|
||||
public class UserAuthController extends BaseController {
|
||||
@Autowired
|
||||
private IUserAuthService userAuthService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:getByIds')" )
|
||||
@PostMapping("/getByIds" )
|
||||
public AjaxResult getByIds(@RequestBody Ids ids) {
|
||||
List<UserAuthPlus> list = userAuthService.getByIds(ids.getLongIds(), false, UserAuthPlus::getName, UserAuthPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:user-getByIds')" )
|
||||
@PostMapping("/user/getByIds" )
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids) {
|
||||
List<UserAuthPlus> list = userAuthService.getByIds(ids.getLongIds(), true, UserAuthPlus::getName,UserAuthPlus::getUserId, UserAuthPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:select')" )
|
||||
@GetMapping("/select" )
|
||||
public AjaxResult select(String keyword) {
|
||||
List<SelectItem> list = userAuthService.select(keyword, false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:user-select')" )
|
||||
@GetMapping("/user/select" )
|
||||
public AjaxResult userSelect(String keyword) {
|
||||
List<SelectItem> list = userAuthService.select(keyword, true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户授权列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:list')" )
|
||||
@GetMapping("/list" )
|
||||
public TableDataInfo list(UserAuth userAuth) {
|
||||
startPage();
|
||||
List<UserAuth> list = userAuthService.selectUserAuthList(userAuth, false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户授权列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:user-list')" )
|
||||
@GetMapping("/user/list" )
|
||||
public TableDataInfo userList(UserAuth userAuth) {
|
||||
startPage();
|
||||
List<UserAuth> list = userAuthService.selectUserAuthList(userAuth, true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户授权列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:export')" )
|
||||
@Log(title = "用户授权" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(UserAuth userAuth) {
|
||||
List<UserAuth> list = userAuthService.selectUserAuthList(userAuth, false);
|
||||
ExcelUtil<UserAuth> util = new ExcelUtil<UserAuth>(UserAuth.class);
|
||||
return util.exportExcel(list, "auth" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户授权详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(userAuthService.selectUserAuthById(id, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户授权详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:user-query')" )
|
||||
@GetMapping(value = "/user/{id}" )
|
||||
public AjaxResult userGetInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(userAuthService.selectUserAuthById(id, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户授权
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:add')" )
|
||||
@Log(title = "用户授权" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UserAuth userAuth) {
|
||||
return toAjax(userAuthService.insertUserAuth(userAuth, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户授权
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:user-add')" )
|
||||
@Log(title = "用户授权" , businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user" )
|
||||
public AjaxResult userAdd(@RequestBody UserAuth userAuth) {
|
||||
return toAjax(userAuthService.insertUserAuth(userAuth, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户授权
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:edit')" )
|
||||
@Log(title = "用户授权" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UserAuth userAuth) {
|
||||
return toAjax(userAuthService.updateUserAuth(userAuth, false));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:user-edit')" )
|
||||
@Log(title = "用户授权" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user" )
|
||||
public AjaxResult userEdit(@RequestBody UserAuth userAuth) {
|
||||
return toAjax(userAuthService.updateUserAuth(userAuth, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户授权
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:remove')" )
|
||||
@Log(title = "用户授权" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(userAuthService.deleteUserAuthByIds(ids, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户授权
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:auth:user-remove')" )
|
||||
@Log(title = "用户授权" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}" )
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids) {
|
||||
return toAjax(userAuthService.deleteUserAuthByIds(ids, true));
|
||||
}
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.select.Ids;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.Web3Wallet;
|
||||
import com.ruoyi.system.domain.Web3WalletPlus;
|
||||
import com.ruoyi.system.service.IWeb3WalletService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 钱包管理Controller
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/wallet" )
|
||||
public class Web3WalletController extends BaseController {
|
||||
@Autowired
|
||||
private IWeb3WalletService web3WalletService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:getByIds')" )
|
||||
@PostMapping("/getByIds" )
|
||||
public AjaxResult getByIds(@RequestBody Ids ids) {
|
||||
List<Web3WalletPlus> list = web3WalletService.getByIds(ids.getLongIds(), false, Web3WalletPlus::getUsdtBalance, Web3WalletPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:user-getByIds')" )
|
||||
@PostMapping("/user/getByIds" )
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids) {
|
||||
List<Web3WalletPlus> list = web3WalletService.getByIds(ids.getLongIds(), true, Web3WalletPlus::getUsdtBalance, Web3WalletPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钱包管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:list')" )
|
||||
@GetMapping("/list" )
|
||||
public TableDataInfo list(Web3Wallet web3Wallet) {
|
||||
startPage();
|
||||
List<Web3Wallet> list = web3WalletService.selectWeb3WalletList(web3Wallet, false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钱包管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:user-list')" )
|
||||
@GetMapping("/user/list" )
|
||||
public TableDataInfo userList(Web3Wallet web3Wallet) {
|
||||
startPage();
|
||||
List<Web3Wallet> list = web3WalletService.selectWeb3WalletList(web3Wallet, true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出钱包管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:export')" )
|
||||
@Log(title = "钱包管理" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(Web3Wallet web3Wallet) {
|
||||
List<Web3Wallet> list = web3WalletService.selectWeb3WalletList(web3Wallet, false);
|
||||
ExcelUtil<Web3Wallet> util = new ExcelUtil<Web3Wallet>(Web3Wallet.class);
|
||||
return util.exportExcel(list, "wallet" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取钱包管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(web3WalletService.selectWeb3WalletById(id, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取钱包管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:user-query')" )
|
||||
@GetMapping(value = "/user/{id}" )
|
||||
public AjaxResult userGetInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(web3WalletService.selectWeb3WalletById(id, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钱包管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:add')" )
|
||||
@Log(title = "钱包管理" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Web3Wallet web3Wallet) {
|
||||
return toAjax(web3WalletService.insertWeb3Wallet(web3Wallet, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钱包管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:user-add')" )
|
||||
@Log(title = "钱包管理" , businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user" )
|
||||
public AjaxResult userAdd(@RequestBody Web3Wallet web3Wallet) {
|
||||
return toAjax(web3WalletService.insertWeb3Wallet(web3Wallet, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改钱包管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:edit')" )
|
||||
@Log(title = "钱包管理" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Web3Wallet web3Wallet) {
|
||||
return toAjax(web3WalletService.updateWeb3Wallet(web3Wallet, false));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:user-edit')" )
|
||||
@Log(title = "钱包管理" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user" )
|
||||
public AjaxResult userEdit(@RequestBody Web3Wallet web3Wallet) {
|
||||
return toAjax(web3WalletService.updateWeb3Wallet(web3Wallet, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钱包管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:remove')" )
|
||||
@Log(title = "钱包管理" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(web3WalletService.deleteWeb3WalletByIds(ids, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钱包管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:wallet:user-remove')" )
|
||||
@Log(title = "钱包管理" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}" )
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids) {
|
||||
return toAjax(web3WalletService.deleteWeb3WalletByIds(ids, true));
|
||||
}
|
||||
}
|
||||
@@ -1,168 +0,0 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 资金流水对象 usdt_fund_flow
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public class UsdtFundFlow extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 订单ID */
|
||||
@Excel(name = "订单ID")
|
||||
private Long orderId;
|
||||
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
private Long appId;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
|
||||
/** 操作金额 */
|
||||
@Excel(name = "操作金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 操作类型 */
|
||||
@Excel(name = "操作类型")
|
||||
private Integer opType;
|
||||
|
||||
/** Token地址 */
|
||||
@Excel(name = "Token地址")
|
||||
private String token;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setOpType(Integer opType)
|
||||
{
|
||||
this.opType = opType;
|
||||
}
|
||||
|
||||
public Integer getOpType()
|
||||
{
|
||||
return opType;
|
||||
}
|
||||
public void setToken(String token)
|
||||
{
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getToken()
|
||||
{
|
||||
return token;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("userId", getUserId())
|
||||
.append("appId", getAppId())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("amount", getAmount())
|
||||
.append("opType", getOpType())
|
||||
.append("token", getToken())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* 资金流水对象 usdt_fund_flow
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@TableName(value = "usdt_fund_flow")
|
||||
public class UsdtFundFlowPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.INPUT)
|
||||
private Long id;
|
||||
/** 订单ID */
|
||||
@Excel(name = "订单ID")
|
||||
private Long orderId;
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
private Long appId;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
/** 操作金额 */
|
||||
@Excel(name = "操作金额")
|
||||
private BigDecimal amount;
|
||||
/** 操作类型 */
|
||||
@Excel(name = "操作类型 操作类型 0 商户收入 1 平台抽佣 2 商户归集提现金额")
|
||||
private Integer opType;
|
||||
/** Token地址 */
|
||||
@Excel(name = "Token地址")
|
||||
private String token;
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setOpType(Integer opType)
|
||||
{
|
||||
this.opType = opType;
|
||||
}
|
||||
|
||||
public Integer getOpType()
|
||||
{
|
||||
return opType;
|
||||
}
|
||||
public void setToken(String token)
|
||||
{
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getToken()
|
||||
{
|
||||
return token;
|
||||
}
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("userId", getUserId())
|
||||
.append("appId", getAppId())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("amount", getAmount())
|
||||
.append("opType", getOpType())
|
||||
.append("token", getToken())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -90,6 +90,16 @@ public class UsdtOrders extends BaseEntity
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
|
||||
private Integer orderType;
|
||||
|
||||
public Integer getOrderType() {
|
||||
return orderType;
|
||||
}
|
||||
|
||||
public void setOrderType(Integer orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
||||
@@ -79,6 +79,18 @@ public class UsdtOrdersPlus implements Serializable
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
|
||||
@Excel(name = "订单类型")
|
||||
private Integer orderType;
|
||||
|
||||
public Integer getOrderType() {
|
||||
return orderType;
|
||||
}
|
||||
|
||||
public void setOrderType(Integer orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
||||
-154
@@ -1,154 +0,0 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 商户配置对象 usdt_user_settlement_configuration
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public class UsdtUserSettlementConfiguration extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 佣金比例 */
|
||||
@Excel(name = "佣金比例")
|
||||
private BigDecimal commissionRate;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
|
||||
/** 提现手续费 */
|
||||
@Excel(name = "提现手续费")
|
||||
private BigDecimal withdrawalFee;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long status;
|
||||
|
||||
/** 预留配置 */
|
||||
@Excel(name = "预留配置")
|
||||
private String extInfo;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setCommissionRate(BigDecimal commissionRate)
|
||||
{
|
||||
this.commissionRate = commissionRate;
|
||||
}
|
||||
|
||||
public BigDecimal getCommissionRate()
|
||||
{
|
||||
return commissionRate;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setWithdrawalFee(BigDecimal withdrawalFee)
|
||||
{
|
||||
this.withdrawalFee = withdrawalFee;
|
||||
}
|
||||
|
||||
public BigDecimal getWithdrawalFee()
|
||||
{
|
||||
return withdrawalFee;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setExtInfo(String extInfo)
|
||||
{
|
||||
this.extInfo = extInfo;
|
||||
}
|
||||
|
||||
public String getExtInfo()
|
||||
{
|
||||
return extInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("commissionRate", getCommissionRate())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("withdrawalFee", getWithdrawalFee())
|
||||
.append("status", getStatus())
|
||||
.append("extInfo", getExtInfo())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
-164
@@ -1,164 +0,0 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* 商户配置对象 usdt_user_settlement_configuration
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@TableName(value = "usdt_user_settlement_configuration")
|
||||
public class UsdtUserSettlementConfigurationPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.INPUT)
|
||||
private Long id;
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
/** 佣金比例 */
|
||||
@Excel(name = "佣金比例")
|
||||
private BigDecimal commissionRate;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
/** 提现手续费 */
|
||||
@Excel(name = "提现手续费")
|
||||
private BigDecimal withdrawalFee;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long status;
|
||||
/** 预留配置 */
|
||||
@Excel(name = "预留配置")
|
||||
private String extInfo;
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setCommissionRate(BigDecimal commissionRate)
|
||||
{
|
||||
this.commissionRate = commissionRate;
|
||||
}
|
||||
|
||||
public BigDecimal getCommissionRate()
|
||||
{
|
||||
return commissionRate;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setWithdrawalFee(BigDecimal withdrawalFee)
|
||||
{
|
||||
this.withdrawalFee = withdrawalFee;
|
||||
}
|
||||
|
||||
public BigDecimal getWithdrawalFee()
|
||||
{
|
||||
return withdrawalFee;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setExtInfo(String extInfo)
|
||||
{
|
||||
this.extInfo = extInfo;
|
||||
}
|
||||
|
||||
public String getExtInfo()
|
||||
{
|
||||
return extInfo;
|
||||
}
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("commissionRate", getCommissionRate())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("withdrawalFee", getWithdrawalFee())
|
||||
.append("status", getStatus())
|
||||
.append("extInfo", getExtInfo())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,180 +0,0 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 用户授权对象 user_auth
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public class UserAuth extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
|
||||
/** 认证类型 */
|
||||
@Excel(name = "认证类型")
|
||||
private Integer authType;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 身份证 */
|
||||
@Excel(name = "身份证")
|
||||
private String idNumber;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
/** 授权状态 */
|
||||
@Excel(name = "授权状态")
|
||||
private Integer authStatus;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
/** 审核人 */
|
||||
@Excel(name = "审核人")
|
||||
private String reviewer;
|
||||
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setAuthType(Integer authType)
|
||||
{
|
||||
this.authType = authType;
|
||||
}
|
||||
|
||||
public Integer getAuthType()
|
||||
{
|
||||
return authType;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setIdNumber(String idNumber)
|
||||
{
|
||||
this.idNumber = idNumber;
|
||||
}
|
||||
|
||||
public String getIdNumber()
|
||||
{
|
||||
return idNumber;
|
||||
}
|
||||
public void setCompanyName(String companyName)
|
||||
{
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCompanyName()
|
||||
{
|
||||
return companyName;
|
||||
}
|
||||
public void setAuthStatus(Integer authStatus)
|
||||
{
|
||||
this.authStatus = authStatus;
|
||||
}
|
||||
|
||||
public Integer getAuthStatus()
|
||||
{
|
||||
return authStatus;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setReviewer(String reviewer)
|
||||
{
|
||||
this.reviewer = reviewer;
|
||||
}
|
||||
|
||||
public String getReviewer()
|
||||
{
|
||||
return reviewer;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("authType", getAuthType())
|
||||
.append("name", getName())
|
||||
.append("idNumber", getIdNumber())
|
||||
.append("companyName", getCompanyName())
|
||||
.append("authStatus", getAuthStatus())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("reviewer", getReviewer())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* 用户授权对象 user_auth
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@TableName(value = "user_auth")
|
||||
public class UserAuthPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@TableId(type = IdType.INPUT)
|
||||
private Long id;
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
/** 认证类型 */
|
||||
@Excel(name = "认证类型")
|
||||
private Integer authType;
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
/** 身份证 */
|
||||
@Excel(name = "身份证")
|
||||
private String idNumber;
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String companyName;
|
||||
/** 授权状态 */
|
||||
@Excel(name = "授权状态")
|
||||
private Integer authStatus;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
/** 审核人 */
|
||||
@Excel(name = "审核人")
|
||||
private String reviewer;
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setAuthType(Integer authType)
|
||||
{
|
||||
this.authType = authType;
|
||||
}
|
||||
|
||||
public Integer getAuthType()
|
||||
{
|
||||
return authType;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setIdNumber(String idNumber)
|
||||
{
|
||||
this.idNumber = idNumber;
|
||||
}
|
||||
|
||||
public String getIdNumber()
|
||||
{
|
||||
return idNumber;
|
||||
}
|
||||
public void setCompanyName(String companyName)
|
||||
{
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCompanyName()
|
||||
{
|
||||
return companyName;
|
||||
}
|
||||
public void setAuthStatus(Integer authStatus)
|
||||
{
|
||||
this.authStatus = authStatus;
|
||||
}
|
||||
|
||||
public Integer getAuthStatus()
|
||||
{
|
||||
return authStatus;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setReviewer(String reviewer)
|
||||
{
|
||||
this.reviewer = reviewer;
|
||||
}
|
||||
|
||||
public String getReviewer()
|
||||
{
|
||||
return reviewer;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("authType", getAuthType())
|
||||
.append("name", getName())
|
||||
.append("idNumber", getIdNumber())
|
||||
.append("companyName", getCompanyName())
|
||||
.append("authStatus", getAuthStatus())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("reviewer", getReviewer())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -9,125 +9,150 @@ import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* token管理对象 wallet_address
|
||||
* 【请填写功能名称】对象 wallet_address
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-30
|
||||
* @date 2026-09-26
|
||||
*/
|
||||
public class WalletAddress extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@Excel(name = "主键")
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** Token */
|
||||
@Excel(name = "Token")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String token;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long status;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date updatedAt;
|
||||
|
||||
/** 删除时间 */
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date deletedAt;
|
||||
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long appId;
|
||||
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long userId;
|
||||
|
||||
/** 密钥 */
|
||||
@Excel(name = "密钥")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String walletUserName;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String tokenIndex;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String tokenKey;
|
||||
@Excel(name = "质押还剩能用的带宽")
|
||||
private Long bandwidthStakedNum;
|
||||
/** usdt余额 */
|
||||
@Excel(name = "usdt余额")
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal usdtBalance;
|
||||
|
||||
/** trx余额 */
|
||||
@Excel(name = "trx余额")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal trxBalance;
|
||||
|
||||
/** 能量-可用 */
|
||||
@Excel(name = "能量-可用")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long energyNum;
|
||||
|
||||
/** 带宽-可用 */
|
||||
@Excel(name = "带宽-可用")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long energyAllNum;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long energyUsedNum;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthNum;
|
||||
|
||||
/** 可以提现usdt金额 */
|
||||
@Excel(name = "可以提现usdt金额")
|
||||
private BigDecimal withdrawUsdtBalance;
|
||||
|
||||
/** 代理给别人能量的trx数量 */
|
||||
@Excel(name = "代理给别人能量的trx数量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long delegatedEnergyTrxNum;
|
||||
|
||||
/** 代理给别人的能量 */
|
||||
@Excel(name = "代理给别人的能量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal delegatedEnergyValue;
|
||||
|
||||
/** 别人代理给我能量的trx数量 */
|
||||
@Excel(name = "别人代理给我能量的trx数量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long acquiredDelegatedEnergyTrxNum;
|
||||
|
||||
/** 别人代理给我的能量 */
|
||||
@Excel(name = "别人代理给我的能量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal acquiredDelegatedEnergyValue;
|
||||
|
||||
/** 代理给别人的带宽trx数量 */
|
||||
@Excel(name = "代理给别人的带宽trx数量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long delegatedBandwidthTrxNum;
|
||||
|
||||
/** 代理给别人的带宽 */
|
||||
@Excel(name = "代理给别人的带宽")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal delegatedBandwidthValue;
|
||||
|
||||
/** 别人代理给我带宽的trx数量 */
|
||||
@Excel(name = "别人代理给我带宽的trx数量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long acquiredDelegatedBandwidthTrxNum;
|
||||
|
||||
/** 别人代理给我的带宽 */
|
||||
@Excel(name = "别人代理给我的带宽")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal acquiredDelegatedBandwidthValue;
|
||||
|
||||
/** 质押的trx数量-不含代理 */
|
||||
@Excel(name = "质押的trx数量-不含代理")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long stakedTrxNum;
|
||||
|
||||
/** 能量质押的trx数量-不含代理 */
|
||||
@Excel(name = "能量质押的trx数量-不含代理")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long energyStakedTrxNum;
|
||||
|
||||
/** 带宽质押的trx数量-不含代理 */
|
||||
@Excel(name = "带宽质押的trx数量-不含代理")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthStakedTrxNum;
|
||||
|
||||
/** 可投票数 */
|
||||
@Excel(name = "可投票数")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long voteNum;
|
||||
|
||||
/** 已经投票数量 */
|
||||
@Excel(name = "已经投票数量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long votedNum;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthStakedNum;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthStakedAllNum;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthFreeNum;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthFreeAllNum;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@@ -142,14 +167,6 @@ public class WalletAddress extends BaseEntity
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public Long getBandwidthStakedNum() {
|
||||
return bandwidthStakedNum;
|
||||
}
|
||||
|
||||
public void setBandwidthStakedNum(Long bandwidthStakedNum) {
|
||||
this.bandwidthStakedNum = bandwidthStakedNum;
|
||||
}
|
||||
|
||||
public String getToken()
|
||||
{
|
||||
return token;
|
||||
@@ -208,9 +225,27 @@ public class WalletAddress extends BaseEntity
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setTokenKey(String key)
|
||||
public void setWalletUserName(String walletUserName)
|
||||
{
|
||||
this.tokenKey = key;
|
||||
this.walletUserName = walletUserName;
|
||||
}
|
||||
|
||||
public String getWalletUserName()
|
||||
{
|
||||
return walletUserName;
|
||||
}
|
||||
public void setTokenIndex(String tokenIndex)
|
||||
{
|
||||
this.tokenIndex = tokenIndex;
|
||||
}
|
||||
|
||||
public String getTokenIndex()
|
||||
{
|
||||
return tokenIndex;
|
||||
}
|
||||
public void setTokenKey(String tokenKey)
|
||||
{
|
||||
this.tokenKey = tokenKey;
|
||||
}
|
||||
|
||||
public String getTokenKey()
|
||||
@@ -244,6 +279,24 @@ public class WalletAddress extends BaseEntity
|
||||
{
|
||||
return energyNum;
|
||||
}
|
||||
public void setEnergyAllNum(Long energyAllNum)
|
||||
{
|
||||
this.energyAllNum = energyAllNum;
|
||||
}
|
||||
|
||||
public Long getEnergyAllNum()
|
||||
{
|
||||
return energyAllNum;
|
||||
}
|
||||
public void setEnergyUsedNum(Long energyUsedNum)
|
||||
{
|
||||
this.energyUsedNum = energyUsedNum;
|
||||
}
|
||||
|
||||
public Long getEnergyUsedNum()
|
||||
{
|
||||
return energyUsedNum;
|
||||
}
|
||||
public void setBandwidthNum(Long bandwidthNum)
|
||||
{
|
||||
this.bandwidthNum = bandwidthNum;
|
||||
@@ -253,15 +306,6 @@ public class WalletAddress extends BaseEntity
|
||||
{
|
||||
return bandwidthNum;
|
||||
}
|
||||
public void setWithdrawUsdtBalance(BigDecimal withdrawUsdtBalance)
|
||||
{
|
||||
this.withdrawUsdtBalance = withdrawUsdtBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getWithdrawUsdtBalance()
|
||||
{
|
||||
return withdrawUsdtBalance;
|
||||
}
|
||||
public void setDelegatedEnergyTrxNum(Long delegatedEnergyTrxNum)
|
||||
{
|
||||
this.delegatedEnergyTrxNum = delegatedEnergyTrxNum;
|
||||
@@ -379,6 +423,42 @@ public class WalletAddress extends BaseEntity
|
||||
{
|
||||
return votedNum;
|
||||
}
|
||||
public void setBandwidthStakedNum(Long bandwidthStakedNum)
|
||||
{
|
||||
this.bandwidthStakedNum = bandwidthStakedNum;
|
||||
}
|
||||
|
||||
public Long getBandwidthStakedNum()
|
||||
{
|
||||
return bandwidthStakedNum;
|
||||
}
|
||||
public void setBandwidthStakedAllNum(Long bandwidthStakedAllNum)
|
||||
{
|
||||
this.bandwidthStakedAllNum = bandwidthStakedAllNum;
|
||||
}
|
||||
|
||||
public Long getBandwidthStakedAllNum()
|
||||
{
|
||||
return bandwidthStakedAllNum;
|
||||
}
|
||||
public void setBandwidthFreeNum(Long bandwidthFreeNum)
|
||||
{
|
||||
this.bandwidthFreeNum = bandwidthFreeNum;
|
||||
}
|
||||
|
||||
public Long getBandwidthFreeNum()
|
||||
{
|
||||
return bandwidthFreeNum;
|
||||
}
|
||||
public void setBandwidthFreeAllNum(Long bandwidthFreeAllNum)
|
||||
{
|
||||
this.bandwidthFreeAllNum = bandwidthFreeAllNum;
|
||||
}
|
||||
|
||||
public Long getBandwidthFreeAllNum()
|
||||
{
|
||||
return bandwidthFreeAllNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@@ -391,12 +471,15 @@ public class WalletAddress extends BaseEntity
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("appId", getAppId())
|
||||
.append("userId", getUserId())
|
||||
.append("walletUserName", getWalletUserName())
|
||||
.append("tokenIndex", getTokenIndex())
|
||||
.append("tokenKey", getTokenKey())
|
||||
.append("usdtBalance", getUsdtBalance())
|
||||
.append("trxBalance", getTrxBalance())
|
||||
.append("energyNum", getEnergyNum())
|
||||
.append("energyAllNum", getEnergyAllNum())
|
||||
.append("energyUsedNum", getEnergyUsedNum())
|
||||
.append("bandwidthNum", getBandwidthNum())
|
||||
.append("withdrawUsdtBalance", getWithdrawUsdtBalance())
|
||||
.append("delegatedEnergyTrxNum", getDelegatedEnergyTrxNum())
|
||||
.append("delegatedEnergyValue", getDelegatedEnergyValue())
|
||||
.append("acquiredDelegatedEnergyTrxNum", getAcquiredDelegatedEnergyTrxNum())
|
||||
@@ -410,6 +493,10 @@ public class WalletAddress extends BaseEntity
|
||||
.append("bandwidthStakedTrxNum", getBandwidthStakedTrxNum())
|
||||
.append("voteNum", getVoteNum())
|
||||
.append("votedNum", getVotedNum())
|
||||
.append("bandwidthStakedNum", getBandwidthStakedNum())
|
||||
.append("bandwidthStakedAllNum", getBandwidthStakedAllNum())
|
||||
.append("bandwidthFreeNum", getBandwidthFreeNum())
|
||||
.append("bandwidthFreeAllNum", getBandwidthFreeAllNum())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,6 @@ package com.ruoyi.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
@@ -14,101 +11,117 @@ import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* token管理对象 wallet_address
|
||||
* 【请填写功能名称】对象 wallet_address
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-30
|
||||
* @date 2026-09-26
|
||||
*/
|
||||
@TableName(value = "wallet_address")
|
||||
public class WalletAddressPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.INPUT)
|
||||
@Excel(name = "主键")
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
/** Token */
|
||||
@Excel(name = "Token")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String token;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long status;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date createdAt;
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date updatedAt;
|
||||
/** 删除时间 */
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date deletedAt;
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long appId;
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long userId;
|
||||
/** 密钥 */
|
||||
@Excel(name = "密钥")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String walletUserName;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String tokenIndex;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String tokenKey;
|
||||
/** usdt余额 */
|
||||
@Excel(name = "usdt余额")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal usdtBalance;
|
||||
/** trx余额 */
|
||||
@Excel(name = "trx余额")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal trxBalance;
|
||||
/** 能量-可用 */
|
||||
@Excel(name = "能量-可用")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long energyNum;
|
||||
@Excel(name = "质押还剩能用的带宽")
|
||||
private Long bandwidthStakedNum;
|
||||
/** 带宽-可用 */
|
||||
@Excel(name = "带宽-可用")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long energyAllNum;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long energyUsedNum;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthNum;
|
||||
/** 可以提现usdt金额 */
|
||||
@Excel(name = "可以提现usdt金额")
|
||||
private BigDecimal withdrawUsdtBalance;
|
||||
/** 代理给别人能量的trx数量 */
|
||||
@Excel(name = "代理给别人能量的trx数量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long delegatedEnergyTrxNum;
|
||||
/** 代理给别人的能量 */
|
||||
@Excel(name = "代理给别人的能量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal delegatedEnergyValue;
|
||||
/** 别人代理给我能量的trx数量 */
|
||||
@Excel(name = "别人代理给我能量的trx数量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long acquiredDelegatedEnergyTrxNum;
|
||||
/** 别人代理给我的能量 */
|
||||
@Excel(name = "别人代理给我的能量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal acquiredDelegatedEnergyValue;
|
||||
/** 代理给别人的带宽trx数量 */
|
||||
@Excel(name = "代理给别人的带宽trx数量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long delegatedBandwidthTrxNum;
|
||||
/** 代理给别人的带宽 */
|
||||
@Excel(name = "代理给别人的带宽")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal delegatedBandwidthValue;
|
||||
/** 别人代理给我带宽的trx数量 */
|
||||
@Excel(name = "别人代理给我带宽的trx数量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long acquiredDelegatedBandwidthTrxNum;
|
||||
/** 别人代理给我的带宽 */
|
||||
@Excel(name = "别人代理给我的带宽")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal acquiredDelegatedBandwidthValue;
|
||||
/** 质押的trx数量-不含代理 */
|
||||
@Excel(name = "质押的trx数量-不含代理")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long stakedTrxNum;
|
||||
/** 能量质押的trx数量-不含代理 */
|
||||
@Excel(name = "能量质押的trx数量-不含代理")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long energyStakedTrxNum;
|
||||
/** 带宽质押的trx数量-不含代理 */
|
||||
@Excel(name = "带宽质押的trx数量-不含代理")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthStakedTrxNum;
|
||||
/** 可投票数 */
|
||||
@Excel(name = "可投票数")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long voteNum;
|
||||
/** 已经投票数量 */
|
||||
@Excel(name = "已经投票数量")
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long votedNum;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthStakedNum;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthStakedAllNum;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthFreeNum;
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long bandwidthFreeAllNum;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@@ -141,14 +154,6 @@ public class WalletAddressPlus implements Serializable
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Long getBandwidthStakedNum() {
|
||||
return bandwidthStakedNum;
|
||||
}
|
||||
|
||||
public void setBandwidthStakedNum(Long bandwidthStakedNum) {
|
||||
this.bandwidthStakedNum = bandwidthStakedNum;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
@@ -189,9 +194,27 @@ public class WalletAddressPlus implements Serializable
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setTokenKey(String key)
|
||||
public void setWalletUserName(String walletUserName)
|
||||
{
|
||||
this.tokenKey = key;
|
||||
this.walletUserName = walletUserName;
|
||||
}
|
||||
|
||||
public String getWalletUserName()
|
||||
{
|
||||
return walletUserName;
|
||||
}
|
||||
public void setTokenIndex(String tokenIndex)
|
||||
{
|
||||
this.tokenIndex = tokenIndex;
|
||||
}
|
||||
|
||||
public String getTokenIndex()
|
||||
{
|
||||
return tokenIndex;
|
||||
}
|
||||
public void setTokenKey(String tokenKey)
|
||||
{
|
||||
this.tokenKey = tokenKey;
|
||||
}
|
||||
|
||||
public String getTokenKey()
|
||||
@@ -225,6 +248,24 @@ public class WalletAddressPlus implements Serializable
|
||||
{
|
||||
return energyNum;
|
||||
}
|
||||
public void setEnergyAllNum(Long energyAllNum)
|
||||
{
|
||||
this.energyAllNum = energyAllNum;
|
||||
}
|
||||
|
||||
public Long getEnergyAllNum()
|
||||
{
|
||||
return energyAllNum;
|
||||
}
|
||||
public void setEnergyUsedNum(Long energyUsedNum)
|
||||
{
|
||||
this.energyUsedNum = energyUsedNum;
|
||||
}
|
||||
|
||||
public Long getEnergyUsedNum()
|
||||
{
|
||||
return energyUsedNum;
|
||||
}
|
||||
public void setBandwidthNum(Long bandwidthNum)
|
||||
{
|
||||
this.bandwidthNum = bandwidthNum;
|
||||
@@ -234,15 +275,6 @@ public class WalletAddressPlus implements Serializable
|
||||
{
|
||||
return bandwidthNum;
|
||||
}
|
||||
public void setWithdrawUsdtBalance(BigDecimal withdrawUsdtBalance)
|
||||
{
|
||||
this.withdrawUsdtBalance = withdrawUsdtBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getWithdrawUsdtBalance()
|
||||
{
|
||||
return withdrawUsdtBalance;
|
||||
}
|
||||
public void setDelegatedEnergyTrxNum(Long delegatedEnergyTrxNum)
|
||||
{
|
||||
this.delegatedEnergyTrxNum = delegatedEnergyTrxNum;
|
||||
@@ -360,6 +392,42 @@ public class WalletAddressPlus implements Serializable
|
||||
{
|
||||
return votedNum;
|
||||
}
|
||||
public void setBandwidthStakedNum(Long bandwidthStakedNum)
|
||||
{
|
||||
this.bandwidthStakedNum = bandwidthStakedNum;
|
||||
}
|
||||
|
||||
public Long getBandwidthStakedNum()
|
||||
{
|
||||
return bandwidthStakedNum;
|
||||
}
|
||||
public void setBandwidthStakedAllNum(Long bandwidthStakedAllNum)
|
||||
{
|
||||
this.bandwidthStakedAllNum = bandwidthStakedAllNum;
|
||||
}
|
||||
|
||||
public Long getBandwidthStakedAllNum()
|
||||
{
|
||||
return bandwidthStakedAllNum;
|
||||
}
|
||||
public void setBandwidthFreeNum(Long bandwidthFreeNum)
|
||||
{
|
||||
this.bandwidthFreeNum = bandwidthFreeNum;
|
||||
}
|
||||
|
||||
public Long getBandwidthFreeNum()
|
||||
{
|
||||
return bandwidthFreeNum;
|
||||
}
|
||||
public void setBandwidthFreeAllNum(Long bandwidthFreeAllNum)
|
||||
{
|
||||
this.bandwidthFreeAllNum = bandwidthFreeAllNum;
|
||||
}
|
||||
|
||||
public Long getBandwidthFreeAllNum()
|
||||
{
|
||||
return bandwidthFreeAllNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@@ -372,12 +440,15 @@ public class WalletAddressPlus implements Serializable
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("appId", getAppId())
|
||||
.append("userId", getUserId())
|
||||
.append("walletUserName", getWalletUserName())
|
||||
.append("tokenIndex", getTokenIndex())
|
||||
.append("tokenKey", getTokenKey())
|
||||
.append("usdtBalance", getUsdtBalance())
|
||||
.append("trxBalance", getTrxBalance())
|
||||
.append("energyNum", getEnergyNum())
|
||||
.append("energyAllNum", getEnergyAllNum())
|
||||
.append("energyUsedNum", getEnergyUsedNum())
|
||||
.append("bandwidthNum", getBandwidthNum())
|
||||
.append("withdrawUsdtBalance", getWithdrawUsdtBalance())
|
||||
.append("delegatedEnergyTrxNum", getDelegatedEnergyTrxNum())
|
||||
.append("delegatedEnergyValue", getDelegatedEnergyValue())
|
||||
.append("acquiredDelegatedEnergyTrxNum", getAcquiredDelegatedEnergyTrxNum())
|
||||
@@ -391,6 +462,10 @@ public class WalletAddressPlus implements Serializable
|
||||
.append("bandwidthStakedTrxNum", getBandwidthStakedTrxNum())
|
||||
.append("voteNum", getVoteNum())
|
||||
.append("votedNum", getVotedNum())
|
||||
.append("bandwidthStakedNum", getBandwidthStakedNum())
|
||||
.append("bandwidthStakedAllNum", getBandwidthStakedAllNum())
|
||||
.append("bandwidthFreeNum", getBandwidthFreeNum())
|
||||
.append("bandwidthFreeAllNum", getBandwidthFreeAllNum())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 钱包管理对象 web3_wallet
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public class Web3Wallet extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户 */
|
||||
private Long id;
|
||||
|
||||
/** usdt */
|
||||
@Excel(name = "usdt")
|
||||
private BigDecimal usdtBalance;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
|
||||
/** trx */
|
||||
@Excel(name = "trx")
|
||||
private BigDecimal trxBalance;
|
||||
|
||||
/** eth */
|
||||
@Excel(name = "eth")
|
||||
private BigDecimal ethBalance;
|
||||
|
||||
/** 密码 */
|
||||
@Excel(name = "密码")
|
||||
private String password;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUsdtBalance(BigDecimal usdtBalance)
|
||||
{
|
||||
this.usdtBalance = usdtBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getUsdtBalance()
|
||||
{
|
||||
return usdtBalance;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setTrxBalance(BigDecimal trxBalance)
|
||||
{
|
||||
this.trxBalance = trxBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getTrxBalance()
|
||||
{
|
||||
return trxBalance;
|
||||
}
|
||||
public void setEthBalance(BigDecimal ethBalance)
|
||||
{
|
||||
this.ethBalance = ethBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getEthBalance()
|
||||
{
|
||||
return ethBalance;
|
||||
}
|
||||
public void setPassword(String password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("usdtBalance", getUsdtBalance())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("trxBalance", getTrxBalance())
|
||||
.append("ethBalance", getEthBalance())
|
||||
.append("password", getPassword())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* 钱包管理对象 web3_wallet
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@TableName(value = "web3_wallet")
|
||||
public class Web3WalletPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户 */
|
||||
@TableId(type = IdType.INPUT)
|
||||
private Long id;
|
||||
/** usdt */
|
||||
@Excel(name = "usdt")
|
||||
private BigDecimal usdtBalance;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
/** trx */
|
||||
@Excel(name = "trx")
|
||||
private BigDecimal trxBalance;
|
||||
/** eth */
|
||||
@Excel(name = "eth")
|
||||
private BigDecimal ethBalance;
|
||||
/** 密码 */
|
||||
@Excel(name = "密码")
|
||||
private String password;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUsdtBalance(BigDecimal usdtBalance)
|
||||
{
|
||||
this.usdtBalance = usdtBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getUsdtBalance()
|
||||
{
|
||||
return usdtBalance;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setTrxBalance(BigDecimal trxBalance)
|
||||
{
|
||||
this.trxBalance = trxBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getTrxBalance()
|
||||
{
|
||||
return trxBalance;
|
||||
}
|
||||
public void setEthBalance(BigDecimal ethBalance)
|
||||
{
|
||||
this.ethBalance = ethBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getEthBalance()
|
||||
{
|
||||
return ethBalance;
|
||||
}
|
||||
public void setPassword(String password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("usdtBalance", getUsdtBalance())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("trxBalance", getTrxBalance())
|
||||
.append("ethBalance", getEthBalance())
|
||||
.append("password", getPassword())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.system.domain.UsdtFundFlow;
|
||||
import com.ruoyi.system.domain.UsdtFundFlowPlus;
|
||||
|
||||
/**
|
||||
* 资金流水Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface UsdtFundFlowMapper extends BaseMapper<UsdtFundFlowPlus>
|
||||
{
|
||||
/**
|
||||
* 查询资金流水
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 资金流水
|
||||
*/
|
||||
public UsdtFundFlow selectUsdtFundFlowById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资金流水列表
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 资金流水集合
|
||||
*/
|
||||
public List<UsdtFundFlow> selectUsdtFundFlowList(UsdtFundFlow usdtFundFlow);
|
||||
|
||||
/**
|
||||
* 新增资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUsdtFundFlow(UsdtFundFlow usdtFundFlow);
|
||||
|
||||
/**
|
||||
* 修改资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUsdtFundFlow(UsdtFundFlow usdtFundFlow);
|
||||
|
||||
/**
|
||||
* 删除资金流水
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtFundFlowById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除资金流水
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtFundFlowByIds(Long[] ids);
|
||||
}
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfiguration;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus;
|
||||
|
||||
/**
|
||||
* 商户配置Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface UsdtUserSettlementConfigurationMapper extends BaseMapper<UsdtUserSettlementConfigurationPlus>
|
||||
{
|
||||
/**
|
||||
* 查询商户配置
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 商户配置
|
||||
*/
|
||||
public UsdtUserSettlementConfiguration selectUsdtUserSettlementConfigurationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商户配置列表
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 商户配置集合
|
||||
*/
|
||||
public List<UsdtUserSettlementConfiguration> selectUsdtUserSettlementConfigurationList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration);
|
||||
|
||||
/**
|
||||
* 新增商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration);
|
||||
|
||||
/**
|
||||
* 修改商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration);
|
||||
|
||||
/**
|
||||
* 删除商户配置
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtUserSettlementConfigurationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除商户配置
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtUserSettlementConfigurationByIds(Long[] ids);
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.system.domain.UserAuth;
|
||||
import com.ruoyi.system.domain.UserAuthPlus;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-20
|
||||
*/
|
||||
public interface UserAuthMapper extends BaseMapper<UserAuthPlus>
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public UserAuth selectUserAuthById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param userAuth 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<UserAuth> selectUserAuthList(UserAuth userAuth);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param userAuth 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserAuth(UserAuth userAuth);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param userAuth 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserAuth(UserAuth userAuth);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserAuthById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserAuthByIds(Long[] ids);
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.system.domain.Web3Wallet;
|
||||
import com.ruoyi.system.domain.Web3WalletPlus;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-21
|
||||
*/
|
||||
public interface Web3WalletMapper extends BaseMapper<Web3WalletPlus>
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public Web3Wallet selectWeb3WalletById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param web3Wallet 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<Web3Wallet> selectWeb3WalletList(Web3Wallet web3Wallet);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param web3Wallet 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWeb3Wallet(Web3Wallet web3Wallet);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param web3Wallet 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWeb3Wallet(Web3Wallet web3Wallet);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWeb3WalletById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWeb3WalletByIds(Long[] ids);
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.system.domain.UsdtFundFlow;
|
||||
import com.ruoyi.system.domain.UsdtFundFlowPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 资金流水Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface IUsdtFundFlowService extends IService<UsdtFundFlowPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询资金流水
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 资金流水
|
||||
*/
|
||||
public UsdtFundFlow selectUsdtFundFlowById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询资金流水列表
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 资金流水集合
|
||||
*/
|
||||
public List<UsdtFundFlow> selectUsdtFundFlowList(UsdtFundFlow usdtFundFlow,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除资金流水
|
||||
*
|
||||
* @param ids 需要删除的资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtFundFlowByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除资金流水信息
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtFundFlowById(Long id,boolean isUser);
|
||||
|
||||
List<UsdtFundFlowPlus> getByIds(List<Long> ids,boolean isUser, SFunction<UsdtFundFlowPlus, ?>... columns);
|
||||
|
||||
UsdtFundFlowPlus getById(Long id, SFunction<UsdtFundFlowPlus, ?>... columns);
|
||||
|
||||
Map<Long, UsdtFundFlowPlus> getMapByIds(List<Long> ids, SFunction<UsdtFundFlowPlus, ?>... columns);
|
||||
|
||||
List<UsdtFundFlowPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, UsdtFundFlowPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
-93
@@ -1,93 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfiguration;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 商户配置Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface IUsdtUserSettlementConfigurationService extends IService<UsdtUserSettlementConfigurationPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询商户配置
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 商户配置
|
||||
*/
|
||||
public UsdtUserSettlementConfiguration selectUsdtUserSettlementConfigurationById(Long id,boolean isUser);
|
||||
|
||||
|
||||
UsdtUserSettlementConfigurationPlus getByUserId(Long userId);
|
||||
/**
|
||||
* 查询商户配置列表
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 商户配置集合
|
||||
*/
|
||||
public List<UsdtUserSettlementConfiguration> selectUsdtUserSettlementConfigurationList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除商户配置
|
||||
*
|
||||
* @param ids 需要删除的商户配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtUserSettlementConfigurationByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除商户配置信息
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtUserSettlementConfigurationById(Long id,boolean isUser);
|
||||
|
||||
List<UsdtUserSettlementConfigurationPlus> getByIds(List<Long> ids,boolean isUser, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns);
|
||||
|
||||
UsdtUserSettlementConfigurationPlus getById(Long id, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns);
|
||||
|
||||
Map<Long, UsdtUserSettlementConfigurationPlus> getMapByIds(List<Long> ids, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns);
|
||||
|
||||
List<UsdtUserSettlementConfigurationPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, UsdtUserSettlementConfigurationPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.UserAuth;
|
||||
import com.ruoyi.system.domain.UserAuthPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
/**
|
||||
* 用户授权Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IUserAuthService extends IService<UserAuthPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询用户授权
|
||||
*
|
||||
* @param id 用户授权ID
|
||||
* @return 用户授权
|
||||
*/
|
||||
public UserAuth selectUserAuthById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询用户授权列表
|
||||
*
|
||||
* @param userAuth 用户授权
|
||||
* @return 用户授权集合
|
||||
*/
|
||||
public List<UserAuth> selectUserAuthList(UserAuth userAuth,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增用户授权
|
||||
*
|
||||
* @param userAuth 用户授权
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserAuth(UserAuth userAuth,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改用户授权
|
||||
*
|
||||
* @param userAuth 用户授权
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserAuth(UserAuth userAuth,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除用户授权
|
||||
*
|
||||
* @param ids 需要删除的用户授权ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserAuthByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除用户授权信息
|
||||
*
|
||||
* @param id 用户授权ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserAuthById(Long id,boolean isUser);
|
||||
|
||||
List<UserAuthPlus> getByIds(List<Long> ids,boolean isUser, SFunction<UserAuthPlus, ?>... columns);
|
||||
|
||||
UserAuthPlus getById(Long id, SFunction<UserAuthPlus, ?>... columns);
|
||||
|
||||
Map<Long, UserAuthPlus> getMapByIds(List<Long> ids, SFunction<UserAuthPlus, ?>... columns);
|
||||
|
||||
List<UserAuthPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, UserAuthPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
@@ -77,7 +77,6 @@ public interface IWalletAddressService extends IService<WalletAddressPlus>
|
||||
|
||||
Map<Long, WalletAddressPlus> getMapByIds(List<Long> ids, SFunction<WalletAddressPlus, ?>... columns);
|
||||
|
||||
boolean updateWithdrawUsdtBalanceById(Long id, BigDecimal withdrawUsdtBalance);
|
||||
|
||||
List<WalletAddressPlus> getByIds(List<Long> ids);
|
||||
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.Web3Wallet;
|
||||
import com.ruoyi.system.domain.Web3WalletPlus;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
/**
|
||||
* 钱包管理Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWeb3WalletService extends IService<Web3WalletPlus>
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询钱包管理
|
||||
*
|
||||
* @param id 钱包管理ID
|
||||
* @return 钱包管理
|
||||
*/
|
||||
public Web3Wallet selectWeb3WalletById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询钱包管理列表
|
||||
*
|
||||
* @param web3Wallet 钱包管理
|
||||
* @return 钱包管理集合
|
||||
*/
|
||||
public List<Web3Wallet> selectWeb3WalletList(Web3Wallet web3Wallet,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增钱包管理
|
||||
*
|
||||
* @param web3Wallet 钱包管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWeb3Wallet(Web3Wallet web3Wallet,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改钱包管理
|
||||
*
|
||||
* @param web3Wallet 钱包管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWeb3Wallet(Web3Wallet web3Wallet,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除钱包管理
|
||||
*
|
||||
* @param ids 需要删除的钱包管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWeb3WalletByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除钱包管理信息
|
||||
*
|
||||
* @param id 钱包管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWeb3WalletById(Long id,boolean isUser);
|
||||
|
||||
List<Web3WalletPlus> getByIds(List<Long> ids,boolean isUser, SFunction<Web3WalletPlus, ?>... columns);
|
||||
|
||||
Web3WalletPlus getById(Long id, SFunction<Web3WalletPlus, ?>... columns);
|
||||
|
||||
Map<Long, Web3WalletPlus> getMapByIds(List<Long> ids, SFunction<Web3WalletPlus, ?>... columns);
|
||||
|
||||
List<Web3WalletPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, Web3WalletPlus> getMapByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* @param field sum 字段
|
||||
* @param where 条件
|
||||
* @param tClass 返回类型
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
<T> T sum(String field, String where, Class<T> tClass);
|
||||
|
||||
Long count(String where);
|
||||
|
||||
<T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass);
|
||||
}
|
||||
+1
-122
@@ -39,8 +39,6 @@ public class UsdtAggregationTaskServiceImpl extends ServiceImpl<UsdtAggregationT
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
@Autowired
|
||||
private IWeb3WalletService web3WalletService;
|
||||
@Autowired
|
||||
private IWalletAddressService walletAddressService;
|
||||
|
||||
@Override
|
||||
@@ -240,126 +238,7 @@ public class UsdtAggregationTaskServiceImpl extends ServiceImpl<UsdtAggregationT
|
||||
usdtAggregationTask.setUpdatedAt(DateUtils.getNowDate());
|
||||
if (isUser) {
|
||||
usdtAggregationTask.setUserId(SecurityUtils.getUserId());
|
||||
if (usdtAggregationTask.getAppId() == null) {
|
||||
throw new RuntimeException("AppId为空");
|
||||
}
|
||||
AppsPlus apps = this.appsService.getById(usdtAggregationTask.getAppId());
|
||||
if (apps == null) {
|
||||
throw new RuntimeException("App为空");
|
||||
}
|
||||
if (SecurityUtils.getUserId() == null) {
|
||||
throw new RuntimeException("没有登入");
|
||||
}
|
||||
if (usdtAggregationTask.getExeTime() == null) {
|
||||
throw new RuntimeException("执行时间为空");
|
||||
}
|
||||
if (apps.getUserId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("没有权限");
|
||||
}
|
||||
Web3WalletPlus web3WalletPlus = web3WalletService.getById(SecurityUtils.getUserId());
|
||||
if (web3WalletPlus.getUsdtBalance().subtract(usdtAggregationTask.getTotalAmount()).longValue() < 0) {
|
||||
throw new RuntimeException("超过账户金额");
|
||||
}
|
||||
if (usdtAggregationTask.getTaskName() == null) {
|
||||
throw new RuntimeException("任务名称为空");
|
||||
}
|
||||
if (usdtAggregationTask.getTotalAmount() == null || usdtAggregationTask.getTotalAmount().longValue() <= 0) {
|
||||
throw new RuntimeException("归集金额为空");
|
||||
}
|
||||
if (usdtAggregationTask.getExeTime() == null) {
|
||||
usdtAggregationTask.setExeTime(DateUtils.getNowDate());
|
||||
}
|
||||
usdtAggregationTask.setUserId(SecurityUtils.getUserId());
|
||||
usdtAggregationTask.setDistTokenAddress(apps.getDistTokenAddress());
|
||||
usdtAggregationTask.setVerifyStatus(1);
|
||||
usdtAggregationTask.setStatus(0);
|
||||
List<WalletAddressPlus> list = walletAddressService.getListByAppId(usdtAggregationTask.getAppId());
|
||||
list.sort(new Comparator<WalletAddressPlus>() {
|
||||
@Override
|
||||
public int compare(WalletAddressPlus p1, WalletAddressPlus p2) {
|
||||
return Double.compare(p2.getWithdrawUsdtBalance().doubleValue(), p1.getWithdrawUsdtBalance().doubleValue()); // 倒序排序
|
||||
}
|
||||
});
|
||||
String willTxAmount = this.sum("total_amount","status = 0 and verify_status=1 and user_id="+usdtAggregationTask.getUserId(),String.class);
|
||||
if(willTxAmount == null){
|
||||
willTxAmount ="0.00";
|
||||
}
|
||||
if(new BigDecimal(willTxAmount).add(usdtAggregationTask.getTotalAmount())
|
||||
.subtract(web3WalletPlus.getUsdtBalance()).doubleValue()>0){
|
||||
throw new RuntimeException("待提现金额超过账户金额");
|
||||
}
|
||||
LambdaQueryWrapper<UsdtAggregationTaskPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtAggregationTaskPlus>()
|
||||
.eq(UsdtAggregationTaskPlus::getAppId, usdtAggregationTask.getAppId())
|
||||
.eq(UsdtAggregationTaskPlus::getUserId,usdtAggregationTask.getUserId())
|
||||
.eq(UsdtAggregationTaskPlus::getStatus,0);
|
||||
if(count(lambdaQueryWrapper) > 0){
|
||||
throw new RuntimeException("存在正在提现的记录");
|
||||
}
|
||||
|
||||
this.usdtAggregationTaskMapper.insertUsdtAggregationTask(usdtAggregationTask);
|
||||
BigDecimal totalAmount = usdtAggregationTask.getTotalAmount();
|
||||
List<UsdtAggregationTaskItemPlus> usdtAggregationTaskItems = new ArrayList<>();
|
||||
BigDecimal hasTxItem = new BigDecimal(0);
|
||||
for (WalletAddressPlus item : list) {
|
||||
if (item.getWithdrawUsdtBalance() == null) {
|
||||
item.setWithdrawUsdtBalance(new BigDecimal(0));
|
||||
}
|
||||
UsdtAggregationTaskItemPlus usdtAggregationTaskItem = new UsdtAggregationTaskItemPlus();
|
||||
usdtAggregationTaskItem.setUserId(SecurityUtils.getUserId());
|
||||
usdtAggregationTaskItem.setAppId(usdtAggregationTask.getAppId());
|
||||
usdtAggregationTaskItem.setCreatedAt(new Date());
|
||||
usdtAggregationTaskItem.setUpdatedAt(new Date());
|
||||
usdtAggregationTaskItem.setStatus(0);
|
||||
usdtAggregationTaskItem.setDistTokenAddress(usdtAggregationTask.getDistTokenAddress());
|
||||
usdtAggregationTaskItem.setParentId(usdtAggregationTask.getId());
|
||||
usdtAggregationTaskItem.setTokenAddress(item.getToken());
|
||||
|
||||
if (item.getEnergyNum() < tronService.defaultEstimateEnergy()) {
|
||||
log.error(item.getToken()+"能量不足,需要手续费");
|
||||
continue;
|
||||
}
|
||||
long bandwidth = tronService.defaultEstimateBandwidth();
|
||||
if (bandwidth > item.getBandwidthNum()) {
|
||||
log.error(item.getToken()+"带宽不足需要手续费");
|
||||
continue;
|
||||
}
|
||||
if(bandwidth > item.getBandwidthStakedNum()
|
||||
&& bandwidth > (item.getBandwidthNum()-item.getBandwidthStakedNum())){
|
||||
log.error("代理|免费带宽不足需要手续费");
|
||||
continue;
|
||||
}
|
||||
|
||||
String tempAmount = usdtAggregationTaskItemService.sum("ope_amount","status = 0 and token_address ='"+item.getToken()+"'",String.class);
|
||||
if(tempAmount ==null){
|
||||
tempAmount = "0.00";
|
||||
}
|
||||
if (item.getWithdrawUsdtBalance().subtract(totalAmount).longValue() > 0) {
|
||||
usdtAggregationTaskItem.setOpeAmount(totalAmount);
|
||||
usdtAggregationTaskItems.add(usdtAggregationTaskItem);
|
||||
hasTxItem = hasTxItem.add(item.getWithdrawUsdtBalance().subtract(new BigDecimal(tempAmount))
|
||||
.subtract(totalAmount));
|
||||
totalAmount = new BigDecimal(0);
|
||||
break;
|
||||
} else {
|
||||
usdtAggregationTaskItem.setOpeAmount(item.getWithdrawUsdtBalance());
|
||||
totalAmount = totalAmount.subtract(item.getWithdrawUsdtBalance());
|
||||
usdtAggregationTaskItems.add(usdtAggregationTaskItem);
|
||||
hasTxItem = hasTxItem.add(item.getWithdrawUsdtBalance().subtract(new BigDecimal(tempAmount))
|
||||
.subtract(item.getWithdrawUsdtBalance()));
|
||||
}
|
||||
}
|
||||
if (hasTxItem.doubleValue() < 0) {
|
||||
throw new RuntimeException("app下的地址可提现金额不足,amount=" + hasTxItem.toString());
|
||||
}
|
||||
if (totalAmount.longValue() > 0) {
|
||||
throw new RuntimeException("app下的地址可提现金额不足,amount=" + totalAmount.toString());
|
||||
}
|
||||
if (!usdtAggregationTaskItems.isEmpty()) {
|
||||
this.usdtAggregationTaskItemService.saveBatch(usdtAggregationTaskItems);
|
||||
}else{
|
||||
throw new RuntimeException("没有可以免费提现的地址");
|
||||
}
|
||||
return 1;
|
||||
return this.usdtAggregationTaskMapper.insertUsdtAggregationTask(usdtAggregationTask);
|
||||
} else {
|
||||
return usdtAggregationTaskMapper.insertUsdtAggregationTask(usdtAggregationTask);
|
||||
}
|
||||
|
||||
-270
@@ -1,270 +0,0 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.UsdtFundFlow;
|
||||
import com.ruoyi.system.domain.UsdtFundFlowPlus;
|
||||
import com.ruoyi.system.mapper.UsdtFundFlowMapper;
|
||||
import com.ruoyi.system.service.IUsdtFundFlowService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
/**
|
||||
* 资金流水Service业务层处理
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@Service
|
||||
public class UsdtFundFlowServiceImpl extends ServiceImpl<UsdtFundFlowMapper, UsdtFundFlowPlus> implements IUsdtFundFlowService
|
||||
{
|
||||
@Autowired
|
||||
private UsdtFundFlowMapper usdtFundFlowMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<UsdtFundFlowPlus> getByIds(List<Long> ids ,boolean isUser, SFunction<UsdtFundFlowPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtFundFlowPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtFundFlowPlus>()
|
||||
.select(columns).in(UsdtFundFlowPlus::getId, ids);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(UsdtFundFlowPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtFundFlowPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
private void checkUserPlus(List<UsdtFundFlowPlus> list) {
|
||||
for (UsdtFundFlowPlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(List<UsdtFundFlow> list) {
|
||||
for (UsdtFundFlow item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(UsdtFundFlowPlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
private void checkUser(UsdtFundFlow item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
LambdaQueryWrapper<UsdtFundFlowPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtFundFlowPlus>()
|
||||
.select(UsdtFundFlowPlus::getId,UsdtFundFlowPlus::getUserId, UsdtFundFlowPlus::getRemark)
|
||||
.like(UsdtFundFlowPlus::getRemark, keyword);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(UsdtFundFlowPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtFundFlowPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (UsdtFundFlowPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getRemark());
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public UsdtFundFlowPlus getById(Long id, SFunction<UsdtFundFlowPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtFundFlowPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtFundFlowPlus>()
|
||||
.select(columns).eq(UsdtFundFlowPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtFundFlowPlus> getMapByIds(List<Long> ids, SFunction<UsdtFundFlowPlus, ?>... columns) {
|
||||
List<UsdtFundFlowPlus> list = this.getByIds(ids,false, columns);
|
||||
Map<Long, UsdtFundFlowPlus> map = new HashMap<>();
|
||||
for (UsdtFundFlowPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtFundFlowPlus> getMapByIds(List<Long> ids) {
|
||||
List<UsdtFundFlowPlus> list = this.getByIds(ids);
|
||||
Map<Long, UsdtFundFlowPlus> map = new HashMap<>();
|
||||
for (UsdtFundFlowPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UsdtFundFlowPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<UsdtFundFlowPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtFundFlowPlus>().in(UsdtFundFlowPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from usdt_fund_flow ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" usdt_fund_flow ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" usdt_fund_flow ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询资金流水
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 资金流水
|
||||
*/
|
||||
@Override
|
||||
public UsdtFundFlow selectUsdtFundFlowById(Long id,boolean isUser)
|
||||
{
|
||||
UsdtFundFlow vo = usdtFundFlowMapper.selectUsdtFundFlowById(id);
|
||||
if(isUser){
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资金流水列表
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 资金流水
|
||||
*/
|
||||
@Override
|
||||
public List<UsdtFundFlow> selectUsdtFundFlowList(UsdtFundFlow usdtFundFlow,boolean isUser)
|
||||
{
|
||||
if(usdtFundFlow == null){
|
||||
usdtFundFlow = new UsdtFundFlow();
|
||||
}
|
||||
if(isUser){
|
||||
usdtFundFlow.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtFundFlow> list = usdtFundFlowMapper.selectUsdtFundFlowList(usdtFundFlow);
|
||||
if(isUser){
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser)
|
||||
{
|
||||
usdtFundFlow.setCreatedAt(DateUtils.getNowDate());
|
||||
usdtFundFlow.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
usdtFundFlow.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return usdtFundFlowMapper.insertUsdtFundFlow(usdtFundFlow);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser)
|
||||
{
|
||||
usdtFundFlow.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
checkUser(usdtFundFlow);
|
||||
}
|
||||
return usdtFundFlowMapper.updateUsdtFundFlow(usdtFundFlow);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除资金流水
|
||||
*
|
||||
* @param ids 需要删除的资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtFundFlowByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<UsdtFundFlowPlus> list= getByIds(Arrays.asList(ids),false,UsdtFundFlowPlus::getUserId,UsdtFundFlowPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return usdtFundFlowMapper.deleteUsdtFundFlowByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资金流水信息
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtFundFlowById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
UsdtFundFlowPlus vo = getById(id,UsdtFundFlowPlus::getUserId,UsdtFundFlowPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return usdtFundFlowMapper.deleteUsdtFundFlowById(id);
|
||||
}
|
||||
}
|
||||
-277
@@ -1,277 +0,0 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfiguration;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus;
|
||||
import com.ruoyi.system.mapper.UsdtUserSettlementConfigurationMapper;
|
||||
import com.ruoyi.system.service.IUsdtUserSettlementConfigurationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
/**
|
||||
* 商户配置Service业务层处理
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@Service
|
||||
public class UsdtUserSettlementConfigurationServiceImpl extends ServiceImpl<UsdtUserSettlementConfigurationMapper, UsdtUserSettlementConfigurationPlus> implements IUsdtUserSettlementConfigurationService
|
||||
{
|
||||
@Autowired
|
||||
private UsdtUserSettlementConfigurationMapper usdtUserSettlementConfigurationMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<UsdtUserSettlementConfigurationPlus> getByIds(List<Long> ids ,boolean isUser, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus>()
|
||||
.select(columns).in(UsdtUserSettlementConfigurationPlus::getId, ids);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(UsdtUserSettlementConfigurationPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtUserSettlementConfigurationPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
private void checkUserPlus(List<UsdtUserSettlementConfigurationPlus> list) {
|
||||
for (UsdtUserSettlementConfigurationPlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(List<UsdtUserSettlementConfiguration> list) {
|
||||
for (UsdtUserSettlementConfiguration item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(UsdtUserSettlementConfigurationPlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
private void checkUser(UsdtUserSettlementConfiguration item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus>()
|
||||
.select(UsdtUserSettlementConfigurationPlus::getId,UsdtUserSettlementConfigurationPlus::getUserId, UsdtUserSettlementConfigurationPlus::getRemark)
|
||||
.like(UsdtUserSettlementConfigurationPlus::getRemark, keyword);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(UsdtUserSettlementConfigurationPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtUserSettlementConfigurationPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (UsdtUserSettlementConfigurationPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getRemark());
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public UsdtUserSettlementConfigurationPlus getById(Long id, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus>()
|
||||
.select(columns).eq(UsdtUserSettlementConfigurationPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtUserSettlementConfigurationPlus> getMapByIds(List<Long> ids, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns) {
|
||||
List<UsdtUserSettlementConfigurationPlus> list = this.getByIds(ids,false, columns);
|
||||
Map<Long, UsdtUserSettlementConfigurationPlus> map = new HashMap<>();
|
||||
for (UsdtUserSettlementConfigurationPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtUserSettlementConfigurationPlus> getMapByIds(List<Long> ids) {
|
||||
List<UsdtUserSettlementConfigurationPlus> list = this.getByIds(ids);
|
||||
Map<Long, UsdtUserSettlementConfigurationPlus> map = new HashMap<>();
|
||||
for (UsdtUserSettlementConfigurationPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UsdtUserSettlementConfigurationPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus>().in(UsdtUserSettlementConfigurationPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from usdt_user_settlement_configuration ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" usdt_user_settlement_configuration ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" usdt_user_settlement_configuration ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询商户配置
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 商户配置
|
||||
*/
|
||||
@Override
|
||||
public UsdtUserSettlementConfiguration selectUsdtUserSettlementConfigurationById(Long id,boolean isUser)
|
||||
{
|
||||
UsdtUserSettlementConfiguration vo = usdtUserSettlementConfigurationMapper.selectUsdtUserSettlementConfigurationById(id);
|
||||
if(isUser){
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsdtUserSettlementConfigurationPlus getByUserId(Long userId) {
|
||||
LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus>()
|
||||
.eq(UsdtUserSettlementConfigurationPlus::getUserId, userId);
|
||||
return getOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商户配置列表
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 商户配置
|
||||
*/
|
||||
@Override
|
||||
public List<UsdtUserSettlementConfiguration> selectUsdtUserSettlementConfigurationList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser)
|
||||
{
|
||||
if(usdtUserSettlementConfiguration == null){
|
||||
usdtUserSettlementConfiguration = new UsdtUserSettlementConfiguration();
|
||||
}
|
||||
if(isUser){
|
||||
usdtUserSettlementConfiguration.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtUserSettlementConfiguration> list = usdtUserSettlementConfigurationMapper.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration);
|
||||
if(isUser){
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser)
|
||||
{
|
||||
usdtUserSettlementConfiguration.setCreatedAt(DateUtils.getNowDate());
|
||||
usdtUserSettlementConfiguration.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
usdtUserSettlementConfiguration.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return usdtUserSettlementConfigurationMapper.insertUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser)
|
||||
{
|
||||
usdtUserSettlementConfiguration.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
checkUser(usdtUserSettlementConfiguration);
|
||||
}
|
||||
return usdtUserSettlementConfigurationMapper.updateUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商户配置
|
||||
*
|
||||
* @param ids 需要删除的商户配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtUserSettlementConfigurationByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<UsdtUserSettlementConfigurationPlus> list= getByIds(Arrays.asList(ids),false,UsdtUserSettlementConfigurationPlus::getUserId,UsdtUserSettlementConfigurationPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return usdtUserSettlementConfigurationMapper.deleteUsdtUserSettlementConfigurationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商户配置信息
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtUserSettlementConfigurationById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
UsdtUserSettlementConfigurationPlus vo = getById(id,UsdtUserSettlementConfigurationPlus::getUserId,UsdtUserSettlementConfigurationPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return usdtUserSettlementConfigurationMapper.deleteUsdtUserSettlementConfigurationById(id);
|
||||
}
|
||||
}
|
||||
@@ -1,271 +0,0 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.UserAuth;
|
||||
import com.ruoyi.system.domain.UserAuthPlus;
|
||||
import com.ruoyi.system.mapper.UserAuthMapper;
|
||||
import com.ruoyi.system.service.IUserAuthService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 用户授权Service业务层处理
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Service
|
||||
public class UserAuthServiceImpl extends ServiceImpl<UserAuthMapper, UserAuthPlus> implements IUserAuthService {
|
||||
@Autowired
|
||||
private UserAuthMapper userAuthMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<UserAuthPlus> getByIds(List<Long> ids, boolean isUser, SFunction<UserAuthPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UserAuthPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UserAuthPlus>()
|
||||
.select(columns).in(UserAuthPlus::getId, ids);
|
||||
if (isUser) {
|
||||
lambdaQueryWrapper.eq(UserAuthPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UserAuthPlus> list = this.list(lambdaQueryWrapper);
|
||||
if (isUser) {
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private void checkUserPlus(List<UserAuthPlus> list) {
|
||||
for (UserAuthPlus item : list) {
|
||||
if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUser(List<UserAuth> list) {
|
||||
for (UserAuth item : list) {
|
||||
if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUser(UserAuthPlus item) {
|
||||
if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUser(UserAuth item) {
|
||||
if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword, boolean isUser) {
|
||||
LambdaQueryWrapper<UserAuthPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UserAuthPlus>()
|
||||
.select(UserAuthPlus::getId, UserAuthPlus::getUserId, UserAuthPlus::getName)
|
||||
.like(UserAuthPlus::getName, keyword);
|
||||
if (isUser) {
|
||||
lambdaQueryWrapper.eq(UserAuthPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UserAuthPlus> list = this.list(lambdaQueryWrapper);
|
||||
if (isUser) {
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result = new ArrayList<>();
|
||||
for (UserAuthPlus item : list) {
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getName());
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserAuthPlus getById(Long id, SFunction<UserAuthPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UserAuthPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UserAuthPlus>()
|
||||
.select(columns).eq(UserAuthPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UserAuthPlus> getMapByIds(List<Long> ids, SFunction<UserAuthPlus, ?>... columns) {
|
||||
List<UserAuthPlus> list = this.getByIds(ids, false, columns);
|
||||
Map<Long, UserAuthPlus> map = new HashMap<>();
|
||||
for (UserAuthPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UserAuthPlus> getMapByIds(List<Long> ids) {
|
||||
List<UserAuthPlus> list = this.getByIds(ids);
|
||||
Map<Long, UserAuthPlus> map = new HashMap<>();
|
||||
for (UserAuthPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserAuthPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<UserAuthPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UserAuthPlus>().in(UserAuthPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from user_auth ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" user_auth ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" user_auth ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户授权
|
||||
*
|
||||
* @param id 用户授权ID
|
||||
* @return 用户授权
|
||||
*/
|
||||
@Override
|
||||
public UserAuth selectUserAuthById(Long id, boolean isUser) {
|
||||
UserAuth vo = userAuthMapper.selectUserAuthById(id);
|
||||
if (isUser) {
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户授权列表
|
||||
*
|
||||
* @param userAuth 用户授权
|
||||
* @return 用户授权
|
||||
*/
|
||||
@Override
|
||||
public List<UserAuth> selectUserAuthList(UserAuth userAuth, boolean isUser) {
|
||||
if (userAuth == null) {
|
||||
userAuth = new UserAuth();
|
||||
}
|
||||
if (isUser) {
|
||||
userAuth.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<UserAuth> list = userAuthMapper.selectUserAuthList(userAuth);
|
||||
if (isUser) {
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户授权
|
||||
*
|
||||
* @param userAuth 用户授权
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUserAuth(UserAuth userAuth, boolean isUser) {
|
||||
userAuth.setCreatedAt(DateUtils.getNowDate());
|
||||
userAuth.setUpdatedAt(DateUtils.getNowDate());
|
||||
if (isUser) {
|
||||
userAuth.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return userAuthMapper.insertUserAuth(userAuth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户授权
|
||||
*
|
||||
* @param userAuth 用户授权
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUserAuth(UserAuth userAuth, boolean isUser) {
|
||||
userAuth.setUpdatedAt(DateUtils.getNowDate());
|
||||
if (isUser) {
|
||||
checkUser(userAuth);
|
||||
}
|
||||
return userAuthMapper.updateUserAuth(userAuth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户授权
|
||||
*
|
||||
* @param ids 需要删除的用户授权ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserAuthByIds(Long[] ids, boolean isUser) {
|
||||
if (isUser) {
|
||||
List<UserAuthPlus> list = getByIds(Arrays.asList(ids), false, UserAuthPlus::getUserId, UserAuthPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return userAuthMapper.deleteUserAuthByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户授权信息
|
||||
*
|
||||
* @param id 用户授权ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserAuthById(Long id, boolean isUser) {
|
||||
if (isUser) {
|
||||
UserAuthPlus vo = getById(id, UserAuthPlus::getUserId, UserAuthPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return userAuthMapper.deleteUserAuthById(id);
|
||||
}
|
||||
}
|
||||
@@ -184,14 +184,6 @@ public class WalletAddressServiceImpl extends ServiceImpl<WalletAddressMapper, W
|
||||
return map;
|
||||
}
|
||||
@Override
|
||||
public boolean updateWithdrawUsdtBalanceById(Long id, BigDecimal withdrawUsdtBalance){
|
||||
WalletAddressPlus walletAddressPlus = new WalletAddressPlus();
|
||||
walletAddressPlus.setWithdrawUsdtBalance(withdrawUsdtBalance);
|
||||
LambdaQueryWrapper<WalletAddressPlus> lambdaQueryWrapper = new LambdaQueryWrapper<WalletAddressPlus>();
|
||||
lambdaQueryWrapper.eq(WalletAddressPlus::getId, id);
|
||||
return this.update(walletAddressPlus,lambdaQueryWrapper);
|
||||
}
|
||||
@Override
|
||||
public Map<Long, WalletAddressPlus> getMapByIds(List<Long> ids) {
|
||||
List<WalletAddressPlus> list = this.getByIds(ids);
|
||||
Map<Long, WalletAddressPlus> map = new HashMap<>();
|
||||
|
||||
@@ -1,261 +0,0 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.Web3Wallet;
|
||||
import com.ruoyi.system.domain.Web3WalletPlus;
|
||||
import com.ruoyi.system.mapper.Web3WalletMapper;
|
||||
import com.ruoyi.system.service.IWeb3WalletService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 钱包管理Service业务层处理
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Service
|
||||
public class Web3WalletServiceImpl extends ServiceImpl<Web3WalletMapper, Web3WalletPlus> implements IWeb3WalletService {
|
||||
@Autowired
|
||||
private Web3WalletMapper web3WalletMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<Web3WalletPlus> getByIds(List<Long> ids, boolean isUser, SFunction<Web3WalletPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<Web3WalletPlus> lambdaQueryWrapper = null;
|
||||
if (isUser) {
|
||||
lambdaQueryWrapper = new LambdaQueryWrapper<Web3WalletPlus>()
|
||||
.select(columns).eq(Web3WalletPlus::getId, SecurityUtils.getUserId());
|
||||
} else {
|
||||
lambdaQueryWrapper = new LambdaQueryWrapper<Web3WalletPlus>()
|
||||
.select(columns).in(Web3WalletPlus::getId, ids);
|
||||
}
|
||||
List<Web3WalletPlus> list = this.list(lambdaQueryWrapper);
|
||||
if (isUser) {
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private void checkUserPlus(List<Web3WalletPlus> list) {
|
||||
for (Web3WalletPlus item : list) {
|
||||
if (null != SecurityUtils.getUserId() && item.getId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUser(List<Web3Wallet> list) {
|
||||
for (Web3Wallet item : list) {
|
||||
if (null != SecurityUtils.getUserId() && item.getId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUser(Web3WalletPlus item) {
|
||||
if (null != SecurityUtils.getUserId() && item.getId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUser(Web3Wallet item) {
|
||||
if (null != SecurityUtils.getUserId() && item.getId().longValue() != SecurityUtils.getUserId()) {
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Web3WalletPlus getById(Long id, SFunction<Web3WalletPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<Web3WalletPlus> lambdaQueryWrapper = new LambdaQueryWrapper<Web3WalletPlus>()
|
||||
.select(columns).eq(Web3WalletPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, Web3WalletPlus> getMapByIds(List<Long> ids, SFunction<Web3WalletPlus, ?>... columns) {
|
||||
List<Web3WalletPlus> list = this.getByIds(ids, false, columns);
|
||||
Map<Long, Web3WalletPlus> map = new HashMap<>();
|
||||
for (Web3WalletPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, Web3WalletPlus> getMapByIds(List<Long> ids) {
|
||||
List<Web3WalletPlus> list = this.getByIds(ids);
|
||||
Map<Long, Web3WalletPlus> map = new HashMap<>();
|
||||
for (Web3WalletPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Web3WalletPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<Web3WalletPlus> lambdaQueryWrapper = new LambdaQueryWrapper<Web3WalletPlus>().in(Web3WalletPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from web3_wallet ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" web3_wallet ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" web3_wallet ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钱包管理
|
||||
*
|
||||
* @param id 钱包管理ID
|
||||
* @return 钱包管理
|
||||
*/
|
||||
@Override
|
||||
public Web3Wallet selectWeb3WalletById(Long id, boolean isUser) {
|
||||
Web3Wallet vo = web3WalletMapper.selectWeb3WalletById(id);
|
||||
if (isUser) {
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钱包管理列表
|
||||
*
|
||||
* @param web3Wallet 钱包管理
|
||||
* @return 钱包管理
|
||||
*/
|
||||
@Override
|
||||
public List<Web3Wallet> selectWeb3WalletList(Web3Wallet web3Wallet, boolean isUser) {
|
||||
if (isUser) {
|
||||
Web3WalletPlus myWallet = this.getById(SecurityUtils.getUserId());
|
||||
if(myWallet == null){
|
||||
myWallet = new Web3WalletPlus();
|
||||
myWallet.setId(SecurityUtils.getUserId());
|
||||
myWallet.setPassword(UUID.randomUUID().toString());
|
||||
myWallet.setEthBalance(new BigDecimal(0));
|
||||
myWallet.setTrxBalance(new BigDecimal(0));
|
||||
myWallet.setUsdtBalance(new BigDecimal(0));
|
||||
myWallet.setCreatedAt(new Date());
|
||||
myWallet.setUpdatedAt(new Date());
|
||||
this.save(myWallet);
|
||||
}
|
||||
web3Wallet.setId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<Web3Wallet> list = web3WalletMapper.selectWeb3WalletList(web3Wallet);
|
||||
if (isUser) {
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钱包管理
|
||||
*
|
||||
* @param web3Wallet 钱包管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWeb3Wallet(Web3Wallet web3Wallet, boolean isUser) {
|
||||
web3Wallet.setCreatedAt(DateUtils.getNowDate());
|
||||
web3Wallet.setUpdatedAt(DateUtils.getNowDate());
|
||||
if (isUser) {
|
||||
web3Wallet.setId(SecurityUtils.getUserId());
|
||||
}
|
||||
return web3WalletMapper.insertWeb3Wallet(web3Wallet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改钱包管理
|
||||
*
|
||||
* @param web3Wallet 钱包管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWeb3Wallet(Web3Wallet web3Wallet, boolean isUser) {
|
||||
web3Wallet.setUpdatedAt(DateUtils.getNowDate());
|
||||
if (isUser) {
|
||||
checkUser(web3Wallet);
|
||||
}
|
||||
return web3WalletMapper.updateWeb3Wallet(web3Wallet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除钱包管理
|
||||
*
|
||||
* @param ids 需要删除的钱包管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWeb3WalletByIds(Long[] ids, boolean isUser) {
|
||||
if (isUser) {
|
||||
List<Web3WalletPlus> list = getByIds(Arrays.asList(ids), false, Web3WalletPlus::getUsdtBalance, Web3WalletPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return web3WalletMapper.deleteWeb3WalletByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钱包管理信息
|
||||
*
|
||||
* @param id 钱包管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWeb3WalletById(Long id, boolean isUser) {
|
||||
if (isUser) {
|
||||
Web3WalletPlus vo = getById(id, Web3WalletPlus::getUsdtBalance, Web3WalletPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return web3WalletMapper.deleteWeb3WalletById(id);
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
<result property="needEnergyNum" column="need_energy_num" />
|
||||
<result property="needBandwidthNum" column="need_bandwidth_num" />
|
||||
<result property="gapBandwidthNum" column="gap_bandwidth_num" />
|
||||
<result property="gapEnergyNum" column="gap_energy_num" />
|
||||
<result property="willUseTrxNum" column="will_use_trx_num" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
@@ -20,17 +25,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUsdtAggregationTaskItemVo">
|
||||
select id, token_address, status, remark, ope_amount, created_at, updated_at, deleted_at, user_id, app_id, parent_id, dist_token_address from usdt_aggregation_task_item
|
||||
select id, token_address, status, remark, ope_amount, created_at, updated_at, deleted_at, need_energy_num, need_bandwidth_num, gap_bandwidth_num, gap_energy_num, will_use_trx_num, user_id, app_id, parent_id, dist_token_address from usdt_aggregation_task_item
|
||||
</sql>
|
||||
|
||||
<select id="selectUsdtAggregationTaskItemList" parameterType="UsdtAggregationTaskItem" resultMap="UsdtAggregationTaskItemResult">
|
||||
<include refid="selectUsdtAggregationTaskItemVo"/>
|
||||
<where>
|
||||
<if test="tokenAddress != null and tokenAddress != ''"> and token_address = #{tokenAddress}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="opeAmount != null "> and ope_amount = #{opeAmount}</if>
|
||||
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
|
||||
<if test="deletedAt != null "> and deleted_at = #{deletedAt}</if>
|
||||
<if test="needEnergyNum != null "> and need_energy_num = #{needEnergyNum}</if>
|
||||
<if test="needBandwidthNum != null "> and need_bandwidth_num = #{needBandwidthNum}</if>
|
||||
<if test="gapBandwidthNum != null "> and gap_bandwidth_num = #{gapBandwidthNum}</if>
|
||||
<if test="gapEnergyNum != null "> and gap_energy_num = #{gapEnergyNum}</if>
|
||||
<if test="willUseTrxNum != null "> and will_use_trx_num = #{willUseTrxNum}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="distTokenAddress != null and distTokenAddress != ''"> and dist_token_address = #{distTokenAddress}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -49,6 +64,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="updatedAt != null">updated_at,</if>
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
<if test="needEnergyNum != null">need_energy_num,</if>
|
||||
<if test="needBandwidthNum != null">need_bandwidth_num,</if>
|
||||
<if test="gapBandwidthNum != null">gap_bandwidth_num,</if>
|
||||
<if test="gapEnergyNum != null">gap_energy_num,</if>
|
||||
<if test="willUseTrxNum != null">will_use_trx_num,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="appId != null">app_id,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
@@ -62,6 +82,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="updatedAt != null">#{updatedAt},</if>
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
<if test="needEnergyNum != null">#{needEnergyNum},</if>
|
||||
<if test="needBandwidthNum != null">#{needBandwidthNum},</if>
|
||||
<if test="gapBandwidthNum != null">#{gapBandwidthNum},</if>
|
||||
<if test="gapEnergyNum != null">#{gapEnergyNum},</if>
|
||||
<if test="willUseTrxNum != null">#{willUseTrxNum},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="appId != null">#{appId},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
@@ -79,6 +104,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
<if test="needEnergyNum != null">need_energy_num = #{needEnergyNum},</if>
|
||||
<if test="needBandwidthNum != null">need_bandwidth_num = #{needBandwidthNum},</if>
|
||||
<if test="gapBandwidthNum != null">gap_bandwidth_num = #{gapBandwidthNum},</if>
|
||||
<if test="gapEnergyNum != null">gap_energy_num = #{gapEnergyNum},</if>
|
||||
<if test="willUseTrxNum != null">will_use_trx_num = #{willUseTrxNum},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.UsdtFundFlowMapper">
|
||||
|
||||
<resultMap type="UsdtFundFlow" id="UsdtFundFlowResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="opType" column="op_type" />
|
||||
<result property="token" column="token" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUsdtFundFlowVo">
|
||||
select id, order_id, user_id, app_id, created_at, updated_at, deleted_at, amount, op_type, token, remark from usdt_fund_flow
|
||||
</sql>
|
||||
|
||||
<select id="selectUsdtFundFlowList" parameterType="UsdtFundFlow" resultMap="UsdtFundFlowResult">
|
||||
<include refid="selectUsdtFundFlowVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="opType != null "> and op_type = #{opType}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUsdtFundFlowById" parameterType="Long" resultMap="UsdtFundFlowResult">
|
||||
<include refid="selectUsdtFundFlowVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUsdtFundFlow" parameterType="UsdtFundFlow" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into usdt_fund_flow
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="appId != null">app_id,</if>
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="updatedAt != null">updated_at,</if>
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="opType != null">op_type,</if>
|
||||
<if test="token != null">token,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="appId != null">#{appId},</if>
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="updatedAt != null">#{updatedAt},</if>
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="opType != null">#{opType},</if>
|
||||
<if test="token != null">#{token},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUsdtFundFlow" parameterType="UsdtFundFlow">
|
||||
update usdt_fund_flow
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="opType != null">op_type = #{opType},</if>
|
||||
<if test="token != null">token = #{token},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUsdtFundFlowById" parameterType="Long">
|
||||
delete from usdt_fund_flow where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUsdtFundFlowByIds" parameterType="String">
|
||||
delete from usdt_fund_flow where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -23,10 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="settlementStatus" column="settlement_status" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="orderType" column="order_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUsdtOrdersVo">
|
||||
select id, trade_id, order_id, block_transaction_id, actual_amount, amount, token, status, notify_url, redirect_url, callback_num, callback_confirm, created_at, updated_at, deleted_at, app_id, settlement_status, user_id from orders
|
||||
select id, trade_id, order_id,order_type, block_transaction_id, actual_amount, amount, token, status, notify_url, redirect_url, callback_num, callback_confirm, created_at, updated_at, deleted_at, app_id, settlement_status, user_id from orders
|
||||
</sql>
|
||||
|
||||
<select id="selectUsdtOrdersList" parameterType="UsdtOrders" resultMap="UsdtOrdersResult">
|
||||
@@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="settlementStatus != null "> and settlement_status = #{settlementStatus}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="orderType != null "> and order_type = #{orderType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -68,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="appId != null">app_id,</if>
|
||||
<if test="settlementStatus != null">settlement_status,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="orderType != null">order_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tradeId != null and tradeId != ''">#{tradeId},</if>
|
||||
@@ -87,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="appId != null">#{appId},</if>
|
||||
<if test="settlementStatus != null">#{settlementStatus},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="orderType != null">#{orderType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -110,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="settlementStatus != null">settlement_status = #{settlementStatus},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="orderType != null">order_type = #{orderType},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.UsdtUserSettlementConfigurationMapper">
|
||||
|
||||
<resultMap type="UsdtUserSettlementConfiguration" id="UsdtUserSettlementConfigurationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="commissionRate" column="commission_rate" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
<result property="withdrawalFee" column="withdrawal_fee" />
|
||||
<result property="status" column="status" />
|
||||
<result property="extInfo" column="ext_info" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUsdtUserSettlementConfigurationVo">
|
||||
select id, user_id, commission_rate, created_at, updated_at, deleted_at, withdrawal_fee, status, ext_info, remark from usdt_user_settlement_configuration
|
||||
</sql>
|
||||
|
||||
<select id="selectUsdtUserSettlementConfigurationList" parameterType="UsdtUserSettlementConfiguration" resultMap="UsdtUserSettlementConfigurationResult">
|
||||
<include refid="selectUsdtUserSettlementConfigurationVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUsdtUserSettlementConfigurationById" parameterType="Long" resultMap="UsdtUserSettlementConfigurationResult">
|
||||
<include refid="selectUsdtUserSettlementConfigurationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUsdtUserSettlementConfiguration" parameterType="UsdtUserSettlementConfiguration" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into usdt_user_settlement_configuration
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="commissionRate != null">commission_rate,</if>
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="updatedAt != null">updated_at,</if>
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
<if test="withdrawalFee != null">withdrawal_fee,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="extInfo != null">ext_info,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="commissionRate != null">#{commissionRate},</if>
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="updatedAt != null">#{updatedAt},</if>
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
<if test="withdrawalFee != null">#{withdrawalFee},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="extInfo != null">#{extInfo},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUsdtUserSettlementConfiguration" parameterType="UsdtUserSettlementConfiguration">
|
||||
update usdt_user_settlement_configuration
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="commissionRate != null">commission_rate = #{commissionRate},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
<if test="withdrawalFee != null">withdrawal_fee = #{withdrawalFee},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="extInfo != null">ext_info = #{extInfo},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUsdtUserSettlementConfigurationById" parameterType="Long">
|
||||
delete from usdt_user_settlement_configuration where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUsdtUserSettlementConfigurationByIds" parameterType="String">
|
||||
delete from usdt_user_settlement_configuration where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.UserAuthMapper">
|
||||
|
||||
<resultMap type="UserAuth" id="UserAuthResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="authType" column="auth_type" />
|
||||
<result property="name" column="name" />
|
||||
<result property="idNumber" column="id_number" />
|
||||
<result property="companyName" column="company_name" />
|
||||
<result property="authStatus" column="auth_status" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="reviewer" column="reviewer" />
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserAuthVo">
|
||||
select id, user_id, auth_type, name, id_number, company_name, auth_status, created_at, updated_at, reviewer, deleted_at from user_auth
|
||||
</sql>
|
||||
|
||||
<select id="selectUserAuthList" parameterType="UserAuth" resultMap="UserAuthResult">
|
||||
<include refid="selectUserAuthVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="authType != null "> and auth_type = #{authType}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="idNumber != null and idNumber != ''"> and id_number = #{idNumber}</if>
|
||||
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
||||
<if test="authStatus != null "> and auth_status = #{authStatus}</if>
|
||||
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
|
||||
<if test="reviewer != null and reviewer != ''"> and reviewer = #{reviewer}</if>
|
||||
<if test="deletedAt != null "> and deleted_at = #{deletedAt}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUserAuthById" parameterType="Long" resultMap="UserAuthResult">
|
||||
<include refid="selectUserAuthVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUserAuth" parameterType="UserAuth" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into user_auth
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="authType != null">auth_type,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="idNumber != null">id_number,</if>
|
||||
<if test="companyName != null">company_name,</if>
|
||||
<if test="authStatus != null">auth_status,</if>
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="updatedAt != null">updated_at,</if>
|
||||
<if test="reviewer != null">reviewer,</if>
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="authType != null">#{authType},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="idNumber != null">#{idNumber},</if>
|
||||
<if test="companyName != null">#{companyName},</if>
|
||||
<if test="authStatus != null">#{authStatus},</if>
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="updatedAt != null">#{updatedAt},</if>
|
||||
<if test="reviewer != null">#{reviewer},</if>
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUserAuth" parameterType="UserAuth">
|
||||
update user_auth
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="authType != null">auth_type = #{authType},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="idNumber != null">id_number = #{idNumber},</if>
|
||||
<if test="companyName != null">company_name = #{companyName},</if>
|
||||
<if test="authStatus != null">auth_status = #{authStatus},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="reviewer != null">reviewer = #{reviewer},</if>
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserAuthById" parameterType="Long">
|
||||
delete from user_auth where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserAuthByIds" parameterType="String">
|
||||
delete from user_auth where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -13,12 +13,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="tokenKey" column="token_key" />
|
||||
<result property="walletUserName" column="wallet_user_name" />
|
||||
<result property="tokenIndex" column="token_index" />
|
||||
<result property="usdtBalance" column="usdt_balance" />
|
||||
<result property="trxBalance" column="trx_balance" />
|
||||
<result property="energyNum" column="energy_num" />
|
||||
<result property="energyAllNum" column="energy_all_num" />
|
||||
<result property="energyUsedNum" column="energy_used_num" />
|
||||
<result property="bandwidthNum" column="bandwidth_num" />
|
||||
<result property="withdrawUsdtBalance" column="withdraw_usdt_balance" />
|
||||
<result property="delegatedEnergyTrxNum" column="delegated_energy_trx_num" />
|
||||
<result property="delegatedEnergyValue" column="delegated_energy_value" />
|
||||
<result property="acquiredDelegatedEnergyTrxNum" column="acquired_delegated_energy_trx_num" />
|
||||
@@ -33,10 +35,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="voteNum" column="vote_num" />
|
||||
<result property="votedNum" column="voted_num" />
|
||||
<result property="bandwidthStakedNum" column="bandwidth_staked_num" />
|
||||
<result property="bandwidthStakedAllNum" column="bandwidth_staked_all_num" />
|
||||
<result property="bandwidthFreeNum" column="bandwidth_free_num" />
|
||||
<result property="bandwidthFreeAllNum" column="bandwidth_free_all_num" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWalletAddressVo">
|
||||
select id, token, status, created_at, updated_at,bandwidth_staked_num, deleted_at, app_id, user_id, token_key, usdt_balance, trx_balance, energy_num, bandwidth_num, withdraw_usdt_balance, delegated_energy_trx_num, delegated_energy_value, acquired_delegated_energy_trx_num, acquired_delegated_energy_value, delegated_bandwidth_trx_num, delegated_bandwidth_value, acquired_delegated_bandwidth_trx_num, acquired_delegated_bandwidth_value, staked_trx_num, energy_staked_trx_num, bandwidth_staked_trx_num, vote_num, voted_num from wallet_address
|
||||
select id, token, status, created_at, updated_at, deleted_at, app_id, user_id, wallet_user_name, token_index, usdt_balance, trx_balance, energy_num, energy_all_num, energy_used_num, bandwidth_num, delegated_energy_trx_num, delegated_energy_value, acquired_delegated_energy_trx_num, acquired_delegated_energy_value, delegated_bandwidth_trx_num, delegated_bandwidth_value, acquired_delegated_bandwidth_trx_num, acquired_delegated_bandwidth_value, staked_trx_num, energy_staked_trx_num, bandwidth_staked_trx_num, vote_num, voted_num, bandwidth_staked_num, bandwidth_staked_all_num, bandwidth_free_num, bandwidth_free_all_num from wallet_address
|
||||
</sql>
|
||||
|
||||
<select id="selectWalletAddressList" parameterType="WalletAddress" resultMap="WalletAddressResult">
|
||||
@@ -44,14 +49,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<where>
|
||||
<if test="token != null and token != ''"> and token = #{token}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
|
||||
<if test="deletedAt != null "> and deleted_at = #{deletedAt}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="tokenKey != null and tokenKey != ''"> and token_key = #{tokenKey}</if>
|
||||
<if test="walletUserName != null and walletUserName != ''"> and wallet_user_name like concat('%', #{walletUserName}, '%')</if>
|
||||
<if test="tokenIndex != null and tokenIndex != ''"> and token_index = #{tokenIndex}</if>
|
||||
<if test="usdtBalance != null "> and usdt_balance = #{usdtBalance}</if>
|
||||
<if test="trxBalance != null "> and trx_balance = #{trxBalance}</if>
|
||||
<if test="energyNum != null "> and energy_num = #{energyNum}</if>
|
||||
<if test="energyAllNum != null "> and energy_all_num = #{energyAllNum}</if>
|
||||
<if test="energyUsedNum != null "> and energy_used_num = #{energyUsedNum}</if>
|
||||
<if test="bandwidthNum != null "> and bandwidth_num = #{bandwidthNum}</if>
|
||||
<if test="withdrawUsdtBalance != null "> and withdraw_usdt_balance = #{withdrawUsdtBalance}</if>
|
||||
<if test="delegatedEnergyTrxNum != null "> and delegated_energy_trx_num = #{delegatedEnergyTrxNum}</if>
|
||||
<if test="delegatedEnergyValue != null "> and delegated_energy_value = #{delegatedEnergyValue}</if>
|
||||
<if test="acquiredDelegatedEnergyTrxNum != null "> and acquired_delegated_energy_trx_num = #{acquiredDelegatedEnergyTrxNum}</if>
|
||||
@@ -65,6 +75,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="bandwidthStakedTrxNum != null "> and bandwidth_staked_trx_num = #{bandwidthStakedTrxNum}</if>
|
||||
<if test="voteNum != null "> and vote_num = #{voteNum}</if>
|
||||
<if test="votedNum != null "> and voted_num = #{votedNum}</if>
|
||||
<if test="bandwidthStakedNum != null "> and bandwidth_staked_num = #{bandwidthStakedNum}</if>
|
||||
<if test="bandwidthStakedAllNum != null "> and bandwidth_staked_all_num = #{bandwidthStakedAllNum}</if>
|
||||
<if test="bandwidthFreeNum != null "> and bandwidth_free_num = #{bandwidthFreeNum}</if>
|
||||
<if test="bandwidthFreeAllNum != null "> and bandwidth_free_all_num = #{bandwidthFreeAllNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -83,12 +97,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
<if test="appId != null">app_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="tokenKey != null">token_key,</if>
|
||||
<if test="walletUserName != null and walletUserName != ''">wallet_user_name,</if>
|
||||
<if test="tokenIndex != null">token_index,</if>
|
||||
<if test="usdtBalance != null">usdt_balance,</if>
|
||||
<if test="trxBalance != null">trx_balance,</if>
|
||||
<if test="energyNum != null">energy_num,</if>
|
||||
<if test="energyAllNum != null">energy_all_num,</if>
|
||||
<if test="energyUsedNum != null">energy_used_num,</if>
|
||||
<if test="bandwidthNum != null">bandwidth_num,</if>
|
||||
<if test="withdrawUsdtBalance != null">withdraw_usdt_balance,</if>
|
||||
<if test="delegatedEnergyTrxNum != null">delegated_energy_trx_num,</if>
|
||||
<if test="delegatedEnergyValue != null">delegated_energy_value,</if>
|
||||
<if test="acquiredDelegatedEnergyTrxNum != null">acquired_delegated_energy_trx_num,</if>
|
||||
@@ -103,6 +119,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="voteNum != null">vote_num,</if>
|
||||
<if test="votedNum != null">voted_num,</if>
|
||||
<if test="bandwidthStakedNum != null">bandwidth_staked_num,</if>
|
||||
<if test="bandwidthStakedAllNum != null">bandwidth_staked_all_num,</if>
|
||||
<if test="bandwidthFreeNum != null">bandwidth_free_num,</if>
|
||||
<if test="bandwidthFreeAllNum != null">bandwidth_free_all_num,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="token != null and token != ''">#{token},</if>
|
||||
@@ -112,12 +131,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
<if test="appId != null">#{appId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="tokenKey != null">#{tokenKey},</if>
|
||||
<if test="walletUserName != null and walletUserName != ''">#{walletUserName},</if>
|
||||
<if test="tokenIndex != null">#{tokenIndex},</if>
|
||||
<if test="usdtBalance != null">#{usdtBalance},</if>
|
||||
<if test="trxBalance != null">#{trxBalance},</if>
|
||||
<if test="energyNum != null">#{energyNum},</if>
|
||||
<if test="energyAllNum != null">#{energyAllNum},</if>
|
||||
<if test="energyUsedNum != null">#{energyUsedNum},</if>
|
||||
<if test="bandwidthNum != null">#{bandwidthNum},</if>
|
||||
<if test="withdrawUsdtBalance != null">#{withdrawUsdtBalance},</if>
|
||||
<if test="delegatedEnergyTrxNum != null">#{delegatedEnergyTrxNum},</if>
|
||||
<if test="delegatedEnergyValue != null">#{delegatedEnergyValue},</if>
|
||||
<if test="acquiredDelegatedEnergyTrxNum != null">#{acquiredDelegatedEnergyTrxNum},</if>
|
||||
@@ -132,6 +153,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="voteNum != null">#{voteNum},</if>
|
||||
<if test="votedNum != null">#{votedNum},</if>
|
||||
<if test="bandwidthStakedNum != null">#{bandwidthStakedNum},</if>
|
||||
<if test="bandwidthStakedAllNum != null">#{bandwidthStakedAllNum},</if>
|
||||
<if test="bandwidthFreeNum != null">#{bandwidthFreeNum},</if>
|
||||
<if test="bandwidthFreeAllNum != null">#{bandwidthFreeAllNum},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -145,12 +169,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="tokenKey != null">token_key = #{tokenKey},</if>
|
||||
<if test="walletUserName != null and walletUserName != ''">wallet_user_name = #{walletUserName},</if>
|
||||
<if test="tokenIndex != null">token_index = #{tokenIndex},</if>
|
||||
<if test="usdtBalance != null">usdt_balance = #{usdtBalance},</if>
|
||||
<if test="trxBalance != null">trx_balance = #{trxBalance},</if>
|
||||
<if test="energyNum != null">energy_num = #{energyNum},</if>
|
||||
<if test="energyAllNum != null">energy_all_num = #{energyAllNum},</if>
|
||||
<if test="energyUsedNum != null">energy_used_num = #{energyUsedNum},</if>
|
||||
<if test="bandwidthNum != null">bandwidth_num = #{bandwidthNum},</if>
|
||||
<if test="withdrawUsdtBalance != null">withdraw_usdt_balance = #{withdrawUsdtBalance},</if>
|
||||
<if test="delegatedEnergyTrxNum != null">delegated_energy_trx_num = #{delegatedEnergyTrxNum},</if>
|
||||
<if test="delegatedEnergyValue != null">delegated_energy_value = #{delegatedEnergyValue},</if>
|
||||
<if test="acquiredDelegatedEnergyTrxNum != null">acquired_delegated_energy_trx_num = #{acquiredDelegatedEnergyTrxNum},</if>
|
||||
@@ -165,6 +191,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="voteNum != null">vote_num = #{voteNum},</if>
|
||||
<if test="votedNum != null">voted_num = #{votedNum},</if>
|
||||
<if test="bandwidthStakedNum != null">bandwidth_staked_num = #{bandwidthStakedNum},</if>
|
||||
<if test="bandwidthStakedAllNum != null">bandwidth_staked_all_num = #{bandwidthStakedAllNum},</if>
|
||||
<if test="bandwidthFreeNum != null">bandwidth_free_num = #{bandwidthFreeNum},</if>
|
||||
<if test="bandwidthFreeAllNum != null">bandwidth_free_all_num = #{bandwidthFreeAllNum},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.Web3WalletMapper">
|
||||
|
||||
<resultMap type="Web3Wallet" id="Web3WalletResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="usdtBalance" column="usdt_balance" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
<result property="trxBalance" column="trx_balance" />
|
||||
<result property="ethBalance" column="eth_balance" />
|
||||
<result property="password" column="password" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWeb3WalletVo">
|
||||
select id, usdt_balance, created_at, updated_at, deleted_at, trx_balance, eth_balance, password from web3_wallet
|
||||
</sql>
|
||||
|
||||
<select id="selectWeb3WalletList" parameterType="Web3Wallet" resultMap="Web3WalletResult">
|
||||
<include refid="selectWeb3WalletVo"/>
|
||||
<where>
|
||||
<if test="usdtBalance != null "> and usdt_balance = #{usdtBalance}</if>
|
||||
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
|
||||
<if test="deletedAt != null "> and deleted_at = #{deletedAt}</if>
|
||||
<if test="trxBalance != null "> and trx_balance = #{trxBalance}</if>
|
||||
<if test="ethBalance != null "> and eth_balance = #{ethBalance}</if>
|
||||
<if test="password != null and password != ''"> and password = #{password}</if>
|
||||
<if test="id != null"> and id = #{id}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWeb3WalletById" parameterType="Long" resultMap="Web3WalletResult">
|
||||
<include refid="selectWeb3WalletVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWeb3Wallet" parameterType="Web3Wallet">
|
||||
insert into web3_wallet
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="usdtBalance != null">usdt_balance,</if>
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="updatedAt != null">updated_at,</if>
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
<if test="trxBalance != null">trx_balance,</if>
|
||||
<if test="ethBalance != null">eth_balance,</if>
|
||||
<if test="password != null">password,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="usdtBalance != null">#{usdtBalance},</if>
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="updatedAt != null">#{updatedAt},</if>
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
<if test="trxBalance != null">#{trxBalance},</if>
|
||||
<if test="ethBalance != null">#{ethBalance},</if>
|
||||
<if test="password != null">#{password},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWeb3Wallet" parameterType="Web3Wallet">
|
||||
update web3_wallet
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="usdtBalance != null">usdt_balance = #{usdtBalance},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
<if test="trxBalance != null">trx_balance = #{trxBalance},</if>
|
||||
<if test="ethBalance != null">eth_balance = #{ethBalance},</if>
|
||||
<if test="password != null">password = #{password},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWeb3WalletById" parameterType="Long">
|
||||
delete from web3_wallet where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWeb3WalletByIds" parameterType="String">
|
||||
delete from web3_wallet where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user