流水表基础代码生成
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
<?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.AppsBalanceLedgerMapper">
|
||||||
|
|
||||||
|
<resultMap type="AppsBalanceLedger" id="AppsBalanceLedgerResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="tradeNo" column="trade_no" />
|
||||||
|
<result property="idempotencyKey" column="idempotency_key" />
|
||||||
|
<result property="appId" column="app_id" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="currency" column="currency" />
|
||||||
|
<result property="balanceType" column="balance_type" />
|
||||||
|
<result property="businessType" column="business_type" />
|
||||||
|
<result property="direction" column="direction" />
|
||||||
|
<result property="amount" column="amount" />
|
||||||
|
<result property="balanceBefore" column="balance_before" />
|
||||||
|
<result property="balanceAfter" column="balance_after" />
|
||||||
|
<result property="availableBefore" column="available_before" />
|
||||||
|
<result property="availableAfter" column="available_after" />
|
||||||
|
<result property="frozenBefore" column="frozen_before" />
|
||||||
|
<result property="frozenAfter" column="frozen_after" />
|
||||||
|
<result property="orderId" column="order_id" />
|
||||||
|
<result property="merchantOrderId" column="merchant_order_id" />
|
||||||
|
<result property="aggregationTaskId" column="aggregation_task_id" />
|
||||||
|
<result property="walletLedgerId" column="wallet_ledger_id" />
|
||||||
|
<result property="transactionId" column="transaction_id" />
|
||||||
|
<result property="operatorId" column="operator_id" />
|
||||||
|
<result property="requestId" column="request_id" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createdAt" column="created_at" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectAppsBalanceLedgerVo">
|
||||||
|
select id, trade_no, idempotency_key, app_id, user_id, currency, balance_type, business_type, direction, amount, balance_before, balance_after, available_before, available_after, frozen_before, frozen_after, order_id, merchant_order_id, aggregation_task_id, wallet_ledger_id, transaction_id, operator_id, request_id, remark, created_at from apps_balance_ledger
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectAppsBalanceLedgerList" parameterType="AppsBalanceLedger" resultMap="AppsBalanceLedgerResult">
|
||||||
|
<include refid="selectAppsBalanceLedgerVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo}</if>
|
||||||
|
<if test="idempotencyKey != null and idempotencyKey != ''"> and idempotency_key = #{idempotencyKey}</if>
|
||||||
|
<if test="appId != null "> and app_id = #{appId}</if>
|
||||||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
|
<if test="currency != null and currency != ''"> and currency = #{currency}</if>
|
||||||
|
<if test="balanceType != null "> and balance_type = #{balanceType}</if>
|
||||||
|
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
|
||||||
|
<if test="direction != null "> and direction = #{direction}</if>
|
||||||
|
<if test="amount != null "> and amount = #{amount}</if>
|
||||||
|
<if test="balanceBefore != null "> and balance_before = #{balanceBefore}</if>
|
||||||
|
<if test="balanceAfter != null "> and balance_after = #{balanceAfter}</if>
|
||||||
|
<if test="availableBefore != null "> and available_before = #{availableBefore}</if>
|
||||||
|
<if test="availableAfter != null "> and available_after = #{availableAfter}</if>
|
||||||
|
<if test="frozenBefore != null "> and frozen_before = #{frozenBefore}</if>
|
||||||
|
<if test="frozenAfter != null "> and frozen_after = #{frozenAfter}</if>
|
||||||
|
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||||
|
<if test="merchantOrderId != null and merchantOrderId != ''"> and merchant_order_id = #{merchantOrderId}</if>
|
||||||
|
<if test="aggregationTaskId != null "> and aggregation_task_id = #{aggregationTaskId}</if>
|
||||||
|
<if test="walletLedgerId != null "> and wallet_ledger_id = #{walletLedgerId}</if>
|
||||||
|
<if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
|
||||||
|
<if test="operatorId != null "> and operator_id = #{operatorId}</if>
|
||||||
|
<if test="requestId != null and requestId != ''"> and request_id = #{requestId}</if>
|
||||||
|
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectAppsBalanceLedgerById" parameterType="Long" resultMap="AppsBalanceLedgerResult">
|
||||||
|
<include refid="selectAppsBalanceLedgerVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertAppsBalanceLedger" parameterType="AppsBalanceLedger" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into apps_balance_ledger
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tradeNo != null and tradeNo != ''">trade_no,</if>
|
||||||
|
<if test="idempotencyKey != null and idempotencyKey != ''">idempotency_key,</if>
|
||||||
|
<if test="appId != null">app_id,</if>
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
|
<if test="currency != null and currency != ''">currency,</if>
|
||||||
|
<if test="balanceType != null">balance_type,</if>
|
||||||
|
<if test="businessType != null and businessType != ''">business_type,</if>
|
||||||
|
<if test="direction != null">direction,</if>
|
||||||
|
<if test="amount != null">amount,</if>
|
||||||
|
<if test="balanceBefore != null">balance_before,</if>
|
||||||
|
<if test="balanceAfter != null">balance_after,</if>
|
||||||
|
<if test="availableBefore != null">available_before,</if>
|
||||||
|
<if test="availableAfter != null">available_after,</if>
|
||||||
|
<if test="frozenBefore != null">frozen_before,</if>
|
||||||
|
<if test="frozenAfter != null">frozen_after,</if>
|
||||||
|
<if test="orderId != null">order_id,</if>
|
||||||
|
<if test="merchantOrderId != null">merchant_order_id,</if>
|
||||||
|
<if test="aggregationTaskId != null">aggregation_task_id,</if>
|
||||||
|
<if test="walletLedgerId != null">wallet_ledger_id,</if>
|
||||||
|
<if test="transactionId != null">transaction_id,</if>
|
||||||
|
<if test="operatorId != null">operator_id,</if>
|
||||||
|
<if test="requestId != null">request_id,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createdAt != null">created_at,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tradeNo != null and tradeNo != ''">#{tradeNo},</if>
|
||||||
|
<if test="idempotencyKey != null and idempotencyKey != ''">#{idempotencyKey},</if>
|
||||||
|
<if test="appId != null">#{appId},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
|
<if test="currency != null and currency != ''">#{currency},</if>
|
||||||
|
<if test="balanceType != null">#{balanceType},</if>
|
||||||
|
<if test="businessType != null and businessType != ''">#{businessType},</if>
|
||||||
|
<if test="direction != null">#{direction},</if>
|
||||||
|
<if test="amount != null">#{amount},</if>
|
||||||
|
<if test="balanceBefore != null">#{balanceBefore},</if>
|
||||||
|
<if test="balanceAfter != null">#{balanceAfter},</if>
|
||||||
|
<if test="availableBefore != null">#{availableBefore},</if>
|
||||||
|
<if test="availableAfter != null">#{availableAfter},</if>
|
||||||
|
<if test="frozenBefore != null">#{frozenBefore},</if>
|
||||||
|
<if test="frozenAfter != null">#{frozenAfter},</if>
|
||||||
|
<if test="orderId != null">#{orderId},</if>
|
||||||
|
<if test="merchantOrderId != null">#{merchantOrderId},</if>
|
||||||
|
<if test="aggregationTaskId != null">#{aggregationTaskId},</if>
|
||||||
|
<if test="walletLedgerId != null">#{walletLedgerId},</if>
|
||||||
|
<if test="transactionId != null">#{transactionId},</if>
|
||||||
|
<if test="operatorId != null">#{operatorId},</if>
|
||||||
|
<if test="requestId != null">#{requestId},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createdAt != null">#{createdAt},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateAppsBalanceLedger" parameterType="AppsBalanceLedger">
|
||||||
|
update apps_balance_ledger
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="tradeNo != null and tradeNo != ''">trade_no = #{tradeNo},</if>
|
||||||
|
<if test="idempotencyKey != null and idempotencyKey != ''">idempotency_key = #{idempotencyKey},</if>
|
||||||
|
<if test="appId != null">app_id = #{appId},</if>
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
|
<if test="currency != null and currency != ''">currency = #{currency},</if>
|
||||||
|
<if test="balanceType != null">balance_type = #{balanceType},</if>
|
||||||
|
<if test="businessType != null and businessType != ''">business_type = #{businessType},</if>
|
||||||
|
<if test="direction != null">direction = #{direction},</if>
|
||||||
|
<if test="amount != null">amount = #{amount},</if>
|
||||||
|
<if test="balanceBefore != null">balance_before = #{balanceBefore},</if>
|
||||||
|
<if test="balanceAfter != null">balance_after = #{balanceAfter},</if>
|
||||||
|
<if test="availableBefore != null">available_before = #{availableBefore},</if>
|
||||||
|
<if test="availableAfter != null">available_after = #{availableAfter},</if>
|
||||||
|
<if test="frozenBefore != null">frozen_before = #{frozenBefore},</if>
|
||||||
|
<if test="frozenAfter != null">frozen_after = #{frozenAfter},</if>
|
||||||
|
<if test="orderId != null">order_id = #{orderId},</if>
|
||||||
|
<if test="merchantOrderId != null">merchant_order_id = #{merchantOrderId},</if>
|
||||||
|
<if test="aggregationTaskId != null">aggregation_task_id = #{aggregationTaskId},</if>
|
||||||
|
<if test="walletLedgerId != null">wallet_ledger_id = #{walletLedgerId},</if>
|
||||||
|
<if test="transactionId != null">transaction_id = #{transactionId},</if>
|
||||||
|
<if test="operatorId != null">operator_id = #{operatorId},</if>
|
||||||
|
<if test="requestId != null">request_id = #{requestId},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteAppsBalanceLedgerById" parameterType="Long">
|
||||||
|
delete from apps_balance_ledger where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteAppsBalanceLedgerByIds" parameterType="String">
|
||||||
|
delete from apps_balance_ledger where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,230 @@
|
|||||||
|
<?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.WalletAddressLedgerMapper">
|
||||||
|
|
||||||
|
<resultMap type="WalletAddressLedger" id="WalletAddressLedgerResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="tradeNo" column="trade_no" />
|
||||||
|
<result property="idempotencyKey" column="idempotency_key" />
|
||||||
|
<result property="appId" column="app_id" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="walletAddressId" column="wallet_address_id" />
|
||||||
|
<result property="walletAddress" column="wallet_address" />
|
||||||
|
<result property="counterpartyAddress" column="counterparty_address" />
|
||||||
|
<result property="currency" column="currency" />
|
||||||
|
<result property="businessType" column="business_type" />
|
||||||
|
<result property="direction" column="direction" />
|
||||||
|
<result property="amount" column="amount" />
|
||||||
|
<result property="balanceBefore" column="balance_before" />
|
||||||
|
<result property="balanceAfter" column="balance_after" />
|
||||||
|
<result property="feeCurrency" column="fee_currency" />
|
||||||
|
<result property="feeAmount" column="fee_amount" />
|
||||||
|
<result property="energyUsed" column="energy_used" />
|
||||||
|
<result property="bandwidthUsed" column="bandwidth_used" />
|
||||||
|
<result property="burnedTrx" column="burned_trx" />
|
||||||
|
<result property="orderId" column="order_id" />
|
||||||
|
<result property="merchantOrderId" column="merchant_order_id" />
|
||||||
|
<result property="tradeId" column="trade_id" />
|
||||||
|
<result property="aggregationTaskId" column="aggregation_task_id" />
|
||||||
|
<result property="aggregationItemId" column="aggregation_item_id" />
|
||||||
|
<result property="transactionId" column="transaction_id" />
|
||||||
|
<result property="blockNumber" column="block_number" />
|
||||||
|
<result property="blockTime" column="block_time" />
|
||||||
|
<result property="confirmationCount" column="confirmation_count" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="sourceType" column="source_type" />
|
||||||
|
<result property="requestId" column="request_id" />
|
||||||
|
<result property="operatorId" column="operator_id" />
|
||||||
|
<result property="errorCode" column="error_code" />
|
||||||
|
<result property="errorMessage" column="error_message" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createdAt" column="created_at" />
|
||||||
|
<result property="updatedAt" column="updated_at" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectWalletAddressLedgerVo">
|
||||||
|
select id, trade_no, idempotency_key, app_id, user_id, wallet_address_id, wallet_address, counterparty_address, currency, business_type, direction, amount, balance_before, balance_after, fee_currency, fee_amount, energy_used, bandwidth_used, burned_trx, order_id, merchant_order_id, trade_id, aggregation_task_id, aggregation_item_id, transaction_id, block_number, block_time, confirmation_count, status, source_type, request_id, operator_id, error_code, error_message, remark, created_at, updated_at from wallet_address_ledger
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWalletAddressLedgerList" parameterType="WalletAddressLedger" resultMap="WalletAddressLedgerResult">
|
||||||
|
<include refid="selectWalletAddressLedgerVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo}</if>
|
||||||
|
<if test="idempotencyKey != null and idempotencyKey != ''"> and idempotency_key = #{idempotencyKey}</if>
|
||||||
|
<if test="appId != null "> and app_id = #{appId}</if>
|
||||||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
|
<if test="walletAddressId != null "> and wallet_address_id = #{walletAddressId}</if>
|
||||||
|
<if test="walletAddress != null and walletAddress != ''"> and wallet_address = #{walletAddress}</if>
|
||||||
|
<if test="counterpartyAddress != null and counterpartyAddress != ''"> and counterparty_address = #{counterpartyAddress}</if>
|
||||||
|
<if test="currency != null and currency != ''"> and currency = #{currency}</if>
|
||||||
|
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
|
||||||
|
<if test="direction != null "> and direction = #{direction}</if>
|
||||||
|
<if test="amount != null "> and amount = #{amount}</if>
|
||||||
|
<if test="balanceBefore != null "> and balance_before = #{balanceBefore}</if>
|
||||||
|
<if test="balanceAfter != null "> and balance_after = #{balanceAfter}</if>
|
||||||
|
<if test="feeCurrency != null and feeCurrency != ''"> and fee_currency = #{feeCurrency}</if>
|
||||||
|
<if test="feeAmount != null "> and fee_amount = #{feeAmount}</if>
|
||||||
|
<if test="energyUsed != null "> and energy_used = #{energyUsed}</if>
|
||||||
|
<if test="bandwidthUsed != null "> and bandwidth_used = #{bandwidthUsed}</if>
|
||||||
|
<if test="burnedTrx != null "> and burned_trx = #{burnedTrx}</if>
|
||||||
|
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||||
|
<if test="merchantOrderId != null and merchantOrderId != ''"> and merchant_order_id = #{merchantOrderId}</if>
|
||||||
|
<if test="tradeId != null and tradeId != ''"> and trade_id = #{tradeId}</if>
|
||||||
|
<if test="aggregationTaskId != null "> and aggregation_task_id = #{aggregationTaskId}</if>
|
||||||
|
<if test="aggregationItemId != null "> and aggregation_item_id = #{aggregationItemId}</if>
|
||||||
|
<if test="transactionId != null and transactionId != ''"> and transaction_id = #{transactionId}</if>
|
||||||
|
<if test="blockNumber != null "> and block_number = #{blockNumber}</if>
|
||||||
|
<if test="blockTime != null "> and block_time = #{blockTime}</if>
|
||||||
|
<if test="confirmationCount != null "> and confirmation_count = #{confirmationCount}</if>
|
||||||
|
<if test="status != null "> and status = #{status}</if>
|
||||||
|
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType}</if>
|
||||||
|
<if test="requestId != null and requestId != ''"> and request_id = #{requestId}</if>
|
||||||
|
<if test="operatorId != null "> and operator_id = #{operatorId}</if>
|
||||||
|
<if test="errorCode != null and errorCode != ''"> and error_code = #{errorCode}</if>
|
||||||
|
<if test="errorMessage != null and errorMessage != ''"> and error_message = #{errorMessage}</if>
|
||||||
|
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||||
|
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWalletAddressLedgerById" parameterType="Long" resultMap="WalletAddressLedgerResult">
|
||||||
|
<include refid="selectWalletAddressLedgerVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWalletAddressLedger" parameterType="WalletAddressLedger" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into wallet_address_ledger
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tradeNo != null and tradeNo != ''">trade_no,</if>
|
||||||
|
<if test="idempotencyKey != null and idempotencyKey != ''">idempotency_key,</if>
|
||||||
|
<if test="appId != null">app_id,</if>
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
|
<if test="walletAddressId != null">wallet_address_id,</if>
|
||||||
|
<if test="walletAddress != null and walletAddress != ''">wallet_address,</if>
|
||||||
|
<if test="counterpartyAddress != null">counterparty_address,</if>
|
||||||
|
<if test="currency != null and currency != ''">currency,</if>
|
||||||
|
<if test="businessType != null and businessType != ''">business_type,</if>
|
||||||
|
<if test="direction != null">direction,</if>
|
||||||
|
<if test="amount != null">amount,</if>
|
||||||
|
<if test="balanceBefore != null">balance_before,</if>
|
||||||
|
<if test="balanceAfter != null">balance_after,</if>
|
||||||
|
<if test="feeCurrency != null">fee_currency,</if>
|
||||||
|
<if test="feeAmount != null">fee_amount,</if>
|
||||||
|
<if test="energyUsed != null">energy_used,</if>
|
||||||
|
<if test="bandwidthUsed != null">bandwidth_used,</if>
|
||||||
|
<if test="burnedTrx != null">burned_trx,</if>
|
||||||
|
<if test="orderId != null">order_id,</if>
|
||||||
|
<if test="merchantOrderId != null">merchant_order_id,</if>
|
||||||
|
<if test="tradeId != null">trade_id,</if>
|
||||||
|
<if test="aggregationTaskId != null">aggregation_task_id,</if>
|
||||||
|
<if test="aggregationItemId != null">aggregation_item_id,</if>
|
||||||
|
<if test="transactionId != null">transaction_id,</if>
|
||||||
|
<if test="blockNumber != null">block_number,</if>
|
||||||
|
<if test="blockTime != null">block_time,</if>
|
||||||
|
<if test="confirmationCount != null">confirmation_count,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="sourceType != null and sourceType != ''">source_type,</if>
|
||||||
|
<if test="requestId != null">request_id,</if>
|
||||||
|
<if test="operatorId != null">operator_id,</if>
|
||||||
|
<if test="errorCode != null">error_code,</if>
|
||||||
|
<if test="errorMessage != null">error_message,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createdAt != null">created_at,</if>
|
||||||
|
<if test="updatedAt != null">updated_at,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="tradeNo != null and tradeNo != ''">#{tradeNo},</if>
|
||||||
|
<if test="idempotencyKey != null and idempotencyKey != ''">#{idempotencyKey},</if>
|
||||||
|
<if test="appId != null">#{appId},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
|
<if test="walletAddressId != null">#{walletAddressId},</if>
|
||||||
|
<if test="walletAddress != null and walletAddress != ''">#{walletAddress},</if>
|
||||||
|
<if test="counterpartyAddress != null">#{counterpartyAddress},</if>
|
||||||
|
<if test="currency != null and currency != ''">#{currency},</if>
|
||||||
|
<if test="businessType != null and businessType != ''">#{businessType},</if>
|
||||||
|
<if test="direction != null">#{direction},</if>
|
||||||
|
<if test="amount != null">#{amount},</if>
|
||||||
|
<if test="balanceBefore != null">#{balanceBefore},</if>
|
||||||
|
<if test="balanceAfter != null">#{balanceAfter},</if>
|
||||||
|
<if test="feeCurrency != null">#{feeCurrency},</if>
|
||||||
|
<if test="feeAmount != null">#{feeAmount},</if>
|
||||||
|
<if test="energyUsed != null">#{energyUsed},</if>
|
||||||
|
<if test="bandwidthUsed != null">#{bandwidthUsed},</if>
|
||||||
|
<if test="burnedTrx != null">#{burnedTrx},</if>
|
||||||
|
<if test="orderId != null">#{orderId},</if>
|
||||||
|
<if test="merchantOrderId != null">#{merchantOrderId},</if>
|
||||||
|
<if test="tradeId != null">#{tradeId},</if>
|
||||||
|
<if test="aggregationTaskId != null">#{aggregationTaskId},</if>
|
||||||
|
<if test="aggregationItemId != null">#{aggregationItemId},</if>
|
||||||
|
<if test="transactionId != null">#{transactionId},</if>
|
||||||
|
<if test="blockNumber != null">#{blockNumber},</if>
|
||||||
|
<if test="blockTime != null">#{blockTime},</if>
|
||||||
|
<if test="confirmationCount != null">#{confirmationCount},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="sourceType != null and sourceType != ''">#{sourceType},</if>
|
||||||
|
<if test="requestId != null">#{requestId},</if>
|
||||||
|
<if test="operatorId != null">#{operatorId},</if>
|
||||||
|
<if test="errorCode != null">#{errorCode},</if>
|
||||||
|
<if test="errorMessage != null">#{errorMessage},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createdAt != null">#{createdAt},</if>
|
||||||
|
<if test="updatedAt != null">#{updatedAt},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateWalletAddressLedger" parameterType="WalletAddressLedger">
|
||||||
|
update wallet_address_ledger
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="tradeNo != null and tradeNo != ''">trade_no = #{tradeNo},</if>
|
||||||
|
<if test="idempotencyKey != null and idempotencyKey != ''">idempotency_key = #{idempotencyKey},</if>
|
||||||
|
<if test="appId != null">app_id = #{appId},</if>
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
|
<if test="walletAddressId != null">wallet_address_id = #{walletAddressId},</if>
|
||||||
|
<if test="walletAddress != null and walletAddress != ''">wallet_address = #{walletAddress},</if>
|
||||||
|
<if test="counterpartyAddress != null">counterparty_address = #{counterpartyAddress},</if>
|
||||||
|
<if test="currency != null and currency != ''">currency = #{currency},</if>
|
||||||
|
<if test="businessType != null and businessType != ''">business_type = #{businessType},</if>
|
||||||
|
<if test="direction != null">direction = #{direction},</if>
|
||||||
|
<if test="amount != null">amount = #{amount},</if>
|
||||||
|
<if test="balanceBefore != null">balance_before = #{balanceBefore},</if>
|
||||||
|
<if test="balanceAfter != null">balance_after = #{balanceAfter},</if>
|
||||||
|
<if test="feeCurrency != null">fee_currency = #{feeCurrency},</if>
|
||||||
|
<if test="feeAmount != null">fee_amount = #{feeAmount},</if>
|
||||||
|
<if test="energyUsed != null">energy_used = #{energyUsed},</if>
|
||||||
|
<if test="bandwidthUsed != null">bandwidth_used = #{bandwidthUsed},</if>
|
||||||
|
<if test="burnedTrx != null">burned_trx = #{burnedTrx},</if>
|
||||||
|
<if test="orderId != null">order_id = #{orderId},</if>
|
||||||
|
<if test="merchantOrderId != null">merchant_order_id = #{merchantOrderId},</if>
|
||||||
|
<if test="tradeId != null">trade_id = #{tradeId},</if>
|
||||||
|
<if test="aggregationTaskId != null">aggregation_task_id = #{aggregationTaskId},</if>
|
||||||
|
<if test="aggregationItemId != null">aggregation_item_id = #{aggregationItemId},</if>
|
||||||
|
<if test="transactionId != null">transaction_id = #{transactionId},</if>
|
||||||
|
<if test="blockNumber != null">block_number = #{blockNumber},</if>
|
||||||
|
<if test="blockTime != null">block_time = #{blockTime},</if>
|
||||||
|
<if test="confirmationCount != null">confirmation_count = #{confirmationCount},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="sourceType != null and sourceType != ''">source_type = #{sourceType},</if>
|
||||||
|
<if test="requestId != null">request_id = #{requestId},</if>
|
||||||
|
<if test="operatorId != null">operator_id = #{operatorId},</if>
|
||||||
|
<if test="errorCode != null">error_code = #{errorCode},</if>
|
||||||
|
<if test="errorMessage != null">error_message = #{errorMessage},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||||
|
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteWalletAddressLedgerById" parameterType="Long">
|
||||||
|
delete from wallet_address_ledger where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWalletAddressLedgerByIds" parameterType="String">
|
||||||
|
delete from wallet_address_ledger where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
Reference in new issue
Block a user