订单支付成功时,事务化写入 USDT 收入流水。

归集明细成功时,事务化写入 USDT 支出流水。
使用唯一幂等键防止订单重扫、归集重试产生重复流水。
新增按应用、币种、时间范围以及日/月/年维度的统计接口。
管理员和商户接口均改为只读,移除流水新增、修改、删除入口。
商户查询由后端强制限定当前用户。
This commit is contained in:
lu7213 committed 2026-10-13 10:32:18 -04:00
1 parent 8cc7bd0c17
commit 0ff174e872
15 files changed
+377 -254

No files matched your search

@@ -5,11 +5,9 @@ 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.domain.vo.WalletLedgerStatisticsQuery;
import com.ruoyi.system.service.IWalletAddressLedgerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -29,34 +27,6 @@ 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);
}
/**
* 查询钱包地址资金流水列表
*/
@@ -110,61 +80,16 @@ public class WalletAddressLedgerController extends BaseController
{
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:list')")
@GetMapping("/statistics")
public AjaxResult statistics(WalletLedgerStatisticsQuery query) {
return AjaxResult.success(walletAddressLedgerService.statistics(query, 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));
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-list')")
@GetMapping("/user/statistics")
public AjaxResult userStatistics(WalletLedgerStatisticsQuery query) {
return AjaxResult.success(walletAddressLedgerService.statistics(query, true));
}
}