流水表基础代码生成
This commit is contained in:
1 parent
cdf32a86cb
commit
8cc7bd0c17
14 files changed
+3356
No files matched your search
+170
@@ -0,0 +1,170 @@
|
||||
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.AppsBalanceLedger;
|
||||
import com.ruoyi.system.domain.AppsBalanceLedgerPlus;
|
||||
import com.ruoyi.system.service.IAppsBalanceLedgerService;
|
||||
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 2026-10-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/appsBalanceLedger")
|
||||
public class AppsBalanceLedgerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppsBalanceLedgerService appsBalanceLedgerService;
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<AppsBalanceLedgerPlus> list = appsBalanceLedgerService.getByIds(ids.getLongIds(),false,AppsBalanceLedgerPlus::getAppId,AppsBalanceLedgerPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<AppsBalanceLedgerPlus> list = appsBalanceLedgerService.getByIds(ids.getLongIds(),true,AppsBalanceLedgerPlus::getUserId,AppsBalanceLedgerPlus::getAppId,AppsBalanceLedgerPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = appsBalanceLedgerService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = appsBalanceLedgerService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询应用账面余额流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
startPage();
|
||||
List<AppsBalanceLedger> list = appsBalanceLedgerService.selectAppsBalanceLedgerList(appsBalanceLedger,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询应用账面余额流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
startPage();
|
||||
List<AppsBalanceLedger> list = appsBalanceLedgerService.selectAppsBalanceLedgerList(appsBalanceLedger,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出应用账面余额流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:export')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
List<AppsBalanceLedger> list = appsBalanceLedgerService.selectAppsBalanceLedgerList(appsBalanceLedger,false);
|
||||
ExcelUtil<AppsBalanceLedger> util = new ExcelUtil<AppsBalanceLedger>(AppsBalanceLedger.class);
|
||||
return util.exportExcel(list, "appsBalanceLedger");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取应用账面余额流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(appsBalanceLedgerService.selectAppsBalanceLedgerById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取应用账面余额流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(appsBalanceLedgerService.selectAppsBalanceLedgerById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增应用账面余额流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:add')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.insertAppsBalanceLedger(appsBalanceLedger,false));
|
||||
}
|
||||
/**
|
||||
* 新增应用账面余额流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-add')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.insertAppsBalanceLedger(appsBalanceLedger,true));
|
||||
}
|
||||
/**
|
||||
* 修改应用账面余额流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:edit')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.updateAppsBalanceLedger(appsBalanceLedger,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-edit')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.updateAppsBalanceLedger(appsBalanceLedger,true));
|
||||
}
|
||||
/**
|
||||
* 删除应用账面余额流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:remove')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.deleteAppsBalanceLedgerByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除应用账面余额流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-remove')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.deleteAppsBalanceLedgerByIds(ids,true));
|
||||
}
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
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.WalletAddressLedger;
|
||||
import com.ruoyi.system.domain.WalletAddressLedgerPlus;
|
||||
import com.ruoyi.system.service.IWalletAddressLedgerService;
|
||||
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 2026-10-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/walletAddressLedger")
|
||||
public class WalletAddressLedgerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWalletAddressLedgerService walletAddressLedgerService;
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<WalletAddressLedgerPlus> list = walletAddressLedgerService.getByIds(ids.getLongIds(),false,WalletAddressLedgerPlus::getWalletAddress,WalletAddressLedgerPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<WalletAddressLedgerPlus> list = walletAddressLedgerService.getByIds(ids.getLongIds(),true,WalletAddressLedgerPlus::getUserId,WalletAddressLedgerPlus::getWalletAddress,WalletAddressLedgerPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = walletAddressLedgerService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = walletAddressLedgerService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询钱包地址资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
startPage();
|
||||
List<WalletAddressLedger> list = walletAddressLedgerService.selectWalletAddressLedgerList(walletAddressLedger,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询钱包地址资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
startPage();
|
||||
List<WalletAddressLedger> list = walletAddressLedgerService.selectWalletAddressLedgerList(walletAddressLedger,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出钱包地址资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:export')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
List<WalletAddressLedger> list = walletAddressLedgerService.selectWalletAddressLedgerList(walletAddressLedger,false);
|
||||
ExcelUtil<WalletAddressLedger> util = new ExcelUtil<WalletAddressLedger>(WalletAddressLedger.class);
|
||||
return util.exportExcel(list, "walletAddressLedger");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取钱包地址资金流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(walletAddressLedgerService.selectWalletAddressLedgerById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取钱包地址资金流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(walletAddressLedgerService.selectWalletAddressLedgerById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增钱包地址资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:add')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.insertWalletAddressLedger(walletAddressLedger,false));
|
||||
}
|
||||
/**
|
||||
* 新增钱包地址资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-add')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.insertWalletAddressLedger(walletAddressLedger,true));
|
||||
}
|
||||
/**
|
||||
* 修改钱包地址资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:edit')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.updateWalletAddressLedger(walletAddressLedger,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-edit')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.updateWalletAddressLedger(walletAddressLedger,true));
|
||||
}
|
||||
/**
|
||||
* 删除钱包地址资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:remove')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.deleteWalletAddressLedgerByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除钱包地址资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-remove')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.deleteWalletAddressLedgerByIds(ids,true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,364 @@
|
||||
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;
|
||||
/**
|
||||
* 应用账面余额流水对象 apps_balance_ledger
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-13
|
||||
*/
|
||||
public class AppsBalanceLedger extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 流水ID */
|
||||
private Long id;
|
||||
|
||||
/** 平台流水号 */
|
||||
@Excel(name = "平台流水号")
|
||||
private String tradeNo;
|
||||
|
||||
/** 幂等键 */
|
||||
@Excel(name = "幂等键")
|
||||
private String idempotencyKey;
|
||||
|
||||
/** 应用ID */
|
||||
@Excel(name = "应用ID")
|
||||
private Long appId;
|
||||
|
||||
/** 应用所属用户 */
|
||||
@Excel(name = "应用所属用户")
|
||||
private Long userId;
|
||||
|
||||
/** 币种:USDT、TRX */
|
||||
@Excel(name = "币种:USDT、TRX")
|
||||
private String currency;
|
||||
|
||||
/** 余额类型:1可用,2冻结 */
|
||||
@Excel(name = "余额类型:1可用,2冻结")
|
||||
private Integer balanceType;
|
||||
|
||||
/** 业务类型 */
|
||||
@Excel(name = "业务类型")
|
||||
private String businessType;
|
||||
|
||||
/** 方向:1收入,2支出 */
|
||||
@Excel(name = "方向:1收入,2支出")
|
||||
private Integer direction;
|
||||
|
||||
/** 变动金额,始终为正数 */
|
||||
@Excel(name = "变动金额,始终为正数")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 变动前余额 */
|
||||
@Excel(name = "变动前余额")
|
||||
private BigDecimal balanceBefore;
|
||||
|
||||
/** 变动后余额 */
|
||||
@Excel(name = "变动后余额")
|
||||
private BigDecimal balanceAfter;
|
||||
|
||||
/** 变动前可用余额 */
|
||||
@Excel(name = "变动前可用余额")
|
||||
private BigDecimal availableBefore;
|
||||
|
||||
/** 变动后可用余额 */
|
||||
@Excel(name = "变动后可用余额")
|
||||
private BigDecimal availableAfter;
|
||||
|
||||
/** 变动前冻结余额 */
|
||||
@Excel(name = "变动前冻结余额")
|
||||
private BigDecimal frozenBefore;
|
||||
|
||||
/** 变动后冻结余额 */
|
||||
@Excel(name = "变动后冻结余额")
|
||||
private BigDecimal frozenAfter;
|
||||
|
||||
/** orders.id */
|
||||
@Excel(name = "orders.id")
|
||||
private Long orderId;
|
||||
|
||||
/** 商户订单号 */
|
||||
@Excel(name = "商户订单号")
|
||||
private String merchantOrderId;
|
||||
|
||||
/** 归集任务ID */
|
||||
@Excel(name = "归集任务ID")
|
||||
private Long aggregationTaskId;
|
||||
|
||||
/** 关联钱包流水ID */
|
||||
@Excel(name = "关联钱包流水ID")
|
||||
private Long walletLedgerId;
|
||||
|
||||
/** 链上交易哈希 */
|
||||
@Excel(name = "链上交易哈希")
|
||||
private String transactionId;
|
||||
|
||||
/** 操作人ID */
|
||||
@Excel(name = "操作人ID")
|
||||
private Long operatorId;
|
||||
|
||||
/** 请求追踪ID */
|
||||
@Excel(name = "请求追踪ID")
|
||||
private String requestId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "请求追踪ID", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTradeNo(String tradeNo)
|
||||
{
|
||||
this.tradeNo = tradeNo;
|
||||
}
|
||||
|
||||
public String getTradeNo()
|
||||
{
|
||||
return tradeNo;
|
||||
}
|
||||
public void setIdempotencyKey(String idempotencyKey)
|
||||
{
|
||||
this.idempotencyKey = idempotencyKey;
|
||||
}
|
||||
|
||||
public String getIdempotencyKey()
|
||||
{
|
||||
return idempotencyKey;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setCurrency(String currency)
|
||||
{
|
||||
this.currency = currency;
|
||||
}
|
||||
|
||||
public String getCurrency()
|
||||
{
|
||||
return currency;
|
||||
}
|
||||
public void setBalanceType(Integer balanceType)
|
||||
{
|
||||
this.balanceType = balanceType;
|
||||
}
|
||||
|
||||
public Integer getBalanceType()
|
||||
{
|
||||
return balanceType;
|
||||
}
|
||||
public void setBusinessType(String businessType)
|
||||
{
|
||||
this.businessType = businessType;
|
||||
}
|
||||
|
||||
public String getBusinessType()
|
||||
{
|
||||
return businessType;
|
||||
}
|
||||
public void setDirection(Integer direction)
|
||||
{
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public Integer getDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setBalanceBefore(BigDecimal balanceBefore)
|
||||
{
|
||||
this.balanceBefore = balanceBefore;
|
||||
}
|
||||
|
||||
public BigDecimal getBalanceBefore()
|
||||
{
|
||||
return balanceBefore;
|
||||
}
|
||||
public void setBalanceAfter(BigDecimal balanceAfter)
|
||||
{
|
||||
this.balanceAfter = balanceAfter;
|
||||
}
|
||||
|
||||
public BigDecimal getBalanceAfter()
|
||||
{
|
||||
return balanceAfter;
|
||||
}
|
||||
public void setAvailableBefore(BigDecimal availableBefore)
|
||||
{
|
||||
this.availableBefore = availableBefore;
|
||||
}
|
||||
|
||||
public BigDecimal getAvailableBefore()
|
||||
{
|
||||
return availableBefore;
|
||||
}
|
||||
public void setAvailableAfter(BigDecimal availableAfter)
|
||||
{
|
||||
this.availableAfter = availableAfter;
|
||||
}
|
||||
|
||||
public BigDecimal getAvailableAfter()
|
||||
{
|
||||
return availableAfter;
|
||||
}
|
||||
public void setFrozenBefore(BigDecimal frozenBefore)
|
||||
{
|
||||
this.frozenBefore = frozenBefore;
|
||||
}
|
||||
|
||||
public BigDecimal getFrozenBefore()
|
||||
{
|
||||
return frozenBefore;
|
||||
}
|
||||
public void setFrozenAfter(BigDecimal frozenAfter)
|
||||
{
|
||||
this.frozenAfter = frozenAfter;
|
||||
}
|
||||
|
||||
public BigDecimal getFrozenAfter()
|
||||
{
|
||||
return frozenAfter;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setMerchantOrderId(String merchantOrderId)
|
||||
{
|
||||
this.merchantOrderId = merchantOrderId;
|
||||
}
|
||||
|
||||
public String getMerchantOrderId()
|
||||
{
|
||||
return merchantOrderId;
|
||||
}
|
||||
public void setAggregationTaskId(Long aggregationTaskId)
|
||||
{
|
||||
this.aggregationTaskId = aggregationTaskId;
|
||||
}
|
||||
|
||||
public Long getAggregationTaskId()
|
||||
{
|
||||
return aggregationTaskId;
|
||||
}
|
||||
public void setWalletLedgerId(Long walletLedgerId)
|
||||
{
|
||||
this.walletLedgerId = walletLedgerId;
|
||||
}
|
||||
|
||||
public Long getWalletLedgerId()
|
||||
{
|
||||
return walletLedgerId;
|
||||
}
|
||||
public void setTransactionId(String transactionId)
|
||||
{
|
||||
this.transactionId = transactionId;
|
||||
}
|
||||
|
||||
public String getTransactionId()
|
||||
{
|
||||
return transactionId;
|
||||
}
|
||||
public void setOperatorId(Long operatorId)
|
||||
{
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
public Long getOperatorId()
|
||||
{
|
||||
return operatorId;
|
||||
}
|
||||
public void setRequestId(String requestId)
|
||||
{
|
||||
this.requestId = requestId;
|
||||
}
|
||||
|
||||
public String getRequestId()
|
||||
{
|
||||
return requestId;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tradeNo", getTradeNo())
|
||||
.append("idempotencyKey", getIdempotencyKey())
|
||||
.append("appId", getAppId())
|
||||
.append("userId", getUserId())
|
||||
.append("currency", getCurrency())
|
||||
.append("balanceType", getBalanceType())
|
||||
.append("businessType", getBusinessType())
|
||||
.append("direction", getDirection())
|
||||
.append("amount", getAmount())
|
||||
.append("balanceBefore", getBalanceBefore())
|
||||
.append("balanceAfter", getBalanceAfter())
|
||||
.append("availableBefore", getAvailableBefore())
|
||||
.append("availableAfter", getAvailableAfter())
|
||||
.append("frozenBefore", getFrozenBefore())
|
||||
.append("frozenAfter", getFrozenAfter())
|
||||
.append("orderId", getOrderId())
|
||||
.append("merchantOrderId", getMerchantOrderId())
|
||||
.append("aggregationTaskId", getAggregationTaskId())
|
||||
.append("walletLedgerId", getWalletLedgerId())
|
||||
.append("transactionId", getTransactionId())
|
||||
.append("operatorId", getOperatorId())
|
||||
.append("requestId", getRequestId())
|
||||
.append("remark", getRemark())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
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;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* 应用账面余额流水对象 apps_balance_ledger
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-13
|
||||
*/
|
||||
@TableName(value = "apps_balance_ledger")
|
||||
public class AppsBalanceLedgerPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 流水ID */
|
||||
private Long id;
|
||||
/** 平台流水号 */
|
||||
@Excel(name = "平台流水号")
|
||||
private String tradeNo;
|
||||
/** 幂等键 */
|
||||
@Excel(name = "幂等键")
|
||||
private String idempotencyKey;
|
||||
/** 应用ID */
|
||||
@Excel(name = "应用ID")
|
||||
private Long appId;
|
||||
/** 应用所属用户 */
|
||||
@Excel(name = "应用所属用户")
|
||||
private Long userId;
|
||||
/** 币种:USDT、TRX */
|
||||
@Excel(name = "币种:USDT、TRX")
|
||||
private String currency;
|
||||
/** 余额类型:1可用,2冻结 */
|
||||
@Excel(name = "余额类型:1可用,2冻结")
|
||||
private Integer balanceType;
|
||||
/** 业务类型 */
|
||||
@Excel(name = "业务类型")
|
||||
private String businessType;
|
||||
/** 方向:1收入,2支出 */
|
||||
@Excel(name = "方向:1收入,2支出")
|
||||
private Integer direction;
|
||||
/** 变动金额,始终为正数 */
|
||||
@Excel(name = "变动金额,始终为正数")
|
||||
private BigDecimal amount;
|
||||
/** 变动前余额 */
|
||||
@Excel(name = "变动前余额")
|
||||
private BigDecimal balanceBefore;
|
||||
/** 变动后余额 */
|
||||
@Excel(name = "变动后余额")
|
||||
private BigDecimal balanceAfter;
|
||||
/** 变动前可用余额 */
|
||||
@Excel(name = "变动前可用余额")
|
||||
private BigDecimal availableBefore;
|
||||
/** 变动后可用余额 */
|
||||
@Excel(name = "变动后可用余额")
|
||||
private BigDecimal availableAfter;
|
||||
/** 变动前冻结余额 */
|
||||
@Excel(name = "变动前冻结余额")
|
||||
private BigDecimal frozenBefore;
|
||||
/** 变动后冻结余额 */
|
||||
@Excel(name = "变动后冻结余额")
|
||||
private BigDecimal frozenAfter;
|
||||
/** orders.id */
|
||||
@Excel(name = "orders.id")
|
||||
private Long orderId;
|
||||
/** 商户订单号 */
|
||||
@Excel(name = "商户订单号")
|
||||
private String merchantOrderId;
|
||||
/** 归集任务ID */
|
||||
@Excel(name = "归集任务ID")
|
||||
private Long aggregationTaskId;
|
||||
/** 关联钱包流水ID */
|
||||
@Excel(name = "关联钱包流水ID")
|
||||
private Long walletLedgerId;
|
||||
/** 链上交易哈希 */
|
||||
@Excel(name = "链上交易哈希")
|
||||
private String transactionId;
|
||||
/** 操作人ID */
|
||||
@Excel(name = "操作人ID")
|
||||
private Long operatorId;
|
||||
/** 请求追踪ID */
|
||||
@Excel(name = "请求追踪ID")
|
||||
private String requestId;
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
/** $column.columnComment */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "备注", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTradeNo(String tradeNo)
|
||||
{
|
||||
this.tradeNo = tradeNo;
|
||||
}
|
||||
|
||||
public String getTradeNo()
|
||||
{
|
||||
return tradeNo;
|
||||
}
|
||||
public void setIdempotencyKey(String idempotencyKey)
|
||||
{
|
||||
this.idempotencyKey = idempotencyKey;
|
||||
}
|
||||
|
||||
public String getIdempotencyKey()
|
||||
{
|
||||
return idempotencyKey;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setCurrency(String currency)
|
||||
{
|
||||
this.currency = currency;
|
||||
}
|
||||
|
||||
public String getCurrency()
|
||||
{
|
||||
return currency;
|
||||
}
|
||||
public void setBalanceType(Integer balanceType)
|
||||
{
|
||||
this.balanceType = balanceType;
|
||||
}
|
||||
|
||||
public Integer getBalanceType()
|
||||
{
|
||||
return balanceType;
|
||||
}
|
||||
public void setBusinessType(String businessType)
|
||||
{
|
||||
this.businessType = businessType;
|
||||
}
|
||||
|
||||
public String getBusinessType()
|
||||
{
|
||||
return businessType;
|
||||
}
|
||||
public void setDirection(Integer direction)
|
||||
{
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public Integer getDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setBalanceBefore(BigDecimal balanceBefore)
|
||||
{
|
||||
this.balanceBefore = balanceBefore;
|
||||
}
|
||||
|
||||
public BigDecimal getBalanceBefore()
|
||||
{
|
||||
return balanceBefore;
|
||||
}
|
||||
public void setBalanceAfter(BigDecimal balanceAfter)
|
||||
{
|
||||
this.balanceAfter = balanceAfter;
|
||||
}
|
||||
|
||||
public BigDecimal getBalanceAfter()
|
||||
{
|
||||
return balanceAfter;
|
||||
}
|
||||
public void setAvailableBefore(BigDecimal availableBefore)
|
||||
{
|
||||
this.availableBefore = availableBefore;
|
||||
}
|
||||
|
||||
public BigDecimal getAvailableBefore()
|
||||
{
|
||||
return availableBefore;
|
||||
}
|
||||
public void setAvailableAfter(BigDecimal availableAfter)
|
||||
{
|
||||
this.availableAfter = availableAfter;
|
||||
}
|
||||
|
||||
public BigDecimal getAvailableAfter()
|
||||
{
|
||||
return availableAfter;
|
||||
}
|
||||
public void setFrozenBefore(BigDecimal frozenBefore)
|
||||
{
|
||||
this.frozenBefore = frozenBefore;
|
||||
}
|
||||
|
||||
public BigDecimal getFrozenBefore()
|
||||
{
|
||||
return frozenBefore;
|
||||
}
|
||||
public void setFrozenAfter(BigDecimal frozenAfter)
|
||||
{
|
||||
this.frozenAfter = frozenAfter;
|
||||
}
|
||||
|
||||
public BigDecimal getFrozenAfter()
|
||||
{
|
||||
return frozenAfter;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setMerchantOrderId(String merchantOrderId)
|
||||
{
|
||||
this.merchantOrderId = merchantOrderId;
|
||||
}
|
||||
|
||||
public String getMerchantOrderId()
|
||||
{
|
||||
return merchantOrderId;
|
||||
}
|
||||
public void setAggregationTaskId(Long aggregationTaskId)
|
||||
{
|
||||
this.aggregationTaskId = aggregationTaskId;
|
||||
}
|
||||
|
||||
public Long getAggregationTaskId()
|
||||
{
|
||||
return aggregationTaskId;
|
||||
}
|
||||
public void setWalletLedgerId(Long walletLedgerId)
|
||||
{
|
||||
this.walletLedgerId = walletLedgerId;
|
||||
}
|
||||
|
||||
public Long getWalletLedgerId()
|
||||
{
|
||||
return walletLedgerId;
|
||||
}
|
||||
public void setTransactionId(String transactionId)
|
||||
{
|
||||
this.transactionId = transactionId;
|
||||
}
|
||||
|
||||
public String getTransactionId()
|
||||
{
|
||||
return transactionId;
|
||||
}
|
||||
public void setOperatorId(Long operatorId)
|
||||
{
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
public Long getOperatorId()
|
||||
{
|
||||
return operatorId;
|
||||
}
|
||||
public void setRequestId(String requestId)
|
||||
{
|
||||
this.requestId = requestId;
|
||||
}
|
||||
|
||||
public String getRequestId()
|
||||
{
|
||||
return requestId;
|
||||
}
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tradeNo", getTradeNo())
|
||||
.append("idempotencyKey", getIdempotencyKey())
|
||||
.append("appId", getAppId())
|
||||
.append("userId", getUserId())
|
||||
.append("currency", getCurrency())
|
||||
.append("balanceType", getBalanceType())
|
||||
.append("businessType", getBusinessType())
|
||||
.append("direction", getDirection())
|
||||
.append("amount", getAmount())
|
||||
.append("balanceBefore", getBalanceBefore())
|
||||
.append("balanceAfter", getBalanceAfter())
|
||||
.append("availableBefore", getAvailableBefore())
|
||||
.append("availableAfter", getAvailableAfter())
|
||||
.append("frozenBefore", getFrozenBefore())
|
||||
.append("frozenAfter", getFrozenAfter())
|
||||
.append("orderId", getOrderId())
|
||||
.append("merchantOrderId", getMerchantOrderId())
|
||||
.append("aggregationTaskId", getAggregationTaskId())
|
||||
.append("walletLedgerId", getWalletLedgerId())
|
||||
.append("transactionId", getTransactionId())
|
||||
.append("operatorId", getOperatorId())
|
||||
.append("requestId", getRequestId())
|
||||
.append("remark", getRemark())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,534 @@
|
||||
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;
|
||||
/**
|
||||
* 钱包地址资金流水对象 wallet_address_ledger
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-13
|
||||
*/
|
||||
public class WalletAddressLedger extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 流水ID */
|
||||
private Long id;
|
||||
|
||||
/** 平台流水号,同一业务事件下不同币种可共用 */
|
||||
@Excel(name = "平台流水号,同一业务事件下不同币种可共用")
|
||||
private String tradeNo;
|
||||
|
||||
/** 幂等键 */
|
||||
@Excel(name = "幂等键")
|
||||
private String idempotencyKey;
|
||||
|
||||
/** 所属应用ID */
|
||||
@Excel(name = "所属应用ID")
|
||||
private Long appId;
|
||||
|
||||
/** 所属用户ID */
|
||||
@Excel(name = "所属用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** wallet_address主键 */
|
||||
@Excel(name = "wallet_address主键")
|
||||
private Long walletAddressId;
|
||||
|
||||
/** 发生余额变化的钱包地址 */
|
||||
@Excel(name = "发生余额变化的钱包地址")
|
||||
private String walletAddress;
|
||||
|
||||
/** 交易对手地址 */
|
||||
@Excel(name = "交易对手地址")
|
||||
private String counterpartyAddress;
|
||||
|
||||
/** 币种:USDT、TRX */
|
||||
@Excel(name = "币种:USDT、TRX")
|
||||
private String currency;
|
||||
|
||||
/** 业务类型 */
|
||||
@Excel(name = "业务类型")
|
||||
private String businessType;
|
||||
|
||||
/** 方向:1收入,2支出 */
|
||||
@Excel(name = "方向:1收入,2支出")
|
||||
private Integer direction;
|
||||
|
||||
/** 变动金额,始终为正数 */
|
||||
@Excel(name = "变动金额,始终为正数")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 操作前链上余额 */
|
||||
@Excel(name = "操作前链上余额")
|
||||
private BigDecimal balanceBefore;
|
||||
|
||||
/** 操作后链上余额 */
|
||||
@Excel(name = "操作后链上余额")
|
||||
private BigDecimal balanceAfter;
|
||||
|
||||
/** 手续费币种,通常为TRX */
|
||||
@Excel(name = "手续费币种,通常为TRX")
|
||||
private String feeCurrency;
|
||||
|
||||
/** 实际手续费 */
|
||||
@Excel(name = "实际手续费")
|
||||
private BigDecimal feeAmount;
|
||||
|
||||
/** 实际消耗能量 */
|
||||
@Excel(name = "实际消耗能量")
|
||||
private Long energyUsed;
|
||||
|
||||
/** 实际消耗带宽 */
|
||||
@Excel(name = "实际消耗带宽")
|
||||
private Long bandwidthUsed;
|
||||
|
||||
/** 资源不足燃烧的TRX */
|
||||
@Excel(name = "资源不足燃烧的TRX")
|
||||
private BigDecimal burnedTrx;
|
||||
|
||||
/** orders.id */
|
||||
@Excel(name = "orders.id")
|
||||
private Long orderId;
|
||||
|
||||
/** 商户订单号 */
|
||||
@Excel(name = "商户订单号")
|
||||
private String merchantOrderId;
|
||||
|
||||
/** 平台订单交易号 */
|
||||
@Excel(name = "平台订单交易号")
|
||||
private String tradeId;
|
||||
|
||||
/** 归集任务ID */
|
||||
@Excel(name = "归集任务ID")
|
||||
private Long aggregationTaskId;
|
||||
|
||||
/** 归集明细ID */
|
||||
@Excel(name = "归集明细ID")
|
||||
private Long aggregationItemId;
|
||||
|
||||
/** 链上交易哈希 */
|
||||
@Excel(name = "链上交易哈希")
|
||||
private String transactionId;
|
||||
|
||||
/** 区块高度 */
|
||||
@Excel(name = "区块高度")
|
||||
private Long blockNumber;
|
||||
|
||||
/** 链上确认时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "链上确认时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date blockTime;
|
||||
|
||||
/** 确认数 */
|
||||
@Excel(name = "确认数")
|
||||
private Long confirmationCount;
|
||||
|
||||
/** 0处理中,1成功,2失败,3取消 */
|
||||
@Excel(name = "0处理中,1成功,2失败,3取消")
|
||||
private Integer status;
|
||||
|
||||
/** 来源:CHAIN、ORDER、AGGREGATION、MANUAL、SYSTEM */
|
||||
@Excel(name = "来源:CHAIN、ORDER、AGGREGATION、MANUAL、SYSTEM")
|
||||
private String sourceType;
|
||||
|
||||
/** 请求追踪ID */
|
||||
@Excel(name = "请求追踪ID")
|
||||
private String requestId;
|
||||
|
||||
/** 后台操作人ID */
|
||||
@Excel(name = "后台操作人ID")
|
||||
private Long operatorId;
|
||||
|
||||
/** 失败代码 */
|
||||
@Excel(name = "失败代码")
|
||||
private String errorCode;
|
||||
|
||||
/** 脱敏后的失败信息 */
|
||||
@Excel(name = "脱敏后的失败信息")
|
||||
private String errorMessage;
|
||||
|
||||
/** $column.columnComment */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "脱敏后的失败信息", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** $column.columnComment */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "脱敏后的失败信息", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTradeNo(String tradeNo)
|
||||
{
|
||||
this.tradeNo = tradeNo;
|
||||
}
|
||||
|
||||
public String getTradeNo()
|
||||
{
|
||||
return tradeNo;
|
||||
}
|
||||
public void setIdempotencyKey(String idempotencyKey)
|
||||
{
|
||||
this.idempotencyKey = idempotencyKey;
|
||||
}
|
||||
|
||||
public String getIdempotencyKey()
|
||||
{
|
||||
return idempotencyKey;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setWalletAddressId(Long walletAddressId)
|
||||
{
|
||||
this.walletAddressId = walletAddressId;
|
||||
}
|
||||
|
||||
public Long getWalletAddressId()
|
||||
{
|
||||
return walletAddressId;
|
||||
}
|
||||
public void setWalletAddress(String walletAddress)
|
||||
{
|
||||
this.walletAddress = walletAddress;
|
||||
}
|
||||
|
||||
public String getWalletAddress()
|
||||
{
|
||||
return walletAddress;
|
||||
}
|
||||
public void setCounterpartyAddress(String counterpartyAddress)
|
||||
{
|
||||
this.counterpartyAddress = counterpartyAddress;
|
||||
}
|
||||
|
||||
public String getCounterpartyAddress()
|
||||
{
|
||||
return counterpartyAddress;
|
||||
}
|
||||
public void setCurrency(String currency)
|
||||
{
|
||||
this.currency = currency;
|
||||
}
|
||||
|
||||
public String getCurrency()
|
||||
{
|
||||
return currency;
|
||||
}
|
||||
public void setBusinessType(String businessType)
|
||||
{
|
||||
this.businessType = businessType;
|
||||
}
|
||||
|
||||
public String getBusinessType()
|
||||
{
|
||||
return businessType;
|
||||
}
|
||||
public void setDirection(Integer direction)
|
||||
{
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public Integer getDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setBalanceBefore(BigDecimal balanceBefore)
|
||||
{
|
||||
this.balanceBefore = balanceBefore;
|
||||
}
|
||||
|
||||
public BigDecimal getBalanceBefore()
|
||||
{
|
||||
return balanceBefore;
|
||||
}
|
||||
public void setBalanceAfter(BigDecimal balanceAfter)
|
||||
{
|
||||
this.balanceAfter = balanceAfter;
|
||||
}
|
||||
|
||||
public BigDecimal getBalanceAfter()
|
||||
{
|
||||
return balanceAfter;
|
||||
}
|
||||
public void setFeeCurrency(String feeCurrency)
|
||||
{
|
||||
this.feeCurrency = feeCurrency;
|
||||
}
|
||||
|
||||
public String getFeeCurrency()
|
||||
{
|
||||
return feeCurrency;
|
||||
}
|
||||
public void setFeeAmount(BigDecimal feeAmount)
|
||||
{
|
||||
this.feeAmount = feeAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getFeeAmount()
|
||||
{
|
||||
return feeAmount;
|
||||
}
|
||||
public void setEnergyUsed(Long energyUsed)
|
||||
{
|
||||
this.energyUsed = energyUsed;
|
||||
}
|
||||
|
||||
public Long getEnergyUsed()
|
||||
{
|
||||
return energyUsed;
|
||||
}
|
||||
public void setBandwidthUsed(Long bandwidthUsed)
|
||||
{
|
||||
this.bandwidthUsed = bandwidthUsed;
|
||||
}
|
||||
|
||||
public Long getBandwidthUsed()
|
||||
{
|
||||
return bandwidthUsed;
|
||||
}
|
||||
public void setBurnedTrx(BigDecimal burnedTrx)
|
||||
{
|
||||
this.burnedTrx = burnedTrx;
|
||||
}
|
||||
|
||||
public BigDecimal getBurnedTrx()
|
||||
{
|
||||
return burnedTrx;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setMerchantOrderId(String merchantOrderId)
|
||||
{
|
||||
this.merchantOrderId = merchantOrderId;
|
||||
}
|
||||
|
||||
public String getMerchantOrderId()
|
||||
{
|
||||
return merchantOrderId;
|
||||
}
|
||||
public void setTradeId(String tradeId)
|
||||
{
|
||||
this.tradeId = tradeId;
|
||||
}
|
||||
|
||||
public String getTradeId()
|
||||
{
|
||||
return tradeId;
|
||||
}
|
||||
public void setAggregationTaskId(Long aggregationTaskId)
|
||||
{
|
||||
this.aggregationTaskId = aggregationTaskId;
|
||||
}
|
||||
|
||||
public Long getAggregationTaskId()
|
||||
{
|
||||
return aggregationTaskId;
|
||||
}
|
||||
public void setAggregationItemId(Long aggregationItemId)
|
||||
{
|
||||
this.aggregationItemId = aggregationItemId;
|
||||
}
|
||||
|
||||
public Long getAggregationItemId()
|
||||
{
|
||||
return aggregationItemId;
|
||||
}
|
||||
public void setTransactionId(String transactionId)
|
||||
{
|
||||
this.transactionId = transactionId;
|
||||
}
|
||||
|
||||
public String getTransactionId()
|
||||
{
|
||||
return transactionId;
|
||||
}
|
||||
public void setBlockNumber(Long blockNumber)
|
||||
{
|
||||
this.blockNumber = blockNumber;
|
||||
}
|
||||
|
||||
public Long getBlockNumber()
|
||||
{
|
||||
return blockNumber;
|
||||
}
|
||||
public void setBlockTime(Date blockTime)
|
||||
{
|
||||
this.blockTime = blockTime;
|
||||
}
|
||||
|
||||
public Date getBlockTime()
|
||||
{
|
||||
return blockTime;
|
||||
}
|
||||
public void setConfirmationCount(Long confirmationCount)
|
||||
{
|
||||
this.confirmationCount = confirmationCount;
|
||||
}
|
||||
|
||||
public Long getConfirmationCount()
|
||||
{
|
||||
return confirmationCount;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setSourceType(String sourceType)
|
||||
{
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
|
||||
public String getSourceType()
|
||||
{
|
||||
return sourceType;
|
||||
}
|
||||
public void setRequestId(String requestId)
|
||||
{
|
||||
this.requestId = requestId;
|
||||
}
|
||||
|
||||
public String getRequestId()
|
||||
{
|
||||
return requestId;
|
||||
}
|
||||
public void setOperatorId(Long operatorId)
|
||||
{
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
public Long getOperatorId()
|
||||
{
|
||||
return operatorId;
|
||||
}
|
||||
public void setErrorCode(String errorCode)
|
||||
{
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
public String getErrorCode()
|
||||
{
|
||||
return errorCode;
|
||||
}
|
||||
public void setErrorMessage(String errorMessage)
|
||||
{
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public String getErrorMessage()
|
||||
{
|
||||
return errorMessage;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tradeNo", getTradeNo())
|
||||
.append("idempotencyKey", getIdempotencyKey())
|
||||
.append("appId", getAppId())
|
||||
.append("userId", getUserId())
|
||||
.append("walletAddressId", getWalletAddressId())
|
||||
.append("walletAddress", getWalletAddress())
|
||||
.append("counterpartyAddress", getCounterpartyAddress())
|
||||
.append("currency", getCurrency())
|
||||
.append("businessType", getBusinessType())
|
||||
.append("direction", getDirection())
|
||||
.append("amount", getAmount())
|
||||
.append("balanceBefore", getBalanceBefore())
|
||||
.append("balanceAfter", getBalanceAfter())
|
||||
.append("feeCurrency", getFeeCurrency())
|
||||
.append("feeAmount", getFeeAmount())
|
||||
.append("energyUsed", getEnergyUsed())
|
||||
.append("bandwidthUsed", getBandwidthUsed())
|
||||
.append("burnedTrx", getBurnedTrx())
|
||||
.append("orderId", getOrderId())
|
||||
.append("merchantOrderId", getMerchantOrderId())
|
||||
.append("tradeId", getTradeId())
|
||||
.append("aggregationTaskId", getAggregationTaskId())
|
||||
.append("aggregationItemId", getAggregationItemId())
|
||||
.append("transactionId", getTransactionId())
|
||||
.append("blockNumber", getBlockNumber())
|
||||
.append("blockTime", getBlockTime())
|
||||
.append("confirmationCount", getConfirmationCount())
|
||||
.append("status", getStatus())
|
||||
.append("sourceType", getSourceType())
|
||||
.append("requestId", getRequestId())
|
||||
.append("operatorId", getOperatorId())
|
||||
.append("errorCode", getErrorCode())
|
||||
.append("errorMessage", getErrorMessage())
|
||||
.append("remark", getRemark())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,513 @@
|
||||
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;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* 钱包地址资金流水对象 wallet_address_ledger
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-13
|
||||
*/
|
||||
@TableName(value = "wallet_address_ledger")
|
||||
public class WalletAddressLedgerPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 流水ID */
|
||||
private Long id;
|
||||
/** 平台流水号,同一业务事件下不同币种可共用 */
|
||||
@Excel(name = "平台流水号,同一业务事件下不同币种可共用")
|
||||
private String tradeNo;
|
||||
/** 幂等键 */
|
||||
@Excel(name = "幂等键")
|
||||
private String idempotencyKey;
|
||||
/** 所属应用ID */
|
||||
@Excel(name = "所属应用ID")
|
||||
private Long appId;
|
||||
/** 所属用户ID */
|
||||
@Excel(name = "所属用户ID")
|
||||
private Long userId;
|
||||
/** wallet_address主键 */
|
||||
@Excel(name = "wallet_address主键")
|
||||
private Long walletAddressId;
|
||||
/** 发生余额变化的钱包地址 */
|
||||
@Excel(name = "发生余额变化的钱包地址")
|
||||
private String walletAddress;
|
||||
/** 交易对手地址 */
|
||||
@Excel(name = "交易对手地址")
|
||||
private String counterpartyAddress;
|
||||
/** 币种:USDT、TRX */
|
||||
@Excel(name = "币种:USDT、TRX")
|
||||
private String currency;
|
||||
/** 业务类型 */
|
||||
@Excel(name = "业务类型")
|
||||
private String businessType;
|
||||
/** 方向:1收入,2支出 */
|
||||
@Excel(name = "方向:1收入,2支出")
|
||||
private Integer direction;
|
||||
/** 变动金额,始终为正数 */
|
||||
@Excel(name = "变动金额,始终为正数")
|
||||
private BigDecimal amount;
|
||||
/** 操作前链上余额 */
|
||||
@Excel(name = "操作前链上余额")
|
||||
private BigDecimal balanceBefore;
|
||||
/** 操作后链上余额 */
|
||||
@Excel(name = "操作后链上余额")
|
||||
private BigDecimal balanceAfter;
|
||||
/** 手续费币种,通常为TRX */
|
||||
@Excel(name = "手续费币种,通常为TRX")
|
||||
private String feeCurrency;
|
||||
/** 实际手续费 */
|
||||
@Excel(name = "实际手续费")
|
||||
private BigDecimal feeAmount;
|
||||
/** 实际消耗能量 */
|
||||
@Excel(name = "实际消耗能量")
|
||||
private Long energyUsed;
|
||||
/** 实际消耗带宽 */
|
||||
@Excel(name = "实际消耗带宽")
|
||||
private Long bandwidthUsed;
|
||||
/** 资源不足燃烧的TRX */
|
||||
@Excel(name = "资源不足燃烧的TRX")
|
||||
private BigDecimal burnedTrx;
|
||||
/** orders.id */
|
||||
@Excel(name = "orders.id")
|
||||
private Long orderId;
|
||||
/** 商户订单号 */
|
||||
@Excel(name = "商户订单号")
|
||||
private String merchantOrderId;
|
||||
/** 平台订单交易号 */
|
||||
@Excel(name = "平台订单交易号")
|
||||
private String tradeId;
|
||||
/** 归集任务ID */
|
||||
@Excel(name = "归集任务ID")
|
||||
private Long aggregationTaskId;
|
||||
/** 归集明细ID */
|
||||
@Excel(name = "归集明细ID")
|
||||
private Long aggregationItemId;
|
||||
/** 链上交易哈希 */
|
||||
@Excel(name = "链上交易哈希")
|
||||
private String transactionId;
|
||||
/** 区块高度 */
|
||||
@Excel(name = "区块高度")
|
||||
private Long blockNumber;
|
||||
/** 链上确认时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "链上确认时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date blockTime;
|
||||
/** 确认数 */
|
||||
@Excel(name = "确认数")
|
||||
private Long confirmationCount;
|
||||
/** 0处理中,1成功,2失败,3取消 */
|
||||
@Excel(name = "0处理中,1成功,2失败,3取消")
|
||||
private Integer status;
|
||||
/** 来源:CHAIN、ORDER、AGGREGATION、MANUAL、SYSTEM */
|
||||
@Excel(name = "来源:CHAIN、ORDER、AGGREGATION、MANUAL、SYSTEM")
|
||||
private String sourceType;
|
||||
/** 请求追踪ID */
|
||||
@Excel(name = "请求追踪ID")
|
||||
private String requestId;
|
||||
/** 后台操作人ID */
|
||||
@Excel(name = "后台操作人ID")
|
||||
private Long operatorId;
|
||||
/** 失败代码 */
|
||||
@Excel(name = "失败代码")
|
||||
private String errorCode;
|
||||
/** 脱敏后的失败信息 */
|
||||
@Excel(name = "脱敏后的失败信息")
|
||||
private String errorMessage;
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
/** $column.columnComment */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "备注", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** $column.columnComment */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "备注", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTradeNo(String tradeNo)
|
||||
{
|
||||
this.tradeNo = tradeNo;
|
||||
}
|
||||
|
||||
public String getTradeNo()
|
||||
{
|
||||
return tradeNo;
|
||||
}
|
||||
public void setIdempotencyKey(String idempotencyKey)
|
||||
{
|
||||
this.idempotencyKey = idempotencyKey;
|
||||
}
|
||||
|
||||
public String getIdempotencyKey()
|
||||
{
|
||||
return idempotencyKey;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setWalletAddressId(Long walletAddressId)
|
||||
{
|
||||
this.walletAddressId = walletAddressId;
|
||||
}
|
||||
|
||||
public Long getWalletAddressId()
|
||||
{
|
||||
return walletAddressId;
|
||||
}
|
||||
public void setWalletAddress(String walletAddress)
|
||||
{
|
||||
this.walletAddress = walletAddress;
|
||||
}
|
||||
|
||||
public String getWalletAddress()
|
||||
{
|
||||
return walletAddress;
|
||||
}
|
||||
public void setCounterpartyAddress(String counterpartyAddress)
|
||||
{
|
||||
this.counterpartyAddress = counterpartyAddress;
|
||||
}
|
||||
|
||||
public String getCounterpartyAddress()
|
||||
{
|
||||
return counterpartyAddress;
|
||||
}
|
||||
public void setCurrency(String currency)
|
||||
{
|
||||
this.currency = currency;
|
||||
}
|
||||
|
||||
public String getCurrency()
|
||||
{
|
||||
return currency;
|
||||
}
|
||||
public void setBusinessType(String businessType)
|
||||
{
|
||||
this.businessType = businessType;
|
||||
}
|
||||
|
||||
public String getBusinessType()
|
||||
{
|
||||
return businessType;
|
||||
}
|
||||
public void setDirection(Integer direction)
|
||||
{
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public Integer getDirection()
|
||||
{
|
||||
return direction;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setBalanceBefore(BigDecimal balanceBefore)
|
||||
{
|
||||
this.balanceBefore = balanceBefore;
|
||||
}
|
||||
|
||||
public BigDecimal getBalanceBefore()
|
||||
{
|
||||
return balanceBefore;
|
||||
}
|
||||
public void setBalanceAfter(BigDecimal balanceAfter)
|
||||
{
|
||||
this.balanceAfter = balanceAfter;
|
||||
}
|
||||
|
||||
public BigDecimal getBalanceAfter()
|
||||
{
|
||||
return balanceAfter;
|
||||
}
|
||||
public void setFeeCurrency(String feeCurrency)
|
||||
{
|
||||
this.feeCurrency = feeCurrency;
|
||||
}
|
||||
|
||||
public String getFeeCurrency()
|
||||
{
|
||||
return feeCurrency;
|
||||
}
|
||||
public void setFeeAmount(BigDecimal feeAmount)
|
||||
{
|
||||
this.feeAmount = feeAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getFeeAmount()
|
||||
{
|
||||
return feeAmount;
|
||||
}
|
||||
public void setEnergyUsed(Long energyUsed)
|
||||
{
|
||||
this.energyUsed = energyUsed;
|
||||
}
|
||||
|
||||
public Long getEnergyUsed()
|
||||
{
|
||||
return energyUsed;
|
||||
}
|
||||
public void setBandwidthUsed(Long bandwidthUsed)
|
||||
{
|
||||
this.bandwidthUsed = bandwidthUsed;
|
||||
}
|
||||
|
||||
public Long getBandwidthUsed()
|
||||
{
|
||||
return bandwidthUsed;
|
||||
}
|
||||
public void setBurnedTrx(BigDecimal burnedTrx)
|
||||
{
|
||||
this.burnedTrx = burnedTrx;
|
||||
}
|
||||
|
||||
public BigDecimal getBurnedTrx()
|
||||
{
|
||||
return burnedTrx;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setMerchantOrderId(String merchantOrderId)
|
||||
{
|
||||
this.merchantOrderId = merchantOrderId;
|
||||
}
|
||||
|
||||
public String getMerchantOrderId()
|
||||
{
|
||||
return merchantOrderId;
|
||||
}
|
||||
public void setTradeId(String tradeId)
|
||||
{
|
||||
this.tradeId = tradeId;
|
||||
}
|
||||
|
||||
public String getTradeId()
|
||||
{
|
||||
return tradeId;
|
||||
}
|
||||
public void setAggregationTaskId(Long aggregationTaskId)
|
||||
{
|
||||
this.aggregationTaskId = aggregationTaskId;
|
||||
}
|
||||
|
||||
public Long getAggregationTaskId()
|
||||
{
|
||||
return aggregationTaskId;
|
||||
}
|
||||
public void setAggregationItemId(Long aggregationItemId)
|
||||
{
|
||||
this.aggregationItemId = aggregationItemId;
|
||||
}
|
||||
|
||||
public Long getAggregationItemId()
|
||||
{
|
||||
return aggregationItemId;
|
||||
}
|
||||
public void setTransactionId(String transactionId)
|
||||
{
|
||||
this.transactionId = transactionId;
|
||||
}
|
||||
|
||||
public String getTransactionId()
|
||||
{
|
||||
return transactionId;
|
||||
}
|
||||
public void setBlockNumber(Long blockNumber)
|
||||
{
|
||||
this.blockNumber = blockNumber;
|
||||
}
|
||||
|
||||
public Long getBlockNumber()
|
||||
{
|
||||
return blockNumber;
|
||||
}
|
||||
public void setBlockTime(Date blockTime)
|
||||
{
|
||||
this.blockTime = blockTime;
|
||||
}
|
||||
|
||||
public Date getBlockTime()
|
||||
{
|
||||
return blockTime;
|
||||
}
|
||||
public void setConfirmationCount(Long confirmationCount)
|
||||
{
|
||||
this.confirmationCount = confirmationCount;
|
||||
}
|
||||
|
||||
public Long getConfirmationCount()
|
||||
{
|
||||
return confirmationCount;
|
||||
}
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setSourceType(String sourceType)
|
||||
{
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
|
||||
public String getSourceType()
|
||||
{
|
||||
return sourceType;
|
||||
}
|
||||
public void setRequestId(String requestId)
|
||||
{
|
||||
this.requestId = requestId;
|
||||
}
|
||||
|
||||
public String getRequestId()
|
||||
{
|
||||
return requestId;
|
||||
}
|
||||
public void setOperatorId(Long operatorId)
|
||||
{
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
public Long getOperatorId()
|
||||
{
|
||||
return operatorId;
|
||||
}
|
||||
public void setErrorCode(String errorCode)
|
||||
{
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
public String getErrorCode()
|
||||
{
|
||||
return errorCode;
|
||||
}
|
||||
public void setErrorMessage(String errorMessage)
|
||||
{
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public String getErrorMessage()
|
||||
{
|
||||
return errorMessage;
|
||||
}
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tradeNo", getTradeNo())
|
||||
.append("idempotencyKey", getIdempotencyKey())
|
||||
.append("appId", getAppId())
|
||||
.append("userId", getUserId())
|
||||
.append("walletAddressId", getWalletAddressId())
|
||||
.append("walletAddress", getWalletAddress())
|
||||
.append("counterpartyAddress", getCounterpartyAddress())
|
||||
.append("currency", getCurrency())
|
||||
.append("businessType", getBusinessType())
|
||||
.append("direction", getDirection())
|
||||
.append("amount", getAmount())
|
||||
.append("balanceBefore", getBalanceBefore())
|
||||
.append("balanceAfter", getBalanceAfter())
|
||||
.append("feeCurrency", getFeeCurrency())
|
||||
.append("feeAmount", getFeeAmount())
|
||||
.append("energyUsed", getEnergyUsed())
|
||||
.append("bandwidthUsed", getBandwidthUsed())
|
||||
.append("burnedTrx", getBurnedTrx())
|
||||
.append("orderId", getOrderId())
|
||||
.append("merchantOrderId", getMerchantOrderId())
|
||||
.append("tradeId", getTradeId())
|
||||
.append("aggregationTaskId", getAggregationTaskId())
|
||||
.append("aggregationItemId", getAggregationItemId())
|
||||
.append("transactionId", getTransactionId())
|
||||
.append("blockNumber", getBlockNumber())
|
||||
.append("blockTime", getBlockTime())
|
||||
.append("confirmationCount", getConfirmationCount())
|
||||
.append("status", getStatus())
|
||||
.append("sourceType", getSourceType())
|
||||
.append("requestId", getRequestId())
|
||||
.append("operatorId", getOperatorId())
|
||||
.append("errorCode", getErrorCode())
|
||||
.append("errorMessage", getErrorMessage())
|
||||
.append("remark", getRemark())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
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.AppsBalanceLedger;
|
||||
import com.ruoyi.system.domain.AppsBalanceLedgerPlus;
|
||||
|
||||
/**
|
||||
* 应用账面余额流水Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-13
|
||||
*/
|
||||
public interface AppsBalanceLedgerMapper extends BaseMapper<AppsBalanceLedgerPlus>
|
||||
{
|
||||
/**
|
||||
* 查询应用账面余额流水
|
||||
*
|
||||
* @param id 应用账面余额流水ID
|
||||
* @return 应用账面余额流水
|
||||
*/
|
||||
public AppsBalanceLedger selectAppsBalanceLedgerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询应用账面余额流水列表
|
||||
*
|
||||
* @param appsBalanceLedger 应用账面余额流水
|
||||
* @return 应用账面余额流水集合
|
||||
*/
|
||||
public List<AppsBalanceLedger> selectAppsBalanceLedgerList(AppsBalanceLedger appsBalanceLedger);
|
||||
|
||||
/**
|
||||
* 新增应用账面余额流水
|
||||
*
|
||||
* @param appsBalanceLedger 应用账面余额流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppsBalanceLedger(AppsBalanceLedger appsBalanceLedger);
|
||||
|
||||
/**
|
||||
* 修改应用账面余额流水
|
||||
*
|
||||
* @param appsBalanceLedger 应用账面余额流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppsBalanceLedger(AppsBalanceLedger appsBalanceLedger);
|
||||
|
||||
/**
|
||||
* 删除应用账面余额流水
|
||||
*
|
||||
* @param id 应用账面余额流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppsBalanceLedgerById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除应用账面余额流水
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppsBalanceLedgerByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
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.WalletAddressLedger;
|
||||
import com.ruoyi.system.domain.WalletAddressLedgerPlus;
|
||||
|
||||
/**
|
||||
* 钱包地址资金流水Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-13
|
||||
*/
|
||||
public interface WalletAddressLedgerMapper extends BaseMapper<WalletAddressLedgerPlus>
|
||||
{
|
||||
/**
|
||||
* 查询钱包地址资金流水
|
||||
*
|
||||
* @param id 钱包地址资金流水ID
|
||||
* @return 钱包地址资金流水
|
||||
*/
|
||||
public WalletAddressLedger selectWalletAddressLedgerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询钱包地址资金流水列表
|
||||
*
|
||||
* @param walletAddressLedger 钱包地址资金流水
|
||||
* @return 钱包地址资金流水集合
|
||||
*/
|
||||
public List<WalletAddressLedger> selectWalletAddressLedgerList(WalletAddressLedger walletAddressLedger);
|
||||
|
||||
/**
|
||||
* 新增钱包地址资金流水
|
||||
*
|
||||
* @param walletAddressLedger 钱包地址资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWalletAddressLedger(WalletAddressLedger walletAddressLedger);
|
||||
|
||||
/**
|
||||
* 修改钱包地址资金流水
|
||||
*
|
||||
* @param walletAddressLedger 钱包地址资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWalletAddressLedger(WalletAddressLedger walletAddressLedger);
|
||||
|
||||
/**
|
||||
* 删除钱包地址资金流水
|
||||
*
|
||||
* @param id 钱包地址资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWalletAddressLedgerById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除钱包地址资金流水
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWalletAddressLedgerByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
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.AppsBalanceLedger;
|
||||
import com.ruoyi.system.domain.AppsBalanceLedgerPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 应用账面余额流水Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-13
|
||||
*/
|
||||
public interface IAppsBalanceLedgerService extends IService<AppsBalanceLedgerPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询应用账面余额流水
|
||||
*
|
||||
* @param id 应用账面余额流水ID
|
||||
* @return 应用账面余额流水
|
||||
*/
|
||||
public AppsBalanceLedger selectAppsBalanceLedgerById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询应用账面余额流水列表
|
||||
*
|
||||
* @param appsBalanceLedger 应用账面余额流水
|
||||
* @return 应用账面余额流水集合
|
||||
*/
|
||||
public List<AppsBalanceLedger> selectAppsBalanceLedgerList(AppsBalanceLedger appsBalanceLedger,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增应用账面余额流水
|
||||
*
|
||||
* @param appsBalanceLedger 应用账面余额流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppsBalanceLedger(AppsBalanceLedger appsBalanceLedger,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改应用账面余额流水
|
||||
*
|
||||
* @param appsBalanceLedger 应用账面余额流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppsBalanceLedger(AppsBalanceLedger appsBalanceLedger,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除应用账面余额流水
|
||||
*
|
||||
* @param ids 需要删除的应用账面余额流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppsBalanceLedgerByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除应用账面余额流水信息
|
||||
*
|
||||
* @param id 应用账面余额流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppsBalanceLedgerById(Long id,boolean isUser);
|
||||
|
||||
List<AppsBalanceLedgerPlus> getByIds(List<Long> ids,boolean isUser, SFunction<AppsBalanceLedgerPlus, ?>... columns);
|
||||
|
||||
AppsBalanceLedgerPlus getById(Long id, SFunction<AppsBalanceLedgerPlus, ?>... columns);
|
||||
|
||||
Map<Long, AppsBalanceLedgerPlus> getMapByIds(List<Long> ids, SFunction<AppsBalanceLedgerPlus, ?>... columns);
|
||||
|
||||
List<AppsBalanceLedgerPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, AppsBalanceLedgerPlus> 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);
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
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.WalletAddressLedger;
|
||||
import com.ruoyi.system.domain.WalletAddressLedgerPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 钱包地址资金流水Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-13
|
||||
*/
|
||||
public interface IWalletAddressLedgerService extends IService<WalletAddressLedgerPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询钱包地址资金流水
|
||||
*
|
||||
* @param id 钱包地址资金流水ID
|
||||
* @return 钱包地址资金流水
|
||||
*/
|
||||
public WalletAddressLedger selectWalletAddressLedgerById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询钱包地址资金流水列表
|
||||
*
|
||||
* @param walletAddressLedger 钱包地址资金流水
|
||||
* @return 钱包地址资金流水集合
|
||||
*/
|
||||
public List<WalletAddressLedger> selectWalletAddressLedgerList(WalletAddressLedger walletAddressLedger,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增钱包地址资金流水
|
||||
*
|
||||
* @param walletAddressLedger 钱包地址资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWalletAddressLedger(WalletAddressLedger walletAddressLedger,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改钱包地址资金流水
|
||||
*
|
||||
* @param walletAddressLedger 钱包地址资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWalletAddressLedger(WalletAddressLedger walletAddressLedger,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除钱包地址资金流水
|
||||
*
|
||||
* @param ids 需要删除的钱包地址资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWalletAddressLedgerByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除钱包地址资金流水信息
|
||||
*
|
||||
* @param id 钱包地址资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWalletAddressLedgerById(Long id,boolean isUser);
|
||||
|
||||
List<WalletAddressLedgerPlus> getByIds(List<Long> ids,boolean isUser, SFunction<WalletAddressLedgerPlus, ?>... columns);
|
||||
|
||||
WalletAddressLedgerPlus getById(Long id, SFunction<WalletAddressLedgerPlus, ?>... columns);
|
||||
|
||||
Map<Long, WalletAddressLedgerPlus> getMapByIds(List<Long> ids, SFunction<WalletAddressLedgerPlus, ?>... columns);
|
||||
|
||||
List<WalletAddressLedgerPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, WalletAddressLedgerPlus> 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);
|
||||
}
|
||||
+268
@@ -0,0 +1,268 @@
|
||||
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.AppsBalanceLedger;
|
||||
import com.ruoyi.system.domain.AppsBalanceLedgerPlus;
|
||||
import com.ruoyi.system.mapper.AppsBalanceLedgerMapper;
|
||||
import com.ruoyi.system.service.IAppsBalanceLedgerService;
|
||||
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 2026-10-13
|
||||
*/
|
||||
@Service
|
||||
public class AppsBalanceLedgerServiceImpl extends ServiceImpl<AppsBalanceLedgerMapper, AppsBalanceLedgerPlus> implements IAppsBalanceLedgerService
|
||||
{
|
||||
@Autowired
|
||||
private AppsBalanceLedgerMapper appsBalanceLedgerMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<AppsBalanceLedgerPlus> getByIds(List<Long> ids ,boolean isUser, SFunction<AppsBalanceLedgerPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<AppsBalanceLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<AppsBalanceLedgerPlus>()
|
||||
.select(columns).in(AppsBalanceLedgerPlus::getId, ids);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(AppsBalanceLedgerPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<AppsBalanceLedgerPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
private void checkUserPlus(List<AppsBalanceLedgerPlus> list) {
|
||||
for (AppsBalanceLedgerPlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(List<AppsBalanceLedger> list) {
|
||||
for (AppsBalanceLedger item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(AppsBalanceLedgerPlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
private void checkUser(AppsBalanceLedger item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
LambdaQueryWrapper<AppsBalanceLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<AppsBalanceLedgerPlus>()
|
||||
.select(AppsBalanceLedgerPlus::getId,AppsBalanceLedgerPlus::getUserId, AppsBalanceLedgerPlus::getAppId)
|
||||
.like(AppsBalanceLedgerPlus::getAppId, keyword);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(AppsBalanceLedgerPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<AppsBalanceLedgerPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (AppsBalanceLedgerPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getAppId()+"");
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public AppsBalanceLedgerPlus getById(Long id, SFunction<AppsBalanceLedgerPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<AppsBalanceLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<AppsBalanceLedgerPlus>()
|
||||
.select(columns).eq(AppsBalanceLedgerPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, AppsBalanceLedgerPlus> getMapByIds(List<Long> ids, SFunction<AppsBalanceLedgerPlus, ?>... columns) {
|
||||
List<AppsBalanceLedgerPlus> list = this.getByIds(ids,false, columns);
|
||||
Map<Long, AppsBalanceLedgerPlus> map = new HashMap<>();
|
||||
for (AppsBalanceLedgerPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, AppsBalanceLedgerPlus> getMapByIds(List<Long> ids) {
|
||||
List<AppsBalanceLedgerPlus> list = this.getByIds(ids);
|
||||
Map<Long, AppsBalanceLedgerPlus> map = new HashMap<>();
|
||||
for (AppsBalanceLedgerPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppsBalanceLedgerPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<AppsBalanceLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<AppsBalanceLedgerPlus>().in(AppsBalanceLedgerPlus::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 apps_balance_ledger ");
|
||||
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(" apps_balance_ledger ");
|
||||
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(" apps_balance_ledger ");
|
||||
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 AppsBalanceLedger selectAppsBalanceLedgerById(Long id,boolean isUser)
|
||||
{
|
||||
AppsBalanceLedger vo = appsBalanceLedgerMapper.selectAppsBalanceLedgerById(id);
|
||||
if(isUser){
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询应用账面余额流水列表
|
||||
*
|
||||
* @param appsBalanceLedger 应用账面余额流水
|
||||
* @return 应用账面余额流水
|
||||
*/
|
||||
@Override
|
||||
public List<AppsBalanceLedger> selectAppsBalanceLedgerList(AppsBalanceLedger appsBalanceLedger,boolean isUser)
|
||||
{
|
||||
if(appsBalanceLedger == null){
|
||||
appsBalanceLedger = new AppsBalanceLedger();
|
||||
}
|
||||
if(isUser){
|
||||
appsBalanceLedger.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<AppsBalanceLedger> list = appsBalanceLedgerMapper.selectAppsBalanceLedgerList(appsBalanceLedger);
|
||||
if(isUser){
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增应用账面余额流水
|
||||
*
|
||||
* @param appsBalanceLedger 应用账面余额流水
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAppsBalanceLedger(AppsBalanceLedger appsBalanceLedger,boolean isUser)
|
||||
{
|
||||
appsBalanceLedger.setCreatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
appsBalanceLedger.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return appsBalanceLedgerMapper.insertAppsBalanceLedger(appsBalanceLedger);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改应用账面余额流水
|
||||
*
|
||||
* @param appsBalanceLedger 应用账面余额流水
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAppsBalanceLedger(AppsBalanceLedger appsBalanceLedger,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
checkUser(appsBalanceLedger);
|
||||
}
|
||||
return appsBalanceLedgerMapper.updateAppsBalanceLedger(appsBalanceLedger);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除应用账面余额流水
|
||||
*
|
||||
* @param ids 需要删除的应用账面余额流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppsBalanceLedgerByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<AppsBalanceLedgerPlus> list= getByIds(Arrays.asList(ids),false,AppsBalanceLedgerPlus::getUserId,AppsBalanceLedgerPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return appsBalanceLedgerMapper.deleteAppsBalanceLedgerByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应用账面余额流水信息
|
||||
*
|
||||
* @param id 应用账面余额流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppsBalanceLedgerById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
AppsBalanceLedgerPlus vo = getById(id,AppsBalanceLedgerPlus::getUserId,AppsBalanceLedgerPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return appsBalanceLedgerMapper.deleteAppsBalanceLedgerById(id);
|
||||
}
|
||||
}
|
||||
+270
@@ -0,0 +1,270 @@
|
||||
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.WalletAddressLedger;
|
||||
import com.ruoyi.system.domain.WalletAddressLedgerPlus;
|
||||
import com.ruoyi.system.mapper.WalletAddressLedgerMapper;
|
||||
import com.ruoyi.system.service.IWalletAddressLedgerService;
|
||||
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 2026-10-13
|
||||
*/
|
||||
@Service
|
||||
public class WalletAddressLedgerServiceImpl extends ServiceImpl<WalletAddressLedgerMapper, WalletAddressLedgerPlus> implements IWalletAddressLedgerService
|
||||
{
|
||||
@Autowired
|
||||
private WalletAddressLedgerMapper walletAddressLedgerMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<WalletAddressLedgerPlus> getByIds(List<Long> ids ,boolean isUser, SFunction<WalletAddressLedgerPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<WalletAddressLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<WalletAddressLedgerPlus>()
|
||||
.select(columns).in(WalletAddressLedgerPlus::getId, ids);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(WalletAddressLedgerPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<WalletAddressLedgerPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
private void checkUserPlus(List<WalletAddressLedgerPlus> list) {
|
||||
for (WalletAddressLedgerPlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(List<WalletAddressLedger> list) {
|
||||
for (WalletAddressLedger item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(WalletAddressLedgerPlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
private void checkUser(WalletAddressLedger item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
LambdaQueryWrapper<WalletAddressLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<WalletAddressLedgerPlus>()
|
||||
.select(WalletAddressLedgerPlus::getId,WalletAddressLedgerPlus::getUserId, WalletAddressLedgerPlus::getWalletAddress)
|
||||
.like(WalletAddressLedgerPlus::getWalletAddress, keyword);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(WalletAddressLedgerPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<WalletAddressLedgerPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (WalletAddressLedgerPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getWalletAddress());
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public WalletAddressLedgerPlus getById(Long id, SFunction<WalletAddressLedgerPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<WalletAddressLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<WalletAddressLedgerPlus>()
|
||||
.select(columns).eq(WalletAddressLedgerPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, WalletAddressLedgerPlus> getMapByIds(List<Long> ids, SFunction<WalletAddressLedgerPlus, ?>... columns) {
|
||||
List<WalletAddressLedgerPlus> list = this.getByIds(ids,false, columns);
|
||||
Map<Long, WalletAddressLedgerPlus> map = new HashMap<>();
|
||||
for (WalletAddressLedgerPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, WalletAddressLedgerPlus> getMapByIds(List<Long> ids) {
|
||||
List<WalletAddressLedgerPlus> list = this.getByIds(ids);
|
||||
Map<Long, WalletAddressLedgerPlus> map = new HashMap<>();
|
||||
for (WalletAddressLedgerPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WalletAddressLedgerPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<WalletAddressLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<WalletAddressLedgerPlus>().in(WalletAddressLedgerPlus::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 wallet_address_ledger ");
|
||||
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(" wallet_address_ledger ");
|
||||
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(" wallet_address_ledger ");
|
||||
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 WalletAddressLedger selectWalletAddressLedgerById(Long id,boolean isUser)
|
||||
{
|
||||
WalletAddressLedger vo = walletAddressLedgerMapper.selectWalletAddressLedgerById(id);
|
||||
if(isUser){
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钱包地址资金流水列表
|
||||
*
|
||||
* @param walletAddressLedger 钱包地址资金流水
|
||||
* @return 钱包地址资金流水
|
||||
*/
|
||||
@Override
|
||||
public List<WalletAddressLedger> selectWalletAddressLedgerList(WalletAddressLedger walletAddressLedger,boolean isUser)
|
||||
{
|
||||
if(walletAddressLedger == null){
|
||||
walletAddressLedger = new WalletAddressLedger();
|
||||
}
|
||||
if(isUser){
|
||||
walletAddressLedger.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<WalletAddressLedger> list = walletAddressLedgerMapper.selectWalletAddressLedgerList(walletAddressLedger);
|
||||
if(isUser){
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钱包地址资金流水
|
||||
*
|
||||
* @param walletAddressLedger 钱包地址资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWalletAddressLedger(WalletAddressLedger walletAddressLedger,boolean isUser)
|
||||
{
|
||||
walletAddressLedger.setCreatedAt(DateUtils.getNowDate());
|
||||
walletAddressLedger.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
walletAddressLedger.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return walletAddressLedgerMapper.insertWalletAddressLedger(walletAddressLedger);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改钱包地址资金流水
|
||||
*
|
||||
* @param walletAddressLedger 钱包地址资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWalletAddressLedger(WalletAddressLedger walletAddressLedger,boolean isUser)
|
||||
{
|
||||
walletAddressLedger.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
checkUser(walletAddressLedger);
|
||||
}
|
||||
return walletAddressLedgerMapper.updateWalletAddressLedger(walletAddressLedger);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除钱包地址资金流水
|
||||
*
|
||||
* @param ids 需要删除的钱包地址资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWalletAddressLedgerByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<WalletAddressLedgerPlus> list= getByIds(Arrays.asList(ids),false,WalletAddressLedgerPlus::getUserId,WalletAddressLedgerPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return walletAddressLedgerMapper.deleteWalletAddressLedgerByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钱包地址资金流水信息
|
||||
*
|
||||
* @param id 钱包地址资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWalletAddressLedgerById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
WalletAddressLedgerPlus vo = getById(id,WalletAddressLedgerPlus::getUserId,WalletAddressLedgerPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return walletAddressLedgerMapper.deleteWalletAddressLedgerById(id);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user