添加代理记录相关表

This commit is contained in:
lu7213 committed 2026-10-12 02:18:23 -04:00
1 parent b2ab430eb6
commit 81febe2c56
14 files changed
+1644

No files matched your search

@@ -0,0 +1,107 @@
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.UsdtDelegationToOther;
import com.ruoyi.system.domain.UsdtDelegationToOtherPlus;
import com.ruoyi.system.service.IUsdtProxyToOtherService;
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-12
*/
@RestController
@RequestMapping("/system/otherToDelegation")
public class UsdtDelegationToOtherController extends BaseController {
@Autowired
private IUsdtProxyToOtherService usdtProxyToOtherService;
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:getByIds')")
@PostMapping("/getByIds")
public AjaxResult getByIds(@RequestBody Ids ids) {
List<UsdtDelegationToOtherPlus> list = usdtProxyToOtherService.getByIds(ids.getLongIds(), UsdtDelegationToOtherPlus::getToken, UsdtDelegationToOtherPlus::getId);
return AjaxResult.success(list);
}
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:select')")
@GetMapping("/select")
public AjaxResult select(String keyword) {
List<SelectItem> list = usdtProxyToOtherService.select(keyword);
return AjaxResult.success(list);
}
/**
* 查询代理给其他地址列表
*/
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:list')")
@GetMapping("/list")
public TableDataInfo list(UsdtDelegationToOther usdtDelegationToOther) {
startPage();
List<UsdtDelegationToOther> list = usdtProxyToOtherService.selectUsdtDelegationToOtherList(usdtDelegationToOther);
return getDataTable(list);
}
/**
* 导出代理给其他地址列表
*/
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:export')")
@Log(title = "代理给其他地址", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(UsdtDelegationToOther usdtDelegationToOther) {
List<UsdtDelegationToOther> list = usdtProxyToOtherService.selectUsdtDelegationToOtherList(usdtDelegationToOther);
ExcelUtil<UsdtDelegationToOther> util = new ExcelUtil<UsdtDelegationToOther>(UsdtDelegationToOther.class);
return util.exportExcel(list, "otherToDelegation");
}
/**
* 获取代理给其他地址详细信息
*/
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(usdtProxyToOtherService.selectUsdtDelegationToOtherById(id));
}
/**
* 新增代理给其他地址
*/
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:add')")
@Log(title = "代理给其他地址", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody UsdtDelegationToOther usdtDelegationToOther) {
return toAjax(usdtProxyToOtherService.insertUsdtDelegationToOther(usdtDelegationToOther));
}
/**
* 修改代理给其他地址
*/
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:edit')")
@Log(title = "代理给其他地址", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody UsdtDelegationToOther usdtDelegationToOther) {
return toAjax(usdtProxyToOtherService.updateUsdtDelegationToOther(usdtDelegationToOther));
}
/**
* 删除代理给其他地址
*/
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:remove')")
@Log(title = "代理给其他地址", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(usdtProxyToOtherService.deleteUsdtDelegationToOtherByIds(ids));
}
}
@@ -0,0 +1,107 @@
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.UsdtOtherToDelegation;
import com.ruoyi.system.domain.UsdtOtherToDelegationPlus;
import com.ruoyi.system.service.IUsdtOtherToProxyService;
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-12
*/
@RestController
@RequestMapping("/system/delegationToOther")
public class UsdtOtherToDelegationController extends BaseController {
@Autowired
private IUsdtOtherToProxyService usdtOtherToProxyService;
@PreAuthorize("@ss.hasPermi('system:delegationToOther:getByIds')")
@PostMapping("/getByIds")
public AjaxResult getByIds(@RequestBody Ids ids) {
List<UsdtOtherToDelegationPlus> list = usdtOtherToProxyService.getByIds(ids.getLongIds(), UsdtOtherToDelegationPlus::getToken, UsdtOtherToDelegationPlus::getId);
return AjaxResult.success(list);
}
@PreAuthorize("@ss.hasPermi('system:delegationToOther:select')")
@GetMapping("/select")
public AjaxResult select(String keyword) {
List<SelectItem> list = usdtOtherToProxyService.select(keyword);
return AjaxResult.success(list);
}
/**
* 查询其他地址代理列表
*/
@PreAuthorize("@ss.hasPermi('system:delegationToOther:list')")
@GetMapping("/list")
public TableDataInfo list(UsdtOtherToDelegation usdtOtherToDelegation) {
startPage();
List<UsdtOtherToDelegation> list = usdtOtherToProxyService.selectUsdtOtherToDelegationList(usdtOtherToDelegation);
return getDataTable(list);
}
/**
* 导出其他地址代理列表
*/
@PreAuthorize("@ss.hasPermi('system:delegationToOther:export')")
@Log(title = "其他地址代理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(UsdtOtherToDelegation usdtOtherToDelegation) {
List<UsdtOtherToDelegation> list = usdtOtherToProxyService.selectUsdtOtherToDelegationList(usdtOtherToDelegation);
ExcelUtil<UsdtOtherToDelegation> util = new ExcelUtil<UsdtOtherToDelegation>(UsdtOtherToDelegation.class);
return util.exportExcel(list, "delegationToOther");
}
/**
* 获取其他地址代理详细信息
*/
@PreAuthorize("@ss.hasPermi('system:delegationToOther:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(usdtOtherToProxyService.selectUsdtOtherToDelegationById(id));
}
/**
* 新增其他地址代理
*/
@PreAuthorize("@ss.hasPermi('system:delegationToOther:add')")
@Log(title = "其他地址代理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody UsdtOtherToDelegation usdtOtherToDelegation) {
return toAjax(usdtOtherToProxyService.insertUsdtOtherToDelegation(usdtOtherToDelegation));
}
/**
* 修改其他地址代理
*/
@PreAuthorize("@ss.hasPermi('system:delegationToOther:edit')")
@Log(title = "其他地址代理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody UsdtOtherToDelegation usdtOtherToDelegation) {
return toAjax(usdtOtherToProxyService.updateUsdtOtherToDelegation(usdtOtherToDelegation));
}
/**
* 删除其他地址代理
*/
@PreAuthorize("@ss.hasPermi('system:delegationToOther:remove')")
@Log(title = "其他地址代理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(usdtOtherToProxyService.deleteUsdtOtherToDelegationByIds(ids));
}
}
@@ -0,0 +1,139 @@
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
/**
* 代理给其他地址对象 usdt_delegation_to_other
*
* @author luqj
* @date 2026-10-12
*/
public class UsdtDelegationToOther extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 钱包地址 */
@Excel(name = "钱包地址")
private String token;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
/** 代理的对方地址 */
@Excel(name = "代理的对方地址")
private String targetToken;
/** 代理的资源 */
@Excel(name = "代理的资源")
private Long resourceAmount;
/** 代理的trx数量 */
@Excel(name = "代理的trx数量")
private Long trxNum;
/** 类型 0 能量 1带宽 */
@Excel(name = "类型 0 能量 1带宽")
private Integer type;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setToken(String token)
{
this.token = token;
}
public String getToken()
{
return token;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
public void setTargetToken(String targetToken)
{
this.targetToken = targetToken;
}
public String getTargetToken()
{
return targetToken;
}
public void setResourceAmount(Long resourceAmount)
{
this.resourceAmount = resourceAmount;
}
public Long getResourceAmount()
{
return resourceAmount;
}
public void setTrxNum(Long trxNum)
{
this.trxNum = trxNum;
}
public Long getTrxNum()
{
return trxNum;
}
public void setType(Integer type)
{
this.type = type;
}
public Integer getType()
{
return type;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("token", getToken())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("targetToken", getTargetToken())
.append("resourceAmount", getResourceAmount())
.append("trxNum", getTrxNum())
.append("type", getType())
.toString();
}
}
@@ -0,0 +1,134 @@
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
* 代理给其他地址对象 usdt_delegation_to_other
*
* @author luqj
* @date 2026-10-12
*/
@TableName(value = "usdt_delegation_to_other")
public class UsdtDelegationToOtherPlus implements Serializable
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 钱包地址 */
@Excel(name = "钱包地址")
private String token;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
/** 代理的对方地址 */
@Excel(name = "代理的对方地址")
private String targetToken;
/** 代理的资源 */
@Excel(name = "代理的资源")
private Long resourceAmount;
/** 代理的trx数量 */
@Excel(name = "代理的trx数量")
private Long trxNum;
/** 类型 0 能量 1带宽 */
@Excel(name = "类型 0 能量 1带宽")
private Integer type;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setToken(String token)
{
this.token = token;
}
public String getToken()
{
return token;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
public void setTargetToken(String targetToken)
{
this.targetToken = targetToken;
}
public String getTargetToken()
{
return targetToken;
}
public void setResourceAmount(Long resourceAmount)
{
this.resourceAmount = resourceAmount;
}
public Long getResourceAmount()
{
return resourceAmount;
}
public void setTrxNum(Long trxNum)
{
this.trxNum = trxNum;
}
public Long getTrxNum()
{
return trxNum;
}
public void setType(Integer type)
{
this.type = type;
}
public Integer getType()
{
return type;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("token", getToken())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("targetToken", getTargetToken())
.append("resourceAmount", getResourceAmount())
.append("trxNum", getTrxNum())
.append("type", getType())
.toString();
}
}
@@ -0,0 +1,139 @@
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
/**
* 其他地址代理对象 usdt_other_to_delegation
*
* @author luqj
* @date 2026-10-12
*/
public class UsdtOtherToDelegation extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 钱包地址 */
@Excel(name = "钱包地址")
private String token;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
/** 代理的来源地址 */
@Excel(name = "代理的来源地址")
private String fromToken;
/** 代理的资源 */
@Excel(name = "代理的资源")
private Long resourceAmount;
/** 代理的trx数量 */
@Excel(name = "代理的trx数量")
private Long trxNum;
/** 类型 0 能量 1带宽 */
@Excel(name = "类型 0 能量 1带宽")
private Integer type;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setToken(String token)
{
this.token = token;
}
public String getToken()
{
return token;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
public void setFromToken(String fromToken)
{
this.fromToken = fromToken;
}
public String getFromToken()
{
return fromToken;
}
public void setResourceAmount(Long resourceAmount)
{
this.resourceAmount = resourceAmount;
}
public Long getResourceAmount()
{
return resourceAmount;
}
public void setTrxNum(Long trxNum)
{
this.trxNum = trxNum;
}
public Long getTrxNum()
{
return trxNum;
}
public void setType(Integer type)
{
this.type = type;
}
public Integer getType()
{
return type;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("token", getToken())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("fromToken", getFromToken())
.append("resourceAmount", getResourceAmount())
.append("trxNum", getTrxNum())
.append("type", getType())
.toString();
}
}
@@ -0,0 +1,134 @@
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
/**
* 其他地址代理对象 usdt_other_to_delegation
*
* @author luqj
* @date 2026-10-12
*/
@TableName(value = "usdt_other_to_delegation")
public class UsdtOtherToDelegationPlus implements Serializable
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 钱包地址 */
@Excel(name = "钱包地址")
private String token;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
/** 代理的来源地址 */
@Excel(name = "代理的来源地址")
private String fromToken;
/** 代理的资源 */
@Excel(name = "代理的资源")
private Long resourceAmount;
/** 代理的trx数量 */
@Excel(name = "代理的trx数量")
private Long trxNum;
/** 类型 0 能量 1带宽 */
@Excel(name = "类型 0 能量 1带宽")
private Integer type;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setToken(String token)
{
this.token = token;
}
public String getToken()
{
return token;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
public void setFromToken(String fromToken)
{
this.fromToken = fromToken;
}
public String getFromToken()
{
return fromToken;
}
public void setResourceAmount(Long resourceAmount)
{
this.resourceAmount = resourceAmount;
}
public Long getResourceAmount()
{
return resourceAmount;
}
public void setTrxNum(Long trxNum)
{
this.trxNum = trxNum;
}
public Long getTrxNum()
{
return trxNum;
}
public void setType(Integer type)
{
this.type = type;
}
public Integer getType()
{
return type;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("token", getToken())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("fromToken", getFromToken())
.append("resourceAmount", getResourceAmount())
.append("trxNum", getTrxNum())
.append("type", getType())
.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.UsdtDelegationToOther;
import com.ruoyi.system.domain.UsdtDelegationToOtherPlus;
/**
* 代理给其他地址Mapper接口
*
* @author luqj
* @date 2026-10-12
*/
public interface UsdtDelegationToOtherMapper extends BaseMapper<UsdtDelegationToOtherPlus>
{
/**
* 查询代理给其他地址
*
* @param id 代理给其他地址ID
* @return 代理给其他地址
*/
public UsdtDelegationToOther selectUsdtDelegationToOtherById(Long id);
/**
* 查询代理给其他地址列表
*
* @param usdtDelegationToOther 代理给其他地址
* @return 代理给其他地址集合
*/
public List<UsdtDelegationToOther> selectUsdtDelegationToOtherList(UsdtDelegationToOther usdtDelegationToOther);
/**
* 新增代理给其他地址
*
* @param usdtDelegationToOther 代理给其他地址
* @return 结果
*/
public int insertUsdtDelegationToOther(UsdtDelegationToOther usdtDelegationToOther);
/**
* 修改代理给其他地址
*
* @param usdtDelegationToOther 代理给其他地址
* @return 结果
*/
public int updateUsdtDelegationToOther(UsdtDelegationToOther usdtDelegationToOther);
/**
* 删除代理给其他地址
*
* @param id 代理给其他地址ID
* @return 结果
*/
public int deleteUsdtDelegationToOtherById(Long id);
/**
* 批量删除代理给其他地址
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteUsdtDelegationToOtherByIds(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.UsdtOtherToDelegation;
import com.ruoyi.system.domain.UsdtOtherToDelegationPlus;
/**
* 其他地址代理Mapper接口
*
* @author luqj
* @date 2026-10-12
*/
public interface UsdtOtherToDelegationMapper extends BaseMapper<UsdtOtherToDelegationPlus>
{
/**
* 查询其他地址代理
*
* @param id 其他地址代理ID
* @return 其他地址代理
*/
public UsdtOtherToDelegation selectUsdtOtherToDelegationById(Long id);
/**
* 查询其他地址代理列表
*
* @param usdtOtherToDelegation 其他地址代理
* @return 其他地址代理集合
*/
public List<UsdtOtherToDelegation> selectUsdtOtherToDelegationList(UsdtOtherToDelegation usdtOtherToDelegation);
/**
* 新增其他地址代理
*
* @param usdtOtherToDelegation 其他地址代理
* @return 结果
*/
public int insertUsdtOtherToDelegation(UsdtOtherToDelegation usdtOtherToDelegation);
/**
* 修改其他地址代理
*
* @param usdtOtherToDelegation 其他地址代理
* @return 结果
*/
public int updateUsdtOtherToDelegation(UsdtOtherToDelegation usdtOtherToDelegation);
/**
* 删除其他地址代理
*
* @param id 其他地址代理ID
* @return 结果
*/
public int deleteUsdtOtherToDelegationById(Long id);
/**
* 批量删除其他地址代理
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteUsdtOtherToDelegationByIds(Long[] ids);
}
@@ -0,0 +1,89 @@
package com.ruoyi.system.service;
import java.util.Map;
import java.util.List;
import com.ruoyi.system.domain.UsdtOtherToDelegation;
import com.ruoyi.system.domain.UsdtOtherToDelegationPlus;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.ruoyi.common.select.SelectItem;
/**
* 其他地址代理Service接口
*
* @author luqj
* @date 2026-10-12
*/
public interface IUsdtOtherToProxyService extends IService<UsdtOtherToDelegationPlus>
{
List<SelectItem> select(String keyword);
/**
* 查询其他地址代理
*
* @param id 其他地址代理ID
* @return 其他地址代理
*/
public UsdtOtherToDelegation selectUsdtOtherToDelegationById(Long id);
/**
* 查询其他地址代理列表
*
* @param usdtOtherToDelegation 其他地址代理
* @return 其他地址代理集合
*/
public List<UsdtOtherToDelegation> selectUsdtOtherToDelegationList(UsdtOtherToDelegation usdtOtherToDelegation);
/**
* 新增其他地址代理
*
* @param usdtOtherToDelegation 其他地址代理
* @return 结果
*/
public int insertUsdtOtherToDelegation(UsdtOtherToDelegation usdtOtherToDelegation);
/**
* 修改其他地址代理
*
* @param usdtOtherToDelegation 其他地址代理
* @return 结果
*/
public int updateUsdtOtherToDelegation(UsdtOtherToDelegation usdtOtherToDelegation);
/**
* 批量删除其他地址代理
*
* @param ids 需要删除的其他地址代理ID
* @return 结果
*/
public int deleteUsdtOtherToDelegationByIds(Long[] ids);
/**
* 删除其他地址代理信息
*
* @param id 其他地址代理ID
* @return 结果
*/
public int deleteUsdtOtherToDelegationById(Long id);
List<UsdtOtherToDelegationPlus> getByIds(List<Long> ids, SFunction<UsdtOtherToDelegationPlus, ?>... columns);
UsdtOtherToDelegationPlus getById(Long id, SFunction<UsdtOtherToDelegationPlus, ?>... columns);
Map<Long, UsdtOtherToDelegationPlus> getMapByIds(List<Long> ids, SFunction<UsdtOtherToDelegationPlus, ?>... columns);
List<UsdtOtherToDelegationPlus> getByIds(List<Long> ids);
Map<Long, UsdtOtherToDelegationPlus> 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,89 @@
package com.ruoyi.system.service;
import java.util.Map;
import java.util.List;
import com.ruoyi.system.domain.UsdtDelegationToOther;
import com.ruoyi.system.domain.UsdtDelegationToOtherPlus;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.ruoyi.common.select.SelectItem;
/**
* 代理给其他地址Service接口
*
* @author luqj
* @date 2026-10-12
*/
public interface IUsdtProxyToOtherService extends IService<UsdtDelegationToOtherPlus>
{
List<SelectItem> select(String keyword);
/**
* 查询代理给其他地址
*
* @param id 代理给其他地址ID
* @return 代理给其他地址
*/
public UsdtDelegationToOther selectUsdtDelegationToOtherById(Long id);
/**
* 查询代理给其他地址列表
*
* @param usdtDelegationToOther 代理给其他地址
* @return 代理给其他地址集合
*/
public List<UsdtDelegationToOther> selectUsdtDelegationToOtherList(UsdtDelegationToOther usdtDelegationToOther);
/**
* 新增代理给其他地址
*
* @param usdtDelegationToOther 代理给其他地址
* @return 结果
*/
public int insertUsdtDelegationToOther(UsdtDelegationToOther usdtDelegationToOther);
/**
* 修改代理给其他地址
*
* @param usdtDelegationToOther 代理给其他地址
* @return 结果
*/
public int updateUsdtDelegationToOther(UsdtDelegationToOther usdtDelegationToOther);
/**
* 批量删除代理给其他地址
*
* @param ids 需要删除的代理给其他地址ID
* @return 结果
*/
public int deleteUsdtDelegationToOtherByIds(Long[] ids);
/**
* 删除代理给其他地址信息
*
* @param id 代理给其他地址ID
* @return 结果
*/
public int deleteUsdtDelegationToOtherById(Long id);
List<UsdtDelegationToOtherPlus> getByIds(List<Long> ids, SFunction<UsdtDelegationToOtherPlus, ?>... columns);
UsdtDelegationToOtherPlus getById(Long id, SFunction<UsdtDelegationToOtherPlus, ?>... columns);
Map<Long, UsdtDelegationToOtherPlus> getMapByIds(List<Long> ids, SFunction<UsdtDelegationToOtherPlus, ?>... columns);
List<UsdtDelegationToOtherPlus> getByIds(List<Long> ids);
Map<Long, UsdtDelegationToOtherPlus> 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,200 @@
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.StringUtils;
import com.ruoyi.system.domain.UsdtOtherToDelegation;
import com.ruoyi.system.domain.UsdtOtherToDelegationPlus;
import com.ruoyi.system.mapper.UsdtOtherToDelegationMapper;
import com.ruoyi.system.service.IUsdtOtherToProxyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 其他地址代理Service业务层处理
*
* @author luqj
* @date 2026-10-12
*/
@Service
public class UsdtOtherToProxyServiceImpl extends ServiceImpl<UsdtOtherToDelegationMapper, UsdtOtherToDelegationPlus> implements IUsdtOtherToProxyService {
@Autowired
private UsdtOtherToDelegationMapper usdtOtherToDelegationMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public List<UsdtOtherToDelegationPlus> getByIds(List<Long> ids, SFunction<UsdtOtherToDelegationPlus, ?>... columns) {
LambdaQueryWrapper<UsdtOtherToDelegationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtOtherToDelegationPlus>()
.select(columns).in(UsdtOtherToDelegationPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
@Override
public List<SelectItem> select(String keyword) {
LambdaQueryWrapper<UsdtOtherToDelegationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtOtherToDelegationPlus>()
.select(UsdtOtherToDelegationPlus::getId, UsdtOtherToDelegationPlus::getToken)
.like(UsdtOtherToDelegationPlus::getToken, keyword);
List<UsdtOtherToDelegationPlus> list = this.list(lambdaQueryWrapper);
List<SelectItem> result = new ArrayList<>();
for (UsdtOtherToDelegationPlus item : list) {
SelectItem selectItem = new SelectItem();
selectItem.setName(item.getToken());
selectItem.setId(item.getId());
result.add(selectItem);
}
return result;
}
@Override
public UsdtOtherToDelegationPlus getById(Long id, SFunction<UsdtOtherToDelegationPlus, ?>... columns) {
LambdaQueryWrapper<UsdtOtherToDelegationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtOtherToDelegationPlus>()
.select(columns).eq(UsdtOtherToDelegationPlus::getId, id);
return baseMapper.selectOne(lambdaQueryWrapper);
}
@Override
public Map<Long, UsdtOtherToDelegationPlus> getMapByIds(List<Long> ids, SFunction<UsdtOtherToDelegationPlus, ?>... columns) {
List<UsdtOtherToDelegationPlus> list = this.getByIds(ids, columns);
Map<Long, UsdtOtherToDelegationPlus> map = new HashMap<>();
for (UsdtOtherToDelegationPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public Map<Long, UsdtOtherToDelegationPlus> getMapByIds(List<Long> ids) {
List<UsdtOtherToDelegationPlus> list = this.getByIds(ids);
Map<Long, UsdtOtherToDelegationPlus> map = new HashMap<>();
for (UsdtOtherToDelegationPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public List<UsdtOtherToDelegationPlus> getByIds(List<Long> ids) {
LambdaQueryWrapper<UsdtOtherToDelegationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtOtherToDelegationPlus>().in(UsdtOtherToDelegationPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
public <T> T sum(String field, String where, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" sum(" + field + ") as total ");
stringBuffer.append(" from usdt_other_to_delegation ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
return result;
}
public Long count(String where) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" count(1)");
stringBuffer.append(" from ");
stringBuffer.append(" usdt_other_to_delegation ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
return result;
}
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(select);
stringBuffer.append(" from ");
stringBuffer.append(" usdt_other_to_delegation ");
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 UsdtOtherToDelegation selectUsdtOtherToDelegationById(Long id) {
return usdtOtherToDelegationMapper.selectUsdtOtherToDelegationById(id);
}
/**
* 查询其他地址代理列表
*
* @param usdtOtherToDelegation 其他地址代理
* @return 其他地址代理
*/
@Override
public List<UsdtOtherToDelegation> selectUsdtOtherToDelegationList(UsdtOtherToDelegation usdtOtherToDelegation) {
return usdtOtherToDelegationMapper.selectUsdtOtherToDelegationList(usdtOtherToDelegation);
}
/**
* 新增其他地址代理
*
* @param usdtOtherToDelegation 其他地址代理
* @return 结果
*/
@Override
public int insertUsdtOtherToDelegation(UsdtOtherToDelegation usdtOtherToDelegation) {
return usdtOtherToDelegationMapper.insertUsdtOtherToDelegation(usdtOtherToDelegation);
}
/**
* 修改其他地址代理
*
* @param usdtOtherToDelegation 其他地址代理
* @return 结果
*/
@Override
public int updateUsdtOtherToDelegation(UsdtOtherToDelegation usdtOtherToDelegation) {
return usdtOtherToDelegationMapper.updateUsdtOtherToDelegation(usdtOtherToDelegation);
}
/**
* 批量删除其他地址代理
*
* @param ids 需要删除的其他地址代理ID
* @return 结果
*/
@Override
public int deleteUsdtOtherToDelegationByIds(Long[] ids) {
return usdtOtherToDelegationMapper.deleteUsdtOtherToDelegationByIds(ids);
}
/**
* 删除其他地址代理信息
*
* @param id 其他地址代理ID
* @return 结果
*/
@Override
public int deleteUsdtOtherToDelegationById(Long id) {
return usdtOtherToDelegationMapper.deleteUsdtOtherToDelegationById(id);
}
}
@@ -0,0 +1,200 @@
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.StringUtils;
import com.ruoyi.system.domain.UsdtDelegationToOther;
import com.ruoyi.system.domain.UsdtDelegationToOtherPlus;
import com.ruoyi.system.mapper.UsdtDelegationToOtherMapper;
import com.ruoyi.system.service.IUsdtProxyToOtherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 代理给其他地址Service业务层处理
*
* @author luqj
* @date 2026-10-12
*/
@Service
public class UsdtProxyToOtherServiceImpl extends ServiceImpl<UsdtDelegationToOtherMapper, UsdtDelegationToOtherPlus> implements IUsdtProxyToOtherService {
@Autowired
private UsdtDelegationToOtherMapper usdtDelegationToOtherMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public List<UsdtDelegationToOtherPlus> getByIds(List<Long> ids, SFunction<UsdtDelegationToOtherPlus, ?>... columns) {
LambdaQueryWrapper<UsdtDelegationToOtherPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtDelegationToOtherPlus>()
.select(columns).in(UsdtDelegationToOtherPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
@Override
public List<SelectItem> select(String keyword) {
LambdaQueryWrapper<UsdtDelegationToOtherPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtDelegationToOtherPlus>()
.select(UsdtDelegationToOtherPlus::getId, UsdtDelegationToOtherPlus::getToken)
.like(UsdtDelegationToOtherPlus::getToken, keyword);
List<UsdtDelegationToOtherPlus> list = this.list(lambdaQueryWrapper);
List<SelectItem> result = new ArrayList<>();
for (UsdtDelegationToOtherPlus item : list) {
SelectItem selectItem = new SelectItem();
selectItem.setName(item.getToken());
selectItem.setId(item.getId());
result.add(selectItem);
}
return result;
}
@Override
public UsdtDelegationToOtherPlus getById(Long id, SFunction<UsdtDelegationToOtherPlus, ?>... columns) {
LambdaQueryWrapper<UsdtDelegationToOtherPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtDelegationToOtherPlus>()
.select(columns).eq(UsdtDelegationToOtherPlus::getId, id);
return baseMapper.selectOne(lambdaQueryWrapper);
}
@Override
public Map<Long, UsdtDelegationToOtherPlus> getMapByIds(List<Long> ids, SFunction<UsdtDelegationToOtherPlus, ?>... columns) {
List<UsdtDelegationToOtherPlus> list = this.getByIds(ids, columns);
Map<Long, UsdtDelegationToOtherPlus> map = new HashMap<>();
for (UsdtDelegationToOtherPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public Map<Long, UsdtDelegationToOtherPlus> getMapByIds(List<Long> ids) {
List<UsdtDelegationToOtherPlus> list = this.getByIds(ids);
Map<Long, UsdtDelegationToOtherPlus> map = new HashMap<>();
for (UsdtDelegationToOtherPlus item : list) {
map.put(item.getId(), item);
}
return map;
}
@Override
public List<UsdtDelegationToOtherPlus> getByIds(List<Long> ids) {
LambdaQueryWrapper<UsdtDelegationToOtherPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtDelegationToOtherPlus>().in(UsdtDelegationToOtherPlus::getId, ids);
return this.list(lambdaQueryWrapper);
}
public <T> T sum(String field, String where, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" sum(" + field + ") as total ");
stringBuffer.append(" from usdt_delegation_to_other ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
return result;
}
public Long count(String where) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(" count(1)");
stringBuffer.append(" from ");
stringBuffer.append(" usdt_delegation_to_other ");
if (StringUtils.isNotBlank(where)) {
stringBuffer.append(" where ");
stringBuffer.append(where);
}
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
return result;
}
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select ");
stringBuffer.append(select);
stringBuffer.append(" from ");
stringBuffer.append(" usdt_delegation_to_other ");
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 UsdtDelegationToOther selectUsdtDelegationToOtherById(Long id) {
return usdtDelegationToOtherMapper.selectUsdtDelegationToOtherById(id);
}
/**
* 查询代理给其他地址列表
*
* @param usdtDelegationToOther 代理给其他地址
* @return 代理给其他地址
*/
@Override
public List<UsdtDelegationToOther> selectUsdtDelegationToOtherList(UsdtDelegationToOther usdtDelegationToOther) {
return usdtDelegationToOtherMapper.selectUsdtDelegationToOtherList(usdtDelegationToOther);
}
/**
* 新增代理给其他地址
*
* @param usdtDelegationToOther 代理给其他地址
* @return 结果
*/
@Override
public int insertUsdtDelegationToOther(UsdtDelegationToOther usdtDelegationToOther) {
return usdtDelegationToOtherMapper.insertUsdtDelegationToOther(usdtDelegationToOther);
}
/**
* 修改代理给其他地址
*
* @param usdtDelegationToOther 代理给其他地址
* @return 结果
*/
@Override
public int updateUsdtDelegationToOther(UsdtDelegationToOther usdtDelegationToOther) {
return usdtDelegationToOtherMapper.updateUsdtDelegationToOther(usdtDelegationToOther);
}
/**
* 批量删除代理给其他地址
*
* @param ids 需要删除的代理给其他地址ID
* @return 结果
*/
@Override
public int deleteUsdtDelegationToOtherByIds(Long[] ids) {
return usdtDelegationToOtherMapper.deleteUsdtDelegationToOtherByIds(ids);
}
/**
* 删除代理给其他地址信息
*
* @param id 代理给其他地址ID
* @return 结果
*/
@Override
public int deleteUsdtDelegationToOtherById(Long id) {
return usdtDelegationToOtherMapper.deleteUsdtDelegationToOtherById(id);
}
}