基础代码生成
This commit is contained in:
1 parent
352d7d023f
commit
1c0544afe0
122 files changed
+21475
No files matched your search
@@ -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.RentAccount;
|
||||
import com.ruoyi.system.domain.RentAccountPlus;
|
||||
import com.ruoyi.system.service.IRentAccountService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 独立租赁资金账户;仅USDT,按用户和网络隔离Controller
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentAccount")
|
||||
public class RentAccountController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentAccountService rentAccountService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentAccountPlus> list = rentAccountService.getByIds(ids.getLongIds(),false,RentAccountPlus::getUserId,RentAccountPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentAccountPlus> list = rentAccountService.getByIds(ids.getLongIds(),true,RentAccountPlus::getUserId,RentAccountPlus::getUserId,RentAccountPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentAccountService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentAccountService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询独立租赁资金账户;仅USDT,按用户和网络隔离列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentAccount rentAccount)
|
||||
{
|
||||
startPage();
|
||||
List<RentAccount> list = rentAccountService.selectRentAccountList(rentAccount,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询独立租赁资金账户;仅USDT,按用户和网络隔离列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(RentAccount rentAccount)
|
||||
{
|
||||
startPage();
|
||||
List<RentAccount> list = rentAccountService.selectRentAccountList(rentAccount,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出独立租赁资金账户;仅USDT,按用户和网络隔离列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:export')")
|
||||
@Log(title = "独立租赁资金账户;仅USDT,按用户和网络隔离", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentAccount rentAccount)
|
||||
{
|
||||
List<RentAccount> list = rentAccountService.selectRentAccountList(rentAccount,false);
|
||||
ExcelUtil<RentAccount> util = new ExcelUtil<RentAccount>(RentAccount.class);
|
||||
return util.exportExcel(list, "rentAccount");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取独立租赁资金账户;仅USDT,按用户和网络隔离详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentAccountService.selectRentAccountById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取独立租赁资金账户;仅USDT,按用户和网络隔离详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentAccountService.selectRentAccountById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:add')")
|
||||
@Log(title = "独立租赁资金账户;仅USDT,按用户和网络隔离", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentAccount rentAccount)
|
||||
{
|
||||
return toAjax(rentAccountService.insertRentAccount(rentAccount,false));
|
||||
}
|
||||
/**
|
||||
* 新增独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:user-add')")
|
||||
@Log(title = "独立租赁资金账户;仅USDT,按用户和网络隔离", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody RentAccount rentAccount)
|
||||
{
|
||||
return toAjax(rentAccountService.insertRentAccount(rentAccount,true));
|
||||
}
|
||||
/**
|
||||
* 修改独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:edit')")
|
||||
@Log(title = "独立租赁资金账户;仅USDT,按用户和网络隔离", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentAccount rentAccount)
|
||||
{
|
||||
return toAjax(rentAccountService.updateRentAccount(rentAccount,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:user-edit')")
|
||||
@Log(title = "独立租赁资金账户;仅USDT,按用户和网络隔离", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody RentAccount rentAccount)
|
||||
{
|
||||
return toAjax(rentAccountService.updateRentAccount(rentAccount,true));
|
||||
}
|
||||
/**
|
||||
* 删除独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:remove')")
|
||||
@Log(title = "独立租赁资金账户;仅USDT,按用户和网络隔离", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentAccountService.deleteRentAccountByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentAccount:user-remove')")
|
||||
@Log(title = "独立租赁资金账户;仅USDT,按用户和网络隔离", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentAccountService.deleteRentAccountByIds(ids,true));
|
||||
}
|
||||
}
|
||||
@@ -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.RentApp;
|
||||
import com.ruoyi.system.domain.RentAppPlus;
|
||||
import com.ruoyi.system.service.IRentAppService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentApp")
|
||||
public class RentAppController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentAppService rentAppService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentAppPlus> list = rentAppService.getByIds(ids.getLongIds(),false,RentAppPlus::getName,RentAppPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentAppPlus> list = rentAppService.getByIds(ids.getLongIds(),true,RentAppPlus::getUserId,RentAppPlus::getName,RentAppPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentAppService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentAppService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询租赁独立商户应用;登录及权限共用若依列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentApp rentApp)
|
||||
{
|
||||
startPage();
|
||||
List<RentApp> list = rentAppService.selectRentAppList(rentApp,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询租赁独立商户应用;登录及权限共用若依列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(RentApp rentApp)
|
||||
{
|
||||
startPage();
|
||||
List<RentApp> list = rentAppService.selectRentAppList(rentApp,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出租赁独立商户应用;登录及权限共用若依列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:export')")
|
||||
@Log(title = "租赁独立商户应用;登录及权限共用若依", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentApp rentApp)
|
||||
{
|
||||
List<RentApp> list = rentAppService.selectRentAppList(rentApp,false);
|
||||
ExcelUtil<RentApp> util = new ExcelUtil<RentApp>(RentApp.class);
|
||||
return util.exportExcel(list, "rentApp");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租赁独立商户应用;登录及权限共用若依详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentAppService.selectRentAppById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取租赁独立商户应用;登录及权限共用若依详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentAppService.selectRentAppById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增租赁独立商户应用;登录及权限共用若依
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:add')")
|
||||
@Log(title = "租赁独立商户应用;登录及权限共用若依", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentApp rentApp)
|
||||
{
|
||||
return toAjax(rentAppService.insertRentApp(rentApp,false));
|
||||
}
|
||||
/**
|
||||
* 新增租赁独立商户应用;登录及权限共用若依
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:user-add')")
|
||||
@Log(title = "租赁独立商户应用;登录及权限共用若依", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody RentApp rentApp)
|
||||
{
|
||||
return toAjax(rentAppService.insertRentApp(rentApp,true));
|
||||
}
|
||||
/**
|
||||
* 修改租赁独立商户应用;登录及权限共用若依
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:edit')")
|
||||
@Log(title = "租赁独立商户应用;登录及权限共用若依", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentApp rentApp)
|
||||
{
|
||||
return toAjax(rentAppService.updateRentApp(rentApp,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:user-edit')")
|
||||
@Log(title = "租赁独立商户应用;登录及权限共用若依", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody RentApp rentApp)
|
||||
{
|
||||
return toAjax(rentAppService.updateRentApp(rentApp,true));
|
||||
}
|
||||
/**
|
||||
* 删除租赁独立商户应用;登录及权限共用若依
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:remove')")
|
||||
@Log(title = "租赁独立商户应用;登录及权限共用若依", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentAppService.deleteRentAppByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除租赁独立商户应用;登录及权限共用若依
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentApp:user-remove')")
|
||||
@Log(title = "租赁独立商户应用;登录及权限共用若依", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentAppService.deleteRentAppByIds(ids,true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentCredential;
|
||||
import com.ruoyi.system.domain.RentCredentialPlus;
|
||||
import com.ruoyi.system.service.IRentCredentialService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商户及节点统一HMAC凭证版本;不含RSAController
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentCredential")
|
||||
public class RentCredentialController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentCredentialService rentCredentialService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentCredential:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentCredentialPlus> list = rentCredentialService.getByIds(ids.getLongIds(),RentCredentialPlus::getApiKey,RentCredentialPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentCredential:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentCredentialService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询商户及节点统一HMAC凭证版本;不含RSA列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentCredential:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentCredential rentCredential)
|
||||
{
|
||||
startPage();
|
||||
List<RentCredential> list = rentCredentialService.selectRentCredentialList(rentCredential);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出商户及节点统一HMAC凭证版本;不含RSA列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentCredential:export')")
|
||||
@Log(title = "商户及节点统一HMAC凭证版本;不含RSA", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentCredential rentCredential)
|
||||
{
|
||||
List<RentCredential> list = rentCredentialService.selectRentCredentialList(rentCredential);
|
||||
ExcelUtil<RentCredential> util = new ExcelUtil<RentCredential>(RentCredential.class);
|
||||
return util.exportExcel(list, "rentCredential");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商户及节点统一HMAC凭证版本;不含RSA详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentCredential:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentCredentialService.selectRentCredentialById(id));
|
||||
}
|
||||
/**
|
||||
* 新增商户及节点统一HMAC凭证版本;不含RSA
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentCredential:add')")
|
||||
@Log(title = "商户及节点统一HMAC凭证版本;不含RSA", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentCredential rentCredential)
|
||||
{
|
||||
return toAjax(rentCredentialService.insertRentCredential(rentCredential));
|
||||
}
|
||||
/**
|
||||
* 修改商户及节点统一HMAC凭证版本;不含RSA
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentCredential:edit')")
|
||||
@Log(title = "商户及节点统一HMAC凭证版本;不含RSA", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentCredential rentCredential)
|
||||
{
|
||||
return toAjax(rentCredentialService.updateRentCredential(rentCredential));
|
||||
}
|
||||
/**
|
||||
* 删除商户及节点统一HMAC凭证版本;不含RSA
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentCredential:remove')")
|
||||
@Log(title = "商户及节点统一HMAC凭证版本;不含RSA", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentCredentialService.deleteRentCredentialByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentEvent;
|
||||
import com.ruoyi.system.domain.RentEventPlus;
|
||||
import com.ruoyi.system.service.IRentEventService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentEvent")
|
||||
public class RentEventController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentEventService rentEventService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentEvent:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentEventPlus> list = rentEventService.getByIds(ids.getLongIds(),RentEventPlus::getEventNo,RentEventPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentEvent:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentEventService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询业务操作和状态变更追加审计;关键事务同写列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentEvent:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentEvent rentEvent)
|
||||
{
|
||||
startPage();
|
||||
List<RentEvent> list = rentEventService.selectRentEventList(rentEvent);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出业务操作和状态变更追加审计;关键事务同写列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentEvent:export')")
|
||||
@Log(title = "业务操作和状态变更追加审计;关键事务同写", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentEvent rentEvent)
|
||||
{
|
||||
List<RentEvent> list = rentEventService.selectRentEventList(rentEvent);
|
||||
ExcelUtil<RentEvent> util = new ExcelUtil<RentEvent>(RentEvent.class);
|
||||
return util.exportExcel(list, "rentEvent");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务操作和状态变更追加审计;关键事务同写详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentEvent:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentEventService.selectRentEventById(id));
|
||||
}
|
||||
/**
|
||||
* 新增业务操作和状态变更追加审计;关键事务同写
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentEvent:add')")
|
||||
@Log(title = "业务操作和状态变更追加审计;关键事务同写", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentEvent rentEvent)
|
||||
{
|
||||
return toAjax(rentEventService.insertRentEvent(rentEvent));
|
||||
}
|
||||
/**
|
||||
* 修改业务操作和状态变更追加审计;关键事务同写
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentEvent:edit')")
|
||||
@Log(title = "业务操作和状态变更追加审计;关键事务同写", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentEvent rentEvent)
|
||||
{
|
||||
return toAjax(rentEventService.updateRentEvent(rentEvent));
|
||||
}
|
||||
/**
|
||||
* 删除业务操作和状态变更追加审计;关键事务同写
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentEvent:remove')")
|
||||
@Log(title = "业务操作和状态变更追加审计;关键事务同写", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentEventService.deleteRentEventByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentLedger;
|
||||
import com.ruoyi.system.domain.RentLedgerPlus;
|
||||
import com.ruoyi.system.service.IRentLedgerService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentLedger")
|
||||
public class RentLedgerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentLedgerService rentLedgerService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentLedger:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentLedgerPlus> list = rentLedgerService.getByIds(ids.getLongIds(),RentLedgerPlus::getBusinessKey,RentLedgerPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentLedger:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentLedgerService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentLedger:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentLedger rentLedger)
|
||||
{
|
||||
startPage();
|
||||
List<RentLedger> list = rentLedgerService.selectRentLedgerList(rentLedger);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentLedger:export')")
|
||||
@Log(title = "不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentLedger rentLedger)
|
||||
{
|
||||
List<RentLedger> list = rentLedgerService.selectRentLedgerList(rentLedger);
|
||||
ExcelUtil<RentLedger> util = new ExcelUtil<RentLedger>(RentLedger.class);
|
||||
return util.exportExcel(list, "rentLedger");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentLedger:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentLedgerService.selectRentLedgerById(id));
|
||||
}
|
||||
/**
|
||||
* 新增不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentLedger:add')")
|
||||
@Log(title = "不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentLedger rentLedger)
|
||||
{
|
||||
return toAjax(rentLedgerService.insertRentLedger(rentLedger));
|
||||
}
|
||||
/**
|
||||
* 修改不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentLedger:edit')")
|
||||
@Log(title = "不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentLedger rentLedger)
|
||||
{
|
||||
return toAjax(rentLedgerService.updateRentLedger(rentLedger));
|
||||
}
|
||||
/**
|
||||
* 删除不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentLedger:remove')")
|
||||
@Log(title = "不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentLedgerService.deleteRentLedgerByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -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.RentNode;
|
||||
import com.ruoyi.system.domain.RentNodePlus;
|
||||
import com.ruoyi.system.service.IRentNodeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 供应商本地Agent节点;供应商直接关联共享用户,不另建成员Controller
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentNode")
|
||||
public class RentNodeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentNodeService rentNodeService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentNodePlus> list = rentNodeService.getByIds(ids.getLongIds(),false,RentNodePlus::getName,RentNodePlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentNodePlus> list = rentNodeService.getByIds(ids.getLongIds(),true,RentNodePlus::getUserId,RentNodePlus::getName,RentNodePlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentNodeService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentNodeService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询供应商本地Agent节点;供应商直接关联共享用户,不另建成员列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentNode rentNode)
|
||||
{
|
||||
startPage();
|
||||
List<RentNode> list = rentNodeService.selectRentNodeList(rentNode,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询供应商本地Agent节点;供应商直接关联共享用户,不另建成员列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(RentNode rentNode)
|
||||
{
|
||||
startPage();
|
||||
List<RentNode> list = rentNodeService.selectRentNodeList(rentNode,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出供应商本地Agent节点;供应商直接关联共享用户,不另建成员列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:export')")
|
||||
@Log(title = "供应商本地Agent节点;供应商直接关联共享用户,不另建成员", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentNode rentNode)
|
||||
{
|
||||
List<RentNode> list = rentNodeService.selectRentNodeList(rentNode,false);
|
||||
ExcelUtil<RentNode> util = new ExcelUtil<RentNode>(RentNode.class);
|
||||
return util.exportExcel(list, "rentNode");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应商本地Agent节点;供应商直接关联共享用户,不另建成员详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentNodeService.selectRentNodeById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取供应商本地Agent节点;供应商直接关联共享用户,不另建成员详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentNodeService.selectRentNodeById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:add')")
|
||||
@Log(title = "供应商本地Agent节点;供应商直接关联共享用户,不另建成员", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentNode rentNode)
|
||||
{
|
||||
return toAjax(rentNodeService.insertRentNode(rentNode,false));
|
||||
}
|
||||
/**
|
||||
* 新增供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:user-add')")
|
||||
@Log(title = "供应商本地Agent节点;供应商直接关联共享用户,不另建成员", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody RentNode rentNode)
|
||||
{
|
||||
return toAjax(rentNodeService.insertRentNode(rentNode,true));
|
||||
}
|
||||
/**
|
||||
* 修改供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:edit')")
|
||||
@Log(title = "供应商本地Agent节点;供应商直接关联共享用户,不另建成员", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentNode rentNode)
|
||||
{
|
||||
return toAjax(rentNodeService.updateRentNode(rentNode,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:user-edit')")
|
||||
@Log(title = "供应商本地Agent节点;供应商直接关联共享用户,不另建成员", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody RentNode rentNode)
|
||||
{
|
||||
return toAjax(rentNodeService.updateRentNode(rentNode,true));
|
||||
}
|
||||
/**
|
||||
* 删除供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:remove')")
|
||||
@Log(title = "供应商本地Agent节点;供应商直接关联共享用户,不另建成员", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentNodeService.deleteRentNodeByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNode:user-remove')")
|
||||
@Log(title = "供应商本地Agent节点;供应商直接关联共享用户,不另建成员", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentNodeService.deleteRentNodeByIds(ids,true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentNonce;
|
||||
import com.ruoyi.system.domain.RentNoncePlus;
|
||||
import com.ruoyi.system.service.IRentNonceService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* HMAC请求防重放记录Controller
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentNonce")
|
||||
public class RentNonceController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentNonceService rentNonceService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNonce:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentNoncePlus> list = rentNonceService.getByIds(ids.getLongIds(),RentNoncePlus::getNonce,RentNoncePlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNonce:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentNonceService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询HMAC请求防重放记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNonce:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentNonce rentNonce)
|
||||
{
|
||||
startPage();
|
||||
List<RentNonce> list = rentNonceService.selectRentNonceList(rentNonce);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出HMAC请求防重放记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNonce:export')")
|
||||
@Log(title = "HMAC请求防重放记录", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentNonce rentNonce)
|
||||
{
|
||||
List<RentNonce> list = rentNonceService.selectRentNonceList(rentNonce);
|
||||
ExcelUtil<RentNonce> util = new ExcelUtil<RentNonce>(RentNonce.class);
|
||||
return util.exportExcel(list, "rentNonce");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取HMAC请求防重放记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNonce:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentNonceService.selectRentNonceById(id));
|
||||
}
|
||||
/**
|
||||
* 新增HMAC请求防重放记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNonce:add')")
|
||||
@Log(title = "HMAC请求防重放记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentNonce rentNonce)
|
||||
{
|
||||
return toAjax(rentNonceService.insertRentNonce(rentNonce));
|
||||
}
|
||||
/**
|
||||
* 修改HMAC请求防重放记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNonce:edit')")
|
||||
@Log(title = "HMAC请求防重放记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentNonce rentNonce)
|
||||
{
|
||||
return toAjax(rentNonceService.updateRentNonce(rentNonce));
|
||||
}
|
||||
/**
|
||||
* 删除HMAC请求防重放记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentNonce:remove')")
|
||||
@Log(title = "HMAC请求防重放记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentNonceService.deleteRentNonceByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentOrder;
|
||||
import com.ruoyi.system.domain.RentOrderPlus;
|
||||
import com.ruoyi.system.service.IRentOrderService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentOrder")
|
||||
public class RentOrderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentOrderService rentOrderService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentOrder:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentOrderPlus> list = rentOrderService.getByIds(ids.getLongIds(),RentOrderPlus::getOrderNo,RentOrderPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentOrder:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentOrderService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentOrder:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentOrder rentOrder)
|
||||
{
|
||||
startPage();
|
||||
List<RentOrder> list = rentOrderService.selectRentOrderList(rentOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentOrder:export')")
|
||||
@Log(title = "能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentOrder rentOrder)
|
||||
{
|
||||
List<RentOrder> list = rentOrderService.selectRentOrderList(rentOrder);
|
||||
ExcelUtil<RentOrder> util = new ExcelUtil<RentOrder>(RentOrder.class);
|
||||
return util.exportExcel(list, "rentOrder");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentOrder:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentOrderService.selectRentOrderById(id));
|
||||
}
|
||||
/**
|
||||
* 新增能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentOrder:add')")
|
||||
@Log(title = "能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentOrder rentOrder)
|
||||
{
|
||||
return toAjax(rentOrderService.insertRentOrder(rentOrder));
|
||||
}
|
||||
/**
|
||||
* 修改能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentOrder:edit')")
|
||||
@Log(title = "能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentOrder rentOrder)
|
||||
{
|
||||
return toAjax(rentOrderService.updateRentOrder(rentOrder));
|
||||
}
|
||||
/**
|
||||
* 删除能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentOrder:remove')")
|
||||
@Log(title = "能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentOrderService.deleteRentOrderByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentPackage;
|
||||
import com.ruoyi.system.domain.RentPackagePlus;
|
||||
import com.ruoyi.system.service.IRentPackageService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentPackage")
|
||||
public class RentPackageController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentPackageService rentPackageService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentPackage:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentPackagePlus> list = rentPackageService.getByIds(ids.getLongIds(),RentPackagePlus::getName,RentPackagePlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentPackage:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentPackageService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentPackage:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentPackage rentPackage)
|
||||
{
|
||||
startPage();
|
||||
List<RentPackage> list = rentPackageService.selectRentPackageList(rentPackage);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentPackage:export')")
|
||||
@Log(title = "能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentPackage rentPackage)
|
||||
{
|
||||
List<RentPackage> list = rentPackageService.selectRentPackageList(rentPackage);
|
||||
ExcelUtil<RentPackage> util = new ExcelUtil<RentPackage>(RentPackage.class);
|
||||
return util.exportExcel(list, "rentPackage");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentPackage:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentPackageService.selectRentPackageById(id));
|
||||
}
|
||||
/**
|
||||
* 新增能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentPackage:add')")
|
||||
@Log(title = "能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentPackage rentPackage)
|
||||
{
|
||||
return toAjax(rentPackageService.insertRentPackage(rentPackage));
|
||||
}
|
||||
/**
|
||||
* 修改能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentPackage:edit')")
|
||||
@Log(title = "能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentPackage rentPackage)
|
||||
{
|
||||
return toAjax(rentPackageService.updateRentPackage(rentPackage));
|
||||
}
|
||||
/**
|
||||
* 删除能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentPackage:remove')")
|
||||
@Log(title = "能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentPackageService.deleteRentPackageByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentRefund;
|
||||
import com.ruoyi.system.domain.RentRefundPlus;
|
||||
import com.ruoyi.system.service.IRentRefundService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentRefund")
|
||||
public class RentRefundController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentRefundService rentRefundService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentRefund:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentRefundPlus> list = rentRefundService.getByIds(ids.getLongIds(),RentRefundPlus::getRefundNo,RentRefundPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentRefund:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentRefundService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentRefund:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentRefund rentRefund)
|
||||
{
|
||||
startPage();
|
||||
List<RentRefund> list = rentRefundService.selectRentRefundList(rentRefund);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentRefund:export')")
|
||||
@Log(title = "内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentRefund rentRefund)
|
||||
{
|
||||
List<RentRefund> list = rentRefundService.selectRentRefundList(rentRefund);
|
||||
ExcelUtil<RentRefund> util = new ExcelUtil<RentRefund>(RentRefund.class);
|
||||
return util.exportExcel(list, "rentRefund");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentRefund:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentRefundService.selectRentRefundById(id));
|
||||
}
|
||||
/**
|
||||
* 新增内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentRefund:add')")
|
||||
@Log(title = "内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentRefund rentRefund)
|
||||
{
|
||||
return toAjax(rentRefundService.insertRentRefund(rentRefund));
|
||||
}
|
||||
/**
|
||||
* 修改内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentRefund:edit')")
|
||||
@Log(title = "内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentRefund rentRefund)
|
||||
{
|
||||
return toAjax(rentRefundService.updateRentRefund(rentRefund));
|
||||
}
|
||||
/**
|
||||
* 删除内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentRefund:remove')")
|
||||
@Log(title = "内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentRefundService.deleteRentRefundByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentSettlement;
|
||||
import com.ruoyi.system.domain.RentSettlementPlus;
|
||||
import com.ruoyi.system.service.IRentSettlementService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentSettlement")
|
||||
public class RentSettlementController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentSettlementService rentSettlementService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlement:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentSettlementPlus> list = rentSettlementService.getByIds(ids.getLongIds(),RentSettlementPlus::getSettlementNo,RentSettlementPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlement:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentSettlementService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询供应商人工结算单;不自动链上出金列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlement:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentSettlement rentSettlement)
|
||||
{
|
||||
startPage();
|
||||
List<RentSettlement> list = rentSettlementService.selectRentSettlementList(rentSettlement);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出供应商人工结算单;不自动链上出金列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlement:export')")
|
||||
@Log(title = "供应商人工结算单;不自动链上出金", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentSettlement rentSettlement)
|
||||
{
|
||||
List<RentSettlement> list = rentSettlementService.selectRentSettlementList(rentSettlement);
|
||||
ExcelUtil<RentSettlement> util = new ExcelUtil<RentSettlement>(RentSettlement.class);
|
||||
return util.exportExcel(list, "rentSettlement");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应商人工结算单;不自动链上出金详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlement:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentSettlementService.selectRentSettlementById(id));
|
||||
}
|
||||
/**
|
||||
* 新增供应商人工结算单;不自动链上出金
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlement:add')")
|
||||
@Log(title = "供应商人工结算单;不自动链上出金", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentSettlement rentSettlement)
|
||||
{
|
||||
return toAjax(rentSettlementService.insertRentSettlement(rentSettlement));
|
||||
}
|
||||
/**
|
||||
* 修改供应商人工结算单;不自动链上出金
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlement:edit')")
|
||||
@Log(title = "供应商人工结算单;不自动链上出金", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentSettlement rentSettlement)
|
||||
{
|
||||
return toAjax(rentSettlementService.updateRentSettlement(rentSettlement));
|
||||
}
|
||||
/**
|
||||
* 删除供应商人工结算单;不自动链上出金
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlement:remove')")
|
||||
@Log(title = "供应商人工结算单;不自动链上出金", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentSettlementService.deleteRentSettlementByIds(ids));
|
||||
}
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
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.RentSettlementItem;
|
||||
import com.ruoyi.system.domain.RentSettlementItemPlus;
|
||||
import com.ruoyi.system.service.IRentSettlementItemService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentSettlementItem")
|
||||
public class RentSettlementItemController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentSettlementItemService rentSettlementItemService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlementItem:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentSettlementItemPlus> list = rentSettlementItemService.getByIds(ids.getLongIds(),RentSettlementItemPlus::getOrderId,RentSettlementItemPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlementItem:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentSettlementItemService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询供应商订单应收与结算关联;首版每单全额结算一次列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlementItem:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentSettlementItem rentSettlementItem)
|
||||
{
|
||||
startPage();
|
||||
List<RentSettlementItem> list = rentSettlementItemService.selectRentSettlementItemList(rentSettlementItem);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出供应商订单应收与结算关联;首版每单全额结算一次列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlementItem:export')")
|
||||
@Log(title = "供应商订单应收与结算关联;首版每单全额结算一次", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentSettlementItem rentSettlementItem)
|
||||
{
|
||||
List<RentSettlementItem> list = rentSettlementItemService.selectRentSettlementItemList(rentSettlementItem);
|
||||
ExcelUtil<RentSettlementItem> util = new ExcelUtil<RentSettlementItem>(RentSettlementItem.class);
|
||||
return util.exportExcel(list, "rentSettlementItem");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应商订单应收与结算关联;首版每单全额结算一次详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlementItem:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentSettlementItemService.selectRentSettlementItemById(id));
|
||||
}
|
||||
/**
|
||||
* 新增供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlementItem:add')")
|
||||
@Log(title = "供应商订单应收与结算关联;首版每单全额结算一次", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentSettlementItem rentSettlementItem)
|
||||
{
|
||||
return toAjax(rentSettlementItemService.insertRentSettlementItem(rentSettlementItem));
|
||||
}
|
||||
/**
|
||||
* 修改供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlementItem:edit')")
|
||||
@Log(title = "供应商订单应收与结算关联;首版每单全额结算一次", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentSettlementItem rentSettlementItem)
|
||||
{
|
||||
return toAjax(rentSettlementItemService.updateRentSettlementItem(rentSettlementItem));
|
||||
}
|
||||
/**
|
||||
* 删除供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentSettlementItem:remove')")
|
||||
@Log(title = "供应商订单应收与结算关联;首版每单全额结算一次", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentSettlementItemService.deleteRentSettlementItemByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentTask;
|
||||
import com.ruoyi.system.domain.RentTaskPlus;
|
||||
import com.ruoyi.system.service.IRentTaskService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentTask")
|
||||
public class RentTaskController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentTaskService rentTaskService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTask:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentTaskPlus> list = rentTaskService.getByIds(ids.getLongIds(),RentTaskPlus::getTaskNo,RentTaskPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTask:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentTaskService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询委托或回收任务,兼作持久队列与资源预留明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTask:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentTask rentTask)
|
||||
{
|
||||
startPage();
|
||||
List<RentTask> list = rentTaskService.selectRentTaskList(rentTask);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出委托或回收任务,兼作持久队列与资源预留明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTask:export')")
|
||||
@Log(title = "委托或回收任务,兼作持久队列与资源预留明细", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentTask rentTask)
|
||||
{
|
||||
List<RentTask> list = rentTaskService.selectRentTaskList(rentTask);
|
||||
ExcelUtil<RentTask> util = new ExcelUtil<RentTask>(RentTask.class);
|
||||
return util.exportExcel(list, "rentTask");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取委托或回收任务,兼作持久队列与资源预留明细详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTask:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentTaskService.selectRentTaskById(id));
|
||||
}
|
||||
/**
|
||||
* 新增委托或回收任务,兼作持久队列与资源预留明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTask:add')")
|
||||
@Log(title = "委托或回收任务,兼作持久队列与资源预留明细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentTask rentTask)
|
||||
{
|
||||
return toAjax(rentTaskService.insertRentTask(rentTask));
|
||||
}
|
||||
/**
|
||||
* 修改委托或回收任务,兼作持久队列与资源预留明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTask:edit')")
|
||||
@Log(title = "委托或回收任务,兼作持久队列与资源预留明细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentTask rentTask)
|
||||
{
|
||||
return toAjax(rentTaskService.updateRentTask(rentTask));
|
||||
}
|
||||
/**
|
||||
* 删除委托或回收任务,兼作持久队列与资源预留明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTask:remove')")
|
||||
@Log(title = "委托或回收任务,兼作持久队列与资源预留明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentTaskService.deleteRentTaskByIds(ids));
|
||||
}
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
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.RentTransaction;
|
||||
import com.ruoyi.system.domain.RentTransactionPlus;
|
||||
import com.ruoyi.system.service.IRentTransactionService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentTransaction")
|
||||
public class RentTransactionController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentTransactionService rentTransactionService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTransaction:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentTransactionPlus> list = rentTransactionService.getByIds(ids.getLongIds(),RentTransactionPlus::getTxId,RentTransactionPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTransaction:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentTransactionService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询链上委托或回收证据;一任务只能构建一笔交易列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTransaction:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentTransaction rentTransaction)
|
||||
{
|
||||
startPage();
|
||||
List<RentTransaction> list = rentTransactionService.selectRentTransactionList(rentTransaction);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出链上委托或回收证据;一任务只能构建一笔交易列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTransaction:export')")
|
||||
@Log(title = "链上委托或回收证据;一任务只能构建一笔交易", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentTransaction rentTransaction)
|
||||
{
|
||||
List<RentTransaction> list = rentTransactionService.selectRentTransactionList(rentTransaction);
|
||||
ExcelUtil<RentTransaction> util = new ExcelUtil<RentTransaction>(RentTransaction.class);
|
||||
return util.exportExcel(list, "rentTransaction");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取链上委托或回收证据;一任务只能构建一笔交易详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTransaction:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentTransactionService.selectRentTransactionById(id));
|
||||
}
|
||||
/**
|
||||
* 新增链上委托或回收证据;一任务只能构建一笔交易
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTransaction:add')")
|
||||
@Log(title = "链上委托或回收证据;一任务只能构建一笔交易", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentTransaction rentTransaction)
|
||||
{
|
||||
return toAjax(rentTransactionService.insertRentTransaction(rentTransaction));
|
||||
}
|
||||
/**
|
||||
* 修改链上委托或回收证据;一任务只能构建一笔交易
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTransaction:edit')")
|
||||
@Log(title = "链上委托或回收证据;一任务只能构建一笔交易", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentTransaction rentTransaction)
|
||||
{
|
||||
return toAjax(rentTransactionService.updateRentTransaction(rentTransaction));
|
||||
}
|
||||
/**
|
||||
* 删除链上委托或回收证据;一任务只能构建一笔交易
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentTransaction:remove')")
|
||||
@Log(title = "链上委托或回收证据;一任务只能构建一笔交易", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentTransactionService.deleteRentTransactionByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentWallet;
|
||||
import com.ruoyi.system.domain.RentWalletPlus;
|
||||
import com.ruoyi.system.service.IRentWalletService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentWallet")
|
||||
public class RentWalletController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentWalletService rentWalletService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWallet:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentWalletPlus> list = rentWalletService.getByIds(ids.getLongIds(),RentWalletPlus::getAddress,RentWalletPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWallet:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentWalletService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWallet:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentWallet rentWallet)
|
||||
{
|
||||
startPage();
|
||||
List<RentWallet> list = rentWalletService.selectRentWalletList(rentWallet);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWallet:export')")
|
||||
@Log(title = "供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentWallet rentWallet)
|
||||
{
|
||||
List<RentWallet> list = rentWalletService.selectRentWalletList(rentWallet);
|
||||
ExcelUtil<RentWallet> util = new ExcelUtil<RentWallet>(RentWallet.class);
|
||||
return util.exportExcel(list, "rentWallet");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWallet:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentWalletService.selectRentWalletById(id));
|
||||
}
|
||||
/**
|
||||
* 新增供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWallet:add')")
|
||||
@Log(title = "供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentWallet rentWallet)
|
||||
{
|
||||
return toAjax(rentWalletService.insertRentWallet(rentWallet));
|
||||
}
|
||||
/**
|
||||
* 修改供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWallet:edit')")
|
||||
@Log(title = "供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentWallet rentWallet)
|
||||
{
|
||||
return toAjax(rentWalletService.updateRentWallet(rentWallet));
|
||||
}
|
||||
/**
|
||||
* 删除供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWallet:remove')")
|
||||
@Log(title = "供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentWalletService.deleteRentWalletByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.RentWebhook;
|
||||
import com.ruoyi.system.domain.RentWebhookPlus;
|
||||
import com.ruoyi.system.service.IRentWebhookService;
|
||||
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-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/rentWebhook")
|
||||
public class RentWebhookController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRentWebhookService rentWebhookService;
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWebhook:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<RentWebhookPlus> list = rentWebhookService.getByIds(ids.getLongIds(),RentWebhookPlus::getEventNo,RentWebhookPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWebhook:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = rentWebhookService.select(keyword);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询订单回调持久队列;业务状态更新时同事务写入列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWebhook:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RentWebhook rentWebhook)
|
||||
{
|
||||
startPage();
|
||||
List<RentWebhook> list = rentWebhookService.selectRentWebhookList(rentWebhook);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出订单回调持久队列;业务状态更新时同事务写入列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWebhook:export')")
|
||||
@Log(title = "订单回调持久队列;业务状态更新时同事务写入", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(RentWebhook rentWebhook)
|
||||
{
|
||||
List<RentWebhook> list = rentWebhookService.selectRentWebhookList(rentWebhook);
|
||||
ExcelUtil<RentWebhook> util = new ExcelUtil<RentWebhook>(RentWebhook.class);
|
||||
return util.exportExcel(list, "rentWebhook");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单回调持久队列;业务状态更新时同事务写入详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWebhook:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(rentWebhookService.selectRentWebhookById(id));
|
||||
}
|
||||
/**
|
||||
* 新增订单回调持久队列;业务状态更新时同事务写入
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWebhook:add')")
|
||||
@Log(title = "订单回调持久队列;业务状态更新时同事务写入", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RentWebhook rentWebhook)
|
||||
{
|
||||
return toAjax(rentWebhookService.insertRentWebhook(rentWebhook));
|
||||
}
|
||||
/**
|
||||
* 修改订单回调持久队列;业务状态更新时同事务写入
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWebhook:edit')")
|
||||
@Log(title = "订单回调持久队列;业务状态更新时同事务写入", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RentWebhook rentWebhook)
|
||||
{
|
||||
return toAjax(rentWebhookService.updateRentWebhook(rentWebhook));
|
||||
}
|
||||
/**
|
||||
* 删除订单回调持久队列;业务状态更新时同事务写入
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:rentWebhook:remove')")
|
||||
@Log(title = "订单回调持久队列;业务状态更新时同事务写入", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rentWebhookService.deleteRentWebhookByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* 独立租赁资金账户;仅USDT,按用户和网络隔离对象 rent_account
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentAccount extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** sys_user.user_id,同用户可同时是商户和供应商 */
|
||||
@Excel(name = "sys_user.user_id,同用户可同时是商户和供应商")
|
||||
private Long userId;
|
||||
|
||||
/** 网络:NILE、MAINNET,必须与所有关联对象一致 */
|
||||
@Excel(name = "网络:NILE、MAINNET,必须与所有关联对象一致")
|
||||
private String network;
|
||||
|
||||
/** 可用USDT余额,不能为负 */
|
||||
@Excel(name = "可用USDT余额,不能为负")
|
||||
private BigDecimal availableAmount;
|
||||
|
||||
/** 订单冻结USDT,不能为负 */
|
||||
@Excel(name = "订单冻结USDT,不能为负")
|
||||
private BigDecimal frozenAmount;
|
||||
|
||||
/** 供应商已履约扣平台手续费后的净待结算USDT,不能为负 */
|
||||
@Excel(name = "供应商已履约扣平台手续费后的净待结算USDT,不能为负")
|
||||
private BigDecimal supplierPendingAmount;
|
||||
|
||||
/** ACTIVE可操作、FROZEN冻结业务 */
|
||||
@Excel(name = "ACTIVE可操作、FROZEN冻结业务")
|
||||
private String status;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setAvailableAmount(BigDecimal availableAmount)
|
||||
{
|
||||
this.availableAmount = availableAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getAvailableAmount()
|
||||
{
|
||||
return availableAmount;
|
||||
}
|
||||
public void setFrozenAmount(BigDecimal frozenAmount)
|
||||
{
|
||||
this.frozenAmount = frozenAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getFrozenAmount()
|
||||
{
|
||||
return frozenAmount;
|
||||
}
|
||||
public void setSupplierPendingAmount(BigDecimal supplierPendingAmount)
|
||||
{
|
||||
this.supplierPendingAmount = supplierPendingAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierPendingAmount()
|
||||
{
|
||||
return supplierPendingAmount;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("userId", getUserId())
|
||||
.append("network", getNetwork())
|
||||
.append("availableAmount", getAvailableAmount())
|
||||
.append("frozenAmount", getFrozenAmount())
|
||||
.append("supplierPendingAmount", getSupplierPendingAmount())
|
||||
.append("status", getStatus())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
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;
|
||||
/**
|
||||
* 独立租赁资金账户;仅USDT,按用户和网络隔离对象 rent_account
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_account")
|
||||
public class RentAccountPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** sys_user.user_id,同用户可同时是商户和供应商 */
|
||||
@Excel(name = "sys_user.user_id,同用户可同时是商户和供应商")
|
||||
private Long userId;
|
||||
/** 网络:NILE、MAINNET,必须与所有关联对象一致 */
|
||||
@Excel(name = "网络:NILE、MAINNET,必须与所有关联对象一致")
|
||||
private String network;
|
||||
/** 可用USDT余额,不能为负 */
|
||||
@Excel(name = "可用USDT余额,不能为负")
|
||||
private BigDecimal availableAmount;
|
||||
/** 订单冻结USDT,不能为负 */
|
||||
@Excel(name = "订单冻结USDT,不能为负")
|
||||
private BigDecimal frozenAmount;
|
||||
/** 供应商已履约扣平台手续费后的净待结算USDT,不能为负 */
|
||||
@Excel(name = "供应商已履约扣平台手续费后的净待结算USDT,不能为负")
|
||||
private BigDecimal supplierPendingAmount;
|
||||
/** ACTIVE可操作、FROZEN冻结业务 */
|
||||
@Excel(name = "ACTIVE可操作、FROZEN冻结业务")
|
||||
private String status;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setAvailableAmount(BigDecimal availableAmount)
|
||||
{
|
||||
this.availableAmount = availableAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getAvailableAmount()
|
||||
{
|
||||
return availableAmount;
|
||||
}
|
||||
public void setFrozenAmount(BigDecimal frozenAmount)
|
||||
{
|
||||
this.frozenAmount = frozenAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getFrozenAmount()
|
||||
{
|
||||
return frozenAmount;
|
||||
}
|
||||
public void setSupplierPendingAmount(BigDecimal supplierPendingAmount)
|
||||
{
|
||||
this.supplierPendingAmount = supplierPendingAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierPendingAmount()
|
||||
{
|
||||
return supplierPendingAmount;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("userId", getUserId())
|
||||
.append("network", getNetwork())
|
||||
.append("availableAmount", getAvailableAmount())
|
||||
.append("frozenAmount", getFrozenAmount())
|
||||
.append("supplierPendingAmount", getSupplierPendingAmount())
|
||||
.append("status", getStatus())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.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;
|
||||
/**
|
||||
* 租赁独立商户应用;登录及权限共用若依对象 rent_app
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentApp extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** 所有者sys_user.user_id */
|
||||
@Excel(name = "所有者sys_user.user_id")
|
||||
private Long userId;
|
||||
|
||||
/** 应用名称 */
|
||||
@Excel(name = "应用名称")
|
||||
private String name;
|
||||
|
||||
/** ACTIVE启用、DISABLED禁用 */
|
||||
@Excel(name = "ACTIVE启用、DISABLED禁用")
|
||||
private String status;
|
||||
|
||||
/** 默认HTTPS回调地址,必须检查SSRF */
|
||||
@Excel(name = "默认HTTPS回调地址,必须检查SSRF")
|
||||
private String notifyUrl;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setNotifyUrl(String notifyUrl)
|
||||
{
|
||||
this.notifyUrl = notifyUrl;
|
||||
}
|
||||
|
||||
public String getNotifyUrl()
|
||||
{
|
||||
return notifyUrl;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("userId", getUserId())
|
||||
.append("name", getName())
|
||||
.append("status", getStatus())
|
||||
.append("notifyUrl", getNotifyUrl())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.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;
|
||||
/**
|
||||
* 租赁独立商户应用;登录及权限共用若依对象 rent_app
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_app")
|
||||
public class RentAppPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** 所有者sys_user.user_id */
|
||||
@Excel(name = "所有者sys_user.user_id")
|
||||
private Long userId;
|
||||
/** 应用名称 */
|
||||
@Excel(name = "应用名称")
|
||||
private String name;
|
||||
/** ACTIVE启用、DISABLED禁用 */
|
||||
@Excel(name = "ACTIVE启用、DISABLED禁用")
|
||||
private String status;
|
||||
/** 默认HTTPS回调地址,必须检查SSRF */
|
||||
@Excel(name = "默认HTTPS回调地址,必须检查SSRF")
|
||||
private String notifyUrl;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setNotifyUrl(String notifyUrl)
|
||||
{
|
||||
this.notifyUrl = notifyUrl;
|
||||
}
|
||||
|
||||
public String getNotifyUrl()
|
||||
{
|
||||
return notifyUrl;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("userId", getUserId())
|
||||
.append("name", getName())
|
||||
.append("status", getStatus())
|
||||
.append("notifyUrl", getNotifyUrl())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
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;
|
||||
/**
|
||||
* 商户及节点统一HMAC凭证版本;不含RSA对象 rent_credential
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentCredential extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** APP商户、NODE节点 */
|
||||
@Excel(name = "APP商户、NODE节点")
|
||||
private String ownerType;
|
||||
|
||||
/** APP时rent_app.id,NODE时rent_node.id */
|
||||
@Excel(name = "APP时rent_app.id,NODE时rent_node.id")
|
||||
private Long ownerId;
|
||||
|
||||
/** 永久唯一公开凭证标识 */
|
||||
@Excel(name = "永久唯一公开凭证标识")
|
||||
private String apiKey;
|
||||
|
||||
/** AES-GCM加密封装的API Secret,含IV和tag;禁止返回或记录明文 */
|
||||
@Excel(name = "AES-GCM加密封装的API Secret,含IV和tag;禁止返回或记录明文")
|
||||
private String apiSecret;
|
||||
|
||||
/** 外部AES主密钥版本,不存主密钥 */
|
||||
@Excel(name = "外部AES主密钥版本,不存主密钥")
|
||||
private String masterKeyVersion;
|
||||
|
||||
/** ACTIVE可签发新消息、VERIFY_ONLY仅验历史在途、REVOKED吊销 */
|
||||
@Excel(name = "ACTIVE可签发新消息、VERIFY_ONLY仅验历史在途、REVOKED吊销")
|
||||
private String status;
|
||||
|
||||
/** 凭证过期时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "凭证过期时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expiresAt;
|
||||
|
||||
/** 吊销时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "吊销时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date revokedAt;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOwnerType(String ownerType)
|
||||
{
|
||||
this.ownerType = ownerType;
|
||||
}
|
||||
|
||||
public String getOwnerType()
|
||||
{
|
||||
return ownerType;
|
||||
}
|
||||
public void setOwnerId(Long ownerId)
|
||||
{
|
||||
this.ownerId = ownerId;
|
||||
}
|
||||
|
||||
public Long getOwnerId()
|
||||
{
|
||||
return ownerId;
|
||||
}
|
||||
public void setApiKey(String apiKey)
|
||||
{
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
|
||||
public String getApiKey()
|
||||
{
|
||||
return apiKey;
|
||||
}
|
||||
public void setApiSecret(String apiSecret)
|
||||
{
|
||||
this.apiSecret = apiSecret;
|
||||
}
|
||||
|
||||
public String getApiSecret()
|
||||
{
|
||||
return apiSecret;
|
||||
}
|
||||
public void setMasterKeyVersion(String masterKeyVersion)
|
||||
{
|
||||
this.masterKeyVersion = masterKeyVersion;
|
||||
}
|
||||
|
||||
public String getMasterKeyVersion()
|
||||
{
|
||||
return masterKeyVersion;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setExpiresAt(Date expiresAt)
|
||||
{
|
||||
this.expiresAt = expiresAt;
|
||||
}
|
||||
|
||||
public Date getExpiresAt()
|
||||
{
|
||||
return expiresAt;
|
||||
}
|
||||
public void setRevokedAt(Date revokedAt)
|
||||
{
|
||||
this.revokedAt = revokedAt;
|
||||
}
|
||||
|
||||
public Date getRevokedAt()
|
||||
{
|
||||
return revokedAt;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("ownerType", getOwnerType())
|
||||
.append("ownerId", getOwnerId())
|
||||
.append("apiKey", getApiKey())
|
||||
.append("apiSecret", getApiSecret())
|
||||
.append("masterKeyVersion", getMasterKeyVersion())
|
||||
.append("status", getStatus())
|
||||
.append("expiresAt", getExpiresAt())
|
||||
.append("revokedAt", getRevokedAt())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
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;
|
||||
/**
|
||||
* 商户及节点统一HMAC凭证版本;不含RSA对象 rent_credential
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_credential")
|
||||
public class RentCredentialPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** APP商户、NODE节点 */
|
||||
@Excel(name = "APP商户、NODE节点")
|
||||
private String ownerType;
|
||||
/** APP时rent_app.id,NODE时rent_node.id */
|
||||
@Excel(name = "APP时rent_app.id,NODE时rent_node.id")
|
||||
private Long ownerId;
|
||||
/** 永久唯一公开凭证标识 */
|
||||
@Excel(name = "永久唯一公开凭证标识")
|
||||
private String apiKey;
|
||||
/** AES-GCM加密封装的API Secret,含IV和tag;禁止返回或记录明文 */
|
||||
@Excel(name = "AES-GCM加密封装的API Secret,含IV和tag;禁止返回或记录明文")
|
||||
private String apiSecret;
|
||||
/** 外部AES主密钥版本,不存主密钥 */
|
||||
@Excel(name = "外部AES主密钥版本,不存主密钥")
|
||||
private String masterKeyVersion;
|
||||
/** ACTIVE可签发新消息、VERIFY_ONLY仅验历史在途、REVOKED吊销 */
|
||||
@Excel(name = "ACTIVE可签发新消息、VERIFY_ONLY仅验历史在途、REVOKED吊销")
|
||||
private String status;
|
||||
/** 凭证过期时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "凭证过期时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expiresAt;
|
||||
/** 吊销时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "吊销时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date revokedAt;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOwnerType(String ownerType)
|
||||
{
|
||||
this.ownerType = ownerType;
|
||||
}
|
||||
|
||||
public String getOwnerType()
|
||||
{
|
||||
return ownerType;
|
||||
}
|
||||
public void setOwnerId(Long ownerId)
|
||||
{
|
||||
this.ownerId = ownerId;
|
||||
}
|
||||
|
||||
public Long getOwnerId()
|
||||
{
|
||||
return ownerId;
|
||||
}
|
||||
public void setApiKey(String apiKey)
|
||||
{
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
|
||||
public String getApiKey()
|
||||
{
|
||||
return apiKey;
|
||||
}
|
||||
public void setApiSecret(String apiSecret)
|
||||
{
|
||||
this.apiSecret = apiSecret;
|
||||
}
|
||||
|
||||
public String getApiSecret()
|
||||
{
|
||||
return apiSecret;
|
||||
}
|
||||
public void setMasterKeyVersion(String masterKeyVersion)
|
||||
{
|
||||
this.masterKeyVersion = masterKeyVersion;
|
||||
}
|
||||
|
||||
public String getMasterKeyVersion()
|
||||
{
|
||||
return masterKeyVersion;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setExpiresAt(Date expiresAt)
|
||||
{
|
||||
this.expiresAt = expiresAt;
|
||||
}
|
||||
|
||||
public Date getExpiresAt()
|
||||
{
|
||||
return expiresAt;
|
||||
}
|
||||
public void setRevokedAt(Date revokedAt)
|
||||
{
|
||||
this.revokedAt = revokedAt;
|
||||
}
|
||||
|
||||
public Date getRevokedAt()
|
||||
{
|
||||
return revokedAt;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("ownerType", getOwnerType())
|
||||
.append("ownerId", getOwnerId())
|
||||
.append("apiKey", getApiKey())
|
||||
.append("apiSecret", getApiSecret())
|
||||
.append("masterKeyVersion", getMasterKeyVersion())
|
||||
.append("status", getStatus())
|
||||
.append("expiresAt", getExpiresAt())
|
||||
.append("revokedAt", getRevokedAt())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
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;
|
||||
/**
|
||||
* 业务操作和状态变更追加审计;关键事务同写对象 rent_event
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentEvent extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** 全局事件编号;节点按NODE:nodeId:eventId构造,限制eventId长度使总长不超过96 */
|
||||
@Excel(name = "全局事件编号;节点按NODE:nodeId:eventId构造,限制eventId长度使总长不超过96")
|
||||
private String eventNo;
|
||||
|
||||
/** APP、NODE、WALLET、PACKAGE、ORDER、TASK、ACCOUNT、SETTLEMENT、REFUND */
|
||||
@Excel(name = "APP、NODE、WALLET、PACKAGE、ORDER、TASK、ACCOUNT、SETTLEMENT、REFUND")
|
||||
private String objectType;
|
||||
|
||||
/** 对应业务表id */
|
||||
@Excel(name = "对应业务表id")
|
||||
private Long objectId;
|
||||
|
||||
/** 状态变更或操作代码 */
|
||||
@Excel(name = "状态变更或操作代码")
|
||||
private String action;
|
||||
|
||||
/** sys_user.user_id,节点或系统处理为0 */
|
||||
@Excel(name = "sys_user.user_id,节点或系统处理为0")
|
||||
private Long actorUserId;
|
||||
|
||||
/** 节点事件来源rent_node.id */
|
||||
@Excel(name = "节点事件来源rent_node.id")
|
||||
private Long nodeId;
|
||||
|
||||
/** 脱敏前后状态、结果与核验证据,不含Secret */
|
||||
@Excel(name = "脱敏前后状态、结果与核验证据,不含Secret")
|
||||
private String detail;
|
||||
|
||||
/** 操作依据或状态转换说明 */
|
||||
@Excel(name = "操作依据或状态转换说明")
|
||||
private String reason;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setEventNo(String eventNo)
|
||||
{
|
||||
this.eventNo = eventNo;
|
||||
}
|
||||
|
||||
public String getEventNo()
|
||||
{
|
||||
return eventNo;
|
||||
}
|
||||
public void setObjectType(String objectType)
|
||||
{
|
||||
this.objectType = objectType;
|
||||
}
|
||||
|
||||
public String getObjectType()
|
||||
{
|
||||
return objectType;
|
||||
}
|
||||
public void setObjectId(Long objectId)
|
||||
{
|
||||
this.objectId = objectId;
|
||||
}
|
||||
|
||||
public Long getObjectId()
|
||||
{
|
||||
return objectId;
|
||||
}
|
||||
public void setAction(String action)
|
||||
{
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public String getAction()
|
||||
{
|
||||
return action;
|
||||
}
|
||||
public void setActorUserId(Long actorUserId)
|
||||
{
|
||||
this.actorUserId = actorUserId;
|
||||
}
|
||||
|
||||
public Long getActorUserId()
|
||||
{
|
||||
return actorUserId;
|
||||
}
|
||||
public void setNodeId(Long nodeId)
|
||||
{
|
||||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public Long getNodeId()
|
||||
{
|
||||
return nodeId;
|
||||
}
|
||||
public void setDetail(String detail)
|
||||
{
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public String getDetail()
|
||||
{
|
||||
return detail;
|
||||
}
|
||||
public void setReason(String reason)
|
||||
{
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public String getReason()
|
||||
{
|
||||
return reason;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("eventNo", getEventNo())
|
||||
.append("objectType", getObjectType())
|
||||
.append("objectId", getObjectId())
|
||||
.append("action", getAction())
|
||||
.append("actorUserId", getActorUserId())
|
||||
.append("nodeId", getNodeId())
|
||||
.append("detail", getDetail())
|
||||
.append("reason", getReason())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
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;
|
||||
/**
|
||||
* 业务操作和状态变更追加审计;关键事务同写对象 rent_event
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_event")
|
||||
public class RentEventPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** 全局事件编号;节点按NODE:nodeId:eventId构造,限制eventId长度使总长不超过96 */
|
||||
@Excel(name = "全局事件编号;节点按NODE:nodeId:eventId构造,限制eventId长度使总长不超过96")
|
||||
private String eventNo;
|
||||
/** APP、NODE、WALLET、PACKAGE、ORDER、TASK、ACCOUNT、SETTLEMENT、REFUND */
|
||||
@Excel(name = "APP、NODE、WALLET、PACKAGE、ORDER、TASK、ACCOUNT、SETTLEMENT、REFUND")
|
||||
private String objectType;
|
||||
/** 对应业务表id */
|
||||
@Excel(name = "对应业务表id")
|
||||
private Long objectId;
|
||||
/** 状态变更或操作代码 */
|
||||
@Excel(name = "状态变更或操作代码")
|
||||
private String action;
|
||||
/** sys_user.user_id,节点或系统处理为0 */
|
||||
@Excel(name = "sys_user.user_id,节点或系统处理为0")
|
||||
private Long actorUserId;
|
||||
/** 节点事件来源rent_node.id */
|
||||
@Excel(name = "节点事件来源rent_node.id")
|
||||
private Long nodeId;
|
||||
/** 脱敏前后状态、结果与核验证据,不含Secret */
|
||||
@Excel(name = "脱敏前后状态、结果与核验证据,不含Secret")
|
||||
private String detail;
|
||||
/** 操作依据或状态转换说明 */
|
||||
@Excel(name = "操作依据或状态转换说明")
|
||||
private String reason;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setEventNo(String eventNo)
|
||||
{
|
||||
this.eventNo = eventNo;
|
||||
}
|
||||
|
||||
public String getEventNo()
|
||||
{
|
||||
return eventNo;
|
||||
}
|
||||
public void setObjectType(String objectType)
|
||||
{
|
||||
this.objectType = objectType;
|
||||
}
|
||||
|
||||
public String getObjectType()
|
||||
{
|
||||
return objectType;
|
||||
}
|
||||
public void setObjectId(Long objectId)
|
||||
{
|
||||
this.objectId = objectId;
|
||||
}
|
||||
|
||||
public Long getObjectId()
|
||||
{
|
||||
return objectId;
|
||||
}
|
||||
public void setAction(String action)
|
||||
{
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public String getAction()
|
||||
{
|
||||
return action;
|
||||
}
|
||||
public void setActorUserId(Long actorUserId)
|
||||
{
|
||||
this.actorUserId = actorUserId;
|
||||
}
|
||||
|
||||
public Long getActorUserId()
|
||||
{
|
||||
return actorUserId;
|
||||
}
|
||||
public void setNodeId(Long nodeId)
|
||||
{
|
||||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public Long getNodeId()
|
||||
{
|
||||
return nodeId;
|
||||
}
|
||||
public void setDetail(String detail)
|
||||
{
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public String getDetail()
|
||||
{
|
||||
return detail;
|
||||
}
|
||||
public void setReason(String reason)
|
||||
{
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public String getReason()
|
||||
{
|
||||
return reason;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("eventNo", getEventNo())
|
||||
.append("objectType", getObjectType())
|
||||
.append("objectId", getObjectId())
|
||||
.append("action", getAction())
|
||||
.append("actorUserId", getActorUserId())
|
||||
.append("nodeId", getNodeId())
|
||||
.append("detail", getDetail())
|
||||
.append("reason", getReason())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,322 @@
|
||||
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;
|
||||
/**
|
||||
* 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖对象 rent_ledger
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentLedger extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** rent_account.id */
|
||||
@Excel(name = "rent_account.id")
|
||||
private Long accountId;
|
||||
|
||||
/** 全局唯一记账键;普通业务含事件及账户,TOPUP仅按网络及链上事件唯一标识构造,不含账户以防跨用户重复充值 */
|
||||
@Excel(name = "全局唯一记账键;普通业务含事件及账户,TOPUP仅按网络及链上事件唯一标识构造,不含账户以防跨用户重复充值")
|
||||
private String businessKey;
|
||||
|
||||
/** TOPUP充值、HOLD冻结、CHARGE扣款、RELEASE解冻、SUPPLIER_EARN毛应收、SUPPLIER_FEE供应商手续费、SETTLE净额结算、REFUND退款、REVERSAL冲正 */
|
||||
@Excel(name = "TOPUP充值、HOLD冻结、CHARGE扣款、RELEASE解冻、SUPPLIER_EARN毛应收、SUPPLIER_FEE供应商手续费、SETTLE净额结算、REFUND退款、REVERSAL冲正")
|
||||
private String eventType;
|
||||
|
||||
/** 可用余额变化,有正负 */
|
||||
@Excel(name = "可用余额变化,有正负")
|
||||
private BigDecimal deltaAvailable;
|
||||
|
||||
/** 冻结余额变化,有正负 */
|
||||
@Excel(name = "冻结余额变化,有正负")
|
||||
private BigDecimal deltaFrozen;
|
||||
|
||||
/** 供应商待结算变化,有正负 */
|
||||
@Excel(name = "供应商待结算变化,有正负")
|
||||
private BigDecimal deltaSupplierPending;
|
||||
|
||||
/** 平台供应商手续费收入变动USDT;扣费为正、退费为负;退商户增加可用,退供应商增加待结算,不是用户账户余额 */
|
||||
@Excel(name = "平台供应商手续费收入变动USDT;扣费为正、退费为负;退商户增加可用,退供应商增加待结算,不是用户账户余额")
|
||||
private BigDecimal deltaPlatformFee;
|
||||
|
||||
/** 变更后可用USDT */
|
||||
@Excel(name = "变更后可用USDT")
|
||||
private BigDecimal afterAvailable;
|
||||
|
||||
/** 变更后冻结USDT */
|
||||
@Excel(name = "变更后冻结USDT")
|
||||
private BigDecimal afterFrozen;
|
||||
|
||||
/** 变更后待结算USDT */
|
||||
@Excel(name = "变更后待结算USDT")
|
||||
private BigDecimal afterSupplierPending;
|
||||
|
||||
/** 关联rent_order.id */
|
||||
@Excel(name = "关联rent_order.id")
|
||||
private Long orderId;
|
||||
|
||||
/** 关联rent_settlement.id */
|
||||
@Excel(name = "关联rent_settlement.id")
|
||||
private Long settlementId;
|
||||
|
||||
/** 退款或相关冲正关联rent_refund.id,每个退款内各事件使用独立business_key */
|
||||
@Excel(name = "退款或相关冲正关联rent_refund.id,每个退款内各事件使用独立business_key")
|
||||
private Long refundId;
|
||||
|
||||
/** 冲正的rent_ledger.id */
|
||||
@Excel(name = "冲正的rent_ledger.id")
|
||||
private Long reversalOfId;
|
||||
|
||||
/** 操作者sys_user.user_id,后台系统为0 */
|
||||
@Excel(name = "操作者sys_user.user_id,后台系统为0")
|
||||
private Long operatorUserId;
|
||||
|
||||
/** 人工充值、付款或补偿审核依据编号;充值凭据必须全局防重复 */
|
||||
@Excel(name = "人工充值、付款或补偿审核依据编号;充值凭据必须全局防重复")
|
||||
private String evidenceRef;
|
||||
|
||||
/** 记账或人工调整原因,必填 */
|
||||
@Excel(name = "记账或人工调整原因,必填")
|
||||
private String reason;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setAccountId(Long accountId)
|
||||
{
|
||||
this.accountId = accountId;
|
||||
}
|
||||
|
||||
public Long getAccountId()
|
||||
{
|
||||
return accountId;
|
||||
}
|
||||
public void setBusinessKey(String businessKey)
|
||||
{
|
||||
this.businessKey = businessKey;
|
||||
}
|
||||
|
||||
public String getBusinessKey()
|
||||
{
|
||||
return businessKey;
|
||||
}
|
||||
public void setEventType(String eventType)
|
||||
{
|
||||
this.eventType = eventType;
|
||||
}
|
||||
|
||||
public String getEventType()
|
||||
{
|
||||
return eventType;
|
||||
}
|
||||
public void setDeltaAvailable(BigDecimal deltaAvailable)
|
||||
{
|
||||
this.deltaAvailable = deltaAvailable;
|
||||
}
|
||||
|
||||
public BigDecimal getDeltaAvailable()
|
||||
{
|
||||
return deltaAvailable;
|
||||
}
|
||||
public void setDeltaFrozen(BigDecimal deltaFrozen)
|
||||
{
|
||||
this.deltaFrozen = deltaFrozen;
|
||||
}
|
||||
|
||||
public BigDecimal getDeltaFrozen()
|
||||
{
|
||||
return deltaFrozen;
|
||||
}
|
||||
public void setDeltaSupplierPending(BigDecimal deltaSupplierPending)
|
||||
{
|
||||
this.deltaSupplierPending = deltaSupplierPending;
|
||||
}
|
||||
|
||||
public BigDecimal getDeltaSupplierPending()
|
||||
{
|
||||
return deltaSupplierPending;
|
||||
}
|
||||
public void setDeltaPlatformFee(BigDecimal deltaPlatformFee)
|
||||
{
|
||||
this.deltaPlatformFee = deltaPlatformFee;
|
||||
}
|
||||
|
||||
public BigDecimal getDeltaPlatformFee()
|
||||
{
|
||||
return deltaPlatformFee;
|
||||
}
|
||||
public void setAfterAvailable(BigDecimal afterAvailable)
|
||||
{
|
||||
this.afterAvailable = afterAvailable;
|
||||
}
|
||||
|
||||
public BigDecimal getAfterAvailable()
|
||||
{
|
||||
return afterAvailable;
|
||||
}
|
||||
public void setAfterFrozen(BigDecimal afterFrozen)
|
||||
{
|
||||
this.afterFrozen = afterFrozen;
|
||||
}
|
||||
|
||||
public BigDecimal getAfterFrozen()
|
||||
{
|
||||
return afterFrozen;
|
||||
}
|
||||
public void setAfterSupplierPending(BigDecimal afterSupplierPending)
|
||||
{
|
||||
this.afterSupplierPending = afterSupplierPending;
|
||||
}
|
||||
|
||||
public BigDecimal getAfterSupplierPending()
|
||||
{
|
||||
return afterSupplierPending;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setSettlementId(Long settlementId)
|
||||
{
|
||||
this.settlementId = settlementId;
|
||||
}
|
||||
|
||||
public Long getSettlementId()
|
||||
{
|
||||
return settlementId;
|
||||
}
|
||||
public void setRefundId(Long refundId)
|
||||
{
|
||||
this.refundId = refundId;
|
||||
}
|
||||
|
||||
public Long getRefundId()
|
||||
{
|
||||
return refundId;
|
||||
}
|
||||
public void setReversalOfId(Long reversalOfId)
|
||||
{
|
||||
this.reversalOfId = reversalOfId;
|
||||
}
|
||||
|
||||
public Long getReversalOfId()
|
||||
{
|
||||
return reversalOfId;
|
||||
}
|
||||
public void setOperatorUserId(Long operatorUserId)
|
||||
{
|
||||
this.operatorUserId = operatorUserId;
|
||||
}
|
||||
|
||||
public Long getOperatorUserId()
|
||||
{
|
||||
return operatorUserId;
|
||||
}
|
||||
public void setEvidenceRef(String evidenceRef)
|
||||
{
|
||||
this.evidenceRef = evidenceRef;
|
||||
}
|
||||
|
||||
public String getEvidenceRef()
|
||||
{
|
||||
return evidenceRef;
|
||||
}
|
||||
public void setReason(String reason)
|
||||
{
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public String getReason()
|
||||
{
|
||||
return reason;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("accountId", getAccountId())
|
||||
.append("businessKey", getBusinessKey())
|
||||
.append("eventType", getEventType())
|
||||
.append("deltaAvailable", getDeltaAvailable())
|
||||
.append("deltaFrozen", getDeltaFrozen())
|
||||
.append("deltaSupplierPending", getDeltaSupplierPending())
|
||||
.append("deltaPlatformFee", getDeltaPlatformFee())
|
||||
.append("afterAvailable", getAfterAvailable())
|
||||
.append("afterFrozen", getAfterFrozen())
|
||||
.append("afterSupplierPending", getAfterSupplierPending())
|
||||
.append("orderId", getOrderId())
|
||||
.append("settlementId", getSettlementId())
|
||||
.append("refundId", getRefundId())
|
||||
.append("reversalOfId", getReversalOfId())
|
||||
.append("operatorUserId", getOperatorUserId())
|
||||
.append("evidenceRef", getEvidenceRef())
|
||||
.append("reason", getReason())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,304 @@
|
||||
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;
|
||||
/**
|
||||
* 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖对象 rent_ledger
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_ledger")
|
||||
public class RentLedgerPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** rent_account.id */
|
||||
@Excel(name = "rent_account.id")
|
||||
private Long accountId;
|
||||
/** 全局唯一记账键;普通业务含事件及账户,TOPUP仅按网络及链上事件唯一标识构造,不含账户以防跨用户重复充值 */
|
||||
@Excel(name = "全局唯一记账键;普通业务含事件及账户,TOPUP仅按网络及链上事件唯一标识构造,不含账户以防跨用户重复充值")
|
||||
private String businessKey;
|
||||
/** TOPUP充值、HOLD冻结、CHARGE扣款、RELEASE解冻、SUPPLIER_EARN毛应收、SUPPLIER_FEE供应商手续费、SETTLE净额结算、REFUND退款、REVERSAL冲正 */
|
||||
@Excel(name = "TOPUP充值、HOLD冻结、CHARGE扣款、RELEASE解冻、SUPPLIER_EARN毛应收、SUPPLIER_FEE供应商手续费、SETTLE净额结算、REFUND退款、REVERSAL冲正")
|
||||
private String eventType;
|
||||
/** 可用余额变化,有正负 */
|
||||
@Excel(name = "可用余额变化,有正负")
|
||||
private BigDecimal deltaAvailable;
|
||||
/** 冻结余额变化,有正负 */
|
||||
@Excel(name = "冻结余额变化,有正负")
|
||||
private BigDecimal deltaFrozen;
|
||||
/** 供应商待结算变化,有正负 */
|
||||
@Excel(name = "供应商待结算变化,有正负")
|
||||
private BigDecimal deltaSupplierPending;
|
||||
/** 平台供应商手续费收入变动USDT;扣费为正、退费为负;退商户增加可用,退供应商增加待结算,不是用户账户余额 */
|
||||
@Excel(name = "平台供应商手续费收入变动USDT;扣费为正、退费为负;退商户增加可用,退供应商增加待结算,不是用户账户余额")
|
||||
private BigDecimal deltaPlatformFee;
|
||||
/** 变更后可用USDT */
|
||||
@Excel(name = "变更后可用USDT")
|
||||
private BigDecimal afterAvailable;
|
||||
/** 变更后冻结USDT */
|
||||
@Excel(name = "变更后冻结USDT")
|
||||
private BigDecimal afterFrozen;
|
||||
/** 变更后待结算USDT */
|
||||
@Excel(name = "变更后待结算USDT")
|
||||
private BigDecimal afterSupplierPending;
|
||||
/** 关联rent_order.id */
|
||||
@Excel(name = "关联rent_order.id")
|
||||
private Long orderId;
|
||||
/** 关联rent_settlement.id */
|
||||
@Excel(name = "关联rent_settlement.id")
|
||||
private Long settlementId;
|
||||
/** 退款或相关冲正关联rent_refund.id,每个退款内各事件使用独立business_key */
|
||||
@Excel(name = "退款或相关冲正关联rent_refund.id,每个退款内各事件使用独立business_key")
|
||||
private Long refundId;
|
||||
/** 冲正的rent_ledger.id */
|
||||
@Excel(name = "冲正的rent_ledger.id")
|
||||
private Long reversalOfId;
|
||||
/** 操作者sys_user.user_id,后台系统为0 */
|
||||
@Excel(name = "操作者sys_user.user_id,后台系统为0")
|
||||
private Long operatorUserId;
|
||||
/** 人工充值、付款或补偿审核依据编号;充值凭据必须全局防重复 */
|
||||
@Excel(name = "人工充值、付款或补偿审核依据编号;充值凭据必须全局防重复")
|
||||
private String evidenceRef;
|
||||
/** 记账或人工调整原因,必填 */
|
||||
@Excel(name = "记账或人工调整原因,必填")
|
||||
private String reason;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setAccountId(Long accountId)
|
||||
{
|
||||
this.accountId = accountId;
|
||||
}
|
||||
|
||||
public Long getAccountId()
|
||||
{
|
||||
return accountId;
|
||||
}
|
||||
public void setBusinessKey(String businessKey)
|
||||
{
|
||||
this.businessKey = businessKey;
|
||||
}
|
||||
|
||||
public String getBusinessKey()
|
||||
{
|
||||
return businessKey;
|
||||
}
|
||||
public void setEventType(String eventType)
|
||||
{
|
||||
this.eventType = eventType;
|
||||
}
|
||||
|
||||
public String getEventType()
|
||||
{
|
||||
return eventType;
|
||||
}
|
||||
public void setDeltaAvailable(BigDecimal deltaAvailable)
|
||||
{
|
||||
this.deltaAvailable = deltaAvailable;
|
||||
}
|
||||
|
||||
public BigDecimal getDeltaAvailable()
|
||||
{
|
||||
return deltaAvailable;
|
||||
}
|
||||
public void setDeltaFrozen(BigDecimal deltaFrozen)
|
||||
{
|
||||
this.deltaFrozen = deltaFrozen;
|
||||
}
|
||||
|
||||
public BigDecimal getDeltaFrozen()
|
||||
{
|
||||
return deltaFrozen;
|
||||
}
|
||||
public void setDeltaSupplierPending(BigDecimal deltaSupplierPending)
|
||||
{
|
||||
this.deltaSupplierPending = deltaSupplierPending;
|
||||
}
|
||||
|
||||
public BigDecimal getDeltaSupplierPending()
|
||||
{
|
||||
return deltaSupplierPending;
|
||||
}
|
||||
public void setDeltaPlatformFee(BigDecimal deltaPlatformFee)
|
||||
{
|
||||
this.deltaPlatformFee = deltaPlatformFee;
|
||||
}
|
||||
|
||||
public BigDecimal getDeltaPlatformFee()
|
||||
{
|
||||
return deltaPlatformFee;
|
||||
}
|
||||
public void setAfterAvailable(BigDecimal afterAvailable)
|
||||
{
|
||||
this.afterAvailable = afterAvailable;
|
||||
}
|
||||
|
||||
public BigDecimal getAfterAvailable()
|
||||
{
|
||||
return afterAvailable;
|
||||
}
|
||||
public void setAfterFrozen(BigDecimal afterFrozen)
|
||||
{
|
||||
this.afterFrozen = afterFrozen;
|
||||
}
|
||||
|
||||
public BigDecimal getAfterFrozen()
|
||||
{
|
||||
return afterFrozen;
|
||||
}
|
||||
public void setAfterSupplierPending(BigDecimal afterSupplierPending)
|
||||
{
|
||||
this.afterSupplierPending = afterSupplierPending;
|
||||
}
|
||||
|
||||
public BigDecimal getAfterSupplierPending()
|
||||
{
|
||||
return afterSupplierPending;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setSettlementId(Long settlementId)
|
||||
{
|
||||
this.settlementId = settlementId;
|
||||
}
|
||||
|
||||
public Long getSettlementId()
|
||||
{
|
||||
return settlementId;
|
||||
}
|
||||
public void setRefundId(Long refundId)
|
||||
{
|
||||
this.refundId = refundId;
|
||||
}
|
||||
|
||||
public Long getRefundId()
|
||||
{
|
||||
return refundId;
|
||||
}
|
||||
public void setReversalOfId(Long reversalOfId)
|
||||
{
|
||||
this.reversalOfId = reversalOfId;
|
||||
}
|
||||
|
||||
public Long getReversalOfId()
|
||||
{
|
||||
return reversalOfId;
|
||||
}
|
||||
public void setOperatorUserId(Long operatorUserId)
|
||||
{
|
||||
this.operatorUserId = operatorUserId;
|
||||
}
|
||||
|
||||
public Long getOperatorUserId()
|
||||
{
|
||||
return operatorUserId;
|
||||
}
|
||||
public void setEvidenceRef(String evidenceRef)
|
||||
{
|
||||
this.evidenceRef = evidenceRef;
|
||||
}
|
||||
|
||||
public String getEvidenceRef()
|
||||
{
|
||||
return evidenceRef;
|
||||
}
|
||||
public void setReason(String reason)
|
||||
{
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public String getReason()
|
||||
{
|
||||
return reason;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("accountId", getAccountId())
|
||||
.append("businessKey", getBusinessKey())
|
||||
.append("eventType", getEventType())
|
||||
.append("deltaAvailable", getDeltaAvailable())
|
||||
.append("deltaFrozen", getDeltaFrozen())
|
||||
.append("deltaSupplierPending", getDeltaSupplierPending())
|
||||
.append("deltaPlatformFee", getDeltaPlatformFee())
|
||||
.append("afterAvailable", getAfterAvailable())
|
||||
.append("afterFrozen", getAfterFrozen())
|
||||
.append("afterSupplierPending", getAfterSupplierPending())
|
||||
.append("orderId", getOrderId())
|
||||
.append("settlementId", getSettlementId())
|
||||
.append("refundId", getRefundId())
|
||||
.append("reversalOfId", getReversalOfId())
|
||||
.append("operatorUserId", getOperatorUserId())
|
||||
.append("evidenceRef", getEvidenceRef())
|
||||
.append("reason", getReason())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
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;
|
||||
/**
|
||||
* 供应商本地Agent节点;供应商直接关联共享用户,不另建成员对象 rent_node
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentNode extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** 供应商sys_user.user_id */
|
||||
@Excel(name = "供应商sys_user.user_id")
|
||||
private Long userId;
|
||||
|
||||
/** 节点全局编号 */
|
||||
@Excel(name = "节点全局编号")
|
||||
private String nodeNo;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String name;
|
||||
|
||||
/** PENDING审核中、ACTIVE接单、PAUSED暂停、REVOKED吊销 */
|
||||
@Excel(name = "PENDING审核中、ACTIVE接单、PAUSED暂停、REVOKED吊销")
|
||||
private String status;
|
||||
|
||||
/** Agent版本 */
|
||||
@Excel(name = "Agent版本")
|
||||
private String agentVersion;
|
||||
|
||||
/** 最近认证心跳时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "最近认证心跳时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date heartbeatAt;
|
||||
|
||||
/** 连接状态:OFFLINE离线、SYNCING已认证恢复中、ONLINE可通信;不替代审核及接单status */
|
||||
@Excel(name = "连接状态:OFFLINE离线、SYNCING已认证恢复中、ONLINE可通信;不替代审核及接单status")
|
||||
private String connectionStatus;
|
||||
|
||||
/** 云端认证成功后生成的随机WebSocket会话编号,当前会话唯一,非登录Token */
|
||||
@Excel(name = "云端认证成功后生成的随机WebSocket会话编号,当前会话唯一,非登录Token")
|
||||
private String sessionId;
|
||||
|
||||
/** 连接代次fencing token,新认证连接原子递增;旧会话消息和断开事件不能修改新会话 */
|
||||
@Excel(name = "连接代次fencing token,新认证连接原子递增;旧会话消息和断开事件不能修改新会话")
|
||||
private Long sessionEpoch;
|
||||
|
||||
/** 持有当前WebSocket连接的云端实例标识,仅路由及恢复使用,不存Socket对象 */
|
||||
@Excel(name = "持有当前WebSocket连接的云端实例标识,仅路由及恢复使用,不存Socket对象")
|
||||
private String serverInstanceId;
|
||||
|
||||
/** 本次会话认证完成UTC时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "本次会话认证完成UTC时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date connectedAt;
|
||||
|
||||
/** 当前会话断开或超时UTC时间,仅当前session_epoch可更新 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "当前会话断开或超时UTC时间,仅当前session_epoch可更新", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date disconnectedAt;
|
||||
|
||||
/** 应用层PING周期秒,默认15,由云端协商;须大于0 */
|
||||
@Excel(name = "应用层PING周期秒,默认15,由云端协商;须大于0")
|
||||
private Long heartbeatIntervalSeconds;
|
||||
|
||||
/** 未收到有效认证心跳的离线阈值秒,默认45;必须大于心跳周期 */
|
||||
@Excel(name = "未收到有效认证心跳的离线阈值秒,默认45;必须大于心跳周期")
|
||||
private Long heartbeatTimeoutSeconds;
|
||||
|
||||
/** 云端按有效心跳接收时间计算的在线租约截止UTC时间,节点本地时钟不作为判定来源 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "云端按有效心跳接收时间计算的在线租约截止UTC时间,节点本地时钟不作为判定来源", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date heartbeatExpiresAt;
|
||||
|
||||
/** 当前会话已接收客户端方向认证帧序号,从1递增;只用于会话去重,不替代业务message_id */
|
||||
@Excel(name = "当前会话已接收客户端方向认证帧序号,从1递增;只用于会话去重,不替代业务message_id")
|
||||
private Long lastClientSequence;
|
||||
|
||||
/** 注册操作者sys_user.user_id */
|
||||
@Excel(name = "注册操作者sys_user.user_id")
|
||||
private Long createdBy;
|
||||
|
||||
/** 审核sys_user.user_id */
|
||||
@Excel(name = "审核sys_user.user_id")
|
||||
private Long approvedBy;
|
||||
|
||||
/** 审核时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date approvedAt;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setNodeNo(String nodeNo)
|
||||
{
|
||||
this.nodeNo = nodeNo;
|
||||
}
|
||||
|
||||
public String getNodeNo()
|
||||
{
|
||||
return nodeNo;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setAgentVersion(String agentVersion)
|
||||
{
|
||||
this.agentVersion = agentVersion;
|
||||
}
|
||||
|
||||
public String getAgentVersion()
|
||||
{
|
||||
return agentVersion;
|
||||
}
|
||||
public void setHeartbeatAt(Date heartbeatAt)
|
||||
{
|
||||
this.heartbeatAt = heartbeatAt;
|
||||
}
|
||||
|
||||
public Date getHeartbeatAt()
|
||||
{
|
||||
return heartbeatAt;
|
||||
}
|
||||
public void setConnectionStatus(String connectionStatus)
|
||||
{
|
||||
this.connectionStatus = connectionStatus;
|
||||
}
|
||||
|
||||
public String getConnectionStatus()
|
||||
{
|
||||
return connectionStatus;
|
||||
}
|
||||
public void setSessionId(String sessionId)
|
||||
{
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
public String getSessionId()
|
||||
{
|
||||
return sessionId;
|
||||
}
|
||||
public void setSessionEpoch(Long sessionEpoch)
|
||||
{
|
||||
this.sessionEpoch = sessionEpoch;
|
||||
}
|
||||
|
||||
public Long getSessionEpoch()
|
||||
{
|
||||
return sessionEpoch;
|
||||
}
|
||||
public void setServerInstanceId(String serverInstanceId)
|
||||
{
|
||||
this.serverInstanceId = serverInstanceId;
|
||||
}
|
||||
|
||||
public String getServerInstanceId()
|
||||
{
|
||||
return serverInstanceId;
|
||||
}
|
||||
public void setConnectedAt(Date connectedAt)
|
||||
{
|
||||
this.connectedAt = connectedAt;
|
||||
}
|
||||
|
||||
public Date getConnectedAt()
|
||||
{
|
||||
return connectedAt;
|
||||
}
|
||||
public void setDisconnectedAt(Date disconnectedAt)
|
||||
{
|
||||
this.disconnectedAt = disconnectedAt;
|
||||
}
|
||||
|
||||
public Date getDisconnectedAt()
|
||||
{
|
||||
return disconnectedAt;
|
||||
}
|
||||
public void setHeartbeatIntervalSeconds(Long heartbeatIntervalSeconds)
|
||||
{
|
||||
this.heartbeatIntervalSeconds = heartbeatIntervalSeconds;
|
||||
}
|
||||
|
||||
public Long getHeartbeatIntervalSeconds()
|
||||
{
|
||||
return heartbeatIntervalSeconds;
|
||||
}
|
||||
public void setHeartbeatTimeoutSeconds(Long heartbeatTimeoutSeconds)
|
||||
{
|
||||
this.heartbeatTimeoutSeconds = heartbeatTimeoutSeconds;
|
||||
}
|
||||
|
||||
public Long getHeartbeatTimeoutSeconds()
|
||||
{
|
||||
return heartbeatTimeoutSeconds;
|
||||
}
|
||||
public void setHeartbeatExpiresAt(Date heartbeatExpiresAt)
|
||||
{
|
||||
this.heartbeatExpiresAt = heartbeatExpiresAt;
|
||||
}
|
||||
|
||||
public Date getHeartbeatExpiresAt()
|
||||
{
|
||||
return heartbeatExpiresAt;
|
||||
}
|
||||
public void setLastClientSequence(Long lastClientSequence)
|
||||
{
|
||||
this.lastClientSequence = lastClientSequence;
|
||||
}
|
||||
|
||||
public Long getLastClientSequence()
|
||||
{
|
||||
return lastClientSequence;
|
||||
}
|
||||
public void setCreatedBy(Long createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public Long getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
public void setApprovedBy(Long approvedBy)
|
||||
{
|
||||
this.approvedBy = approvedBy;
|
||||
}
|
||||
|
||||
public Long getApprovedBy()
|
||||
{
|
||||
return approvedBy;
|
||||
}
|
||||
public void setApprovedAt(Date approvedAt)
|
||||
{
|
||||
this.approvedAt = approvedAt;
|
||||
}
|
||||
|
||||
public Date getApprovedAt()
|
||||
{
|
||||
return approvedAt;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("userId", getUserId())
|
||||
.append("nodeNo", getNodeNo())
|
||||
.append("name", getName())
|
||||
.append("status", getStatus())
|
||||
.append("agentVersion", getAgentVersion())
|
||||
.append("heartbeatAt", getHeartbeatAt())
|
||||
.append("connectionStatus", getConnectionStatus())
|
||||
.append("sessionId", getSessionId())
|
||||
.append("sessionEpoch", getSessionEpoch())
|
||||
.append("serverInstanceId", getServerInstanceId())
|
||||
.append("connectedAt", getConnectedAt())
|
||||
.append("disconnectedAt", getDisconnectedAt())
|
||||
.append("heartbeatIntervalSeconds", getHeartbeatIntervalSeconds())
|
||||
.append("heartbeatTimeoutSeconds", getHeartbeatTimeoutSeconds())
|
||||
.append("heartbeatExpiresAt", getHeartbeatExpiresAt())
|
||||
.append("lastClientSequence", getLastClientSequence())
|
||||
.append("createdBy", getCreatedBy())
|
||||
.append("approvedBy", getApprovedBy())
|
||||
.append("approvedAt", getApprovedAt())
|
||||
.append("remark", getRemark())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,347 @@
|
||||
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;
|
||||
/**
|
||||
* 供应商本地Agent节点;供应商直接关联共享用户,不另建成员对象 rent_node
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_node")
|
||||
public class RentNodePlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** 供应商sys_user.user_id */
|
||||
@Excel(name = "供应商sys_user.user_id")
|
||||
private Long userId;
|
||||
/** 节点全局编号 */
|
||||
@Excel(name = "节点全局编号")
|
||||
private String nodeNo;
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String name;
|
||||
/** PENDING审核中、ACTIVE接单、PAUSED暂停、REVOKED吊销 */
|
||||
@Excel(name = "PENDING审核中、ACTIVE接单、PAUSED暂停、REVOKED吊销")
|
||||
private String status;
|
||||
/** Agent版本 */
|
||||
@Excel(name = "Agent版本")
|
||||
private String agentVersion;
|
||||
/** 最近认证心跳时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "最近认证心跳时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date heartbeatAt;
|
||||
/** 连接状态:OFFLINE离线、SYNCING已认证恢复中、ONLINE可通信;不替代审核及接单status */
|
||||
@Excel(name = "连接状态:OFFLINE离线、SYNCING已认证恢复中、ONLINE可通信;不替代审核及接单status")
|
||||
private String connectionStatus;
|
||||
/** 云端认证成功后生成的随机WebSocket会话编号,当前会话唯一,非登录Token */
|
||||
@Excel(name = "云端认证成功后生成的随机WebSocket会话编号,当前会话唯一,非登录Token")
|
||||
private String sessionId;
|
||||
/** 连接代次fencing token,新认证连接原子递增;旧会话消息和断开事件不能修改新会话 */
|
||||
@Excel(name = "连接代次fencing token,新认证连接原子递增;旧会话消息和断开事件不能修改新会话")
|
||||
private Long sessionEpoch;
|
||||
/** 持有当前WebSocket连接的云端实例标识,仅路由及恢复使用,不存Socket对象 */
|
||||
@Excel(name = "持有当前WebSocket连接的云端实例标识,仅路由及恢复使用,不存Socket对象")
|
||||
private String serverInstanceId;
|
||||
/** 本次会话认证完成UTC时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "本次会话认证完成UTC时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date connectedAt;
|
||||
/** 当前会话断开或超时UTC时间,仅当前session_epoch可更新 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "当前会话断开或超时UTC时间,仅当前session_epoch可更新", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date disconnectedAt;
|
||||
/** 应用层PING周期秒,默认15,由云端协商;须大于0 */
|
||||
@Excel(name = "应用层PING周期秒,默认15,由云端协商;须大于0")
|
||||
private Long heartbeatIntervalSeconds;
|
||||
/** 未收到有效认证心跳的离线阈值秒,默认45;必须大于心跳周期 */
|
||||
@Excel(name = "未收到有效认证心跳的离线阈值秒,默认45;必须大于心跳周期")
|
||||
private Long heartbeatTimeoutSeconds;
|
||||
/** 云端按有效心跳接收时间计算的在线租约截止UTC时间,节点本地时钟不作为判定来源 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "云端按有效心跳接收时间计算的在线租约截止UTC时间,节点本地时钟不作为判定来源", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date heartbeatExpiresAt;
|
||||
/** 当前会话已接收客户端方向认证帧序号,从1递增;只用于会话去重,不替代业务message_id */
|
||||
@Excel(name = "当前会话已接收客户端方向认证帧序号,从1递增;只用于会话去重,不替代业务message_id")
|
||||
private Long lastClientSequence;
|
||||
/** 注册操作者sys_user.user_id */
|
||||
@Excel(name = "注册操作者sys_user.user_id")
|
||||
private Long createdBy;
|
||||
/** 审核sys_user.user_id */
|
||||
@Excel(name = "审核sys_user.user_id")
|
||||
private Long approvedBy;
|
||||
/** 审核时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date approvedAt;
|
||||
/** 审核或暂停原因 */
|
||||
@Excel(name = "审核或暂停原因")
|
||||
private String remark;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setNodeNo(String nodeNo)
|
||||
{
|
||||
this.nodeNo = nodeNo;
|
||||
}
|
||||
|
||||
public String getNodeNo()
|
||||
{
|
||||
return nodeNo;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setAgentVersion(String agentVersion)
|
||||
{
|
||||
this.agentVersion = agentVersion;
|
||||
}
|
||||
|
||||
public String getAgentVersion()
|
||||
{
|
||||
return agentVersion;
|
||||
}
|
||||
public void setHeartbeatAt(Date heartbeatAt)
|
||||
{
|
||||
this.heartbeatAt = heartbeatAt;
|
||||
}
|
||||
|
||||
public Date getHeartbeatAt()
|
||||
{
|
||||
return heartbeatAt;
|
||||
}
|
||||
public void setConnectionStatus(String connectionStatus)
|
||||
{
|
||||
this.connectionStatus = connectionStatus;
|
||||
}
|
||||
|
||||
public String getConnectionStatus()
|
||||
{
|
||||
return connectionStatus;
|
||||
}
|
||||
public void setSessionId(String sessionId)
|
||||
{
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
public String getSessionId()
|
||||
{
|
||||
return sessionId;
|
||||
}
|
||||
public void setSessionEpoch(Long sessionEpoch)
|
||||
{
|
||||
this.sessionEpoch = sessionEpoch;
|
||||
}
|
||||
|
||||
public Long getSessionEpoch()
|
||||
{
|
||||
return sessionEpoch;
|
||||
}
|
||||
public void setServerInstanceId(String serverInstanceId)
|
||||
{
|
||||
this.serverInstanceId = serverInstanceId;
|
||||
}
|
||||
|
||||
public String getServerInstanceId()
|
||||
{
|
||||
return serverInstanceId;
|
||||
}
|
||||
public void setConnectedAt(Date connectedAt)
|
||||
{
|
||||
this.connectedAt = connectedAt;
|
||||
}
|
||||
|
||||
public Date getConnectedAt()
|
||||
{
|
||||
return connectedAt;
|
||||
}
|
||||
public void setDisconnectedAt(Date disconnectedAt)
|
||||
{
|
||||
this.disconnectedAt = disconnectedAt;
|
||||
}
|
||||
|
||||
public Date getDisconnectedAt()
|
||||
{
|
||||
return disconnectedAt;
|
||||
}
|
||||
public void setHeartbeatIntervalSeconds(Long heartbeatIntervalSeconds)
|
||||
{
|
||||
this.heartbeatIntervalSeconds = heartbeatIntervalSeconds;
|
||||
}
|
||||
|
||||
public Long getHeartbeatIntervalSeconds()
|
||||
{
|
||||
return heartbeatIntervalSeconds;
|
||||
}
|
||||
public void setHeartbeatTimeoutSeconds(Long heartbeatTimeoutSeconds)
|
||||
{
|
||||
this.heartbeatTimeoutSeconds = heartbeatTimeoutSeconds;
|
||||
}
|
||||
|
||||
public Long getHeartbeatTimeoutSeconds()
|
||||
{
|
||||
return heartbeatTimeoutSeconds;
|
||||
}
|
||||
public void setHeartbeatExpiresAt(Date heartbeatExpiresAt)
|
||||
{
|
||||
this.heartbeatExpiresAt = heartbeatExpiresAt;
|
||||
}
|
||||
|
||||
public Date getHeartbeatExpiresAt()
|
||||
{
|
||||
return heartbeatExpiresAt;
|
||||
}
|
||||
public void setLastClientSequence(Long lastClientSequence)
|
||||
{
|
||||
this.lastClientSequence = lastClientSequence;
|
||||
}
|
||||
|
||||
public Long getLastClientSequence()
|
||||
{
|
||||
return lastClientSequence;
|
||||
}
|
||||
public void setCreatedBy(Long createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public Long getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
public void setApprovedBy(Long approvedBy)
|
||||
{
|
||||
this.approvedBy = approvedBy;
|
||||
}
|
||||
|
||||
public Long getApprovedBy()
|
||||
{
|
||||
return approvedBy;
|
||||
}
|
||||
public void setApprovedAt(Date approvedAt)
|
||||
{
|
||||
this.approvedAt = approvedAt;
|
||||
}
|
||||
|
||||
public Date getApprovedAt()
|
||||
{
|
||||
return approvedAt;
|
||||
}
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("userId", getUserId())
|
||||
.append("nodeNo", getNodeNo())
|
||||
.append("name", getName())
|
||||
.append("status", getStatus())
|
||||
.append("agentVersion", getAgentVersion())
|
||||
.append("heartbeatAt", getHeartbeatAt())
|
||||
.append("connectionStatus", getConnectionStatus())
|
||||
.append("sessionId", getSessionId())
|
||||
.append("sessionEpoch", getSessionEpoch())
|
||||
.append("serverInstanceId", getServerInstanceId())
|
||||
.append("connectedAt", getConnectedAt())
|
||||
.append("disconnectedAt", getDisconnectedAt())
|
||||
.append("heartbeatIntervalSeconds", getHeartbeatIntervalSeconds())
|
||||
.append("heartbeatTimeoutSeconds", getHeartbeatTimeoutSeconds())
|
||||
.append("heartbeatExpiresAt", getHeartbeatExpiresAt())
|
||||
.append("lastClientSequence", getLastClientSequence())
|
||||
.append("createdBy", getCreatedBy())
|
||||
.append("approvedBy", getApprovedBy())
|
||||
.append("approvedAt", getApprovedAt())
|
||||
.append("remark", getRemark())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
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;
|
||||
/**
|
||||
* HMAC请求防重放记录对象 rent_nonce
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentNonce extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** rent_credential.api_key */
|
||||
@Excel(name = "rent_credential.api_key")
|
||||
private String apiKey;
|
||||
|
||||
/** API、NODE、TASK、WEBHOOK,签名须覆盖该域 */
|
||||
@Excel(name = "API、NODE、TASK、WEBHOOK,签名须覆盖该域")
|
||||
private String scope;
|
||||
|
||||
/** 高熵随机数 */
|
||||
@Excel(name = "高熵随机数")
|
||||
private String nonce;
|
||||
|
||||
/** 可清理时间UTC,必须晚于消息有效期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "可清理时间UTC,必须晚于消息有效期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expiresAt;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setApiKey(String apiKey)
|
||||
{
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
|
||||
public String getApiKey()
|
||||
{
|
||||
return apiKey;
|
||||
}
|
||||
public void setScope(String scope)
|
||||
{
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
public String getScope()
|
||||
{
|
||||
return scope;
|
||||
}
|
||||
public void setNonce(String nonce)
|
||||
{
|
||||
this.nonce = nonce;
|
||||
}
|
||||
|
||||
public String getNonce()
|
||||
{
|
||||
return nonce;
|
||||
}
|
||||
public void setExpiresAt(Date expiresAt)
|
||||
{
|
||||
this.expiresAt = expiresAt;
|
||||
}
|
||||
|
||||
public Date getExpiresAt()
|
||||
{
|
||||
return expiresAt;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("apiKey", getApiKey())
|
||||
.append("scope", getScope())
|
||||
.append("nonce", getNonce())
|
||||
.append("expiresAt", getExpiresAt())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
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;
|
||||
/**
|
||||
* HMAC请求防重放记录对象 rent_nonce
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_nonce")
|
||||
public class RentNoncePlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** rent_credential.api_key */
|
||||
@Excel(name = "rent_credential.api_key")
|
||||
private String apiKey;
|
||||
/** API、NODE、TASK、WEBHOOK,签名须覆盖该域 */
|
||||
@Excel(name = "API、NODE、TASK、WEBHOOK,签名须覆盖该域")
|
||||
private String scope;
|
||||
/** 高熵随机数 */
|
||||
@Excel(name = "高熵随机数")
|
||||
private String nonce;
|
||||
/** 可清理时间UTC,必须晚于消息有效期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "可清理时间UTC,必须晚于消息有效期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expiresAt;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setApiKey(String apiKey)
|
||||
{
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
|
||||
public String getApiKey()
|
||||
{
|
||||
return apiKey;
|
||||
}
|
||||
public void setScope(String scope)
|
||||
{
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
public String getScope()
|
||||
{
|
||||
return scope;
|
||||
}
|
||||
public void setNonce(String nonce)
|
||||
{
|
||||
this.nonce = nonce;
|
||||
}
|
||||
|
||||
public String getNonce()
|
||||
{
|
||||
return nonce;
|
||||
}
|
||||
public void setExpiresAt(Date expiresAt)
|
||||
{
|
||||
this.expiresAt = expiresAt;
|
||||
}
|
||||
|
||||
public Date getExpiresAt()
|
||||
{
|
||||
return expiresAt;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("apiKey", getApiKey())
|
||||
.append("scope", getScope())
|
||||
.append("nonce", getNonce())
|
||||
.append("expiresAt", getExpiresAt())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,593 @@
|
||||
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;
|
||||
/**
|
||||
* 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开对象 rent_order
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentOrder extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** 平台订单编号 */
|
||||
@Excel(name = "平台订单编号")
|
||||
private String orderNo;
|
||||
|
||||
/** rent_app.id */
|
||||
@Excel(name = "rent_app.id")
|
||||
private Long appId;
|
||||
|
||||
/** 商户订单号,兼作业务幂等键 */
|
||||
@Excel(name = "商户订单号,兼作业务幂等键")
|
||||
private String merchantOrderNo;
|
||||
|
||||
/** 原请求规范化摘要,同编号不同内容拒绝 */
|
||||
@Excel(name = "原请求规范化摘要,同编号不同内容拒绝")
|
||||
private String requestHash;
|
||||
|
||||
/** rent_package.id */
|
||||
@Excel(name = "rent_package.id")
|
||||
private Long packageId;
|
||||
|
||||
/** 网络:NILE、MAINNET,必须与所有关联对象一致 */
|
||||
@Excel(name = "网络:NILE、MAINNET,必须与所有关联对象一致")
|
||||
private String network;
|
||||
|
||||
/** 资源接收者,TRON Base58Check地址 */
|
||||
@Excel(name = "资源接收者,TRON Base58Check地址")
|
||||
private String receiverAddress;
|
||||
|
||||
/** 套餐资源类型快照:ENERGY能量、BANDWIDTH带宽,订单创建后不可修改 */
|
||||
@Excel(name = "套餐资源类型快照:ENERGY能量、BANDWIDTH带宽,订单创建后不可修改")
|
||||
private String resourceType;
|
||||
|
||||
/** 套餐资源数量快照:ENERGY单位Energy、BANDWIDTH单位bytes,必须大于零 */
|
||||
@Excel(name = "套餐资源数量快照:ENERGY单位Energy、BANDWIDTH单位bytes,必须大于零")
|
||||
private Long resourceQuantity;
|
||||
|
||||
/** 订单锁定冗余百分数,必须大于0,不能被套餐后续改价或调参覆盖 */
|
||||
@Excel(name = "订单锁定冗余百分数,必须大于0,不能被套餐后续改价或调参覆盖")
|
||||
private BigDecimal redundancyPercent;
|
||||
|
||||
/** 含冗余最低交付目标max(请求量+1,ceil(请求量乘以(1+冗余百分数/100))),严格大于resource_quantity */
|
||||
@Excel(name = "含冗余最低交付目标max(请求量+1,ceil(请求量乘以(1+冗余百分数/100))),严格大于resource_quantity")
|
||||
private Long targetResourceQuantity;
|
||||
|
||||
/** 租期秒快照 */
|
||||
@Excel(name = "租期秒快照")
|
||||
private Long durationSeconds;
|
||||
|
||||
/** USDT售价快照 */
|
||||
@Excel(name = "USDT售价快照")
|
||||
private BigDecimal saleAmount;
|
||||
|
||||
/** 供应商扣费前毛收入USDT快照,不能因费率变更被覆盖 */
|
||||
@Excel(name = "供应商扣费前毛收入USDT快照,不能因费率变更被覆盖")
|
||||
private BigDecimal supplierAmount;
|
||||
|
||||
/** 订单锁定供应商手续费百分数,必须大于0小于100 */
|
||||
@Excel(name = "订单锁定供应商手续费百分数,必须大于0小于100")
|
||||
private BigDecimal supplierFeePercent;
|
||||
|
||||
/** 平台手续费USDT快照=毛收入乘费率除100,按6位小数HALF_UP;必须大于0且小于毛收入 */
|
||||
@Excel(name = "平台手续费USDT快照=毛收入乘费率除100,按6位小数HALF_UP;必须大于0且小于毛收入")
|
||||
private BigDecimal supplierFeeAmount;
|
||||
|
||||
/** 供应商净应收USDT快照=供应商毛收入减平台手续费,必须大于0,结算以此为基数 */
|
||||
@Excel(name = "供应商净应收USDT快照=供应商毛收入减平台手续费,必须大于0,结算以此为基数")
|
||||
private BigDecimal supplierNetAmount;
|
||||
|
||||
/** 已冲正供应商净应收USDT累计,不超过supplier_net_amount,按审核退款规则追加流水 */
|
||||
@Excel(name = "已冲正供应商净应收USDT累计,不超过supplier_net_amount,按审核退款规则追加流水")
|
||||
private BigDecimal supplierReversedAmount;
|
||||
|
||||
/** 已退回或冲正平台手续费USDT累计,不超过supplier_fee_amount,不因退款自动推定全退 */
|
||||
@Excel(name = "已退回或冲正平台手续费USDT累计,不超过supplier_fee_amount,不因退款自动推定全退")
|
||||
private BigDecimal supplierFeeReversedAmount;
|
||||
|
||||
/** 手续费冲正中返还供应商的累计USDT,不超过supplier_fee_reversed_amount,增加本单可结算净额 */
|
||||
@Excel(name = "手续费冲正中返还供应商的累计USDT,不超过supplier_fee_reversed_amount,增加本单可结算净额")
|
||||
private BigDecimal supplierFeeReturnedAmount;
|
||||
|
||||
/** 套餐、费用预算、偏差、锁定和退款规则快照 */
|
||||
@Excel(name = "套餐、费用预算、偏差、锁定和退款规则快照")
|
||||
private String packageSnapshot;
|
||||
|
||||
/** WAITING待调度、EXECUTING委托中、VERIFYING核验中、SUCCESS履约成功、FAILED明确失败、CANCELLED未执行取消、MANUAL_REVIEW人工核对 */
|
||||
@Excel(name = "WAITING待调度、EXECUTING委托中、VERIFYING核验中、SUCCESS履约成功、FAILED明确失败、CANCELLED未执行取消、MANUAL_REVIEW人工核对")
|
||||
private String status;
|
||||
|
||||
/** 选定rent_wallet.id;未知执行结果时不能改派 */
|
||||
@Excel(name = "选定rent_wallet.id;未知执行结果时不能改派")
|
||||
private Long walletId;
|
||||
|
||||
/** 选定供应商sys_user.user_id快照 */
|
||||
@Excel(name = "选定供应商sys_user.user_id快照")
|
||||
private Long supplierUserId;
|
||||
|
||||
/** 调度时固定供应商rent_account.id,与供应商用户及订单网络一致 */
|
||||
@Excel(name = "调度时固定供应商rent_account.id,与供应商用户及订单网络一致")
|
||||
private Long supplierAccountId;
|
||||
|
||||
/** 分配钱包时取1,明确未执行终结或本金回收且资源恢复后置NULL;未知保留,禁止同钱包同接收者同类型并行租赁 */
|
||||
@Excel(name = "分配钱包时取1,明确未执行终结或本金回收且资源恢复后置NULL;未知保留,禁止同钱包同接收者同类型并行租赁")
|
||||
private Integer relationSlot;
|
||||
|
||||
/** 商户rent_account.id */
|
||||
@Excel(name = "商户rent_account.id")
|
||||
private Long payerAccountId;
|
||||
|
||||
/** 资金:HELD冻结、CHARGED扣款、RELEASED释放 */
|
||||
@Excel(name = "资金:HELD冻结、CHARGED扣款、RELEASED释放")
|
||||
private String fundStatus;
|
||||
|
||||
/** 累计已退USDT,仅可按规则退租赁内部余额 */
|
||||
@Excel(name = "累计已退USDT,仅可按规则退租赁内部余额")
|
||||
private BigDecimal refundedAmount;
|
||||
|
||||
/** 创建时锁定的最晚新任务执行时间UTC;WAITING超时取消,已投递不能仅凭过期判未执行 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时锁定的最晚新任务执行时间UTC;WAITING超时取消,已投递不能仅凭过期判未执行", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date dispatchDeadline;
|
||||
|
||||
/** 已独立核验委托交易所在区块的UTC时间,不使用核验完成时间延长租期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "已独立核验委托交易所在区块的UTC时间,不使用核验完成时间延长租期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date serviceStartedAt;
|
||||
|
||||
/** 业务租期结束,不等于自动回收,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "业务租期结束,不等于自动回收,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date serviceExpiresAt;
|
||||
|
||||
/** 回收:NOT_STARTED、WAITING、RUNNING、RECOVERING、DONE、MANUAL_REVIEW */
|
||||
@Excel(name = "回收:NOT_STARTED、WAITING、RUNNING、RECOVERING、DONE、MANUAL_REVIEW")
|
||||
private String reclaimStatus;
|
||||
|
||||
/** 下次到期或资源恢复核对,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下次到期或资源恢复核对,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date nextReclaimAt;
|
||||
|
||||
/** 该单回调URL快照,允许为空 */
|
||||
@Excel(name = "该单回调URL快照,允许为空")
|
||||
private String notifyUrl;
|
||||
|
||||
/** 稳定错误码 */
|
||||
@Excel(name = "稳定错误码")
|
||||
private String errorCode;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderNo(String orderNo)
|
||||
{
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getOrderNo()
|
||||
{
|
||||
return orderNo;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setMerchantOrderNo(String merchantOrderNo)
|
||||
{
|
||||
this.merchantOrderNo = merchantOrderNo;
|
||||
}
|
||||
|
||||
public String getMerchantOrderNo()
|
||||
{
|
||||
return merchantOrderNo;
|
||||
}
|
||||
public void setRequestHash(String requestHash)
|
||||
{
|
||||
this.requestHash = requestHash;
|
||||
}
|
||||
|
||||
public String getRequestHash()
|
||||
{
|
||||
return requestHash;
|
||||
}
|
||||
public void setPackageId(Long packageId)
|
||||
{
|
||||
this.packageId = packageId;
|
||||
}
|
||||
|
||||
public Long getPackageId()
|
||||
{
|
||||
return packageId;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setReceiverAddress(String receiverAddress)
|
||||
{
|
||||
this.receiverAddress = receiverAddress;
|
||||
}
|
||||
|
||||
public String getReceiverAddress()
|
||||
{
|
||||
return receiverAddress;
|
||||
}
|
||||
public void setResourceType(String resourceType)
|
||||
{
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceType()
|
||||
{
|
||||
return resourceType;
|
||||
}
|
||||
public void setResourceQuantity(Long resourceQuantity)
|
||||
{
|
||||
this.resourceQuantity = resourceQuantity;
|
||||
}
|
||||
|
||||
public Long getResourceQuantity()
|
||||
{
|
||||
return resourceQuantity;
|
||||
}
|
||||
public void setRedundancyPercent(BigDecimal redundancyPercent)
|
||||
{
|
||||
this.redundancyPercent = redundancyPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getRedundancyPercent()
|
||||
{
|
||||
return redundancyPercent;
|
||||
}
|
||||
public void setTargetResourceQuantity(Long targetResourceQuantity)
|
||||
{
|
||||
this.targetResourceQuantity = targetResourceQuantity;
|
||||
}
|
||||
|
||||
public Long getTargetResourceQuantity()
|
||||
{
|
||||
return targetResourceQuantity;
|
||||
}
|
||||
public void setDurationSeconds(Long durationSeconds)
|
||||
{
|
||||
this.durationSeconds = durationSeconds;
|
||||
}
|
||||
|
||||
public Long getDurationSeconds()
|
||||
{
|
||||
return durationSeconds;
|
||||
}
|
||||
public void setSaleAmount(BigDecimal saleAmount)
|
||||
{
|
||||
this.saleAmount = saleAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSaleAmount()
|
||||
{
|
||||
return saleAmount;
|
||||
}
|
||||
public void setSupplierAmount(BigDecimal supplierAmount)
|
||||
{
|
||||
this.supplierAmount = supplierAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierAmount()
|
||||
{
|
||||
return supplierAmount;
|
||||
}
|
||||
public void setSupplierFeePercent(BigDecimal supplierFeePercent)
|
||||
{
|
||||
this.supplierFeePercent = supplierFeePercent;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierFeePercent()
|
||||
{
|
||||
return supplierFeePercent;
|
||||
}
|
||||
public void setSupplierFeeAmount(BigDecimal supplierFeeAmount)
|
||||
{
|
||||
this.supplierFeeAmount = supplierFeeAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierFeeAmount()
|
||||
{
|
||||
return supplierFeeAmount;
|
||||
}
|
||||
public void setSupplierNetAmount(BigDecimal supplierNetAmount)
|
||||
{
|
||||
this.supplierNetAmount = supplierNetAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierNetAmount()
|
||||
{
|
||||
return supplierNetAmount;
|
||||
}
|
||||
public void setSupplierReversedAmount(BigDecimal supplierReversedAmount)
|
||||
{
|
||||
this.supplierReversedAmount = supplierReversedAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierReversedAmount()
|
||||
{
|
||||
return supplierReversedAmount;
|
||||
}
|
||||
public void setSupplierFeeReversedAmount(BigDecimal supplierFeeReversedAmount)
|
||||
{
|
||||
this.supplierFeeReversedAmount = supplierFeeReversedAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierFeeReversedAmount()
|
||||
{
|
||||
return supplierFeeReversedAmount;
|
||||
}
|
||||
public void setSupplierFeeReturnedAmount(BigDecimal supplierFeeReturnedAmount)
|
||||
{
|
||||
this.supplierFeeReturnedAmount = supplierFeeReturnedAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierFeeReturnedAmount()
|
||||
{
|
||||
return supplierFeeReturnedAmount;
|
||||
}
|
||||
public void setPackageSnapshot(String packageSnapshot)
|
||||
{
|
||||
this.packageSnapshot = packageSnapshot;
|
||||
}
|
||||
|
||||
public String getPackageSnapshot()
|
||||
{
|
||||
return packageSnapshot;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setWalletId(Long walletId)
|
||||
{
|
||||
this.walletId = walletId;
|
||||
}
|
||||
|
||||
public Long getWalletId()
|
||||
{
|
||||
return walletId;
|
||||
}
|
||||
public void setSupplierUserId(Long supplierUserId)
|
||||
{
|
||||
this.supplierUserId = supplierUserId;
|
||||
}
|
||||
|
||||
public Long getSupplierUserId()
|
||||
{
|
||||
return supplierUserId;
|
||||
}
|
||||
public void setSupplierAccountId(Long supplierAccountId)
|
||||
{
|
||||
this.supplierAccountId = supplierAccountId;
|
||||
}
|
||||
|
||||
public Long getSupplierAccountId()
|
||||
{
|
||||
return supplierAccountId;
|
||||
}
|
||||
public void setRelationSlot(Integer relationSlot)
|
||||
{
|
||||
this.relationSlot = relationSlot;
|
||||
}
|
||||
|
||||
public Integer getRelationSlot()
|
||||
{
|
||||
return relationSlot;
|
||||
}
|
||||
public void setPayerAccountId(Long payerAccountId)
|
||||
{
|
||||
this.payerAccountId = payerAccountId;
|
||||
}
|
||||
|
||||
public Long getPayerAccountId()
|
||||
{
|
||||
return payerAccountId;
|
||||
}
|
||||
public void setFundStatus(String fundStatus)
|
||||
{
|
||||
this.fundStatus = fundStatus;
|
||||
}
|
||||
|
||||
public String getFundStatus()
|
||||
{
|
||||
return fundStatus;
|
||||
}
|
||||
public void setRefundedAmount(BigDecimal refundedAmount)
|
||||
{
|
||||
this.refundedAmount = refundedAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getRefundedAmount()
|
||||
{
|
||||
return refundedAmount;
|
||||
}
|
||||
public void setDispatchDeadline(Date dispatchDeadline)
|
||||
{
|
||||
this.dispatchDeadline = dispatchDeadline;
|
||||
}
|
||||
|
||||
public Date getDispatchDeadline()
|
||||
{
|
||||
return dispatchDeadline;
|
||||
}
|
||||
public void setServiceStartedAt(Date serviceStartedAt)
|
||||
{
|
||||
this.serviceStartedAt = serviceStartedAt;
|
||||
}
|
||||
|
||||
public Date getServiceStartedAt()
|
||||
{
|
||||
return serviceStartedAt;
|
||||
}
|
||||
public void setServiceExpiresAt(Date serviceExpiresAt)
|
||||
{
|
||||
this.serviceExpiresAt = serviceExpiresAt;
|
||||
}
|
||||
|
||||
public Date getServiceExpiresAt()
|
||||
{
|
||||
return serviceExpiresAt;
|
||||
}
|
||||
public void setReclaimStatus(String reclaimStatus)
|
||||
{
|
||||
this.reclaimStatus = reclaimStatus;
|
||||
}
|
||||
|
||||
public String getReclaimStatus()
|
||||
{
|
||||
return reclaimStatus;
|
||||
}
|
||||
public void setNextReclaimAt(Date nextReclaimAt)
|
||||
{
|
||||
this.nextReclaimAt = nextReclaimAt;
|
||||
}
|
||||
|
||||
public Date getNextReclaimAt()
|
||||
{
|
||||
return nextReclaimAt;
|
||||
}
|
||||
public void setNotifyUrl(String notifyUrl)
|
||||
{
|
||||
this.notifyUrl = notifyUrl;
|
||||
}
|
||||
|
||||
public String getNotifyUrl()
|
||||
{
|
||||
return notifyUrl;
|
||||
}
|
||||
public void setErrorCode(String errorCode)
|
||||
{
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
public String getErrorCode()
|
||||
{
|
||||
return errorCode;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("orderNo", getOrderNo())
|
||||
.append("appId", getAppId())
|
||||
.append("merchantOrderNo", getMerchantOrderNo())
|
||||
.append("requestHash", getRequestHash())
|
||||
.append("packageId", getPackageId())
|
||||
.append("network", getNetwork())
|
||||
.append("receiverAddress", getReceiverAddress())
|
||||
.append("resourceType", getResourceType())
|
||||
.append("resourceQuantity", getResourceQuantity())
|
||||
.append("redundancyPercent", getRedundancyPercent())
|
||||
.append("targetResourceQuantity", getTargetResourceQuantity())
|
||||
.append("durationSeconds", getDurationSeconds())
|
||||
.append("saleAmount", getSaleAmount())
|
||||
.append("supplierAmount", getSupplierAmount())
|
||||
.append("supplierFeePercent", getSupplierFeePercent())
|
||||
.append("supplierFeeAmount", getSupplierFeeAmount())
|
||||
.append("supplierNetAmount", getSupplierNetAmount())
|
||||
.append("supplierReversedAmount", getSupplierReversedAmount())
|
||||
.append("supplierFeeReversedAmount", getSupplierFeeReversedAmount())
|
||||
.append("supplierFeeReturnedAmount", getSupplierFeeReturnedAmount())
|
||||
.append("packageSnapshot", getPackageSnapshot())
|
||||
.append("status", getStatus())
|
||||
.append("walletId", getWalletId())
|
||||
.append("supplierUserId", getSupplierUserId())
|
||||
.append("supplierAccountId", getSupplierAccountId())
|
||||
.append("relationSlot", getRelationSlot())
|
||||
.append("payerAccountId", getPayerAccountId())
|
||||
.append("fundStatus", getFundStatus())
|
||||
.append("refundedAmount", getRefundedAmount())
|
||||
.append("dispatchDeadline", getDispatchDeadline())
|
||||
.append("serviceStartedAt", getServiceStartedAt())
|
||||
.append("serviceExpiresAt", getServiceExpiresAt())
|
||||
.append("reclaimStatus", getReclaimStatus())
|
||||
.append("nextReclaimAt", getNextReclaimAt())
|
||||
.append("notifyUrl", getNotifyUrl())
|
||||
.append("errorCode", getErrorCode())
|
||||
.append("remark", getRemark())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,568 @@
|
||||
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;
|
||||
/**
|
||||
* 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开对象 rent_order
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_order")
|
||||
public class RentOrderPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** 平台订单编号 */
|
||||
@Excel(name = "平台订单编号")
|
||||
private String orderNo;
|
||||
/** rent_app.id */
|
||||
@Excel(name = "rent_app.id")
|
||||
private Long appId;
|
||||
/** 商户订单号,兼作业务幂等键 */
|
||||
@Excel(name = "商户订单号,兼作业务幂等键")
|
||||
private String merchantOrderNo;
|
||||
/** 原请求规范化摘要,同编号不同内容拒绝 */
|
||||
@Excel(name = "原请求规范化摘要,同编号不同内容拒绝")
|
||||
private String requestHash;
|
||||
/** rent_package.id */
|
||||
@Excel(name = "rent_package.id")
|
||||
private Long packageId;
|
||||
/** 网络:NILE、MAINNET,必须与所有关联对象一致 */
|
||||
@Excel(name = "网络:NILE、MAINNET,必须与所有关联对象一致")
|
||||
private String network;
|
||||
/** 资源接收者,TRON Base58Check地址 */
|
||||
@Excel(name = "资源接收者,TRON Base58Check地址")
|
||||
private String receiverAddress;
|
||||
/** 套餐资源类型快照:ENERGY能量、BANDWIDTH带宽,订单创建后不可修改 */
|
||||
@Excel(name = "套餐资源类型快照:ENERGY能量、BANDWIDTH带宽,订单创建后不可修改")
|
||||
private String resourceType;
|
||||
/** 套餐资源数量快照:ENERGY单位Energy、BANDWIDTH单位bytes,必须大于零 */
|
||||
@Excel(name = "套餐资源数量快照:ENERGY单位Energy、BANDWIDTH单位bytes,必须大于零")
|
||||
private Long resourceQuantity;
|
||||
/** 订单锁定冗余百分数,必须大于0,不能被套餐后续改价或调参覆盖 */
|
||||
@Excel(name = "订单锁定冗余百分数,必须大于0,不能被套餐后续改价或调参覆盖")
|
||||
private BigDecimal redundancyPercent;
|
||||
/** 含冗余最低交付目标max(请求量+1,ceil(请求量乘以(1+冗余百分数/100))),严格大于resource_quantity */
|
||||
@Excel(name = "含冗余最低交付目标max(请求量+1,ceil(请求量乘以(1+冗余百分数/100))),严格大于resource_quantity")
|
||||
private Long targetResourceQuantity;
|
||||
/** 租期秒快照 */
|
||||
@Excel(name = "租期秒快照")
|
||||
private Long durationSeconds;
|
||||
/** USDT售价快照 */
|
||||
@Excel(name = "USDT售价快照")
|
||||
private BigDecimal saleAmount;
|
||||
/** 供应商扣费前毛收入USDT快照,不能因费率变更被覆盖 */
|
||||
@Excel(name = "供应商扣费前毛收入USDT快照,不能因费率变更被覆盖")
|
||||
private BigDecimal supplierAmount;
|
||||
/** 订单锁定供应商手续费百分数,必须大于0小于100 */
|
||||
@Excel(name = "订单锁定供应商手续费百分数,必须大于0小于100")
|
||||
private BigDecimal supplierFeePercent;
|
||||
/** 平台手续费USDT快照=毛收入乘费率除100,按6位小数HALF_UP;必须大于0且小于毛收入 */
|
||||
@Excel(name = "平台手续费USDT快照=毛收入乘费率除100,按6位小数HALF_UP;必须大于0且小于毛收入")
|
||||
private BigDecimal supplierFeeAmount;
|
||||
/** 供应商净应收USDT快照=供应商毛收入减平台手续费,必须大于0,结算以此为基数 */
|
||||
@Excel(name = "供应商净应收USDT快照=供应商毛收入减平台手续费,必须大于0,结算以此为基数")
|
||||
private BigDecimal supplierNetAmount;
|
||||
/** 已冲正供应商净应收USDT累计,不超过supplier_net_amount,按审核退款规则追加流水 */
|
||||
@Excel(name = "已冲正供应商净应收USDT累计,不超过supplier_net_amount,按审核退款规则追加流水")
|
||||
private BigDecimal supplierReversedAmount;
|
||||
/** 已退回或冲正平台手续费USDT累计,不超过supplier_fee_amount,不因退款自动推定全退 */
|
||||
@Excel(name = "已退回或冲正平台手续费USDT累计,不超过supplier_fee_amount,不因退款自动推定全退")
|
||||
private BigDecimal supplierFeeReversedAmount;
|
||||
/** 手续费冲正中返还供应商的累计USDT,不超过supplier_fee_reversed_amount,增加本单可结算净额 */
|
||||
@Excel(name = "手续费冲正中返还供应商的累计USDT,不超过supplier_fee_reversed_amount,增加本单可结算净额")
|
||||
private BigDecimal supplierFeeReturnedAmount;
|
||||
/** 套餐、费用预算、偏差、锁定和退款规则快照 */
|
||||
@Excel(name = "套餐、费用预算、偏差、锁定和退款规则快照")
|
||||
private String packageSnapshot;
|
||||
/** WAITING待调度、EXECUTING委托中、VERIFYING核验中、SUCCESS履约成功、FAILED明确失败、CANCELLED未执行取消、MANUAL_REVIEW人工核对 */
|
||||
@Excel(name = "WAITING待调度、EXECUTING委托中、VERIFYING核验中、SUCCESS履约成功、FAILED明确失败、CANCELLED未执行取消、MANUAL_REVIEW人工核对")
|
||||
private String status;
|
||||
/** 选定rent_wallet.id;未知执行结果时不能改派 */
|
||||
@Excel(name = "选定rent_wallet.id;未知执行结果时不能改派")
|
||||
private Long walletId;
|
||||
/** 选定供应商sys_user.user_id快照 */
|
||||
@Excel(name = "选定供应商sys_user.user_id快照")
|
||||
private Long supplierUserId;
|
||||
/** 调度时固定供应商rent_account.id,与供应商用户及订单网络一致 */
|
||||
@Excel(name = "调度时固定供应商rent_account.id,与供应商用户及订单网络一致")
|
||||
private Long supplierAccountId;
|
||||
/** 分配钱包时取1,明确未执行终结或本金回收且资源恢复后置NULL;未知保留,禁止同钱包同接收者同类型并行租赁 */
|
||||
@Excel(name = "分配钱包时取1,明确未执行终结或本金回收且资源恢复后置NULL;未知保留,禁止同钱包同接收者同类型并行租赁")
|
||||
private Integer relationSlot;
|
||||
/** 商户rent_account.id */
|
||||
@Excel(name = "商户rent_account.id")
|
||||
private Long payerAccountId;
|
||||
/** 资金:HELD冻结、CHARGED扣款、RELEASED释放 */
|
||||
@Excel(name = "资金:HELD冻结、CHARGED扣款、RELEASED释放")
|
||||
private String fundStatus;
|
||||
/** 累计已退USDT,仅可按规则退租赁内部余额 */
|
||||
@Excel(name = "累计已退USDT,仅可按规则退租赁内部余额")
|
||||
private BigDecimal refundedAmount;
|
||||
/** 创建时锁定的最晚新任务执行时间UTC;WAITING超时取消,已投递不能仅凭过期判未执行 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时锁定的最晚新任务执行时间UTC;WAITING超时取消,已投递不能仅凭过期判未执行", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date dispatchDeadline;
|
||||
/** 已独立核验委托交易所在区块的UTC时间,不使用核验完成时间延长租期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "已独立核验委托交易所在区块的UTC时间,不使用核验完成时间延长租期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date serviceStartedAt;
|
||||
/** 业务租期结束,不等于自动回收,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "业务租期结束,不等于自动回收,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date serviceExpiresAt;
|
||||
/** 回收:NOT_STARTED、WAITING、RUNNING、RECOVERING、DONE、MANUAL_REVIEW */
|
||||
@Excel(name = "回收:NOT_STARTED、WAITING、RUNNING、RECOVERING、DONE、MANUAL_REVIEW")
|
||||
private String reclaimStatus;
|
||||
/** 下次到期或资源恢复核对,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下次到期或资源恢复核对,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date nextReclaimAt;
|
||||
/** 该单回调URL快照,允许为空 */
|
||||
@Excel(name = "该单回调URL快照,允许为空")
|
||||
private String notifyUrl;
|
||||
/** 稳定错误码 */
|
||||
@Excel(name = "稳定错误码")
|
||||
private String errorCode;
|
||||
/** 脱敏结果说明 */
|
||||
@Excel(name = "脱敏结果说明")
|
||||
private String remark;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderNo(String orderNo)
|
||||
{
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getOrderNo()
|
||||
{
|
||||
return orderNo;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setMerchantOrderNo(String merchantOrderNo)
|
||||
{
|
||||
this.merchantOrderNo = merchantOrderNo;
|
||||
}
|
||||
|
||||
public String getMerchantOrderNo()
|
||||
{
|
||||
return merchantOrderNo;
|
||||
}
|
||||
public void setRequestHash(String requestHash)
|
||||
{
|
||||
this.requestHash = requestHash;
|
||||
}
|
||||
|
||||
public String getRequestHash()
|
||||
{
|
||||
return requestHash;
|
||||
}
|
||||
public void setPackageId(Long packageId)
|
||||
{
|
||||
this.packageId = packageId;
|
||||
}
|
||||
|
||||
public Long getPackageId()
|
||||
{
|
||||
return packageId;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setReceiverAddress(String receiverAddress)
|
||||
{
|
||||
this.receiverAddress = receiverAddress;
|
||||
}
|
||||
|
||||
public String getReceiverAddress()
|
||||
{
|
||||
return receiverAddress;
|
||||
}
|
||||
public void setResourceType(String resourceType)
|
||||
{
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceType()
|
||||
{
|
||||
return resourceType;
|
||||
}
|
||||
public void setResourceQuantity(Long resourceQuantity)
|
||||
{
|
||||
this.resourceQuantity = resourceQuantity;
|
||||
}
|
||||
|
||||
public Long getResourceQuantity()
|
||||
{
|
||||
return resourceQuantity;
|
||||
}
|
||||
public void setRedundancyPercent(BigDecimal redundancyPercent)
|
||||
{
|
||||
this.redundancyPercent = redundancyPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getRedundancyPercent()
|
||||
{
|
||||
return redundancyPercent;
|
||||
}
|
||||
public void setTargetResourceQuantity(Long targetResourceQuantity)
|
||||
{
|
||||
this.targetResourceQuantity = targetResourceQuantity;
|
||||
}
|
||||
|
||||
public Long getTargetResourceQuantity()
|
||||
{
|
||||
return targetResourceQuantity;
|
||||
}
|
||||
public void setDurationSeconds(Long durationSeconds)
|
||||
{
|
||||
this.durationSeconds = durationSeconds;
|
||||
}
|
||||
|
||||
public Long getDurationSeconds()
|
||||
{
|
||||
return durationSeconds;
|
||||
}
|
||||
public void setSaleAmount(BigDecimal saleAmount)
|
||||
{
|
||||
this.saleAmount = saleAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSaleAmount()
|
||||
{
|
||||
return saleAmount;
|
||||
}
|
||||
public void setSupplierAmount(BigDecimal supplierAmount)
|
||||
{
|
||||
this.supplierAmount = supplierAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierAmount()
|
||||
{
|
||||
return supplierAmount;
|
||||
}
|
||||
public void setSupplierFeePercent(BigDecimal supplierFeePercent)
|
||||
{
|
||||
this.supplierFeePercent = supplierFeePercent;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierFeePercent()
|
||||
{
|
||||
return supplierFeePercent;
|
||||
}
|
||||
public void setSupplierFeeAmount(BigDecimal supplierFeeAmount)
|
||||
{
|
||||
this.supplierFeeAmount = supplierFeeAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierFeeAmount()
|
||||
{
|
||||
return supplierFeeAmount;
|
||||
}
|
||||
public void setSupplierNetAmount(BigDecimal supplierNetAmount)
|
||||
{
|
||||
this.supplierNetAmount = supplierNetAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierNetAmount()
|
||||
{
|
||||
return supplierNetAmount;
|
||||
}
|
||||
public void setSupplierReversedAmount(BigDecimal supplierReversedAmount)
|
||||
{
|
||||
this.supplierReversedAmount = supplierReversedAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierReversedAmount()
|
||||
{
|
||||
return supplierReversedAmount;
|
||||
}
|
||||
public void setSupplierFeeReversedAmount(BigDecimal supplierFeeReversedAmount)
|
||||
{
|
||||
this.supplierFeeReversedAmount = supplierFeeReversedAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierFeeReversedAmount()
|
||||
{
|
||||
return supplierFeeReversedAmount;
|
||||
}
|
||||
public void setSupplierFeeReturnedAmount(BigDecimal supplierFeeReturnedAmount)
|
||||
{
|
||||
this.supplierFeeReturnedAmount = supplierFeeReturnedAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierFeeReturnedAmount()
|
||||
{
|
||||
return supplierFeeReturnedAmount;
|
||||
}
|
||||
public void setPackageSnapshot(String packageSnapshot)
|
||||
{
|
||||
this.packageSnapshot = packageSnapshot;
|
||||
}
|
||||
|
||||
public String getPackageSnapshot()
|
||||
{
|
||||
return packageSnapshot;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setWalletId(Long walletId)
|
||||
{
|
||||
this.walletId = walletId;
|
||||
}
|
||||
|
||||
public Long getWalletId()
|
||||
{
|
||||
return walletId;
|
||||
}
|
||||
public void setSupplierUserId(Long supplierUserId)
|
||||
{
|
||||
this.supplierUserId = supplierUserId;
|
||||
}
|
||||
|
||||
public Long getSupplierUserId()
|
||||
{
|
||||
return supplierUserId;
|
||||
}
|
||||
public void setSupplierAccountId(Long supplierAccountId)
|
||||
{
|
||||
this.supplierAccountId = supplierAccountId;
|
||||
}
|
||||
|
||||
public Long getSupplierAccountId()
|
||||
{
|
||||
return supplierAccountId;
|
||||
}
|
||||
public void setRelationSlot(Integer relationSlot)
|
||||
{
|
||||
this.relationSlot = relationSlot;
|
||||
}
|
||||
|
||||
public Integer getRelationSlot()
|
||||
{
|
||||
return relationSlot;
|
||||
}
|
||||
public void setPayerAccountId(Long payerAccountId)
|
||||
{
|
||||
this.payerAccountId = payerAccountId;
|
||||
}
|
||||
|
||||
public Long getPayerAccountId()
|
||||
{
|
||||
return payerAccountId;
|
||||
}
|
||||
public void setFundStatus(String fundStatus)
|
||||
{
|
||||
this.fundStatus = fundStatus;
|
||||
}
|
||||
|
||||
public String getFundStatus()
|
||||
{
|
||||
return fundStatus;
|
||||
}
|
||||
public void setRefundedAmount(BigDecimal refundedAmount)
|
||||
{
|
||||
this.refundedAmount = refundedAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getRefundedAmount()
|
||||
{
|
||||
return refundedAmount;
|
||||
}
|
||||
public void setDispatchDeadline(Date dispatchDeadline)
|
||||
{
|
||||
this.dispatchDeadline = dispatchDeadline;
|
||||
}
|
||||
|
||||
public Date getDispatchDeadline()
|
||||
{
|
||||
return dispatchDeadline;
|
||||
}
|
||||
public void setServiceStartedAt(Date serviceStartedAt)
|
||||
{
|
||||
this.serviceStartedAt = serviceStartedAt;
|
||||
}
|
||||
|
||||
public Date getServiceStartedAt()
|
||||
{
|
||||
return serviceStartedAt;
|
||||
}
|
||||
public void setServiceExpiresAt(Date serviceExpiresAt)
|
||||
{
|
||||
this.serviceExpiresAt = serviceExpiresAt;
|
||||
}
|
||||
|
||||
public Date getServiceExpiresAt()
|
||||
{
|
||||
return serviceExpiresAt;
|
||||
}
|
||||
public void setReclaimStatus(String reclaimStatus)
|
||||
{
|
||||
this.reclaimStatus = reclaimStatus;
|
||||
}
|
||||
|
||||
public String getReclaimStatus()
|
||||
{
|
||||
return reclaimStatus;
|
||||
}
|
||||
public void setNextReclaimAt(Date nextReclaimAt)
|
||||
{
|
||||
this.nextReclaimAt = nextReclaimAt;
|
||||
}
|
||||
|
||||
public Date getNextReclaimAt()
|
||||
{
|
||||
return nextReclaimAt;
|
||||
}
|
||||
public void setNotifyUrl(String notifyUrl)
|
||||
{
|
||||
this.notifyUrl = notifyUrl;
|
||||
}
|
||||
|
||||
public String getNotifyUrl()
|
||||
{
|
||||
return notifyUrl;
|
||||
}
|
||||
public void setErrorCode(String errorCode)
|
||||
{
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
public String getErrorCode()
|
||||
{
|
||||
return errorCode;
|
||||
}
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("orderNo", getOrderNo())
|
||||
.append("appId", getAppId())
|
||||
.append("merchantOrderNo", getMerchantOrderNo())
|
||||
.append("requestHash", getRequestHash())
|
||||
.append("packageId", getPackageId())
|
||||
.append("network", getNetwork())
|
||||
.append("receiverAddress", getReceiverAddress())
|
||||
.append("resourceType", getResourceType())
|
||||
.append("resourceQuantity", getResourceQuantity())
|
||||
.append("redundancyPercent", getRedundancyPercent())
|
||||
.append("targetResourceQuantity", getTargetResourceQuantity())
|
||||
.append("durationSeconds", getDurationSeconds())
|
||||
.append("saleAmount", getSaleAmount())
|
||||
.append("supplierAmount", getSupplierAmount())
|
||||
.append("supplierFeePercent", getSupplierFeePercent())
|
||||
.append("supplierFeeAmount", getSupplierFeeAmount())
|
||||
.append("supplierNetAmount", getSupplierNetAmount())
|
||||
.append("supplierReversedAmount", getSupplierReversedAmount())
|
||||
.append("supplierFeeReversedAmount", getSupplierFeeReversedAmount())
|
||||
.append("supplierFeeReturnedAmount", getSupplierFeeReturnedAmount())
|
||||
.append("packageSnapshot", getPackageSnapshot())
|
||||
.append("status", getStatus())
|
||||
.append("walletId", getWalletId())
|
||||
.append("supplierUserId", getSupplierUserId())
|
||||
.append("supplierAccountId", getSupplierAccountId())
|
||||
.append("relationSlot", getRelationSlot())
|
||||
.append("payerAccountId", getPayerAccountId())
|
||||
.append("fundStatus", getFundStatus())
|
||||
.append("refundedAmount", getRefundedAmount())
|
||||
.append("dispatchDeadline", getDispatchDeadline())
|
||||
.append("serviceStartedAt", getServiceStartedAt())
|
||||
.append("serviceExpiresAt", getServiceExpiresAt())
|
||||
.append("reclaimStatus", getReclaimStatus())
|
||||
.append("nextReclaimAt", getNextReclaimAt())
|
||||
.append("notifyUrl", getNotifyUrl())
|
||||
.append("errorCode", getErrorCode())
|
||||
.append("remark", getRemark())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,294 @@
|
||||
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;
|
||||
/**
|
||||
* 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变对象 rent_package
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentPackage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** 套餐代码 */
|
||||
@Excel(name = "套餐代码")
|
||||
private String packageCode;
|
||||
|
||||
/** 套餐版本递增 */
|
||||
@Excel(name = "套餐版本递增")
|
||||
private Long revision;
|
||||
|
||||
/** 套餐名称 */
|
||||
@Excel(name = "套餐名称")
|
||||
private String name;
|
||||
|
||||
/** 网络:NILE、MAINNET,必须与所有关联对象一致 */
|
||||
@Excel(name = "网络:NILE、MAINNET,必须与所有关联对象一致")
|
||||
private String network;
|
||||
|
||||
/** 资源类型:ENERGY能量、BANDWIDTH带宽;必须显式填写,无默认值 */
|
||||
@Excel(name = "资源类型:ENERGY能量、BANDWIDTH带宽;必须显式填写,无默认值")
|
||||
private String resourceType;
|
||||
|
||||
/** 交付资源正整数数量:ENERGY单位Energy、BANDWIDTH单位bytes,不是TRX或SUN */
|
||||
@Excel(name = "交付资源正整数数量:ENERGY单位Energy、BANDWIDTH单位bytes,不是TRX或SUN")
|
||||
private Long resourceQuantity;
|
||||
|
||||
/** 资源冗余百分数,20表示20%,必须大于0;目标量必须严格大于请求量,创建订单锁定 */
|
||||
@Excel(name = "资源冗余百分数,20表示20%,必须大于0;目标量必须严格大于请求量,创建订单锁定")
|
||||
private BigDecimal redundancyPercent;
|
||||
|
||||
/** 业务租期秒,不代表链上自动撤销 */
|
||||
@Excel(name = "业务租期秒,不代表链上自动撤销")
|
||||
private Long durationSeconds;
|
||||
|
||||
/** 售价USDT */
|
||||
@Excel(name = "售价USDT")
|
||||
private BigDecimal saleAmount;
|
||||
|
||||
/** 供应商扣平台手续费前毛收入USDT,包含约定链上操作成本,不是净结算额 */
|
||||
@Excel(name = "供应商扣平台手续费前毛收入USDT,包含约定链上操作成本,不是净结算额")
|
||||
private BigDecimal supplierAmount;
|
||||
|
||||
/** 平台向供应商收取的手续费百分数,必须显式配置且大于0小于100,5表示5%;下单锁定 */
|
||||
@Excel(name = "平台向供应商收取的手续费百分数,必须显式配置且大于0小于100,5表示5%;下单锁定")
|
||||
private BigDecimal supplierFeePercent;
|
||||
|
||||
/** 节点单笔操作本地费用预算SUN,零不可广播;委托撤销非合约交易,不假定协议支持fee_limit硬上限 */
|
||||
@Excel(name = "节点单笔操作本地费用预算SUN,零不可广播;委托撤销非合约交易,不假定协议支持fee_limit硬上限")
|
||||
private Long feeLimitSun;
|
||||
|
||||
/** 首版仅允许0非锁定委托;1拒绝上架,不能把租期秒当链上锁定参数 */
|
||||
@Excel(name = "首版仅允许0非锁定委托;1拒绝上架,不能把租期秒当链上锁定参数")
|
||||
private Integer delegateLock;
|
||||
|
||||
/** ACTIVE上架、DISABLED下架 */
|
||||
@Excel(name = "ACTIVE上架、DISABLED下架")
|
||||
private String status;
|
||||
|
||||
/** 委托锁定模式、允许偏差、退款及费用承担规则;启用前必须配置 */
|
||||
@Excel(name = "委托锁定模式、允许偏差、退款及费用承担规则;启用前必须配置")
|
||||
private String rules;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPackageCode(String packageCode)
|
||||
{
|
||||
this.packageCode = packageCode;
|
||||
}
|
||||
|
||||
public String getPackageCode()
|
||||
{
|
||||
return packageCode;
|
||||
}
|
||||
public void setRevision(Long revision)
|
||||
{
|
||||
this.revision = revision;
|
||||
}
|
||||
|
||||
public Long getRevision()
|
||||
{
|
||||
return revision;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setResourceType(String resourceType)
|
||||
{
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceType()
|
||||
{
|
||||
return resourceType;
|
||||
}
|
||||
public void setResourceQuantity(Long resourceQuantity)
|
||||
{
|
||||
this.resourceQuantity = resourceQuantity;
|
||||
}
|
||||
|
||||
public Long getResourceQuantity()
|
||||
{
|
||||
return resourceQuantity;
|
||||
}
|
||||
public void setRedundancyPercent(BigDecimal redundancyPercent)
|
||||
{
|
||||
this.redundancyPercent = redundancyPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getRedundancyPercent()
|
||||
{
|
||||
return redundancyPercent;
|
||||
}
|
||||
public void setDurationSeconds(Long durationSeconds)
|
||||
{
|
||||
this.durationSeconds = durationSeconds;
|
||||
}
|
||||
|
||||
public Long getDurationSeconds()
|
||||
{
|
||||
return durationSeconds;
|
||||
}
|
||||
public void setSaleAmount(BigDecimal saleAmount)
|
||||
{
|
||||
this.saleAmount = saleAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSaleAmount()
|
||||
{
|
||||
return saleAmount;
|
||||
}
|
||||
public void setSupplierAmount(BigDecimal supplierAmount)
|
||||
{
|
||||
this.supplierAmount = supplierAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierAmount()
|
||||
{
|
||||
return supplierAmount;
|
||||
}
|
||||
public void setSupplierFeePercent(BigDecimal supplierFeePercent)
|
||||
{
|
||||
this.supplierFeePercent = supplierFeePercent;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierFeePercent()
|
||||
{
|
||||
return supplierFeePercent;
|
||||
}
|
||||
public void setFeeLimitSun(Long feeLimitSun)
|
||||
{
|
||||
this.feeLimitSun = feeLimitSun;
|
||||
}
|
||||
|
||||
public Long getFeeLimitSun()
|
||||
{
|
||||
return feeLimitSun;
|
||||
}
|
||||
public void setDelegateLock(Integer delegateLock)
|
||||
{
|
||||
this.delegateLock = delegateLock;
|
||||
}
|
||||
|
||||
public Integer getDelegateLock()
|
||||
{
|
||||
return delegateLock;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setRules(String rules)
|
||||
{
|
||||
this.rules = rules;
|
||||
}
|
||||
|
||||
public String getRules()
|
||||
{
|
||||
return rules;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("packageCode", getPackageCode())
|
||||
.append("revision", getRevision())
|
||||
.append("name", getName())
|
||||
.append("network", getNetwork())
|
||||
.append("resourceType", getResourceType())
|
||||
.append("resourceQuantity", getResourceQuantity())
|
||||
.append("redundancyPercent", getRedundancyPercent())
|
||||
.append("durationSeconds", getDurationSeconds())
|
||||
.append("saleAmount", getSaleAmount())
|
||||
.append("supplierAmount", getSupplierAmount())
|
||||
.append("supplierFeePercent", getSupplierFeePercent())
|
||||
.append("feeLimitSun", getFeeLimitSun())
|
||||
.append("delegateLock", getDelegateLock())
|
||||
.append("status", getStatus())
|
||||
.append("rules", getRules())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
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;
|
||||
/**
|
||||
* 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变对象 rent_package
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_package")
|
||||
public class RentPackagePlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** 套餐代码 */
|
||||
@Excel(name = "套餐代码")
|
||||
private String packageCode;
|
||||
/** 套餐版本递增 */
|
||||
@Excel(name = "套餐版本递增")
|
||||
private Long revision;
|
||||
/** 套餐名称 */
|
||||
@Excel(name = "套餐名称")
|
||||
private String name;
|
||||
/** 网络:NILE、MAINNET,必须与所有关联对象一致 */
|
||||
@Excel(name = "网络:NILE、MAINNET,必须与所有关联对象一致")
|
||||
private String network;
|
||||
/** 资源类型:ENERGY能量、BANDWIDTH带宽;必须显式填写,无默认值 */
|
||||
@Excel(name = "资源类型:ENERGY能量、BANDWIDTH带宽;必须显式填写,无默认值")
|
||||
private String resourceType;
|
||||
/** 交付资源正整数数量:ENERGY单位Energy、BANDWIDTH单位bytes,不是TRX或SUN */
|
||||
@Excel(name = "交付资源正整数数量:ENERGY单位Energy、BANDWIDTH单位bytes,不是TRX或SUN")
|
||||
private Long resourceQuantity;
|
||||
/** 资源冗余百分数,20表示20%,必须大于0;目标量必须严格大于请求量,创建订单锁定 */
|
||||
@Excel(name = "资源冗余百分数,20表示20%,必须大于0;目标量必须严格大于请求量,创建订单锁定")
|
||||
private BigDecimal redundancyPercent;
|
||||
/** 业务租期秒,不代表链上自动撤销 */
|
||||
@Excel(name = "业务租期秒,不代表链上自动撤销")
|
||||
private Long durationSeconds;
|
||||
/** 售价USDT */
|
||||
@Excel(name = "售价USDT")
|
||||
private BigDecimal saleAmount;
|
||||
/** 供应商扣平台手续费前毛收入USDT,包含约定链上操作成本,不是净结算额 */
|
||||
@Excel(name = "供应商扣平台手续费前毛收入USDT,包含约定链上操作成本,不是净结算额")
|
||||
private BigDecimal supplierAmount;
|
||||
/** 平台向供应商收取的手续费百分数,必须显式配置且大于0小于100,5表示5%;下单锁定 */
|
||||
@Excel(name = "平台向供应商收取的手续费百分数,必须显式配置且大于0小于100,5表示5%;下单锁定")
|
||||
private BigDecimal supplierFeePercent;
|
||||
/** 节点单笔操作本地费用预算SUN,零不可广播;委托撤销非合约交易,不假定协议支持fee_limit硬上限 */
|
||||
@Excel(name = "节点单笔操作本地费用预算SUN,零不可广播;委托撤销非合约交易,不假定协议支持fee_limit硬上限")
|
||||
private Long feeLimitSun;
|
||||
/** 首版仅允许0非锁定委托;1拒绝上架,不能把租期秒当链上锁定参数 */
|
||||
@Excel(name = "首版仅允许0非锁定委托;1拒绝上架,不能把租期秒当链上锁定参数")
|
||||
private Integer delegateLock;
|
||||
/** ACTIVE上架、DISABLED下架 */
|
||||
@Excel(name = "ACTIVE上架、DISABLED下架")
|
||||
private String status;
|
||||
/** 委托锁定模式、允许偏差、退款及费用承担规则;启用前必须配置 */
|
||||
@Excel(name = "委托锁定模式、允许偏差、退款及费用承担规则;启用前必须配置")
|
||||
private String rules;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPackageCode(String packageCode)
|
||||
{
|
||||
this.packageCode = packageCode;
|
||||
}
|
||||
|
||||
public String getPackageCode()
|
||||
{
|
||||
return packageCode;
|
||||
}
|
||||
public void setRevision(Long revision)
|
||||
{
|
||||
this.revision = revision;
|
||||
}
|
||||
|
||||
public Long getRevision()
|
||||
{
|
||||
return revision;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setResourceType(String resourceType)
|
||||
{
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceType()
|
||||
{
|
||||
return resourceType;
|
||||
}
|
||||
public void setResourceQuantity(Long resourceQuantity)
|
||||
{
|
||||
this.resourceQuantity = resourceQuantity;
|
||||
}
|
||||
|
||||
public Long getResourceQuantity()
|
||||
{
|
||||
return resourceQuantity;
|
||||
}
|
||||
public void setRedundancyPercent(BigDecimal redundancyPercent)
|
||||
{
|
||||
this.redundancyPercent = redundancyPercent;
|
||||
}
|
||||
|
||||
public BigDecimal getRedundancyPercent()
|
||||
{
|
||||
return redundancyPercent;
|
||||
}
|
||||
public void setDurationSeconds(Long durationSeconds)
|
||||
{
|
||||
this.durationSeconds = durationSeconds;
|
||||
}
|
||||
|
||||
public Long getDurationSeconds()
|
||||
{
|
||||
return durationSeconds;
|
||||
}
|
||||
public void setSaleAmount(BigDecimal saleAmount)
|
||||
{
|
||||
this.saleAmount = saleAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSaleAmount()
|
||||
{
|
||||
return saleAmount;
|
||||
}
|
||||
public void setSupplierAmount(BigDecimal supplierAmount)
|
||||
{
|
||||
this.supplierAmount = supplierAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierAmount()
|
||||
{
|
||||
return supplierAmount;
|
||||
}
|
||||
public void setSupplierFeePercent(BigDecimal supplierFeePercent)
|
||||
{
|
||||
this.supplierFeePercent = supplierFeePercent;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierFeePercent()
|
||||
{
|
||||
return supplierFeePercent;
|
||||
}
|
||||
public void setFeeLimitSun(Long feeLimitSun)
|
||||
{
|
||||
this.feeLimitSun = feeLimitSun;
|
||||
}
|
||||
|
||||
public Long getFeeLimitSun()
|
||||
{
|
||||
return feeLimitSun;
|
||||
}
|
||||
public void setDelegateLock(Integer delegateLock)
|
||||
{
|
||||
this.delegateLock = delegateLock;
|
||||
}
|
||||
|
||||
public Integer getDelegateLock()
|
||||
{
|
||||
return delegateLock;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setRules(String rules)
|
||||
{
|
||||
this.rules = rules;
|
||||
}
|
||||
|
||||
public String getRules()
|
||||
{
|
||||
return rules;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("packageCode", getPackageCode())
|
||||
.append("revision", getRevision())
|
||||
.append("name", getName())
|
||||
.append("network", getNetwork())
|
||||
.append("resourceType", getResourceType())
|
||||
.append("resourceQuantity", getResourceQuantity())
|
||||
.append("redundancyPercent", getRedundancyPercent())
|
||||
.append("durationSeconds", getDurationSeconds())
|
||||
.append("saleAmount", getSaleAmount())
|
||||
.append("supplierAmount", getSupplierAmount())
|
||||
.append("supplierFeePercent", getSupplierFeePercent())
|
||||
.append("feeLimitSun", getFeeLimitSun())
|
||||
.append("delegateLock", getDelegateLock())
|
||||
.append("status", getStatus())
|
||||
.append("rules", getRules())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
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;
|
||||
/**
|
||||
* 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史对象 rent_refund
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentRefund extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** 平台全局唯一退款编号 */
|
||||
@Excel(name = "平台全局唯一退款编号")
|
||||
private String refundNo;
|
||||
|
||||
/** rent_order.id,仅CHARGED且已确认收入的订单可退款;HELD订单用释放流程 */
|
||||
@Excel(name = "rent_order.id,仅CHARGED且已确认收入的订单可退款;HELD订单用释放流程")
|
||||
private Long orderId;
|
||||
|
||||
/** 同订单退款请求幂等编号,调用方重试保持不变 */
|
||||
@Excel(name = "同订单退款请求幂等编号,调用方重试保持不变")
|
||||
private String requestNo;
|
||||
|
||||
/** 规范化退款请求SHA256,同编号不同内容拒绝 */
|
||||
@Excel(name = "规范化退款请求SHA256,同编号不同内容拒绝")
|
||||
private String requestHash;
|
||||
|
||||
/** 本次返还商户内部可用余额USDT,必须大于0,包含退商户的平台手续费部分 */
|
||||
@Excel(name = "本次返还商户内部可用余额USDT,必须大于0,包含退商户的平台手续费部分")
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
/** 本次冲正供应商原净应收USDT,累计不能超过订单supplier_net_amount */
|
||||
@Excel(name = "本次冲正供应商原净应收USDT,累计不能超过订单supplier_net_amount")
|
||||
private BigDecimal supplierReverseAmount;
|
||||
|
||||
/** 本次退回平台手续费USDT,累计不能超过订单supplier_fee_amount */
|
||||
@Excel(name = "本次退回平台手续费USDT,累计不能超过订单supplier_fee_amount")
|
||||
private BigDecimal platformFeeReverseAmount;
|
||||
|
||||
/** NONE无退费、MERCHANT已包含在refund_amount、SUPPLIER增加供应商待结算及订单返还累计;无自动推定 */
|
||||
@Excel(name = "NONE无退费、MERCHANT已包含在refund_amount、SUPPLIER增加供应商待结算及订单返还累计;无自动推定")
|
||||
private String feeReturnTo;
|
||||
|
||||
/** PENDING待审核、APPLIED已同事务入账、REJECTED已拒绝;无外部退款中状态 */
|
||||
@Excel(name = "PENDING待审核、APPLIED已同事务入账、REJECTED已拒绝;无外部退款中状态")
|
||||
private String status;
|
||||
|
||||
/** 发起sys_user.user_id */
|
||||
@Excel(name = "发起sys_user.user_id")
|
||||
private Long createdBy;
|
||||
|
||||
/** 审批sys_user.user_id,必须与发起人不同 */
|
||||
@Excel(name = "审批sys_user.user_id,必须与发起人不同")
|
||||
private Long approvedBy;
|
||||
|
||||
/** 余额、流水、订单累计、回调及审计原子提交UTC时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "余额、流水、订单累计、回调及审计原子提交UTC时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date appliedAt;
|
||||
|
||||
/** 退款及费用承担审核依据,必填 */
|
||||
@Excel(name = "退款及费用承担审核依据,必填")
|
||||
private String reason;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setRefundNo(String refundNo)
|
||||
{
|
||||
this.refundNo = refundNo;
|
||||
}
|
||||
|
||||
public String getRefundNo()
|
||||
{
|
||||
return refundNo;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setRequestNo(String requestNo)
|
||||
{
|
||||
this.requestNo = requestNo;
|
||||
}
|
||||
|
||||
public String getRequestNo()
|
||||
{
|
||||
return requestNo;
|
||||
}
|
||||
public void setRequestHash(String requestHash)
|
||||
{
|
||||
this.requestHash = requestHash;
|
||||
}
|
||||
|
||||
public String getRequestHash()
|
||||
{
|
||||
return requestHash;
|
||||
}
|
||||
public void setRefundAmount(BigDecimal refundAmount)
|
||||
{
|
||||
this.refundAmount = refundAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getRefundAmount()
|
||||
{
|
||||
return refundAmount;
|
||||
}
|
||||
public void setSupplierReverseAmount(BigDecimal supplierReverseAmount)
|
||||
{
|
||||
this.supplierReverseAmount = supplierReverseAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierReverseAmount()
|
||||
{
|
||||
return supplierReverseAmount;
|
||||
}
|
||||
public void setPlatformFeeReverseAmount(BigDecimal platformFeeReverseAmount)
|
||||
{
|
||||
this.platformFeeReverseAmount = platformFeeReverseAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getPlatformFeeReverseAmount()
|
||||
{
|
||||
return platformFeeReverseAmount;
|
||||
}
|
||||
public void setFeeReturnTo(String feeReturnTo)
|
||||
{
|
||||
this.feeReturnTo = feeReturnTo;
|
||||
}
|
||||
|
||||
public String getFeeReturnTo()
|
||||
{
|
||||
return feeReturnTo;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setCreatedBy(Long createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public Long getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
public void setApprovedBy(Long approvedBy)
|
||||
{
|
||||
this.approvedBy = approvedBy;
|
||||
}
|
||||
|
||||
public Long getApprovedBy()
|
||||
{
|
||||
return approvedBy;
|
||||
}
|
||||
public void setAppliedAt(Date appliedAt)
|
||||
{
|
||||
this.appliedAt = appliedAt;
|
||||
}
|
||||
|
||||
public Date getAppliedAt()
|
||||
{
|
||||
return appliedAt;
|
||||
}
|
||||
public void setReason(String reason)
|
||||
{
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public String getReason()
|
||||
{
|
||||
return reason;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("refundNo", getRefundNo())
|
||||
.append("orderId", getOrderId())
|
||||
.append("requestNo", getRequestNo())
|
||||
.append("requestHash", getRequestHash())
|
||||
.append("refundAmount", getRefundAmount())
|
||||
.append("supplierReverseAmount", getSupplierReverseAmount())
|
||||
.append("platformFeeReverseAmount", getPlatformFeeReverseAmount())
|
||||
.append("feeReturnTo", getFeeReturnTo())
|
||||
.append("status", getStatus())
|
||||
.append("createdBy", getCreatedBy())
|
||||
.append("approvedBy", getApprovedBy())
|
||||
.append("appliedAt", getAppliedAt())
|
||||
.append("reason", getReason())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,253 @@
|
||||
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;
|
||||
/**
|
||||
* 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史对象 rent_refund
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_refund")
|
||||
public class RentRefundPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** 平台全局唯一退款编号 */
|
||||
@Excel(name = "平台全局唯一退款编号")
|
||||
private String refundNo;
|
||||
/** rent_order.id,仅CHARGED且已确认收入的订单可退款;HELD订单用释放流程 */
|
||||
@Excel(name = "rent_order.id,仅CHARGED且已确认收入的订单可退款;HELD订单用释放流程")
|
||||
private Long orderId;
|
||||
/** 同订单退款请求幂等编号,调用方重试保持不变 */
|
||||
@Excel(name = "同订单退款请求幂等编号,调用方重试保持不变")
|
||||
private String requestNo;
|
||||
/** 规范化退款请求SHA256,同编号不同内容拒绝 */
|
||||
@Excel(name = "规范化退款请求SHA256,同编号不同内容拒绝")
|
||||
private String requestHash;
|
||||
/** 本次返还商户内部可用余额USDT,必须大于0,包含退商户的平台手续费部分 */
|
||||
@Excel(name = "本次返还商户内部可用余额USDT,必须大于0,包含退商户的平台手续费部分")
|
||||
private BigDecimal refundAmount;
|
||||
/** 本次冲正供应商原净应收USDT,累计不能超过订单supplier_net_amount */
|
||||
@Excel(name = "本次冲正供应商原净应收USDT,累计不能超过订单supplier_net_amount")
|
||||
private BigDecimal supplierReverseAmount;
|
||||
/** 本次退回平台手续费USDT,累计不能超过订单supplier_fee_amount */
|
||||
@Excel(name = "本次退回平台手续费USDT,累计不能超过订单supplier_fee_amount")
|
||||
private BigDecimal platformFeeReverseAmount;
|
||||
/** NONE无退费、MERCHANT已包含在refund_amount、SUPPLIER增加供应商待结算及订单返还累计;无自动推定 */
|
||||
@Excel(name = "NONE无退费、MERCHANT已包含在refund_amount、SUPPLIER增加供应商待结算及订单返还累计;无自动推定")
|
||||
private String feeReturnTo;
|
||||
/** PENDING待审核、APPLIED已同事务入账、REJECTED已拒绝;无外部退款中状态 */
|
||||
@Excel(name = "PENDING待审核、APPLIED已同事务入账、REJECTED已拒绝;无外部退款中状态")
|
||||
private String status;
|
||||
/** 发起sys_user.user_id */
|
||||
@Excel(name = "发起sys_user.user_id")
|
||||
private Long createdBy;
|
||||
/** 审批sys_user.user_id,必须与发起人不同 */
|
||||
@Excel(name = "审批sys_user.user_id,必须与发起人不同")
|
||||
private Long approvedBy;
|
||||
/** 余额、流水、订单累计、回调及审计原子提交UTC时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "余额、流水、订单累计、回调及审计原子提交UTC时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date appliedAt;
|
||||
/** 退款及费用承担审核依据,必填 */
|
||||
@Excel(name = "退款及费用承担审核依据,必填")
|
||||
private String reason;
|
||||
/** CAS乐观锁版本,更新须条件递增 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setRefundNo(String refundNo)
|
||||
{
|
||||
this.refundNo = refundNo;
|
||||
}
|
||||
|
||||
public String getRefundNo()
|
||||
{
|
||||
return refundNo;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setRequestNo(String requestNo)
|
||||
{
|
||||
this.requestNo = requestNo;
|
||||
}
|
||||
|
||||
public String getRequestNo()
|
||||
{
|
||||
return requestNo;
|
||||
}
|
||||
public void setRequestHash(String requestHash)
|
||||
{
|
||||
this.requestHash = requestHash;
|
||||
}
|
||||
|
||||
public String getRequestHash()
|
||||
{
|
||||
return requestHash;
|
||||
}
|
||||
public void setRefundAmount(BigDecimal refundAmount)
|
||||
{
|
||||
this.refundAmount = refundAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getRefundAmount()
|
||||
{
|
||||
return refundAmount;
|
||||
}
|
||||
public void setSupplierReverseAmount(BigDecimal supplierReverseAmount)
|
||||
{
|
||||
this.supplierReverseAmount = supplierReverseAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getSupplierReverseAmount()
|
||||
{
|
||||
return supplierReverseAmount;
|
||||
}
|
||||
public void setPlatformFeeReverseAmount(BigDecimal platformFeeReverseAmount)
|
||||
{
|
||||
this.platformFeeReverseAmount = platformFeeReverseAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getPlatformFeeReverseAmount()
|
||||
{
|
||||
return platformFeeReverseAmount;
|
||||
}
|
||||
public void setFeeReturnTo(String feeReturnTo)
|
||||
{
|
||||
this.feeReturnTo = feeReturnTo;
|
||||
}
|
||||
|
||||
public String getFeeReturnTo()
|
||||
{
|
||||
return feeReturnTo;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setCreatedBy(Long createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public Long getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
public void setApprovedBy(Long approvedBy)
|
||||
{
|
||||
this.approvedBy = approvedBy;
|
||||
}
|
||||
|
||||
public Long getApprovedBy()
|
||||
{
|
||||
return approvedBy;
|
||||
}
|
||||
public void setAppliedAt(Date appliedAt)
|
||||
{
|
||||
this.appliedAt = appliedAt;
|
||||
}
|
||||
|
||||
public Date getAppliedAt()
|
||||
{
|
||||
return appliedAt;
|
||||
}
|
||||
public void setReason(String reason)
|
||||
{
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public String getReason()
|
||||
{
|
||||
return reason;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("refundNo", getRefundNo())
|
||||
.append("orderId", getOrderId())
|
||||
.append("requestNo", getRequestNo())
|
||||
.append("requestHash", getRequestHash())
|
||||
.append("refundAmount", getRefundAmount())
|
||||
.append("supplierReverseAmount", getSupplierReverseAmount())
|
||||
.append("platformFeeReverseAmount", getPlatformFeeReverseAmount())
|
||||
.append("feeReturnTo", getFeeReturnTo())
|
||||
.append("status", getStatus())
|
||||
.append("createdBy", getCreatedBy())
|
||||
.append("approvedBy", getApprovedBy())
|
||||
.append("appliedAt", getAppliedAt())
|
||||
.append("reason", getReason())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
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;
|
||||
/**
|
||||
* 供应商人工结算单;不自动链上出金对象 rent_settlement
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentSettlement extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** 结算单号 */
|
||||
@Excel(name = "结算单号")
|
||||
private String settlementNo;
|
||||
|
||||
/** 供应商rent_account.id */
|
||||
@Excel(name = "供应商rent_account.id")
|
||||
private Long accountId;
|
||||
|
||||
/** 本次人工结算USDT总额,必须大于零 */
|
||||
@Excel(name = "本次人工结算USDT总额,必须大于零")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** PENDING待审、APPROVED待付款、PAYING已占用付款授权、PAID付款核验完成、REJECTED明确未付拒绝、UNKNOWN付款待核对 */
|
||||
@Excel(name = "PENDING待审、APPROVED待付款、PAYING已占用付款授权、PAID付款核验完成、REJECTED明确未付拒绝、UNKNOWN付款待核对")
|
||||
private String status;
|
||||
|
||||
/** 人工付款授权唯一编号;先同事务进入PAYING并持久化该编号再付款,重试查询原付款,不重新授权 */
|
||||
@Excel(name = "人工付款授权唯一编号;先同事务进入PAYING并持久化该编号再付款,重试查询原付款,不重新授权")
|
||||
private String payoutNo;
|
||||
|
||||
/** 进入PAYING的UTC时间;PAYING或UNKNOWN不能因超时释放来源 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "进入PAYING的UTC时间;PAYING或UNKNOWN不能因超时释放来源", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date paymentStartedAt;
|
||||
|
||||
/** 收款信息、唯一付款凭据和独立核对结果;没有确认不能记已付 */
|
||||
@Excel(name = "收款信息、唯一付款凭据和独立核对结果;没有确认不能记已付")
|
||||
private String paymentEvidence;
|
||||
|
||||
/** 唯一标准化付款凭据,例如network:txid:index,防重复登记 */
|
||||
@Excel(name = "唯一标准化付款凭据,例如network:txid:index,防重复登记")
|
||||
private String paymentReference;
|
||||
|
||||
/** 发起sys_user.user_id */
|
||||
@Excel(name = "发起sys_user.user_id")
|
||||
private Long createdBy;
|
||||
|
||||
/** 审批sys_user.user_id,职责分离 */
|
||||
@Excel(name = "审批sys_user.user_id,职责分离")
|
||||
private Long approvedBy;
|
||||
|
||||
/** 付款核验UTC时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "付款核验UTC时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date paidAt;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSettlementNo(String settlementNo)
|
||||
{
|
||||
this.settlementNo = settlementNo;
|
||||
}
|
||||
|
||||
public String getSettlementNo()
|
||||
{
|
||||
return settlementNo;
|
||||
}
|
||||
public void setAccountId(Long accountId)
|
||||
{
|
||||
this.accountId = accountId;
|
||||
}
|
||||
|
||||
public Long getAccountId()
|
||||
{
|
||||
return accountId;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setPayoutNo(String payoutNo)
|
||||
{
|
||||
this.payoutNo = payoutNo;
|
||||
}
|
||||
|
||||
public String getPayoutNo()
|
||||
{
|
||||
return payoutNo;
|
||||
}
|
||||
public void setPaymentStartedAt(Date paymentStartedAt)
|
||||
{
|
||||
this.paymentStartedAt = paymentStartedAt;
|
||||
}
|
||||
|
||||
public Date getPaymentStartedAt()
|
||||
{
|
||||
return paymentStartedAt;
|
||||
}
|
||||
public void setPaymentEvidence(String paymentEvidence)
|
||||
{
|
||||
this.paymentEvidence = paymentEvidence;
|
||||
}
|
||||
|
||||
public String getPaymentEvidence()
|
||||
{
|
||||
return paymentEvidence;
|
||||
}
|
||||
public void setPaymentReference(String paymentReference)
|
||||
{
|
||||
this.paymentReference = paymentReference;
|
||||
}
|
||||
|
||||
public String getPaymentReference()
|
||||
{
|
||||
return paymentReference;
|
||||
}
|
||||
public void setCreatedBy(Long createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public Long getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
public void setApprovedBy(Long approvedBy)
|
||||
{
|
||||
this.approvedBy = approvedBy;
|
||||
}
|
||||
|
||||
public Long getApprovedBy()
|
||||
{
|
||||
return approvedBy;
|
||||
}
|
||||
public void setPaidAt(Date paidAt)
|
||||
{
|
||||
this.paidAt = paidAt;
|
||||
}
|
||||
|
||||
public Date getPaidAt()
|
||||
{
|
||||
return paidAt;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("settlementNo", getSettlementNo())
|
||||
.append("accountId", getAccountId())
|
||||
.append("amount", getAmount())
|
||||
.append("status", getStatus())
|
||||
.append("payoutNo", getPayoutNo())
|
||||
.append("paymentStartedAt", getPaymentStartedAt())
|
||||
.append("paymentEvidence", getPaymentEvidence())
|
||||
.append("paymentReference", getPaymentReference())
|
||||
.append("createdBy", getCreatedBy())
|
||||
.append("approvedBy", getApprovedBy())
|
||||
.append("paidAt", getPaidAt())
|
||||
.append("remark", getRemark())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
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;
|
||||
/**
|
||||
* 供应商订单应收与结算关联;首版每单全额结算一次对象 rent_settlement_item
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentSettlementItem extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** rent_settlement.id */
|
||||
@Excel(name = "rent_settlement.id")
|
||||
private Long settlementId;
|
||||
|
||||
/** 已履约rent_order.id */
|
||||
@Excel(name = "已履约rent_order.id")
|
||||
private Long orderId;
|
||||
|
||||
/** 本单净可结算USDT=supplier_net_amount减supplier_reversed_amount加supplier_fee_returned_amount;手续费不重复扣 */
|
||||
@Excel(name = "本单净可结算USDT=supplier_net_amount减supplier_reversed_amount加supplier_fee_returned_amount;手续费不重复扣")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 占用或已支付为1;明确拒绝且未付款可置NULL,UNKNOWN不可释放 */
|
||||
@Excel(name = "占用或已支付为1;明确拒绝且未付款可置NULL,UNKNOWN不可释放")
|
||||
private Integer activeSlot;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSettlementId(Long settlementId)
|
||||
{
|
||||
this.settlementId = settlementId;
|
||||
}
|
||||
|
||||
public Long getSettlementId()
|
||||
{
|
||||
return settlementId;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setActiveSlot(Integer activeSlot)
|
||||
{
|
||||
this.activeSlot = activeSlot;
|
||||
}
|
||||
|
||||
public Integer getActiveSlot()
|
||||
{
|
||||
return activeSlot;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("settlementId", getSettlementId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("amount", getAmount())
|
||||
.append("activeSlot", getActiveSlot())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
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;
|
||||
/**
|
||||
* 供应商订单应收与结算关联;首版每单全额结算一次对象 rent_settlement_item
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_settlement_item")
|
||||
public class RentSettlementItemPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** rent_settlement.id */
|
||||
@Excel(name = "rent_settlement.id")
|
||||
private Long settlementId;
|
||||
/** 已履约rent_order.id */
|
||||
@Excel(name = "已履约rent_order.id")
|
||||
private Long orderId;
|
||||
/** 本单净可结算USDT=supplier_net_amount减supplier_reversed_amount加supplier_fee_returned_amount;手续费不重复扣 */
|
||||
@Excel(name = "本单净可结算USDT=supplier_net_amount减supplier_reversed_amount加supplier_fee_returned_amount;手续费不重复扣")
|
||||
private BigDecimal amount;
|
||||
/** 占用或已支付为1;明确拒绝且未付款可置NULL,UNKNOWN不可释放 */
|
||||
@Excel(name = "占用或已支付为1;明确拒绝且未付款可置NULL,UNKNOWN不可释放")
|
||||
private Integer activeSlot;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSettlementId(Long settlementId)
|
||||
{
|
||||
this.settlementId = settlementId;
|
||||
}
|
||||
|
||||
public Long getSettlementId()
|
||||
{
|
||||
return settlementId;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setActiveSlot(Integer activeSlot)
|
||||
{
|
||||
this.activeSlot = activeSlot;
|
||||
}
|
||||
|
||||
public Integer getActiveSlot()
|
||||
{
|
||||
return activeSlot;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("settlementId", getSettlementId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("amount", getAmount())
|
||||
.append("activeSlot", getActiveSlot())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
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;
|
||||
/**
|
||||
* 供应商人工结算单;不自动链上出金对象 rent_settlement
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_settlement")
|
||||
public class RentSettlementPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** 结算单号 */
|
||||
@Excel(name = "结算单号")
|
||||
private String settlementNo;
|
||||
/** 供应商rent_account.id */
|
||||
@Excel(name = "供应商rent_account.id")
|
||||
private Long accountId;
|
||||
/** 本次人工结算USDT总额,必须大于零 */
|
||||
@Excel(name = "本次人工结算USDT总额,必须大于零")
|
||||
private BigDecimal amount;
|
||||
/** PENDING待审、APPROVED待付款、PAYING已占用付款授权、PAID付款核验完成、REJECTED明确未付拒绝、UNKNOWN付款待核对 */
|
||||
@Excel(name = "PENDING待审、APPROVED待付款、PAYING已占用付款授权、PAID付款核验完成、REJECTED明确未付拒绝、UNKNOWN付款待核对")
|
||||
private String status;
|
||||
/** 人工付款授权唯一编号;先同事务进入PAYING并持久化该编号再付款,重试查询原付款,不重新授权 */
|
||||
@Excel(name = "人工付款授权唯一编号;先同事务进入PAYING并持久化该编号再付款,重试查询原付款,不重新授权")
|
||||
private String payoutNo;
|
||||
/** 进入PAYING的UTC时间;PAYING或UNKNOWN不能因超时释放来源 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "进入PAYING的UTC时间;PAYING或UNKNOWN不能因超时释放来源", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date paymentStartedAt;
|
||||
/** 收款信息、唯一付款凭据和独立核对结果;没有确认不能记已付 */
|
||||
@Excel(name = "收款信息、唯一付款凭据和独立核对结果;没有确认不能记已付")
|
||||
private String paymentEvidence;
|
||||
/** 唯一标准化付款凭据,例如network:txid:index,防重复登记 */
|
||||
@Excel(name = "唯一标准化付款凭据,例如network:txid:index,防重复登记")
|
||||
private String paymentReference;
|
||||
/** 发起sys_user.user_id */
|
||||
@Excel(name = "发起sys_user.user_id")
|
||||
private Long createdBy;
|
||||
/** 审批sys_user.user_id,职责分离 */
|
||||
@Excel(name = "审批sys_user.user_id,职责分离")
|
||||
private Long approvedBy;
|
||||
/** 付款核验UTC时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "付款核验UTC时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date paidAt;
|
||||
/** 审核说明 */
|
||||
@Excel(name = "审核说明")
|
||||
private String remark;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSettlementNo(String settlementNo)
|
||||
{
|
||||
this.settlementNo = settlementNo;
|
||||
}
|
||||
|
||||
public String getSettlementNo()
|
||||
{
|
||||
return settlementNo;
|
||||
}
|
||||
public void setAccountId(Long accountId)
|
||||
{
|
||||
this.accountId = accountId;
|
||||
}
|
||||
|
||||
public Long getAccountId()
|
||||
{
|
||||
return accountId;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setPayoutNo(String payoutNo)
|
||||
{
|
||||
this.payoutNo = payoutNo;
|
||||
}
|
||||
|
||||
public String getPayoutNo()
|
||||
{
|
||||
return payoutNo;
|
||||
}
|
||||
public void setPaymentStartedAt(Date paymentStartedAt)
|
||||
{
|
||||
this.paymentStartedAt = paymentStartedAt;
|
||||
}
|
||||
|
||||
public Date getPaymentStartedAt()
|
||||
{
|
||||
return paymentStartedAt;
|
||||
}
|
||||
public void setPaymentEvidence(String paymentEvidence)
|
||||
{
|
||||
this.paymentEvidence = paymentEvidence;
|
||||
}
|
||||
|
||||
public String getPaymentEvidence()
|
||||
{
|
||||
return paymentEvidence;
|
||||
}
|
||||
public void setPaymentReference(String paymentReference)
|
||||
{
|
||||
this.paymentReference = paymentReference;
|
||||
}
|
||||
|
||||
public String getPaymentReference()
|
||||
{
|
||||
return paymentReference;
|
||||
}
|
||||
public void setCreatedBy(Long createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public Long getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
public void setApprovedBy(Long approvedBy)
|
||||
{
|
||||
this.approvedBy = approvedBy;
|
||||
}
|
||||
|
||||
public Long getApprovedBy()
|
||||
{
|
||||
return approvedBy;
|
||||
}
|
||||
public void setPaidAt(Date paidAt)
|
||||
{
|
||||
this.paidAt = paidAt;
|
||||
}
|
||||
|
||||
public Date getPaidAt()
|
||||
{
|
||||
return paidAt;
|
||||
}
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("settlementNo", getSettlementNo())
|
||||
.append("accountId", getAccountId())
|
||||
.append("amount", getAmount())
|
||||
.append("status", getStatus())
|
||||
.append("payoutNo", getPayoutNo())
|
||||
.append("paymentStartedAt", getPaymentStartedAt())
|
||||
.append("paymentEvidence", getPaymentEvidence())
|
||||
.append("paymentReference", getPaymentReference())
|
||||
.append("createdBy", getCreatedBy())
|
||||
.append("approvedBy", getApprovedBy())
|
||||
.append("paidAt", getPaidAt())
|
||||
.append("remark", getRemark())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,623 @@
|
||||
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;
|
||||
/**
|
||||
* 委托或回收任务,兼作持久队列与资源预留明细对象 rent_task
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentTask extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** 任务编号 */
|
||||
@Excel(name = "任务编号")
|
||||
private String taskNo;
|
||||
|
||||
/** rent_order.id */
|
||||
@Excel(name = "rent_order.id")
|
||||
private Long orderId;
|
||||
|
||||
/** rent_wallet.id */
|
||||
@Excel(name = "rent_wallet.id")
|
||||
private Long walletId;
|
||||
|
||||
/** rent_node.id */
|
||||
@Excel(name = "rent_node.id")
|
||||
private Long nodeId;
|
||||
|
||||
/** 与订单钱包及实际链上交易一致的网络,纳入HMAC */
|
||||
@Excel(name = "与订单钱包及实际链上交易一致的网络,纳入HMAC")
|
||||
private String network;
|
||||
|
||||
/** RECLAIM必须指向原已确认DELEGATE的rent_transaction.id;DELEGATE为空,不允许回收任务引用回收交易 */
|
||||
@Excel(name = "RECLAIM必须指向原已确认DELEGATE的rent_transaction.id;DELEGATE为空,不允许回收任务引用回收交易")
|
||||
private Long sourceTransactionId;
|
||||
|
||||
/** 同钱包同资源类型最多一个在途链上操作;未知保留1,终结且写入快照屏障后置NULL;与订单地址对占位独立 */
|
||||
@Excel(name = "同钱包同资源类型最多一个在途链上操作;未知保留1,终结且写入快照屏障后置NULL;与订单地址对占位独立")
|
||||
private Integer walletExecutionSlot;
|
||||
|
||||
/** DELEGATE委托、RECLAIM回收,不支持转账 */
|
||||
@Excel(name = "DELEGATE委托、RECLAIM回收,不支持转账")
|
||||
private String taskType;
|
||||
|
||||
/** 资源类型:ENERGY或BANDWIDTH,必须与订单及链上交易一致并纳入HMAC */
|
||||
@Excel(name = "资源类型:ENERGY或BANDWIDTH,必须与订单及链上交易一致并纳入HMAC")
|
||||
private String resourceType;
|
||||
|
||||
/** 本任务资源数量快照:ENERGY单位Energy、BANDWIDTH单位bytes,不得跨类型换算 */
|
||||
@Excel(name = "本任务资源数量快照:ENERGY单位Energy、BANDWIDTH单位bytes,不得跨类型换算")
|
||||
private Long resourceQuantity;
|
||||
|
||||
/** 原订单含冗余目标快照;委托必须覆盖该量,回收任务仅用于追溯原委托目标 */
|
||||
@Excel(name = "原订单含冗余目标快照;委托必须覆盖该量,回收任务仅用于追溯原委托目标")
|
||||
private Long targetResourceQuantity;
|
||||
|
||||
/** 换算时该资源全网总额度:ENERGY为Energy,BANDWIDTH为质押带宽bytes,必须大于0 */
|
||||
@Excel(name = "换算时该资源全网总额度:ENERGY为Energy,BANDWIDTH为质押带宽bytes,必须大于0")
|
||||
private Long conversionTotalLimit;
|
||||
|
||||
/** 换算时该资源全网总权重,单位为协议TRX权重,不能当作SUN;必须大于0 */
|
||||
@Excel(name = "换算时该资源全网总权重,单位为协议TRX权重,不能当作SUN;必须大于0")
|
||||
private Long conversionTotalWeight;
|
||||
|
||||
/** 可信换算查询对应区块高度,结合时间检查快照有效期 */
|
||||
@Excel(name = "可信换算查询对应区块高度,结合时间检查快照有效期")
|
||||
private Long conversionBlockHeight;
|
||||
|
||||
/** 本次换算参数查询UTC时间,Agent签名前必须重新检查参数及额度 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "本次换算参数查询UTC时间,Agent签名前必须重新检查参数及额度", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date conversionAt;
|
||||
|
||||
/** 按本次换算参数和delegate_sun向下计算的资源量,委托任务必须不小于target_resource_quantity */
|
||||
@Excel(name = "按本次换算参数和delegate_sun向下计算的资源量,委托任务必须不小于target_resource_quantity")
|
||||
private Long estimatedResourceQuantity;
|
||||
|
||||
/** 同订单同类型的尝试序号 */
|
||||
@Excel(name = "同订单同类型的尝试序号")
|
||||
private Long attemptNo;
|
||||
|
||||
/** 有效或已成功取1,仅明确未执行失败可置NULL;UNKNOWN不得释放 */
|
||||
@Excel(name = "有效或已成功取1,仅明确未执行失败可置NULL;UNKNOWN不得释放")
|
||||
private Integer activeSlot;
|
||||
|
||||
/** 委托本金SUN=ceil(目标资源量乘全网权重除全网额度)乘1000000,TRX向上取整;回收取原确认本金,禁止重新按资源量换算 */
|
||||
@Excel(name = "委托本金SUN=ceil(目标资源量乘全网权重除全网额度)乘1000000,TRX向上取整;回收取原确认本金,禁止重新按资源量换算")
|
||||
private Long delegateSun;
|
||||
|
||||
/** 本地操作费用预算SUN;按当前网络费用、签名权限及资源评估,不作为协议fee_limit硬上限 */
|
||||
@Excel(name = "本地操作费用预算SUN;按当前网络费用、签名权限及资源评估,不作为协议fee_limit硬上限")
|
||||
private Long feeLimitSun;
|
||||
|
||||
/** 目标节点rent_credential.id */
|
||||
@Excel(name = "目标节点rent_credential.id")
|
||||
private Long credentialId;
|
||||
|
||||
/** 任务防重放随机数 */
|
||||
@Excel(name = "任务防重放随机数")
|
||||
private String nonce;
|
||||
|
||||
/** HMAC签发UTC时间,按Unix毫秒参与签名 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "HMAC签发UTC时间,按Unix毫秒参与签名", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date signedAt;
|
||||
|
||||
/** 允许新签名及新广播截止UTC时间;委托不晚于订单dispatch_deadline,回收使用独立有效期;过期仍允许原交易核对 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "允许新签名及新广播截止UTC时间;委托不晚于订单dispatch_deadline,回收使用独立有效期;过期仍允许原交易核对", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deadline;
|
||||
|
||||
/** RENT_TASK_V2冻结意图:网络、类型、请求及目标、换算证据、精确本金SUN、owner/receiver、非锁定、预算、期限、节点、原委托来源及txId,全部纳入HMAC且与标量字段一致 */
|
||||
@Excel(name = "RENT_TASK_V2冻结意图:网络、类型、请求及目标、换算证据、精确本金SUN、owner/receiver、非锁定、预算、期限、节点、原委托来源及txId,全部纳入HMAC且与标量字段一致")
|
||||
private String intent;
|
||||
|
||||
/** TASK域的HMAC-SHA256小写十六进制,不含自身 */
|
||||
@Excel(name = "TASK域的HMAC-SHA256小写十六进制,不含自身")
|
||||
private String signature;
|
||||
|
||||
/** PENDING待接单、ACCEPTED接受、BROADCASTED已广播、VERIFIED核验成功、REJECTED明确未执行拒绝、FAILED明确失败、UNKNOWN未知 */
|
||||
@Excel(name = "PENDING待接单、ACCEPTED接受、BROADCASTED已广播、VERIFIED核验成功、REJECTED明确未执行拒绝、FAILED明确失败、UNKNOWN未知")
|
||||
private String status;
|
||||
|
||||
/** 委托资源占用HELD、COMMITTED、RELEASED;未知委托保持HELD;回收任务固定NONE,不新增可委托本金预留 */
|
||||
@Excel(name = "委托资源占用HELD、COMMITTED、RELEASED;未知委托保持HELD;回收任务固定NONE,不新增可委托本金预留")
|
||||
private String reservationStatus;
|
||||
|
||||
/** 云端worker抢占标识,非节点身份 */
|
||||
@Excel(name = "云端worker抢占标识,非节点身份")
|
||||
private String leaseOwner;
|
||||
|
||||
/** worker租约截止,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "worker租约截止,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date leaseUntil;
|
||||
|
||||
/** 节点接受时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "节点接受时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date acceptedAt;
|
||||
|
||||
/** 本逻辑任务推送的稳定消息编号,重发保持不变;仅新业务任务使用新编号 */
|
||||
@Excel(name = "本逻辑任务推送的稳定消息编号,重发保持不变;仅新业务任务使用新编号")
|
||||
private String deliveryMessageId;
|
||||
|
||||
/** 最近推送所用节点会话代次,重连重新投递时更新;不修改原任务签名意图 */
|
||||
@Excel(name = "最近推送所用节点会话代次,重连重新投递时更新;不修改原任务签名意图")
|
||||
private Long deliverySessionEpoch;
|
||||
|
||||
/** Socket任务发送次数,仅表示投递尝试,不是链上执行次数 */
|
||||
@Excel(name = "Socket任务发送次数,仅表示投递尝试,不是链上执行次数")
|
||||
private Long deliveryCount;
|
||||
|
||||
/** 最近一次向节点写入任务帧的UTC时间,不代表对端已持久化 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "最近一次向节点写入任务帧的UTC时间,不代表对端已持久化", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date lastSentAt;
|
||||
|
||||
/** 节点本地持久化任务后返回接收ACK的云端UTC时间,不代表接受、广播或执行成功 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "节点本地持久化任务后返回接收ACK的云端UTC时间,不代表接受、广播或执行成功", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deliveryAckedAt;
|
||||
|
||||
/** 下次处理时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下次处理时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date nextCheckAt;
|
||||
|
||||
/** 脱敏原因 */
|
||||
@Excel(name = "脱敏原因")
|
||||
private String error;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTaskNo(String taskNo)
|
||||
{
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public String getTaskNo()
|
||||
{
|
||||
return taskNo;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setWalletId(Long walletId)
|
||||
{
|
||||
this.walletId = walletId;
|
||||
}
|
||||
|
||||
public Long getWalletId()
|
||||
{
|
||||
return walletId;
|
||||
}
|
||||
public void setNodeId(Long nodeId)
|
||||
{
|
||||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public Long getNodeId()
|
||||
{
|
||||
return nodeId;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setSourceTransactionId(Long sourceTransactionId)
|
||||
{
|
||||
this.sourceTransactionId = sourceTransactionId;
|
||||
}
|
||||
|
||||
public Long getSourceTransactionId()
|
||||
{
|
||||
return sourceTransactionId;
|
||||
}
|
||||
public void setWalletExecutionSlot(Integer walletExecutionSlot)
|
||||
{
|
||||
this.walletExecutionSlot = walletExecutionSlot;
|
||||
}
|
||||
|
||||
public Integer getWalletExecutionSlot()
|
||||
{
|
||||
return walletExecutionSlot;
|
||||
}
|
||||
public void setTaskType(String taskType)
|
||||
{
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public String getTaskType()
|
||||
{
|
||||
return taskType;
|
||||
}
|
||||
public void setResourceType(String resourceType)
|
||||
{
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceType()
|
||||
{
|
||||
return resourceType;
|
||||
}
|
||||
public void setResourceQuantity(Long resourceQuantity)
|
||||
{
|
||||
this.resourceQuantity = resourceQuantity;
|
||||
}
|
||||
|
||||
public Long getResourceQuantity()
|
||||
{
|
||||
return resourceQuantity;
|
||||
}
|
||||
public void setTargetResourceQuantity(Long targetResourceQuantity)
|
||||
{
|
||||
this.targetResourceQuantity = targetResourceQuantity;
|
||||
}
|
||||
|
||||
public Long getTargetResourceQuantity()
|
||||
{
|
||||
return targetResourceQuantity;
|
||||
}
|
||||
public void setConversionTotalLimit(Long conversionTotalLimit)
|
||||
{
|
||||
this.conversionTotalLimit = conversionTotalLimit;
|
||||
}
|
||||
|
||||
public Long getConversionTotalLimit()
|
||||
{
|
||||
return conversionTotalLimit;
|
||||
}
|
||||
public void setConversionTotalWeight(Long conversionTotalWeight)
|
||||
{
|
||||
this.conversionTotalWeight = conversionTotalWeight;
|
||||
}
|
||||
|
||||
public Long getConversionTotalWeight()
|
||||
{
|
||||
return conversionTotalWeight;
|
||||
}
|
||||
public void setConversionBlockHeight(Long conversionBlockHeight)
|
||||
{
|
||||
this.conversionBlockHeight = conversionBlockHeight;
|
||||
}
|
||||
|
||||
public Long getConversionBlockHeight()
|
||||
{
|
||||
return conversionBlockHeight;
|
||||
}
|
||||
public void setConversionAt(Date conversionAt)
|
||||
{
|
||||
this.conversionAt = conversionAt;
|
||||
}
|
||||
|
||||
public Date getConversionAt()
|
||||
{
|
||||
return conversionAt;
|
||||
}
|
||||
public void setEstimatedResourceQuantity(Long estimatedResourceQuantity)
|
||||
{
|
||||
this.estimatedResourceQuantity = estimatedResourceQuantity;
|
||||
}
|
||||
|
||||
public Long getEstimatedResourceQuantity()
|
||||
{
|
||||
return estimatedResourceQuantity;
|
||||
}
|
||||
public void setAttemptNo(Long attemptNo)
|
||||
{
|
||||
this.attemptNo = attemptNo;
|
||||
}
|
||||
|
||||
public Long getAttemptNo()
|
||||
{
|
||||
return attemptNo;
|
||||
}
|
||||
public void setActiveSlot(Integer activeSlot)
|
||||
{
|
||||
this.activeSlot = activeSlot;
|
||||
}
|
||||
|
||||
public Integer getActiveSlot()
|
||||
{
|
||||
return activeSlot;
|
||||
}
|
||||
public void setDelegateSun(Long delegateSun)
|
||||
{
|
||||
this.delegateSun = delegateSun;
|
||||
}
|
||||
|
||||
public Long getDelegateSun()
|
||||
{
|
||||
return delegateSun;
|
||||
}
|
||||
public void setFeeLimitSun(Long feeLimitSun)
|
||||
{
|
||||
this.feeLimitSun = feeLimitSun;
|
||||
}
|
||||
|
||||
public Long getFeeLimitSun()
|
||||
{
|
||||
return feeLimitSun;
|
||||
}
|
||||
public void setCredentialId(Long credentialId)
|
||||
{
|
||||
this.credentialId = credentialId;
|
||||
}
|
||||
|
||||
public Long getCredentialId()
|
||||
{
|
||||
return credentialId;
|
||||
}
|
||||
public void setNonce(String nonce)
|
||||
{
|
||||
this.nonce = nonce;
|
||||
}
|
||||
|
||||
public String getNonce()
|
||||
{
|
||||
return nonce;
|
||||
}
|
||||
public void setSignedAt(Date signedAt)
|
||||
{
|
||||
this.signedAt = signedAt;
|
||||
}
|
||||
|
||||
public Date getSignedAt()
|
||||
{
|
||||
return signedAt;
|
||||
}
|
||||
public void setDeadline(Date deadline)
|
||||
{
|
||||
this.deadline = deadline;
|
||||
}
|
||||
|
||||
public Date getDeadline()
|
||||
{
|
||||
return deadline;
|
||||
}
|
||||
public void setIntent(String intent)
|
||||
{
|
||||
this.intent = intent;
|
||||
}
|
||||
|
||||
public String getIntent()
|
||||
{
|
||||
return intent;
|
||||
}
|
||||
public void setSignature(String signature)
|
||||
{
|
||||
this.signature = signature;
|
||||
}
|
||||
|
||||
public String getSignature()
|
||||
{
|
||||
return signature;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setReservationStatus(String reservationStatus)
|
||||
{
|
||||
this.reservationStatus = reservationStatus;
|
||||
}
|
||||
|
||||
public String getReservationStatus()
|
||||
{
|
||||
return reservationStatus;
|
||||
}
|
||||
public void setLeaseOwner(String leaseOwner)
|
||||
{
|
||||
this.leaseOwner = leaseOwner;
|
||||
}
|
||||
|
||||
public String getLeaseOwner()
|
||||
{
|
||||
return leaseOwner;
|
||||
}
|
||||
public void setLeaseUntil(Date leaseUntil)
|
||||
{
|
||||
this.leaseUntil = leaseUntil;
|
||||
}
|
||||
|
||||
public Date getLeaseUntil()
|
||||
{
|
||||
return leaseUntil;
|
||||
}
|
||||
public void setAcceptedAt(Date acceptedAt)
|
||||
{
|
||||
this.acceptedAt = acceptedAt;
|
||||
}
|
||||
|
||||
public Date getAcceptedAt()
|
||||
{
|
||||
return acceptedAt;
|
||||
}
|
||||
public void setDeliveryMessageId(String deliveryMessageId)
|
||||
{
|
||||
this.deliveryMessageId = deliveryMessageId;
|
||||
}
|
||||
|
||||
public String getDeliveryMessageId()
|
||||
{
|
||||
return deliveryMessageId;
|
||||
}
|
||||
public void setDeliverySessionEpoch(Long deliverySessionEpoch)
|
||||
{
|
||||
this.deliverySessionEpoch = deliverySessionEpoch;
|
||||
}
|
||||
|
||||
public Long getDeliverySessionEpoch()
|
||||
{
|
||||
return deliverySessionEpoch;
|
||||
}
|
||||
public void setDeliveryCount(Long deliveryCount)
|
||||
{
|
||||
this.deliveryCount = deliveryCount;
|
||||
}
|
||||
|
||||
public Long getDeliveryCount()
|
||||
{
|
||||
return deliveryCount;
|
||||
}
|
||||
public void setLastSentAt(Date lastSentAt)
|
||||
{
|
||||
this.lastSentAt = lastSentAt;
|
||||
}
|
||||
|
||||
public Date getLastSentAt()
|
||||
{
|
||||
return lastSentAt;
|
||||
}
|
||||
public void setDeliveryAckedAt(Date deliveryAckedAt)
|
||||
{
|
||||
this.deliveryAckedAt = deliveryAckedAt;
|
||||
}
|
||||
|
||||
public Date getDeliveryAckedAt()
|
||||
{
|
||||
return deliveryAckedAt;
|
||||
}
|
||||
public void setNextCheckAt(Date nextCheckAt)
|
||||
{
|
||||
this.nextCheckAt = nextCheckAt;
|
||||
}
|
||||
|
||||
public Date getNextCheckAt()
|
||||
{
|
||||
return nextCheckAt;
|
||||
}
|
||||
public void setError(String error)
|
||||
{
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public String getError()
|
||||
{
|
||||
return error;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("taskNo", getTaskNo())
|
||||
.append("orderId", getOrderId())
|
||||
.append("walletId", getWalletId())
|
||||
.append("nodeId", getNodeId())
|
||||
.append("network", getNetwork())
|
||||
.append("sourceTransactionId", getSourceTransactionId())
|
||||
.append("walletExecutionSlot", getWalletExecutionSlot())
|
||||
.append("taskType", getTaskType())
|
||||
.append("resourceType", getResourceType())
|
||||
.append("resourceQuantity", getResourceQuantity())
|
||||
.append("targetResourceQuantity", getTargetResourceQuantity())
|
||||
.append("conversionTotalLimit", getConversionTotalLimit())
|
||||
.append("conversionTotalWeight", getConversionTotalWeight())
|
||||
.append("conversionBlockHeight", getConversionBlockHeight())
|
||||
.append("conversionAt", getConversionAt())
|
||||
.append("estimatedResourceQuantity", getEstimatedResourceQuantity())
|
||||
.append("attemptNo", getAttemptNo())
|
||||
.append("activeSlot", getActiveSlot())
|
||||
.append("delegateSun", getDelegateSun())
|
||||
.append("feeLimitSun", getFeeLimitSun())
|
||||
.append("credentialId", getCredentialId())
|
||||
.append("nonce", getNonce())
|
||||
.append("signedAt", getSignedAt())
|
||||
.append("deadline", getDeadline())
|
||||
.append("intent", getIntent())
|
||||
.append("signature", getSignature())
|
||||
.append("status", getStatus())
|
||||
.append("reservationStatus", getReservationStatus())
|
||||
.append("leaseOwner", getLeaseOwner())
|
||||
.append("leaseUntil", getLeaseUntil())
|
||||
.append("acceptedAt", getAcceptedAt())
|
||||
.append("deliveryMessageId", getDeliveryMessageId())
|
||||
.append("deliverySessionEpoch", getDeliverySessionEpoch())
|
||||
.append("deliveryCount", getDeliveryCount())
|
||||
.append("lastSentAt", getLastSentAt())
|
||||
.append("deliveryAckedAt", getDeliveryAckedAt())
|
||||
.append("nextCheckAt", getNextCheckAt())
|
||||
.append("error", getError())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,584 @@
|
||||
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;
|
||||
/**
|
||||
* 委托或回收任务,兼作持久队列与资源预留明细对象 rent_task
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_task")
|
||||
public class RentTaskPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** 任务编号 */
|
||||
@Excel(name = "任务编号")
|
||||
private String taskNo;
|
||||
/** rent_order.id */
|
||||
@Excel(name = "rent_order.id")
|
||||
private Long orderId;
|
||||
/** rent_wallet.id */
|
||||
@Excel(name = "rent_wallet.id")
|
||||
private Long walletId;
|
||||
/** rent_node.id */
|
||||
@Excel(name = "rent_node.id")
|
||||
private Long nodeId;
|
||||
/** 与订单钱包及实际链上交易一致的网络,纳入HMAC */
|
||||
@Excel(name = "与订单钱包及实际链上交易一致的网络,纳入HMAC")
|
||||
private String network;
|
||||
/** RECLAIM必须指向原已确认DELEGATE的rent_transaction.id;DELEGATE为空,不允许回收任务引用回收交易 */
|
||||
@Excel(name = "RECLAIM必须指向原已确认DELEGATE的rent_transaction.id;DELEGATE为空,不允许回收任务引用回收交易")
|
||||
private Long sourceTransactionId;
|
||||
/** 同钱包同资源类型最多一个在途链上操作;未知保留1,终结且写入快照屏障后置NULL;与订单地址对占位独立 */
|
||||
@Excel(name = "同钱包同资源类型最多一个在途链上操作;未知保留1,终结且写入快照屏障后置NULL;与订单地址对占位独立")
|
||||
private Integer walletExecutionSlot;
|
||||
/** DELEGATE委托、RECLAIM回收,不支持转账 */
|
||||
@Excel(name = "DELEGATE委托、RECLAIM回收,不支持转账")
|
||||
private String taskType;
|
||||
/** 资源类型:ENERGY或BANDWIDTH,必须与订单及链上交易一致并纳入HMAC */
|
||||
@Excel(name = "资源类型:ENERGY或BANDWIDTH,必须与订单及链上交易一致并纳入HMAC")
|
||||
private String resourceType;
|
||||
/** 本任务资源数量快照:ENERGY单位Energy、BANDWIDTH单位bytes,不得跨类型换算 */
|
||||
@Excel(name = "本任务资源数量快照:ENERGY单位Energy、BANDWIDTH单位bytes,不得跨类型换算")
|
||||
private Long resourceQuantity;
|
||||
/** 原订单含冗余目标快照;委托必须覆盖该量,回收任务仅用于追溯原委托目标 */
|
||||
@Excel(name = "原订单含冗余目标快照;委托必须覆盖该量,回收任务仅用于追溯原委托目标")
|
||||
private Long targetResourceQuantity;
|
||||
/** 换算时该资源全网总额度:ENERGY为Energy,BANDWIDTH为质押带宽bytes,必须大于0 */
|
||||
@Excel(name = "换算时该资源全网总额度:ENERGY为Energy,BANDWIDTH为质押带宽bytes,必须大于0")
|
||||
private Long conversionTotalLimit;
|
||||
/** 换算时该资源全网总权重,单位为协议TRX权重,不能当作SUN;必须大于0 */
|
||||
@Excel(name = "换算时该资源全网总权重,单位为协议TRX权重,不能当作SUN;必须大于0")
|
||||
private Long conversionTotalWeight;
|
||||
/** 可信换算查询对应区块高度,结合时间检查快照有效期 */
|
||||
@Excel(name = "可信换算查询对应区块高度,结合时间检查快照有效期")
|
||||
private Long conversionBlockHeight;
|
||||
/** 本次换算参数查询UTC时间,Agent签名前必须重新检查参数及额度 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "本次换算参数查询UTC时间,Agent签名前必须重新检查参数及额度", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date conversionAt;
|
||||
/** 按本次换算参数和delegate_sun向下计算的资源量,委托任务必须不小于target_resource_quantity */
|
||||
@Excel(name = "按本次换算参数和delegate_sun向下计算的资源量,委托任务必须不小于target_resource_quantity")
|
||||
private Long estimatedResourceQuantity;
|
||||
/** 同订单同类型的尝试序号 */
|
||||
@Excel(name = "同订单同类型的尝试序号")
|
||||
private Long attemptNo;
|
||||
/** 有效或已成功取1,仅明确未执行失败可置NULL;UNKNOWN不得释放 */
|
||||
@Excel(name = "有效或已成功取1,仅明确未执行失败可置NULL;UNKNOWN不得释放")
|
||||
private Integer activeSlot;
|
||||
/** 委托本金SUN=ceil(目标资源量乘全网权重除全网额度)乘1000000,TRX向上取整;回收取原确认本金,禁止重新按资源量换算 */
|
||||
@Excel(name = "委托本金SUN=ceil(目标资源量乘全网权重除全网额度)乘1000000,TRX向上取整;回收取原确认本金,禁止重新按资源量换算")
|
||||
private Long delegateSun;
|
||||
/** 本地操作费用预算SUN;按当前网络费用、签名权限及资源评估,不作为协议fee_limit硬上限 */
|
||||
@Excel(name = "本地操作费用预算SUN;按当前网络费用、签名权限及资源评估,不作为协议fee_limit硬上限")
|
||||
private Long feeLimitSun;
|
||||
/** 目标节点rent_credential.id */
|
||||
@Excel(name = "目标节点rent_credential.id")
|
||||
private Long credentialId;
|
||||
/** 任务防重放随机数 */
|
||||
@Excel(name = "任务防重放随机数")
|
||||
private String nonce;
|
||||
/** HMAC签发UTC时间,按Unix毫秒参与签名 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "HMAC签发UTC时间,按Unix毫秒参与签名", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date signedAt;
|
||||
/** 允许新签名及新广播截止UTC时间;委托不晚于订单dispatch_deadline,回收使用独立有效期;过期仍允许原交易核对 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "允许新签名及新广播截止UTC时间;委托不晚于订单dispatch_deadline,回收使用独立有效期;过期仍允许原交易核对", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deadline;
|
||||
/** RENT_TASK_V2冻结意图:网络、类型、请求及目标、换算证据、精确本金SUN、owner/receiver、非锁定、预算、期限、节点、原委托来源及txId,全部纳入HMAC且与标量字段一致 */
|
||||
@Excel(name = "RENT_TASK_V2冻结意图:网络、类型、请求及目标、换算证据、精确本金SUN、owner/receiver、非锁定、预算、期限、节点、原委托来源及txId,全部纳入HMAC且与标量字段一致")
|
||||
private String intent;
|
||||
/** TASK域的HMAC-SHA256小写十六进制,不含自身 */
|
||||
@Excel(name = "TASK域的HMAC-SHA256小写十六进制,不含自身")
|
||||
private String signature;
|
||||
/** PENDING待接单、ACCEPTED接受、BROADCASTED已广播、VERIFIED核验成功、REJECTED明确未执行拒绝、FAILED明确失败、UNKNOWN未知 */
|
||||
@Excel(name = "PENDING待接单、ACCEPTED接受、BROADCASTED已广播、VERIFIED核验成功、REJECTED明确未执行拒绝、FAILED明确失败、UNKNOWN未知")
|
||||
private String status;
|
||||
/** 委托资源占用HELD、COMMITTED、RELEASED;未知委托保持HELD;回收任务固定NONE,不新增可委托本金预留 */
|
||||
@Excel(name = "委托资源占用HELD、COMMITTED、RELEASED;未知委托保持HELD;回收任务固定NONE,不新增可委托本金预留")
|
||||
private String reservationStatus;
|
||||
/** 云端worker抢占标识,非节点身份 */
|
||||
@Excel(name = "云端worker抢占标识,非节点身份")
|
||||
private String leaseOwner;
|
||||
/** worker租约截止,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "worker租约截止,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date leaseUntil;
|
||||
/** 节点接受时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "节点接受时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date acceptedAt;
|
||||
/** 本逻辑任务推送的稳定消息编号,重发保持不变;仅新业务任务使用新编号 */
|
||||
@Excel(name = "本逻辑任务推送的稳定消息编号,重发保持不变;仅新业务任务使用新编号")
|
||||
private String deliveryMessageId;
|
||||
/** 最近推送所用节点会话代次,重连重新投递时更新;不修改原任务签名意图 */
|
||||
@Excel(name = "最近推送所用节点会话代次,重连重新投递时更新;不修改原任务签名意图")
|
||||
private Long deliverySessionEpoch;
|
||||
/** Socket任务发送次数,仅表示投递尝试,不是链上执行次数 */
|
||||
@Excel(name = "Socket任务发送次数,仅表示投递尝试,不是链上执行次数")
|
||||
private Long deliveryCount;
|
||||
/** 最近一次向节点写入任务帧的UTC时间,不代表对端已持久化 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "最近一次向节点写入任务帧的UTC时间,不代表对端已持久化", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date lastSentAt;
|
||||
/** 节点本地持久化任务后返回接收ACK的云端UTC时间,不代表接受、广播或执行成功 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "节点本地持久化任务后返回接收ACK的云端UTC时间,不代表接受、广播或执行成功", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deliveryAckedAt;
|
||||
/** 下次处理时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下次处理时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date nextCheckAt;
|
||||
/** 脱敏原因 */
|
||||
@Excel(name = "脱敏原因")
|
||||
private String error;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTaskNo(String taskNo)
|
||||
{
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public String getTaskNo()
|
||||
{
|
||||
return taskNo;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setWalletId(Long walletId)
|
||||
{
|
||||
this.walletId = walletId;
|
||||
}
|
||||
|
||||
public Long getWalletId()
|
||||
{
|
||||
return walletId;
|
||||
}
|
||||
public void setNodeId(Long nodeId)
|
||||
{
|
||||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public Long getNodeId()
|
||||
{
|
||||
return nodeId;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setSourceTransactionId(Long sourceTransactionId)
|
||||
{
|
||||
this.sourceTransactionId = sourceTransactionId;
|
||||
}
|
||||
|
||||
public Long getSourceTransactionId()
|
||||
{
|
||||
return sourceTransactionId;
|
||||
}
|
||||
public void setWalletExecutionSlot(Integer walletExecutionSlot)
|
||||
{
|
||||
this.walletExecutionSlot = walletExecutionSlot;
|
||||
}
|
||||
|
||||
public Integer getWalletExecutionSlot()
|
||||
{
|
||||
return walletExecutionSlot;
|
||||
}
|
||||
public void setTaskType(String taskType)
|
||||
{
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public String getTaskType()
|
||||
{
|
||||
return taskType;
|
||||
}
|
||||
public void setResourceType(String resourceType)
|
||||
{
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceType()
|
||||
{
|
||||
return resourceType;
|
||||
}
|
||||
public void setResourceQuantity(Long resourceQuantity)
|
||||
{
|
||||
this.resourceQuantity = resourceQuantity;
|
||||
}
|
||||
|
||||
public Long getResourceQuantity()
|
||||
{
|
||||
return resourceQuantity;
|
||||
}
|
||||
public void setTargetResourceQuantity(Long targetResourceQuantity)
|
||||
{
|
||||
this.targetResourceQuantity = targetResourceQuantity;
|
||||
}
|
||||
|
||||
public Long getTargetResourceQuantity()
|
||||
{
|
||||
return targetResourceQuantity;
|
||||
}
|
||||
public void setConversionTotalLimit(Long conversionTotalLimit)
|
||||
{
|
||||
this.conversionTotalLimit = conversionTotalLimit;
|
||||
}
|
||||
|
||||
public Long getConversionTotalLimit()
|
||||
{
|
||||
return conversionTotalLimit;
|
||||
}
|
||||
public void setConversionTotalWeight(Long conversionTotalWeight)
|
||||
{
|
||||
this.conversionTotalWeight = conversionTotalWeight;
|
||||
}
|
||||
|
||||
public Long getConversionTotalWeight()
|
||||
{
|
||||
return conversionTotalWeight;
|
||||
}
|
||||
public void setConversionBlockHeight(Long conversionBlockHeight)
|
||||
{
|
||||
this.conversionBlockHeight = conversionBlockHeight;
|
||||
}
|
||||
|
||||
public Long getConversionBlockHeight()
|
||||
{
|
||||
return conversionBlockHeight;
|
||||
}
|
||||
public void setConversionAt(Date conversionAt)
|
||||
{
|
||||
this.conversionAt = conversionAt;
|
||||
}
|
||||
|
||||
public Date getConversionAt()
|
||||
{
|
||||
return conversionAt;
|
||||
}
|
||||
public void setEstimatedResourceQuantity(Long estimatedResourceQuantity)
|
||||
{
|
||||
this.estimatedResourceQuantity = estimatedResourceQuantity;
|
||||
}
|
||||
|
||||
public Long getEstimatedResourceQuantity()
|
||||
{
|
||||
return estimatedResourceQuantity;
|
||||
}
|
||||
public void setAttemptNo(Long attemptNo)
|
||||
{
|
||||
this.attemptNo = attemptNo;
|
||||
}
|
||||
|
||||
public Long getAttemptNo()
|
||||
{
|
||||
return attemptNo;
|
||||
}
|
||||
public void setActiveSlot(Integer activeSlot)
|
||||
{
|
||||
this.activeSlot = activeSlot;
|
||||
}
|
||||
|
||||
public Integer getActiveSlot()
|
||||
{
|
||||
return activeSlot;
|
||||
}
|
||||
public void setDelegateSun(Long delegateSun)
|
||||
{
|
||||
this.delegateSun = delegateSun;
|
||||
}
|
||||
|
||||
public Long getDelegateSun()
|
||||
{
|
||||
return delegateSun;
|
||||
}
|
||||
public void setFeeLimitSun(Long feeLimitSun)
|
||||
{
|
||||
this.feeLimitSun = feeLimitSun;
|
||||
}
|
||||
|
||||
public Long getFeeLimitSun()
|
||||
{
|
||||
return feeLimitSun;
|
||||
}
|
||||
public void setCredentialId(Long credentialId)
|
||||
{
|
||||
this.credentialId = credentialId;
|
||||
}
|
||||
|
||||
public Long getCredentialId()
|
||||
{
|
||||
return credentialId;
|
||||
}
|
||||
public void setNonce(String nonce)
|
||||
{
|
||||
this.nonce = nonce;
|
||||
}
|
||||
|
||||
public String getNonce()
|
||||
{
|
||||
return nonce;
|
||||
}
|
||||
public void setSignedAt(Date signedAt)
|
||||
{
|
||||
this.signedAt = signedAt;
|
||||
}
|
||||
|
||||
public Date getSignedAt()
|
||||
{
|
||||
return signedAt;
|
||||
}
|
||||
public void setDeadline(Date deadline)
|
||||
{
|
||||
this.deadline = deadline;
|
||||
}
|
||||
|
||||
public Date getDeadline()
|
||||
{
|
||||
return deadline;
|
||||
}
|
||||
public void setIntent(String intent)
|
||||
{
|
||||
this.intent = intent;
|
||||
}
|
||||
|
||||
public String getIntent()
|
||||
{
|
||||
return intent;
|
||||
}
|
||||
public void setSignature(String signature)
|
||||
{
|
||||
this.signature = signature;
|
||||
}
|
||||
|
||||
public String getSignature()
|
||||
{
|
||||
return signature;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setReservationStatus(String reservationStatus)
|
||||
{
|
||||
this.reservationStatus = reservationStatus;
|
||||
}
|
||||
|
||||
public String getReservationStatus()
|
||||
{
|
||||
return reservationStatus;
|
||||
}
|
||||
public void setLeaseOwner(String leaseOwner)
|
||||
{
|
||||
this.leaseOwner = leaseOwner;
|
||||
}
|
||||
|
||||
public String getLeaseOwner()
|
||||
{
|
||||
return leaseOwner;
|
||||
}
|
||||
public void setLeaseUntil(Date leaseUntil)
|
||||
{
|
||||
this.leaseUntil = leaseUntil;
|
||||
}
|
||||
|
||||
public Date getLeaseUntil()
|
||||
{
|
||||
return leaseUntil;
|
||||
}
|
||||
public void setAcceptedAt(Date acceptedAt)
|
||||
{
|
||||
this.acceptedAt = acceptedAt;
|
||||
}
|
||||
|
||||
public Date getAcceptedAt()
|
||||
{
|
||||
return acceptedAt;
|
||||
}
|
||||
public void setDeliveryMessageId(String deliveryMessageId)
|
||||
{
|
||||
this.deliveryMessageId = deliveryMessageId;
|
||||
}
|
||||
|
||||
public String getDeliveryMessageId()
|
||||
{
|
||||
return deliveryMessageId;
|
||||
}
|
||||
public void setDeliverySessionEpoch(Long deliverySessionEpoch)
|
||||
{
|
||||
this.deliverySessionEpoch = deliverySessionEpoch;
|
||||
}
|
||||
|
||||
public Long getDeliverySessionEpoch()
|
||||
{
|
||||
return deliverySessionEpoch;
|
||||
}
|
||||
public void setDeliveryCount(Long deliveryCount)
|
||||
{
|
||||
this.deliveryCount = deliveryCount;
|
||||
}
|
||||
|
||||
public Long getDeliveryCount()
|
||||
{
|
||||
return deliveryCount;
|
||||
}
|
||||
public void setLastSentAt(Date lastSentAt)
|
||||
{
|
||||
this.lastSentAt = lastSentAt;
|
||||
}
|
||||
|
||||
public Date getLastSentAt()
|
||||
{
|
||||
return lastSentAt;
|
||||
}
|
||||
public void setDeliveryAckedAt(Date deliveryAckedAt)
|
||||
{
|
||||
this.deliveryAckedAt = deliveryAckedAt;
|
||||
}
|
||||
|
||||
public Date getDeliveryAckedAt()
|
||||
{
|
||||
return deliveryAckedAt;
|
||||
}
|
||||
public void setNextCheckAt(Date nextCheckAt)
|
||||
{
|
||||
this.nextCheckAt = nextCheckAt;
|
||||
}
|
||||
|
||||
public Date getNextCheckAt()
|
||||
{
|
||||
return nextCheckAt;
|
||||
}
|
||||
public void setError(String error)
|
||||
{
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public String getError()
|
||||
{
|
||||
return error;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("taskNo", getTaskNo())
|
||||
.append("orderId", getOrderId())
|
||||
.append("walletId", getWalletId())
|
||||
.append("nodeId", getNodeId())
|
||||
.append("network", getNetwork())
|
||||
.append("sourceTransactionId", getSourceTransactionId())
|
||||
.append("walletExecutionSlot", getWalletExecutionSlot())
|
||||
.append("taskType", getTaskType())
|
||||
.append("resourceType", getResourceType())
|
||||
.append("resourceQuantity", getResourceQuantity())
|
||||
.append("targetResourceQuantity", getTargetResourceQuantity())
|
||||
.append("conversionTotalLimit", getConversionTotalLimit())
|
||||
.append("conversionTotalWeight", getConversionTotalWeight())
|
||||
.append("conversionBlockHeight", getConversionBlockHeight())
|
||||
.append("conversionAt", getConversionAt())
|
||||
.append("estimatedResourceQuantity", getEstimatedResourceQuantity())
|
||||
.append("attemptNo", getAttemptNo())
|
||||
.append("activeSlot", getActiveSlot())
|
||||
.append("delegateSun", getDelegateSun())
|
||||
.append("feeLimitSun", getFeeLimitSun())
|
||||
.append("credentialId", getCredentialId())
|
||||
.append("nonce", getNonce())
|
||||
.append("signedAt", getSignedAt())
|
||||
.append("deadline", getDeadline())
|
||||
.append("intent", getIntent())
|
||||
.append("signature", getSignature())
|
||||
.append("status", getStatus())
|
||||
.append("reservationStatus", getReservationStatus())
|
||||
.append("leaseOwner", getLeaseOwner())
|
||||
.append("leaseUntil", getLeaseUntil())
|
||||
.append("acceptedAt", getAcceptedAt())
|
||||
.append("deliveryMessageId", getDeliveryMessageId())
|
||||
.append("deliverySessionEpoch", getDeliverySessionEpoch())
|
||||
.append("deliveryCount", getDeliveryCount())
|
||||
.append("lastSentAt", getLastSentAt())
|
||||
.append("deliveryAckedAt", getDeliveryAckedAt())
|
||||
.append("nextCheckAt", getNextCheckAt())
|
||||
.append("error", getError())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,367 @@
|
||||
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;
|
||||
/**
|
||||
* 链上委托或回收证据;一任务只能构建一笔交易对象 rent_transaction
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentTransaction extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** rent_task.id */
|
||||
@Excel(name = "rent_task.id")
|
||||
private Long taskId;
|
||||
|
||||
/** 网络:NILE、MAINNET,必须与所有关联对象一致 */
|
||||
@Excel(name = "网络:NILE、MAINNET,必须与所有关联对象一致")
|
||||
private String network;
|
||||
|
||||
/** 链上交易哈希 */
|
||||
@Excel(name = "链上交易哈希")
|
||||
private String txId;
|
||||
|
||||
/** 实际资源owner,TRON Base58Check地址 */
|
||||
@Excel(name = "实际资源owner,TRON Base58Check地址")
|
||||
private String ownerAddress;
|
||||
|
||||
/** 实际receiver,TRON Base58Check地址 */
|
||||
@Excel(name = "实际receiver,TRON Base58Check地址")
|
||||
private String receiverAddress;
|
||||
|
||||
/** DELEGATE委托、RECLAIM撤销 */
|
||||
@Excel(name = "DELEGATE委托、RECLAIM撤销")
|
||||
private String transactionType;
|
||||
|
||||
/** 实际链上资源类型:ENERGY对应resource_code=1、BANDWIDTH对应resource_code=0,独立核验 */
|
||||
@Excel(name = "实际链上资源类型:ENERGY对应resource_code=1、BANDWIDTH对应resource_code=0,独立核验")
|
||||
private String resourceType;
|
||||
|
||||
/** 链上实际本金SUN */
|
||||
@Excel(name = "链上实际本金SUN")
|
||||
private Long amountSun;
|
||||
|
||||
/** 独立核验区块该资源全网额度,确认前可空,确认委托时必须有有效正值 */
|
||||
@Excel(name = "独立核验区块该资源全网额度,确认前可空,确认委托时必须有有效正值")
|
||||
private Long verifiedTotalLimit;
|
||||
|
||||
/** 独立核验区块该资源全网TRX权重,确认前可空,不能与SUN混用 */
|
||||
@Excel(name = "独立核验区块该资源全网TRX权重,确认前可空,不能与SUN混用")
|
||||
private Long verifiedTotalWeight;
|
||||
|
||||
/** 实际本金对应资源额度;不足目标仍保留真实值并确认链上事实,但订单转人工不能记履约成功;撤销不作新交付 */
|
||||
@Excel(name = "实际本金对应资源额度;不足目标仍保留真实值并确认链上事实,但订单转人工不能记履约成功;撤销不作新交付")
|
||||
private Long verifiedResourceQuantity;
|
||||
|
||||
/** 执行前同owner/receiver及相同resource_type的委托本金SUN,能量带宽分别计算 */
|
||||
@Excel(name = "执行前同owner/receiver及相同resource_type的委托本金SUN,能量带宽分别计算")
|
||||
private Long baselineSun;
|
||||
|
||||
/** 核验后同地址对及相同resource_type的本金SUN,不混入另一资源类型 */
|
||||
@Excel(name = "核验后同地址对及相同resource_type的本金SUN,不混入另一资源类型")
|
||||
private Long afterSun;
|
||||
|
||||
/** 确认区块高度 */
|
||||
@Excel(name = "确认区块高度")
|
||||
private Long blockHeight;
|
||||
|
||||
/** 交易所在确认区块UTC时间,独立查询,用于委托服务起点及到期判断 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交易所在确认区块UTC时间,独立查询,用于委托服务起点及到期判断", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date blockTime;
|
||||
|
||||
/** REPORTED已报、CONFIRMED已独立核验、FAILED已证实失败、UNKNOWN未知 */
|
||||
@Excel(name = "REPORTED已报、CONFIRMED已独立核验、FAILED已证实失败、UNKNOWN未知")
|
||||
private String status;
|
||||
|
||||
/** 云端回执、交易参数、前后关系及确认规则证据,不含密钥 */
|
||||
@Excel(name = "云端回执、交易参数、前后关系及确认规则证据,不含密钥")
|
||||
private String evidence;
|
||||
|
||||
/** 原签名交易过期时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "原签名交易过期时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expiresAt;
|
||||
|
||||
/** 独立确认时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "独立确认时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date confirmedAt;
|
||||
|
||||
/** 下次链上核对,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下次链上核对,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date nextCheckAt;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTaskId(Long taskId)
|
||||
{
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public Long getTaskId()
|
||||
{
|
||||
return taskId;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setTxId(String txId)
|
||||
{
|
||||
this.txId = txId;
|
||||
}
|
||||
|
||||
public String getTxId()
|
||||
{
|
||||
return txId;
|
||||
}
|
||||
public void setOwnerAddress(String ownerAddress)
|
||||
{
|
||||
this.ownerAddress = ownerAddress;
|
||||
}
|
||||
|
||||
public String getOwnerAddress()
|
||||
{
|
||||
return ownerAddress;
|
||||
}
|
||||
public void setReceiverAddress(String receiverAddress)
|
||||
{
|
||||
this.receiverAddress = receiverAddress;
|
||||
}
|
||||
|
||||
public String getReceiverAddress()
|
||||
{
|
||||
return receiverAddress;
|
||||
}
|
||||
public void setTransactionType(String transactionType)
|
||||
{
|
||||
this.transactionType = transactionType;
|
||||
}
|
||||
|
||||
public String getTransactionType()
|
||||
{
|
||||
return transactionType;
|
||||
}
|
||||
public void setResourceType(String resourceType)
|
||||
{
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceType()
|
||||
{
|
||||
return resourceType;
|
||||
}
|
||||
public void setAmountSun(Long amountSun)
|
||||
{
|
||||
this.amountSun = amountSun;
|
||||
}
|
||||
|
||||
public Long getAmountSun()
|
||||
{
|
||||
return amountSun;
|
||||
}
|
||||
public void setVerifiedTotalLimit(Long verifiedTotalLimit)
|
||||
{
|
||||
this.verifiedTotalLimit = verifiedTotalLimit;
|
||||
}
|
||||
|
||||
public Long getVerifiedTotalLimit()
|
||||
{
|
||||
return verifiedTotalLimit;
|
||||
}
|
||||
public void setVerifiedTotalWeight(Long verifiedTotalWeight)
|
||||
{
|
||||
this.verifiedTotalWeight = verifiedTotalWeight;
|
||||
}
|
||||
|
||||
public Long getVerifiedTotalWeight()
|
||||
{
|
||||
return verifiedTotalWeight;
|
||||
}
|
||||
public void setVerifiedResourceQuantity(Long verifiedResourceQuantity)
|
||||
{
|
||||
this.verifiedResourceQuantity = verifiedResourceQuantity;
|
||||
}
|
||||
|
||||
public Long getVerifiedResourceQuantity()
|
||||
{
|
||||
return verifiedResourceQuantity;
|
||||
}
|
||||
public void setBaselineSun(Long baselineSun)
|
||||
{
|
||||
this.baselineSun = baselineSun;
|
||||
}
|
||||
|
||||
public Long getBaselineSun()
|
||||
{
|
||||
return baselineSun;
|
||||
}
|
||||
public void setAfterSun(Long afterSun)
|
||||
{
|
||||
this.afterSun = afterSun;
|
||||
}
|
||||
|
||||
public Long getAfterSun()
|
||||
{
|
||||
return afterSun;
|
||||
}
|
||||
public void setBlockHeight(Long blockHeight)
|
||||
{
|
||||
this.blockHeight = blockHeight;
|
||||
}
|
||||
|
||||
public Long getBlockHeight()
|
||||
{
|
||||
return blockHeight;
|
||||
}
|
||||
public void setBlockTime(Date blockTime)
|
||||
{
|
||||
this.blockTime = blockTime;
|
||||
}
|
||||
|
||||
public Date getBlockTime()
|
||||
{
|
||||
return blockTime;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setEvidence(String evidence)
|
||||
{
|
||||
this.evidence = evidence;
|
||||
}
|
||||
|
||||
public String getEvidence()
|
||||
{
|
||||
return evidence;
|
||||
}
|
||||
public void setExpiresAt(Date expiresAt)
|
||||
{
|
||||
this.expiresAt = expiresAt;
|
||||
}
|
||||
|
||||
public Date getExpiresAt()
|
||||
{
|
||||
return expiresAt;
|
||||
}
|
||||
public void setConfirmedAt(Date confirmedAt)
|
||||
{
|
||||
this.confirmedAt = confirmedAt;
|
||||
}
|
||||
|
||||
public Date getConfirmedAt()
|
||||
{
|
||||
return confirmedAt;
|
||||
}
|
||||
public void setNextCheckAt(Date nextCheckAt)
|
||||
{
|
||||
this.nextCheckAt = nextCheckAt;
|
||||
}
|
||||
|
||||
public Date getNextCheckAt()
|
||||
{
|
||||
return nextCheckAt;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("taskId", getTaskId())
|
||||
.append("network", getNetwork())
|
||||
.append("txId", getTxId())
|
||||
.append("ownerAddress", getOwnerAddress())
|
||||
.append("receiverAddress", getReceiverAddress())
|
||||
.append("transactionType", getTransactionType())
|
||||
.append("resourceType", getResourceType())
|
||||
.append("amountSun", getAmountSun())
|
||||
.append("verifiedTotalLimit", getVerifiedTotalLimit())
|
||||
.append("verifiedTotalWeight", getVerifiedTotalWeight())
|
||||
.append("verifiedResourceQuantity", getVerifiedResourceQuantity())
|
||||
.append("baselineSun", getBaselineSun())
|
||||
.append("afterSun", getAfterSun())
|
||||
.append("blockHeight", getBlockHeight())
|
||||
.append("blockTime", getBlockTime())
|
||||
.append("status", getStatus())
|
||||
.append("evidence", getEvidence())
|
||||
.append("expiresAt", getExpiresAt())
|
||||
.append("confirmedAt", getConfirmedAt())
|
||||
.append("nextCheckAt", getNextCheckAt())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,346 @@
|
||||
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;
|
||||
/**
|
||||
* 链上委托或回收证据;一任务只能构建一笔交易对象 rent_transaction
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_transaction")
|
||||
public class RentTransactionPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** rent_task.id */
|
||||
@Excel(name = "rent_task.id")
|
||||
private Long taskId;
|
||||
/** 网络:NILE、MAINNET,必须与所有关联对象一致 */
|
||||
@Excel(name = "网络:NILE、MAINNET,必须与所有关联对象一致")
|
||||
private String network;
|
||||
/** 链上交易哈希 */
|
||||
@Excel(name = "链上交易哈希")
|
||||
private String txId;
|
||||
/** 实际资源owner,TRON Base58Check地址 */
|
||||
@Excel(name = "实际资源owner,TRON Base58Check地址")
|
||||
private String ownerAddress;
|
||||
/** 实际receiver,TRON Base58Check地址 */
|
||||
@Excel(name = "实际receiver,TRON Base58Check地址")
|
||||
private String receiverAddress;
|
||||
/** DELEGATE委托、RECLAIM撤销 */
|
||||
@Excel(name = "DELEGATE委托、RECLAIM撤销")
|
||||
private String transactionType;
|
||||
/** 实际链上资源类型:ENERGY对应resource_code=1、BANDWIDTH对应resource_code=0,独立核验 */
|
||||
@Excel(name = "实际链上资源类型:ENERGY对应resource_code=1、BANDWIDTH对应resource_code=0,独立核验")
|
||||
private String resourceType;
|
||||
/** 链上实际本金SUN */
|
||||
@Excel(name = "链上实际本金SUN")
|
||||
private Long amountSun;
|
||||
/** 独立核验区块该资源全网额度,确认前可空,确认委托时必须有有效正值 */
|
||||
@Excel(name = "独立核验区块该资源全网额度,确认前可空,确认委托时必须有有效正值")
|
||||
private Long verifiedTotalLimit;
|
||||
/** 独立核验区块该资源全网TRX权重,确认前可空,不能与SUN混用 */
|
||||
@Excel(name = "独立核验区块该资源全网TRX权重,确认前可空,不能与SUN混用")
|
||||
private Long verifiedTotalWeight;
|
||||
/** 实际本金对应资源额度;不足目标仍保留真实值并确认链上事实,但订单转人工不能记履约成功;撤销不作新交付 */
|
||||
@Excel(name = "实际本金对应资源额度;不足目标仍保留真实值并确认链上事实,但订单转人工不能记履约成功;撤销不作新交付")
|
||||
private Long verifiedResourceQuantity;
|
||||
/** 执行前同owner/receiver及相同resource_type的委托本金SUN,能量带宽分别计算 */
|
||||
@Excel(name = "执行前同owner/receiver及相同resource_type的委托本金SUN,能量带宽分别计算")
|
||||
private Long baselineSun;
|
||||
/** 核验后同地址对及相同resource_type的本金SUN,不混入另一资源类型 */
|
||||
@Excel(name = "核验后同地址对及相同resource_type的本金SUN,不混入另一资源类型")
|
||||
private Long afterSun;
|
||||
/** 确认区块高度 */
|
||||
@Excel(name = "确认区块高度")
|
||||
private Long blockHeight;
|
||||
/** 交易所在确认区块UTC时间,独立查询,用于委托服务起点及到期判断 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交易所在确认区块UTC时间,独立查询,用于委托服务起点及到期判断", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date blockTime;
|
||||
/** REPORTED已报、CONFIRMED已独立核验、FAILED已证实失败、UNKNOWN未知 */
|
||||
@Excel(name = "REPORTED已报、CONFIRMED已独立核验、FAILED已证实失败、UNKNOWN未知")
|
||||
private String status;
|
||||
/** 云端回执、交易参数、前后关系及确认规则证据,不含密钥 */
|
||||
@Excel(name = "云端回执、交易参数、前后关系及确认规则证据,不含密钥")
|
||||
private String evidence;
|
||||
/** 原签名交易过期时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "原签名交易过期时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expiresAt;
|
||||
/** 独立确认时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "独立确认时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date confirmedAt;
|
||||
/** 下次链上核对,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下次链上核对,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date nextCheckAt;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTaskId(Long taskId)
|
||||
{
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public Long getTaskId()
|
||||
{
|
||||
return taskId;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setTxId(String txId)
|
||||
{
|
||||
this.txId = txId;
|
||||
}
|
||||
|
||||
public String getTxId()
|
||||
{
|
||||
return txId;
|
||||
}
|
||||
public void setOwnerAddress(String ownerAddress)
|
||||
{
|
||||
this.ownerAddress = ownerAddress;
|
||||
}
|
||||
|
||||
public String getOwnerAddress()
|
||||
{
|
||||
return ownerAddress;
|
||||
}
|
||||
public void setReceiverAddress(String receiverAddress)
|
||||
{
|
||||
this.receiverAddress = receiverAddress;
|
||||
}
|
||||
|
||||
public String getReceiverAddress()
|
||||
{
|
||||
return receiverAddress;
|
||||
}
|
||||
public void setTransactionType(String transactionType)
|
||||
{
|
||||
this.transactionType = transactionType;
|
||||
}
|
||||
|
||||
public String getTransactionType()
|
||||
{
|
||||
return transactionType;
|
||||
}
|
||||
public void setResourceType(String resourceType)
|
||||
{
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceType()
|
||||
{
|
||||
return resourceType;
|
||||
}
|
||||
public void setAmountSun(Long amountSun)
|
||||
{
|
||||
this.amountSun = amountSun;
|
||||
}
|
||||
|
||||
public Long getAmountSun()
|
||||
{
|
||||
return amountSun;
|
||||
}
|
||||
public void setVerifiedTotalLimit(Long verifiedTotalLimit)
|
||||
{
|
||||
this.verifiedTotalLimit = verifiedTotalLimit;
|
||||
}
|
||||
|
||||
public Long getVerifiedTotalLimit()
|
||||
{
|
||||
return verifiedTotalLimit;
|
||||
}
|
||||
public void setVerifiedTotalWeight(Long verifiedTotalWeight)
|
||||
{
|
||||
this.verifiedTotalWeight = verifiedTotalWeight;
|
||||
}
|
||||
|
||||
public Long getVerifiedTotalWeight()
|
||||
{
|
||||
return verifiedTotalWeight;
|
||||
}
|
||||
public void setVerifiedResourceQuantity(Long verifiedResourceQuantity)
|
||||
{
|
||||
this.verifiedResourceQuantity = verifiedResourceQuantity;
|
||||
}
|
||||
|
||||
public Long getVerifiedResourceQuantity()
|
||||
{
|
||||
return verifiedResourceQuantity;
|
||||
}
|
||||
public void setBaselineSun(Long baselineSun)
|
||||
{
|
||||
this.baselineSun = baselineSun;
|
||||
}
|
||||
|
||||
public Long getBaselineSun()
|
||||
{
|
||||
return baselineSun;
|
||||
}
|
||||
public void setAfterSun(Long afterSun)
|
||||
{
|
||||
this.afterSun = afterSun;
|
||||
}
|
||||
|
||||
public Long getAfterSun()
|
||||
{
|
||||
return afterSun;
|
||||
}
|
||||
public void setBlockHeight(Long blockHeight)
|
||||
{
|
||||
this.blockHeight = blockHeight;
|
||||
}
|
||||
|
||||
public Long getBlockHeight()
|
||||
{
|
||||
return blockHeight;
|
||||
}
|
||||
public void setBlockTime(Date blockTime)
|
||||
{
|
||||
this.blockTime = blockTime;
|
||||
}
|
||||
|
||||
public Date getBlockTime()
|
||||
{
|
||||
return blockTime;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setEvidence(String evidence)
|
||||
{
|
||||
this.evidence = evidence;
|
||||
}
|
||||
|
||||
public String getEvidence()
|
||||
{
|
||||
return evidence;
|
||||
}
|
||||
public void setExpiresAt(Date expiresAt)
|
||||
{
|
||||
this.expiresAt = expiresAt;
|
||||
}
|
||||
|
||||
public Date getExpiresAt()
|
||||
{
|
||||
return expiresAt;
|
||||
}
|
||||
public void setConfirmedAt(Date confirmedAt)
|
||||
{
|
||||
this.confirmedAt = confirmedAt;
|
||||
}
|
||||
|
||||
public Date getConfirmedAt()
|
||||
{
|
||||
return confirmedAt;
|
||||
}
|
||||
public void setNextCheckAt(Date nextCheckAt)
|
||||
{
|
||||
this.nextCheckAt = nextCheckAt;
|
||||
}
|
||||
|
||||
public Date getNextCheckAt()
|
||||
{
|
||||
return nextCheckAt;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("taskId", getTaskId())
|
||||
.append("network", getNetwork())
|
||||
.append("txId", getTxId())
|
||||
.append("ownerAddress", getOwnerAddress())
|
||||
.append("receiverAddress", getReceiverAddress())
|
||||
.append("transactionType", getTransactionType())
|
||||
.append("resourceType", getResourceType())
|
||||
.append("amountSun", getAmountSun())
|
||||
.append("verifiedTotalLimit", getVerifiedTotalLimit())
|
||||
.append("verifiedTotalWeight", getVerifiedTotalWeight())
|
||||
.append("verifiedResourceQuantity", getVerifiedResourceQuantity())
|
||||
.append("baselineSun", getBaselineSun())
|
||||
.append("afterSun", getAfterSun())
|
||||
.append("blockHeight", getBlockHeight())
|
||||
.append("blockTime", getBlockTime())
|
||||
.append("status", getStatus())
|
||||
.append("evidence", getEvidence())
|
||||
.append("expiresAt", getExpiresAt())
|
||||
.append("confirmedAt", getConfirmedAt())
|
||||
.append("nextCheckAt", getNextCheckAt())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,565 @@
|
||||
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;
|
||||
/**
|
||||
* 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点对象 rent_wallet
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentWallet extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** rent_node.id,供应商归属由节点user_id取得 */
|
||||
@Excel(name = "rent_node.id,供应商归属由节点user_id取得")
|
||||
private Long nodeId;
|
||||
|
||||
/** 网络:NILE、MAINNET,必须与所有关联对象一致 */
|
||||
@Excel(name = "网络:NILE、MAINNET,必须与所有关联对象一致")
|
||||
private String network;
|
||||
|
||||
/** 资源所有者,TRON Base58Check地址 */
|
||||
@Excel(name = "资源所有者,TRON Base58Check地址")
|
||||
private String address;
|
||||
|
||||
/** PENDING待核验、ACTIVE可调度、PAUSED暂停 */
|
||||
@Excel(name = "PENDING待核验、ACTIVE可调度、PAUSED暂停")
|
||||
private String status;
|
||||
|
||||
/** TRON链上权限编号,与平台HMAC无关 */
|
||||
@Excel(name = "TRON链上权限编号,与平台HMAC无关")
|
||||
private Long permissionId;
|
||||
|
||||
/** 钱包验证方式:TRONLINK_SIGN_MESSAGE_V2,离线消息签名,不广播交易,不使用RSA */
|
||||
@Excel(name = "钱包验证方式:TRONLINK_SIGN_MESSAGE_V2,离线消息签名,不广播交易,不使用RSA")
|
||||
private String ownershipMethod;
|
||||
|
||||
/** 平台生成的高熵一次性随机挑战,绑定登录用户、钱包、网络和业务域;重新签发使旧挑战失效 */
|
||||
@Excel(name = "平台生成的高熵一次性随机挑战,绑定登录用户、钱包、网络和业务域;重新签发使旧挑战失效")
|
||||
private String ownershipChallenge;
|
||||
|
||||
/** 平台生成并保存的完整UTF-8待签文本,含域名、用途、user_id、wallet_id、地址、网络、nonce、签发及到期时间,后端不得信任客户端重建文本 */
|
||||
@Excel(name = "平台生成并保存的完整UTF-8待签文本,含域名、用途、user_id、wallet_id、地址、网络、nonce、签发及到期时间,后端不得信任客户端重建文本")
|
||||
private String ownershipMessage;
|
||||
|
||||
/** TronLink的tronWeb.trx.signMessageV2对上述原文生成的签名;非私钥,仅用于钱包验证,禁止作为交易或API签名复用 */
|
||||
@Excel(name = "TronLink的tronWeb.trx.signMessageV2对上述原文生成的签名;非私钥,仅用于钱包验证,禁止作为交易或API签名复用")
|
||||
private String ownershipSignature;
|
||||
|
||||
/** 后端按TRON消息签名规则恢复并验证的Base58Check地址,必须与address完全一致 */
|
||||
@Excel(name = "后端按TRON消息签名规则恢复并验证的Base58Check地址,必须与address完全一致")
|
||||
private String ownershipVerifiedAddress;
|
||||
|
||||
/** 挑战签发UTC时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "挑战签发UTC时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date challengeIssuedAt;
|
||||
|
||||
/** 控制权证明挑战期限,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "控制权证明挑战期限,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date challengeExpiresAt;
|
||||
|
||||
/** 挑战原子消费UTC时间;非空不可再次使用,签名失败不设置 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "挑战原子消费UTC时间;非空不可再次使用,签名失败不设置", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date challengeConsumedAt;
|
||||
|
||||
/** 钱包离线消息签名验证通过的UTC时间,不等于供应商审核通过或交易权限已具备 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "钱包离线消息签名验证通过的UTC时间,不等于供应商审核通过或交易权限已具备", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date ownershipVerifiedAt;
|
||||
|
||||
/** 签名版本、原文摘要、恢复地址及当前链上权限核验结果,不包含私钥或助记词;历史验证事件写rent_event */
|
||||
@Excel(name = "签名版本、原文摘要、恢复地址及当前链上权限核验结果,不包含私钥或助记词;历史验证事件写rent_event")
|
||||
private String ownershipEvidence;
|
||||
|
||||
/** 可用能量max(0,limit-used),仅查询投影 */
|
||||
@Excel(name = "可用能量max(0,limit-used),仅查询投影")
|
||||
private Long energyAvailable;
|
||||
|
||||
/** 可用质押带宽max(0,limit-used),单位bytes,不含不可出租的免费带宽 */
|
||||
@Excel(name = "可用质押带宽max(0,limit-used),单位bytes,不含不可出租的免费带宽")
|
||||
private Long bandwidthAvailable;
|
||||
|
||||
/** 是否允许出租能量:0关闭、1开启,须本地策略及审核同时允许 */
|
||||
@Excel(name = "是否允许出租能量:0关闭、1开启,须本地策略及审核同时允许")
|
||||
private Integer energyEnabled;
|
||||
|
||||
/** 是否允许出租带宽:0关闭、1开启,须本地策略及审核同时允许 */
|
||||
@Excel(name = "是否允许出租带宽:0关闭、1开启,须本地策略及审核同时允许")
|
||||
private Integer bandwidthEnabled;
|
||||
|
||||
/** 链上能量类型可委托本金SUN,不能用TRX余额或带宽本金替代 */
|
||||
@Excel(name = "链上能量类型可委托本金SUN,不能用TRX余额或带宽本金替代")
|
||||
private Long energyDelegatableSun;
|
||||
|
||||
/** 待执行及未知能量任务预留本金SUN,钱包行锁原子更新 */
|
||||
@Excel(name = "待执行及未知能量任务预留本金SUN,钱包行锁原子更新")
|
||||
private Long energyReservedSun;
|
||||
|
||||
/** 供应商要求保留的能量质押本金SUN */
|
||||
@Excel(name = "供应商要求保留的能量质押本金SUN")
|
||||
private Long energyRetainSun;
|
||||
|
||||
/** 链上带宽类型可委托本金SUN,不包含免费带宽或能量本金 */
|
||||
@Excel(name = "链上带宽类型可委托本金SUN,不包含免费带宽或能量本金")
|
||||
private Long bandwidthDelegatableSun;
|
||||
|
||||
/** 待执行及未知带宽任务预留本金SUN,钱包行锁原子更新 */
|
||||
@Excel(name = "待执行及未知带宽任务预留本金SUN,钱包行锁原子更新")
|
||||
private Long bandwidthReservedSun;
|
||||
|
||||
/** 供应商要求保留的带宽质押本金SUN */
|
||||
@Excel(name = "供应商要求保留的带宽质押本金SUN")
|
||||
private Long bandwidthRetainSun;
|
||||
|
||||
/** 全网能量额度,用于动态换算 */
|
||||
@Excel(name = "全网能量额度,用于动态换算")
|
||||
private Long totalEnergyLimit;
|
||||
|
||||
/** 全网能量权重,零时拒绝估算 */
|
||||
@Excel(name = "全网能量权重,零时拒绝估算")
|
||||
private Long totalEnergyWeight;
|
||||
|
||||
/** 全网质押带宽额度bytes,不能使用免费带宽额度换算 */
|
||||
@Excel(name = "全网质押带宽额度bytes,不能使用免费带宽额度换算")
|
||||
private Long totalBandwidthLimit;
|
||||
|
||||
/** 全网带宽权重,零时拒绝带宽估算 */
|
||||
@Excel(name = "全网带宽权重,零时拒绝带宽估算")
|
||||
private Long totalBandwidthWeight;
|
||||
|
||||
/** 云端可信快照时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "云端可信快照时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date snapshotAt;
|
||||
|
||||
/** 快照失效时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "快照失效时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date snapshotExpiresAt;
|
||||
|
||||
/** 两类可信资源快照对应确认区块;不得回退,须不小于snapshot_min_block_height */
|
||||
@Excel(name = "两类可信资源快照对应确认区块;不得回退,须不小于snapshot_min_block_height")
|
||||
private Long snapshotBlockHeight;
|
||||
|
||||
/** 已确认委托或撤销要求的最低快照区块;提高时使旧快照失效 */
|
||||
@Excel(name = "已确认委托或撤销要求的最低快照区块;提高时使旧快照失效")
|
||||
private Long snapshotMinBlockHeight;
|
||||
|
||||
/** 本地额度、费用保留、允许锁定模式等非敏感策略 */
|
||||
@Excel(name = "本地额度、费用保留、允许锁定模式等非敏感策略")
|
||||
private String policy;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setNodeId(Long nodeId)
|
||||
{
|
||||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public Long getNodeId()
|
||||
{
|
||||
return nodeId;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setPermissionId(Long permissionId)
|
||||
{
|
||||
this.permissionId = permissionId;
|
||||
}
|
||||
|
||||
public Long getPermissionId()
|
||||
{
|
||||
return permissionId;
|
||||
}
|
||||
public void setOwnershipMethod(String ownershipMethod)
|
||||
{
|
||||
this.ownershipMethod = ownershipMethod;
|
||||
}
|
||||
|
||||
public String getOwnershipMethod()
|
||||
{
|
||||
return ownershipMethod;
|
||||
}
|
||||
public void setOwnershipChallenge(String ownershipChallenge)
|
||||
{
|
||||
this.ownershipChallenge = ownershipChallenge;
|
||||
}
|
||||
|
||||
public String getOwnershipChallenge()
|
||||
{
|
||||
return ownershipChallenge;
|
||||
}
|
||||
public void setOwnershipMessage(String ownershipMessage)
|
||||
{
|
||||
this.ownershipMessage = ownershipMessage;
|
||||
}
|
||||
|
||||
public String getOwnershipMessage()
|
||||
{
|
||||
return ownershipMessage;
|
||||
}
|
||||
public void setOwnershipSignature(String ownershipSignature)
|
||||
{
|
||||
this.ownershipSignature = ownershipSignature;
|
||||
}
|
||||
|
||||
public String getOwnershipSignature()
|
||||
{
|
||||
return ownershipSignature;
|
||||
}
|
||||
public void setOwnershipVerifiedAddress(String ownershipVerifiedAddress)
|
||||
{
|
||||
this.ownershipVerifiedAddress = ownershipVerifiedAddress;
|
||||
}
|
||||
|
||||
public String getOwnershipVerifiedAddress()
|
||||
{
|
||||
return ownershipVerifiedAddress;
|
||||
}
|
||||
public void setChallengeIssuedAt(Date challengeIssuedAt)
|
||||
{
|
||||
this.challengeIssuedAt = challengeIssuedAt;
|
||||
}
|
||||
|
||||
public Date getChallengeIssuedAt()
|
||||
{
|
||||
return challengeIssuedAt;
|
||||
}
|
||||
public void setChallengeExpiresAt(Date challengeExpiresAt)
|
||||
{
|
||||
this.challengeExpiresAt = challengeExpiresAt;
|
||||
}
|
||||
|
||||
public Date getChallengeExpiresAt()
|
||||
{
|
||||
return challengeExpiresAt;
|
||||
}
|
||||
public void setChallengeConsumedAt(Date challengeConsumedAt)
|
||||
{
|
||||
this.challengeConsumedAt = challengeConsumedAt;
|
||||
}
|
||||
|
||||
public Date getChallengeConsumedAt()
|
||||
{
|
||||
return challengeConsumedAt;
|
||||
}
|
||||
public void setOwnershipVerifiedAt(Date ownershipVerifiedAt)
|
||||
{
|
||||
this.ownershipVerifiedAt = ownershipVerifiedAt;
|
||||
}
|
||||
|
||||
public Date getOwnershipVerifiedAt()
|
||||
{
|
||||
return ownershipVerifiedAt;
|
||||
}
|
||||
public void setOwnershipEvidence(String ownershipEvidence)
|
||||
{
|
||||
this.ownershipEvidence = ownershipEvidence;
|
||||
}
|
||||
|
||||
public String getOwnershipEvidence()
|
||||
{
|
||||
return ownershipEvidence;
|
||||
}
|
||||
public void setEnergyAvailable(Long energyAvailable)
|
||||
{
|
||||
this.energyAvailable = energyAvailable;
|
||||
}
|
||||
|
||||
public Long getEnergyAvailable()
|
||||
{
|
||||
return energyAvailable;
|
||||
}
|
||||
public void setBandwidthAvailable(Long bandwidthAvailable)
|
||||
{
|
||||
this.bandwidthAvailable = bandwidthAvailable;
|
||||
}
|
||||
|
||||
public Long getBandwidthAvailable()
|
||||
{
|
||||
return bandwidthAvailable;
|
||||
}
|
||||
public void setEnergyEnabled(Integer energyEnabled)
|
||||
{
|
||||
this.energyEnabled = energyEnabled;
|
||||
}
|
||||
|
||||
public Integer getEnergyEnabled()
|
||||
{
|
||||
return energyEnabled;
|
||||
}
|
||||
public void setBandwidthEnabled(Integer bandwidthEnabled)
|
||||
{
|
||||
this.bandwidthEnabled = bandwidthEnabled;
|
||||
}
|
||||
|
||||
public Integer getBandwidthEnabled()
|
||||
{
|
||||
return bandwidthEnabled;
|
||||
}
|
||||
public void setEnergyDelegatableSun(Long energyDelegatableSun)
|
||||
{
|
||||
this.energyDelegatableSun = energyDelegatableSun;
|
||||
}
|
||||
|
||||
public Long getEnergyDelegatableSun()
|
||||
{
|
||||
return energyDelegatableSun;
|
||||
}
|
||||
public void setEnergyReservedSun(Long energyReservedSun)
|
||||
{
|
||||
this.energyReservedSun = energyReservedSun;
|
||||
}
|
||||
|
||||
public Long getEnergyReservedSun()
|
||||
{
|
||||
return energyReservedSun;
|
||||
}
|
||||
public void setEnergyRetainSun(Long energyRetainSun)
|
||||
{
|
||||
this.energyRetainSun = energyRetainSun;
|
||||
}
|
||||
|
||||
public Long getEnergyRetainSun()
|
||||
{
|
||||
return energyRetainSun;
|
||||
}
|
||||
public void setBandwidthDelegatableSun(Long bandwidthDelegatableSun)
|
||||
{
|
||||
this.bandwidthDelegatableSun = bandwidthDelegatableSun;
|
||||
}
|
||||
|
||||
public Long getBandwidthDelegatableSun()
|
||||
{
|
||||
return bandwidthDelegatableSun;
|
||||
}
|
||||
public void setBandwidthReservedSun(Long bandwidthReservedSun)
|
||||
{
|
||||
this.bandwidthReservedSun = bandwidthReservedSun;
|
||||
}
|
||||
|
||||
public Long getBandwidthReservedSun()
|
||||
{
|
||||
return bandwidthReservedSun;
|
||||
}
|
||||
public void setBandwidthRetainSun(Long bandwidthRetainSun)
|
||||
{
|
||||
this.bandwidthRetainSun = bandwidthRetainSun;
|
||||
}
|
||||
|
||||
public Long getBandwidthRetainSun()
|
||||
{
|
||||
return bandwidthRetainSun;
|
||||
}
|
||||
public void setTotalEnergyLimit(Long totalEnergyLimit)
|
||||
{
|
||||
this.totalEnergyLimit = totalEnergyLimit;
|
||||
}
|
||||
|
||||
public Long getTotalEnergyLimit()
|
||||
{
|
||||
return totalEnergyLimit;
|
||||
}
|
||||
public void setTotalEnergyWeight(Long totalEnergyWeight)
|
||||
{
|
||||
this.totalEnergyWeight = totalEnergyWeight;
|
||||
}
|
||||
|
||||
public Long getTotalEnergyWeight()
|
||||
{
|
||||
return totalEnergyWeight;
|
||||
}
|
||||
public void setTotalBandwidthLimit(Long totalBandwidthLimit)
|
||||
{
|
||||
this.totalBandwidthLimit = totalBandwidthLimit;
|
||||
}
|
||||
|
||||
public Long getTotalBandwidthLimit()
|
||||
{
|
||||
return totalBandwidthLimit;
|
||||
}
|
||||
public void setTotalBandwidthWeight(Long totalBandwidthWeight)
|
||||
{
|
||||
this.totalBandwidthWeight = totalBandwidthWeight;
|
||||
}
|
||||
|
||||
public Long getTotalBandwidthWeight()
|
||||
{
|
||||
return totalBandwidthWeight;
|
||||
}
|
||||
public void setSnapshotAt(Date snapshotAt)
|
||||
{
|
||||
this.snapshotAt = snapshotAt;
|
||||
}
|
||||
|
||||
public Date getSnapshotAt()
|
||||
{
|
||||
return snapshotAt;
|
||||
}
|
||||
public void setSnapshotExpiresAt(Date snapshotExpiresAt)
|
||||
{
|
||||
this.snapshotExpiresAt = snapshotExpiresAt;
|
||||
}
|
||||
|
||||
public Date getSnapshotExpiresAt()
|
||||
{
|
||||
return snapshotExpiresAt;
|
||||
}
|
||||
public void setSnapshotBlockHeight(Long snapshotBlockHeight)
|
||||
{
|
||||
this.snapshotBlockHeight = snapshotBlockHeight;
|
||||
}
|
||||
|
||||
public Long getSnapshotBlockHeight()
|
||||
{
|
||||
return snapshotBlockHeight;
|
||||
}
|
||||
public void setSnapshotMinBlockHeight(Long snapshotMinBlockHeight)
|
||||
{
|
||||
this.snapshotMinBlockHeight = snapshotMinBlockHeight;
|
||||
}
|
||||
|
||||
public Long getSnapshotMinBlockHeight()
|
||||
{
|
||||
return snapshotMinBlockHeight;
|
||||
}
|
||||
public void setPolicy(String policy)
|
||||
{
|
||||
this.policy = policy;
|
||||
}
|
||||
|
||||
public String getPolicy()
|
||||
{
|
||||
return policy;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("nodeId", getNodeId())
|
||||
.append("network", getNetwork())
|
||||
.append("address", getAddress())
|
||||
.append("status", getStatus())
|
||||
.append("permissionId", getPermissionId())
|
||||
.append("ownershipMethod", getOwnershipMethod())
|
||||
.append("ownershipChallenge", getOwnershipChallenge())
|
||||
.append("ownershipMessage", getOwnershipMessage())
|
||||
.append("ownershipSignature", getOwnershipSignature())
|
||||
.append("ownershipVerifiedAddress", getOwnershipVerifiedAddress())
|
||||
.append("challengeIssuedAt", getChallengeIssuedAt())
|
||||
.append("challengeExpiresAt", getChallengeExpiresAt())
|
||||
.append("challengeConsumedAt", getChallengeConsumedAt())
|
||||
.append("ownershipVerifiedAt", getOwnershipVerifiedAt())
|
||||
.append("ownershipEvidence", getOwnershipEvidence())
|
||||
.append("energyAvailable", getEnergyAvailable())
|
||||
.append("bandwidthAvailable", getBandwidthAvailable())
|
||||
.append("energyEnabled", getEnergyEnabled())
|
||||
.append("bandwidthEnabled", getBandwidthEnabled())
|
||||
.append("energyDelegatableSun", getEnergyDelegatableSun())
|
||||
.append("energyReservedSun", getEnergyReservedSun())
|
||||
.append("energyRetainSun", getEnergyRetainSun())
|
||||
.append("bandwidthDelegatableSun", getBandwidthDelegatableSun())
|
||||
.append("bandwidthReservedSun", getBandwidthReservedSun())
|
||||
.append("bandwidthRetainSun", getBandwidthRetainSun())
|
||||
.append("totalEnergyLimit", getTotalEnergyLimit())
|
||||
.append("totalEnergyWeight", getTotalEnergyWeight())
|
||||
.append("totalBandwidthLimit", getTotalBandwidthLimit())
|
||||
.append("totalBandwidthWeight", getTotalBandwidthWeight())
|
||||
.append("snapshotAt", getSnapshotAt())
|
||||
.append("snapshotExpiresAt", getSnapshotExpiresAt())
|
||||
.append("snapshotBlockHeight", getSnapshotBlockHeight())
|
||||
.append("snapshotMinBlockHeight", getSnapshotMinBlockHeight())
|
||||
.append("policy", getPolicy())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,530 @@
|
||||
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;
|
||||
/**
|
||||
* 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点对象 rent_wallet
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_wallet")
|
||||
public class RentWalletPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** rent_node.id,供应商归属由节点user_id取得 */
|
||||
@Excel(name = "rent_node.id,供应商归属由节点user_id取得")
|
||||
private Long nodeId;
|
||||
/** 网络:NILE、MAINNET,必须与所有关联对象一致 */
|
||||
@Excel(name = "网络:NILE、MAINNET,必须与所有关联对象一致")
|
||||
private String network;
|
||||
/** 资源所有者,TRON Base58Check地址 */
|
||||
@Excel(name = "资源所有者,TRON Base58Check地址")
|
||||
private String address;
|
||||
/** PENDING待核验、ACTIVE可调度、PAUSED暂停 */
|
||||
@Excel(name = "PENDING待核验、ACTIVE可调度、PAUSED暂停")
|
||||
private String status;
|
||||
/** TRON链上权限编号,与平台HMAC无关 */
|
||||
@Excel(name = "TRON链上权限编号,与平台HMAC无关")
|
||||
private Long permissionId;
|
||||
/** 钱包验证方式:TRONLINK_SIGN_MESSAGE_V2,离线消息签名,不广播交易,不使用RSA */
|
||||
@Excel(name = "钱包验证方式:TRONLINK_SIGN_MESSAGE_V2,离线消息签名,不广播交易,不使用RSA")
|
||||
private String ownershipMethod;
|
||||
/** 平台生成的高熵一次性随机挑战,绑定登录用户、钱包、网络和业务域;重新签发使旧挑战失效 */
|
||||
@Excel(name = "平台生成的高熵一次性随机挑战,绑定登录用户、钱包、网络和业务域;重新签发使旧挑战失效")
|
||||
private String ownershipChallenge;
|
||||
/** 平台生成并保存的完整UTF-8待签文本,含域名、用途、user_id、wallet_id、地址、网络、nonce、签发及到期时间,后端不得信任客户端重建文本 */
|
||||
@Excel(name = "平台生成并保存的完整UTF-8待签文本,含域名、用途、user_id、wallet_id、地址、网络、nonce、签发及到期时间,后端不得信任客户端重建文本")
|
||||
private String ownershipMessage;
|
||||
/** TronLink的tronWeb.trx.signMessageV2对上述原文生成的签名;非私钥,仅用于钱包验证,禁止作为交易或API签名复用 */
|
||||
@Excel(name = "TronLink的tronWeb.trx.signMessageV2对上述原文生成的签名;非私钥,仅用于钱包验证,禁止作为交易或API签名复用")
|
||||
private String ownershipSignature;
|
||||
/** 后端按TRON消息签名规则恢复并验证的Base58Check地址,必须与address完全一致 */
|
||||
@Excel(name = "后端按TRON消息签名规则恢复并验证的Base58Check地址,必须与address完全一致")
|
||||
private String ownershipVerifiedAddress;
|
||||
/** 挑战签发UTC时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "挑战签发UTC时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date challengeIssuedAt;
|
||||
/** 控制权证明挑战期限,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "控制权证明挑战期限,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date challengeExpiresAt;
|
||||
/** 挑战原子消费UTC时间;非空不可再次使用,签名失败不设置 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "挑战原子消费UTC时间;非空不可再次使用,签名失败不设置", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date challengeConsumedAt;
|
||||
/** 钱包离线消息签名验证通过的UTC时间,不等于供应商审核通过或交易权限已具备 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "钱包离线消息签名验证通过的UTC时间,不等于供应商审核通过或交易权限已具备", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date ownershipVerifiedAt;
|
||||
/** 签名版本、原文摘要、恢复地址及当前链上权限核验结果,不包含私钥或助记词;历史验证事件写rent_event */
|
||||
@Excel(name = "签名版本、原文摘要、恢复地址及当前链上权限核验结果,不包含私钥或助记词;历史验证事件写rent_event")
|
||||
private String ownershipEvidence;
|
||||
/** 可用能量max(0,limit-used),仅查询投影 */
|
||||
@Excel(name = "可用能量max(0,limit-used),仅查询投影")
|
||||
private Long energyAvailable;
|
||||
/** 可用质押带宽max(0,limit-used),单位bytes,不含不可出租的免费带宽 */
|
||||
@Excel(name = "可用质押带宽max(0,limit-used),单位bytes,不含不可出租的免费带宽")
|
||||
private Long bandwidthAvailable;
|
||||
/** 是否允许出租能量:0关闭、1开启,须本地策略及审核同时允许 */
|
||||
@Excel(name = "是否允许出租能量:0关闭、1开启,须本地策略及审核同时允许")
|
||||
private Integer energyEnabled;
|
||||
/** 是否允许出租带宽:0关闭、1开启,须本地策略及审核同时允许 */
|
||||
@Excel(name = "是否允许出租带宽:0关闭、1开启,须本地策略及审核同时允许")
|
||||
private Integer bandwidthEnabled;
|
||||
/** 链上能量类型可委托本金SUN,不能用TRX余额或带宽本金替代 */
|
||||
@Excel(name = "链上能量类型可委托本金SUN,不能用TRX余额或带宽本金替代")
|
||||
private Long energyDelegatableSun;
|
||||
/** 待执行及未知能量任务预留本金SUN,钱包行锁原子更新 */
|
||||
@Excel(name = "待执行及未知能量任务预留本金SUN,钱包行锁原子更新")
|
||||
private Long energyReservedSun;
|
||||
/** 供应商要求保留的能量质押本金SUN */
|
||||
@Excel(name = "供应商要求保留的能量质押本金SUN")
|
||||
private Long energyRetainSun;
|
||||
/** 链上带宽类型可委托本金SUN,不包含免费带宽或能量本金 */
|
||||
@Excel(name = "链上带宽类型可委托本金SUN,不包含免费带宽或能量本金")
|
||||
private Long bandwidthDelegatableSun;
|
||||
/** 待执行及未知带宽任务预留本金SUN,钱包行锁原子更新 */
|
||||
@Excel(name = "待执行及未知带宽任务预留本金SUN,钱包行锁原子更新")
|
||||
private Long bandwidthReservedSun;
|
||||
/** 供应商要求保留的带宽质押本金SUN */
|
||||
@Excel(name = "供应商要求保留的带宽质押本金SUN")
|
||||
private Long bandwidthRetainSun;
|
||||
/** 全网能量额度,用于动态换算 */
|
||||
@Excel(name = "全网能量额度,用于动态换算")
|
||||
private Long totalEnergyLimit;
|
||||
/** 全网能量权重,零时拒绝估算 */
|
||||
@Excel(name = "全网能量权重,零时拒绝估算")
|
||||
private Long totalEnergyWeight;
|
||||
/** 全网质押带宽额度bytes,不能使用免费带宽额度换算 */
|
||||
@Excel(name = "全网质押带宽额度bytes,不能使用免费带宽额度换算")
|
||||
private Long totalBandwidthLimit;
|
||||
/** 全网带宽权重,零时拒绝带宽估算 */
|
||||
@Excel(name = "全网带宽权重,零时拒绝带宽估算")
|
||||
private Long totalBandwidthWeight;
|
||||
/** 云端可信快照时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "云端可信快照时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date snapshotAt;
|
||||
/** 快照失效时间,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "快照失效时间,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date snapshotExpiresAt;
|
||||
/** 两类可信资源快照对应确认区块;不得回退,须不小于snapshot_min_block_height */
|
||||
@Excel(name = "两类可信资源快照对应确认区块;不得回退,须不小于snapshot_min_block_height")
|
||||
private Long snapshotBlockHeight;
|
||||
/** 已确认委托或撤销要求的最低快照区块;提高时使旧快照失效 */
|
||||
@Excel(name = "已确认委托或撤销要求的最低快照区块;提高时使旧快照失效")
|
||||
private Long snapshotMinBlockHeight;
|
||||
/** 本地额度、费用保留、允许锁定模式等非敏感策略 */
|
||||
@Excel(name = "本地额度、费用保留、允许锁定模式等非敏感策略")
|
||||
private String policy;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setNodeId(Long nodeId)
|
||||
{
|
||||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public Long getNodeId()
|
||||
{
|
||||
return nodeId;
|
||||
}
|
||||
public void setNetwork(String network)
|
||||
{
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public String getNetwork()
|
||||
{
|
||||
return network;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setPermissionId(Long permissionId)
|
||||
{
|
||||
this.permissionId = permissionId;
|
||||
}
|
||||
|
||||
public Long getPermissionId()
|
||||
{
|
||||
return permissionId;
|
||||
}
|
||||
public void setOwnershipMethod(String ownershipMethod)
|
||||
{
|
||||
this.ownershipMethod = ownershipMethod;
|
||||
}
|
||||
|
||||
public String getOwnershipMethod()
|
||||
{
|
||||
return ownershipMethod;
|
||||
}
|
||||
public void setOwnershipChallenge(String ownershipChallenge)
|
||||
{
|
||||
this.ownershipChallenge = ownershipChallenge;
|
||||
}
|
||||
|
||||
public String getOwnershipChallenge()
|
||||
{
|
||||
return ownershipChallenge;
|
||||
}
|
||||
public void setOwnershipMessage(String ownershipMessage)
|
||||
{
|
||||
this.ownershipMessage = ownershipMessage;
|
||||
}
|
||||
|
||||
public String getOwnershipMessage()
|
||||
{
|
||||
return ownershipMessage;
|
||||
}
|
||||
public void setOwnershipSignature(String ownershipSignature)
|
||||
{
|
||||
this.ownershipSignature = ownershipSignature;
|
||||
}
|
||||
|
||||
public String getOwnershipSignature()
|
||||
{
|
||||
return ownershipSignature;
|
||||
}
|
||||
public void setOwnershipVerifiedAddress(String ownershipVerifiedAddress)
|
||||
{
|
||||
this.ownershipVerifiedAddress = ownershipVerifiedAddress;
|
||||
}
|
||||
|
||||
public String getOwnershipVerifiedAddress()
|
||||
{
|
||||
return ownershipVerifiedAddress;
|
||||
}
|
||||
public void setChallengeIssuedAt(Date challengeIssuedAt)
|
||||
{
|
||||
this.challengeIssuedAt = challengeIssuedAt;
|
||||
}
|
||||
|
||||
public Date getChallengeIssuedAt()
|
||||
{
|
||||
return challengeIssuedAt;
|
||||
}
|
||||
public void setChallengeExpiresAt(Date challengeExpiresAt)
|
||||
{
|
||||
this.challengeExpiresAt = challengeExpiresAt;
|
||||
}
|
||||
|
||||
public Date getChallengeExpiresAt()
|
||||
{
|
||||
return challengeExpiresAt;
|
||||
}
|
||||
public void setChallengeConsumedAt(Date challengeConsumedAt)
|
||||
{
|
||||
this.challengeConsumedAt = challengeConsumedAt;
|
||||
}
|
||||
|
||||
public Date getChallengeConsumedAt()
|
||||
{
|
||||
return challengeConsumedAt;
|
||||
}
|
||||
public void setOwnershipVerifiedAt(Date ownershipVerifiedAt)
|
||||
{
|
||||
this.ownershipVerifiedAt = ownershipVerifiedAt;
|
||||
}
|
||||
|
||||
public Date getOwnershipVerifiedAt()
|
||||
{
|
||||
return ownershipVerifiedAt;
|
||||
}
|
||||
public void setOwnershipEvidence(String ownershipEvidence)
|
||||
{
|
||||
this.ownershipEvidence = ownershipEvidence;
|
||||
}
|
||||
|
||||
public String getOwnershipEvidence()
|
||||
{
|
||||
return ownershipEvidence;
|
||||
}
|
||||
public void setEnergyAvailable(Long energyAvailable)
|
||||
{
|
||||
this.energyAvailable = energyAvailable;
|
||||
}
|
||||
|
||||
public Long getEnergyAvailable()
|
||||
{
|
||||
return energyAvailable;
|
||||
}
|
||||
public void setBandwidthAvailable(Long bandwidthAvailable)
|
||||
{
|
||||
this.bandwidthAvailable = bandwidthAvailable;
|
||||
}
|
||||
|
||||
public Long getBandwidthAvailable()
|
||||
{
|
||||
return bandwidthAvailable;
|
||||
}
|
||||
public void setEnergyEnabled(Integer energyEnabled)
|
||||
{
|
||||
this.energyEnabled = energyEnabled;
|
||||
}
|
||||
|
||||
public Integer getEnergyEnabled()
|
||||
{
|
||||
return energyEnabled;
|
||||
}
|
||||
public void setBandwidthEnabled(Integer bandwidthEnabled)
|
||||
{
|
||||
this.bandwidthEnabled = bandwidthEnabled;
|
||||
}
|
||||
|
||||
public Integer getBandwidthEnabled()
|
||||
{
|
||||
return bandwidthEnabled;
|
||||
}
|
||||
public void setEnergyDelegatableSun(Long energyDelegatableSun)
|
||||
{
|
||||
this.energyDelegatableSun = energyDelegatableSun;
|
||||
}
|
||||
|
||||
public Long getEnergyDelegatableSun()
|
||||
{
|
||||
return energyDelegatableSun;
|
||||
}
|
||||
public void setEnergyReservedSun(Long energyReservedSun)
|
||||
{
|
||||
this.energyReservedSun = energyReservedSun;
|
||||
}
|
||||
|
||||
public Long getEnergyReservedSun()
|
||||
{
|
||||
return energyReservedSun;
|
||||
}
|
||||
public void setEnergyRetainSun(Long energyRetainSun)
|
||||
{
|
||||
this.energyRetainSun = energyRetainSun;
|
||||
}
|
||||
|
||||
public Long getEnergyRetainSun()
|
||||
{
|
||||
return energyRetainSun;
|
||||
}
|
||||
public void setBandwidthDelegatableSun(Long bandwidthDelegatableSun)
|
||||
{
|
||||
this.bandwidthDelegatableSun = bandwidthDelegatableSun;
|
||||
}
|
||||
|
||||
public Long getBandwidthDelegatableSun()
|
||||
{
|
||||
return bandwidthDelegatableSun;
|
||||
}
|
||||
public void setBandwidthReservedSun(Long bandwidthReservedSun)
|
||||
{
|
||||
this.bandwidthReservedSun = bandwidthReservedSun;
|
||||
}
|
||||
|
||||
public Long getBandwidthReservedSun()
|
||||
{
|
||||
return bandwidthReservedSun;
|
||||
}
|
||||
public void setBandwidthRetainSun(Long bandwidthRetainSun)
|
||||
{
|
||||
this.bandwidthRetainSun = bandwidthRetainSun;
|
||||
}
|
||||
|
||||
public Long getBandwidthRetainSun()
|
||||
{
|
||||
return bandwidthRetainSun;
|
||||
}
|
||||
public void setTotalEnergyLimit(Long totalEnergyLimit)
|
||||
{
|
||||
this.totalEnergyLimit = totalEnergyLimit;
|
||||
}
|
||||
|
||||
public Long getTotalEnergyLimit()
|
||||
{
|
||||
return totalEnergyLimit;
|
||||
}
|
||||
public void setTotalEnergyWeight(Long totalEnergyWeight)
|
||||
{
|
||||
this.totalEnergyWeight = totalEnergyWeight;
|
||||
}
|
||||
|
||||
public Long getTotalEnergyWeight()
|
||||
{
|
||||
return totalEnergyWeight;
|
||||
}
|
||||
public void setTotalBandwidthLimit(Long totalBandwidthLimit)
|
||||
{
|
||||
this.totalBandwidthLimit = totalBandwidthLimit;
|
||||
}
|
||||
|
||||
public Long getTotalBandwidthLimit()
|
||||
{
|
||||
return totalBandwidthLimit;
|
||||
}
|
||||
public void setTotalBandwidthWeight(Long totalBandwidthWeight)
|
||||
{
|
||||
this.totalBandwidthWeight = totalBandwidthWeight;
|
||||
}
|
||||
|
||||
public Long getTotalBandwidthWeight()
|
||||
{
|
||||
return totalBandwidthWeight;
|
||||
}
|
||||
public void setSnapshotAt(Date snapshotAt)
|
||||
{
|
||||
this.snapshotAt = snapshotAt;
|
||||
}
|
||||
|
||||
public Date getSnapshotAt()
|
||||
{
|
||||
return snapshotAt;
|
||||
}
|
||||
public void setSnapshotExpiresAt(Date snapshotExpiresAt)
|
||||
{
|
||||
this.snapshotExpiresAt = snapshotExpiresAt;
|
||||
}
|
||||
|
||||
public Date getSnapshotExpiresAt()
|
||||
{
|
||||
return snapshotExpiresAt;
|
||||
}
|
||||
public void setSnapshotBlockHeight(Long snapshotBlockHeight)
|
||||
{
|
||||
this.snapshotBlockHeight = snapshotBlockHeight;
|
||||
}
|
||||
|
||||
public Long getSnapshotBlockHeight()
|
||||
{
|
||||
return snapshotBlockHeight;
|
||||
}
|
||||
public void setSnapshotMinBlockHeight(Long snapshotMinBlockHeight)
|
||||
{
|
||||
this.snapshotMinBlockHeight = snapshotMinBlockHeight;
|
||||
}
|
||||
|
||||
public Long getSnapshotMinBlockHeight()
|
||||
{
|
||||
return snapshotMinBlockHeight;
|
||||
}
|
||||
public void setPolicy(String policy)
|
||||
{
|
||||
this.policy = policy;
|
||||
}
|
||||
|
||||
public String getPolicy()
|
||||
{
|
||||
return policy;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("nodeId", getNodeId())
|
||||
.append("network", getNetwork())
|
||||
.append("address", getAddress())
|
||||
.append("status", getStatus())
|
||||
.append("permissionId", getPermissionId())
|
||||
.append("ownershipMethod", getOwnershipMethod())
|
||||
.append("ownershipChallenge", getOwnershipChallenge())
|
||||
.append("ownershipMessage", getOwnershipMessage())
|
||||
.append("ownershipSignature", getOwnershipSignature())
|
||||
.append("ownershipVerifiedAddress", getOwnershipVerifiedAddress())
|
||||
.append("challengeIssuedAt", getChallengeIssuedAt())
|
||||
.append("challengeExpiresAt", getChallengeExpiresAt())
|
||||
.append("challengeConsumedAt", getChallengeConsumedAt())
|
||||
.append("ownershipVerifiedAt", getOwnershipVerifiedAt())
|
||||
.append("ownershipEvidence", getOwnershipEvidence())
|
||||
.append("energyAvailable", getEnergyAvailable())
|
||||
.append("bandwidthAvailable", getBandwidthAvailable())
|
||||
.append("energyEnabled", getEnergyEnabled())
|
||||
.append("bandwidthEnabled", getBandwidthEnabled())
|
||||
.append("energyDelegatableSun", getEnergyDelegatableSun())
|
||||
.append("energyReservedSun", getEnergyReservedSun())
|
||||
.append("energyRetainSun", getEnergyRetainSun())
|
||||
.append("bandwidthDelegatableSun", getBandwidthDelegatableSun())
|
||||
.append("bandwidthReservedSun", getBandwidthReservedSun())
|
||||
.append("bandwidthRetainSun", getBandwidthRetainSun())
|
||||
.append("totalEnergyLimit", getTotalEnergyLimit())
|
||||
.append("totalEnergyWeight", getTotalEnergyWeight())
|
||||
.append("totalBandwidthLimit", getTotalBandwidthLimit())
|
||||
.append("totalBandwidthWeight", getTotalBandwidthWeight())
|
||||
.append("snapshotAt", getSnapshotAt())
|
||||
.append("snapshotExpiresAt", getSnapshotExpiresAt())
|
||||
.append("snapshotBlockHeight", getSnapshotBlockHeight())
|
||||
.append("snapshotMinBlockHeight", getSnapshotMinBlockHeight())
|
||||
.append("policy", getPolicy())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
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;
|
||||
/**
|
||||
* 订单回调持久队列;业务状态更新时同事务写入对象 rent_webhook
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public class RentWebhook extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
|
||||
/** 商户回调事件编号 */
|
||||
@Excel(name = "商户回调事件编号")
|
||||
private String eventNo;
|
||||
|
||||
/** rent_order.id */
|
||||
@Excel(name = "rent_order.id")
|
||||
private Long orderId;
|
||||
|
||||
/** SUCCESS、FAILED、CANCELLED、REFUNDED、RECLAIMED */
|
||||
@Excel(name = "SUCCESS、FAILED、CANCELLED、REFUNDED、RECLAIMED")
|
||||
private String eventType;
|
||||
|
||||
/** 全局唯一业务事件键;普通事件ORDER:id:type,退款REFUND:refund_no,每次部分退款独立 */
|
||||
@Excel(name = "全局唯一业务事件键;普通事件ORDER:id:type,退款REFUND:refund_no,每次部分退款独立")
|
||||
private String eventKey;
|
||||
|
||||
/** 锁订单行后分配的递增事件序号;商户去重并按序号识别乱序,重试不变 */
|
||||
@Excel(name = "锁订单行后分配的递增事件序号;商户去重并按序号识别乱序,重试不变")
|
||||
private Long orderEventSequence;
|
||||
|
||||
/** 锁定回调业务内容,不含内部成本或Secret */
|
||||
@Excel(name = "锁定回调业务内容,不含内部成本或Secret")
|
||||
private String payload;
|
||||
|
||||
/** PENDING待发、SENDING发送、ACKED确认、DEAD重试超限 */
|
||||
@Excel(name = "PENDING待发、SENDING发送、ACKED确认、DEAD重试超限")
|
||||
private String status;
|
||||
|
||||
/** 重试次数,每次生成新nonce及timestamp */
|
||||
@Excel(name = "重试次数,每次生成新nonce及timestamp")
|
||||
private Long attemptCount;
|
||||
|
||||
/** 最近回调使用的APP主体rent_credential.id */
|
||||
@Excel(name = "最近回调使用的APP主体rent_credential.id")
|
||||
private Long credentialId;
|
||||
|
||||
/** 下次重试,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下次重试,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date nextAttemptAt;
|
||||
|
||||
/** worker租约标识 */
|
||||
@Excel(name = "worker租约标识")
|
||||
private String lockOwner;
|
||||
|
||||
/** worker租约期限,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "worker租约期限,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date lockUntil;
|
||||
|
||||
/** 最近脱敏错误 */
|
||||
@Excel(name = "最近脱敏错误")
|
||||
private String lastError;
|
||||
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setEventNo(String eventNo)
|
||||
{
|
||||
this.eventNo = eventNo;
|
||||
}
|
||||
|
||||
public String getEventNo()
|
||||
{
|
||||
return eventNo;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setEventType(String eventType)
|
||||
{
|
||||
this.eventType = eventType;
|
||||
}
|
||||
|
||||
public String getEventType()
|
||||
{
|
||||
return eventType;
|
||||
}
|
||||
public void setEventKey(String eventKey)
|
||||
{
|
||||
this.eventKey = eventKey;
|
||||
}
|
||||
|
||||
public String getEventKey()
|
||||
{
|
||||
return eventKey;
|
||||
}
|
||||
public void setOrderEventSequence(Long orderEventSequence)
|
||||
{
|
||||
this.orderEventSequence = orderEventSequence;
|
||||
}
|
||||
|
||||
public Long getOrderEventSequence()
|
||||
{
|
||||
return orderEventSequence;
|
||||
}
|
||||
public void setPayload(String payload)
|
||||
{
|
||||
this.payload = payload;
|
||||
}
|
||||
|
||||
public String getPayload()
|
||||
{
|
||||
return payload;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setAttemptCount(Long attemptCount)
|
||||
{
|
||||
this.attemptCount = attemptCount;
|
||||
}
|
||||
|
||||
public Long getAttemptCount()
|
||||
{
|
||||
return attemptCount;
|
||||
}
|
||||
public void setCredentialId(Long credentialId)
|
||||
{
|
||||
this.credentialId = credentialId;
|
||||
}
|
||||
|
||||
public Long getCredentialId()
|
||||
{
|
||||
return credentialId;
|
||||
}
|
||||
public void setNextAttemptAt(Date nextAttemptAt)
|
||||
{
|
||||
this.nextAttemptAt = nextAttemptAt;
|
||||
}
|
||||
|
||||
public Date getNextAttemptAt()
|
||||
{
|
||||
return nextAttemptAt;
|
||||
}
|
||||
public void setLockOwner(String lockOwner)
|
||||
{
|
||||
this.lockOwner = lockOwner;
|
||||
}
|
||||
|
||||
public String getLockOwner()
|
||||
{
|
||||
return lockOwner;
|
||||
}
|
||||
public void setLockUntil(Date lockUntil)
|
||||
{
|
||||
this.lockUntil = lockUntil;
|
||||
}
|
||||
|
||||
public Date getLockUntil()
|
||||
{
|
||||
return lockUntil;
|
||||
}
|
||||
public void setLastError(String lastError)
|
||||
{
|
||||
this.lastError = lastError;
|
||||
}
|
||||
|
||||
public String getLastError()
|
||||
{
|
||||
return lastError;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("eventNo", getEventNo())
|
||||
.append("orderId", getOrderId())
|
||||
.append("eventType", getEventType())
|
||||
.append("eventKey", getEventKey())
|
||||
.append("orderEventSequence", getOrderEventSequence())
|
||||
.append("payload", getPayload())
|
||||
.append("status", getStatus())
|
||||
.append("attemptCount", getAttemptCount())
|
||||
.append("credentialId", getCredentialId())
|
||||
.append("nextAttemptAt", getNextAttemptAt())
|
||||
.append("lockOwner", getLockOwner())
|
||||
.append("lockUntil", getLockUntil())
|
||||
.append("lastError", getLastError())
|
||||
.append("version", getVersion())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,253 @@
|
||||
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;
|
||||
/**
|
||||
* 订单回调持久队列;业务状态更新时同事务写入对象 rent_webhook
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@TableName(value = "rent_webhook")
|
||||
public class RentWebhookPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录主键 */
|
||||
private Long id;
|
||||
/** 商户回调事件编号 */
|
||||
@Excel(name = "商户回调事件编号")
|
||||
private String eventNo;
|
||||
/** rent_order.id */
|
||||
@Excel(name = "rent_order.id")
|
||||
private Long orderId;
|
||||
/** SUCCESS、FAILED、CANCELLED、REFUNDED、RECLAIMED */
|
||||
@Excel(name = "SUCCESS、FAILED、CANCELLED、REFUNDED、RECLAIMED")
|
||||
private String eventType;
|
||||
/** 全局唯一业务事件键;普通事件ORDER:id:type,退款REFUND:refund_no,每次部分退款独立 */
|
||||
@Excel(name = "全局唯一业务事件键;普通事件ORDER:id:type,退款REFUND:refund_no,每次部分退款独立")
|
||||
private String eventKey;
|
||||
/** 锁订单行后分配的递增事件序号;商户去重并按序号识别乱序,重试不变 */
|
||||
@Excel(name = "锁订单行后分配的递增事件序号;商户去重并按序号识别乱序,重试不变")
|
||||
private Long orderEventSequence;
|
||||
/** 锁定回调业务内容,不含内部成本或Secret */
|
||||
@Excel(name = "锁定回调业务内容,不含内部成本或Secret")
|
||||
private String payload;
|
||||
/** PENDING待发、SENDING发送、ACKED确认、DEAD重试超限 */
|
||||
@Excel(name = "PENDING待发、SENDING发送、ACKED确认、DEAD重试超限")
|
||||
private String status;
|
||||
/** 重试次数,每次生成新nonce及timestamp */
|
||||
@Excel(name = "重试次数,每次生成新nonce及timestamp")
|
||||
private Long attemptCount;
|
||||
/** 最近回调使用的APP主体rent_credential.id */
|
||||
@Excel(name = "最近回调使用的APP主体rent_credential.id")
|
||||
private Long credentialId;
|
||||
/** 下次重试,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下次重试,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date nextAttemptAt;
|
||||
/** worker租约标识 */
|
||||
@Excel(name = "worker租约标识")
|
||||
private String lockOwner;
|
||||
/** worker租约期限,UTC */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "worker租约期限,UTC", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date lockUntil;
|
||||
/** 最近脱敏错误 */
|
||||
@Excel(name = "最近脱敏错误")
|
||||
private String lastError;
|
||||
/** CAS乐观锁版本,更新须条件递增;追加记录保持0 */
|
||||
@Excel(name = "CAS乐观锁版本,更新须条件递增;追加记录保持0")
|
||||
private Long version;
|
||||
/** 创建UTC时间,应用显式写入 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建UTC时间,应用显式写入", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新UTC时间,追加记录与创建时间相同 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新UTC时间,追加记录与创建时间相同", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setEventNo(String eventNo)
|
||||
{
|
||||
this.eventNo = eventNo;
|
||||
}
|
||||
|
||||
public String getEventNo()
|
||||
{
|
||||
return eventNo;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setEventType(String eventType)
|
||||
{
|
||||
this.eventType = eventType;
|
||||
}
|
||||
|
||||
public String getEventType()
|
||||
{
|
||||
return eventType;
|
||||
}
|
||||
public void setEventKey(String eventKey)
|
||||
{
|
||||
this.eventKey = eventKey;
|
||||
}
|
||||
|
||||
public String getEventKey()
|
||||
{
|
||||
return eventKey;
|
||||
}
|
||||
public void setOrderEventSequence(Long orderEventSequence)
|
||||
{
|
||||
this.orderEventSequence = orderEventSequence;
|
||||
}
|
||||
|
||||
public Long getOrderEventSequence()
|
||||
{
|
||||
return orderEventSequence;
|
||||
}
|
||||
public void setPayload(String payload)
|
||||
{
|
||||
this.payload = payload;
|
||||
}
|
||||
|
||||
public String getPayload()
|
||||
{
|
||||
return payload;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setAttemptCount(Long attemptCount)
|
||||
{
|
||||
this.attemptCount = attemptCount;
|
||||
}
|
||||
|
||||
public Long getAttemptCount()
|
||||
{
|
||||
return attemptCount;
|
||||
}
|
||||
public void setCredentialId(Long credentialId)
|
||||
{
|
||||
this.credentialId = credentialId;
|
||||
}
|
||||
|
||||
public Long getCredentialId()
|
||||
{
|
||||
return credentialId;
|
||||
}
|
||||
public void setNextAttemptAt(Date nextAttemptAt)
|
||||
{
|
||||
this.nextAttemptAt = nextAttemptAt;
|
||||
}
|
||||
|
||||
public Date getNextAttemptAt()
|
||||
{
|
||||
return nextAttemptAt;
|
||||
}
|
||||
public void setLockOwner(String lockOwner)
|
||||
{
|
||||
this.lockOwner = lockOwner;
|
||||
}
|
||||
|
||||
public String getLockOwner()
|
||||
{
|
||||
return lockOwner;
|
||||
}
|
||||
public void setLockUntil(Date lockUntil)
|
||||
{
|
||||
this.lockUntil = lockUntil;
|
||||
}
|
||||
|
||||
public Date getLockUntil()
|
||||
{
|
||||
return lockUntil;
|
||||
}
|
||||
public void setLastError(String lastError)
|
||||
{
|
||||
this.lastError = lastError;
|
||||
}
|
||||
|
||||
public String getLastError()
|
||||
{
|
||||
return lastError;
|
||||
}
|
||||
public void setVersion(Long version)
|
||||
{
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Long getVersion()
|
||||
{
|
||||
return version;
|
||||
}
|
||||
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("eventNo", getEventNo())
|
||||
.append("orderId", getOrderId())
|
||||
.append("eventType", getEventType())
|
||||
.append("eventKey", getEventKey())
|
||||
.append("orderEventSequence", getOrderEventSequence())
|
||||
.append("payload", getPayload())
|
||||
.append("status", getStatus())
|
||||
.append("attemptCount", getAttemptCount())
|
||||
.append("credentialId", getCredentialId())
|
||||
.append("nextAttemptAt", getNextAttemptAt())
|
||||
.append("lockOwner", getLockOwner())
|
||||
.append("lockUntil", getLockUntil())
|
||||
.append("lastError", getLastError())
|
||||
.append("version", getVersion())
|
||||
.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.RentAccount;
|
||||
import com.ruoyi.system.domain.RentAccountPlus;
|
||||
|
||||
/**
|
||||
* 独立租赁资金账户;仅USDT,按用户和网络隔离Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentAccountMapper extends BaseMapper<RentAccountPlus>
|
||||
{
|
||||
/**
|
||||
* 查询独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param id 独立租赁资金账户;仅USDT,按用户和网络隔离ID
|
||||
* @return 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*/
|
||||
public RentAccount selectRentAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 查询独立租赁资金账户;仅USDT,按用户和网络隔离列表
|
||||
*
|
||||
* @param rentAccount 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
* @return 独立租赁资金账户;仅USDT,按用户和网络隔离集合
|
||||
*/
|
||||
public List<RentAccount> selectRentAccountList(RentAccount rentAccount);
|
||||
|
||||
/**
|
||||
* 新增独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param rentAccount 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentAccount(RentAccount rentAccount);
|
||||
|
||||
/**
|
||||
* 修改独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param rentAccount 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentAccount(RentAccount rentAccount);
|
||||
|
||||
/**
|
||||
* 删除独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param id 独立租赁资金账户;仅USDT,按用户和网络隔离ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentAccountByIds(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.RentApp;
|
||||
import com.ruoyi.system.domain.RentAppPlus;
|
||||
|
||||
/**
|
||||
* 租赁独立商户应用;登录及权限共用若依Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentAppMapper extends BaseMapper<RentAppPlus>
|
||||
{
|
||||
/**
|
||||
* 查询租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param id 租赁独立商户应用;登录及权限共用若依ID
|
||||
* @return 租赁独立商户应用;登录及权限共用若依
|
||||
*/
|
||||
public RentApp selectRentAppById(Long id);
|
||||
|
||||
/**
|
||||
* 查询租赁独立商户应用;登录及权限共用若依列表
|
||||
*
|
||||
* @param rentApp 租赁独立商户应用;登录及权限共用若依
|
||||
* @return 租赁独立商户应用;登录及权限共用若依集合
|
||||
*/
|
||||
public List<RentApp> selectRentAppList(RentApp rentApp);
|
||||
|
||||
/**
|
||||
* 新增租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param rentApp 租赁独立商户应用;登录及权限共用若依
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentApp(RentApp rentApp);
|
||||
|
||||
/**
|
||||
* 修改租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param rentApp 租赁独立商户应用;登录及权限共用若依
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentApp(RentApp rentApp);
|
||||
|
||||
/**
|
||||
* 删除租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param id 租赁独立商户应用;登录及权限共用若依ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentAppById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentAppByIds(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.RentCredential;
|
||||
import com.ruoyi.system.domain.RentCredentialPlus;
|
||||
|
||||
/**
|
||||
* 商户及节点统一HMAC凭证版本;不含RSAMapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentCredentialMapper extends BaseMapper<RentCredentialPlus>
|
||||
{
|
||||
/**
|
||||
* 查询商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param id 商户及节点统一HMAC凭证版本;不含RSAID
|
||||
* @return 商户及节点统一HMAC凭证版本;不含RSA
|
||||
*/
|
||||
public RentCredential selectRentCredentialById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商户及节点统一HMAC凭证版本;不含RSA列表
|
||||
*
|
||||
* @param rentCredential 商户及节点统一HMAC凭证版本;不含RSA
|
||||
* @return 商户及节点统一HMAC凭证版本;不含RSA集合
|
||||
*/
|
||||
public List<RentCredential> selectRentCredentialList(RentCredential rentCredential);
|
||||
|
||||
/**
|
||||
* 新增商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param rentCredential 商户及节点统一HMAC凭证版本;不含RSA
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentCredential(RentCredential rentCredential);
|
||||
|
||||
/**
|
||||
* 修改商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param rentCredential 商户及节点统一HMAC凭证版本;不含RSA
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentCredential(RentCredential rentCredential);
|
||||
|
||||
/**
|
||||
* 删除商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param id 商户及节点统一HMAC凭证版本;不含RSAID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentCredentialById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentCredentialByIds(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.RentEvent;
|
||||
import com.ruoyi.system.domain.RentEventPlus;
|
||||
|
||||
/**
|
||||
* 业务操作和状态变更追加审计;关键事务同写Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentEventMapper extends BaseMapper<RentEventPlus>
|
||||
{
|
||||
/**
|
||||
* 查询业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param id 业务操作和状态变更追加审计;关键事务同写ID
|
||||
* @return 业务操作和状态变更追加审计;关键事务同写
|
||||
*/
|
||||
public RentEvent selectRentEventById(Long id);
|
||||
|
||||
/**
|
||||
* 查询业务操作和状态变更追加审计;关键事务同写列表
|
||||
*
|
||||
* @param rentEvent 业务操作和状态变更追加审计;关键事务同写
|
||||
* @return 业务操作和状态变更追加审计;关键事务同写集合
|
||||
*/
|
||||
public List<RentEvent> selectRentEventList(RentEvent rentEvent);
|
||||
|
||||
/**
|
||||
* 新增业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param rentEvent 业务操作和状态变更追加审计;关键事务同写
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentEvent(RentEvent rentEvent);
|
||||
|
||||
/**
|
||||
* 修改业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param rentEvent 业务操作和状态变更追加审计;关键事务同写
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentEvent(RentEvent rentEvent);
|
||||
|
||||
/**
|
||||
* 删除业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param id 业务操作和状态变更追加审计;关键事务同写ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentEventById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentEventByIds(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.RentLedger;
|
||||
import com.ruoyi.system.domain.RentLedgerPlus;
|
||||
|
||||
/**
|
||||
* 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentLedgerMapper extends BaseMapper<RentLedgerPlus>
|
||||
{
|
||||
/**
|
||||
* 查询不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param id 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖ID
|
||||
* @return 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*/
|
||||
public RentLedger selectRentLedgerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖列表
|
||||
*
|
||||
* @param rentLedger 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
* @return 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖集合
|
||||
*/
|
||||
public List<RentLedger> selectRentLedgerList(RentLedger rentLedger);
|
||||
|
||||
/**
|
||||
* 新增不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param rentLedger 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentLedger(RentLedger rentLedger);
|
||||
|
||||
/**
|
||||
* 修改不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param rentLedger 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentLedger(RentLedger rentLedger);
|
||||
|
||||
/**
|
||||
* 删除不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param id 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentLedgerById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentLedgerByIds(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.RentNode;
|
||||
import com.ruoyi.system.domain.RentNodePlus;
|
||||
|
||||
/**
|
||||
* 供应商本地Agent节点;供应商直接关联共享用户,不另建成员Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentNodeMapper extends BaseMapper<RentNodePlus>
|
||||
{
|
||||
/**
|
||||
* 查询供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param id 供应商本地Agent节点;供应商直接关联共享用户,不另建成员ID
|
||||
* @return 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*/
|
||||
public RentNode selectRentNodeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应商本地Agent节点;供应商直接关联共享用户,不另建成员列表
|
||||
*
|
||||
* @param rentNode 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
* @return 供应商本地Agent节点;供应商直接关联共享用户,不另建成员集合
|
||||
*/
|
||||
public List<RentNode> selectRentNodeList(RentNode rentNode);
|
||||
|
||||
/**
|
||||
* 新增供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param rentNode 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentNode(RentNode rentNode);
|
||||
|
||||
/**
|
||||
* 修改供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param rentNode 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentNode(RentNode rentNode);
|
||||
|
||||
/**
|
||||
* 删除供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param id 供应商本地Agent节点;供应商直接关联共享用户,不另建成员ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentNodeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentNodeByIds(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.RentNonce;
|
||||
import com.ruoyi.system.domain.RentNoncePlus;
|
||||
|
||||
/**
|
||||
* HMAC请求防重放记录Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentNonceMapper extends BaseMapper<RentNoncePlus>
|
||||
{
|
||||
/**
|
||||
* 查询HMAC请求防重放记录
|
||||
*
|
||||
* @param id HMAC请求防重放记录ID
|
||||
* @return HMAC请求防重放记录
|
||||
*/
|
||||
public RentNonce selectRentNonceById(Long id);
|
||||
|
||||
/**
|
||||
* 查询HMAC请求防重放记录列表
|
||||
*
|
||||
* @param rentNonce HMAC请求防重放记录
|
||||
* @return HMAC请求防重放记录集合
|
||||
*/
|
||||
public List<RentNonce> selectRentNonceList(RentNonce rentNonce);
|
||||
|
||||
/**
|
||||
* 新增HMAC请求防重放记录
|
||||
*
|
||||
* @param rentNonce HMAC请求防重放记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentNonce(RentNonce rentNonce);
|
||||
|
||||
/**
|
||||
* 修改HMAC请求防重放记录
|
||||
*
|
||||
* @param rentNonce HMAC请求防重放记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentNonce(RentNonce rentNonce);
|
||||
|
||||
/**
|
||||
* 删除HMAC请求防重放记录
|
||||
*
|
||||
* @param id HMAC请求防重放记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentNonceById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除HMAC请求防重放记录
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentNonceByIds(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.RentOrder;
|
||||
import com.ruoyi.system.domain.RentOrderPlus;
|
||||
|
||||
/**
|
||||
* 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentOrderMapper extends BaseMapper<RentOrderPlus>
|
||||
{
|
||||
/**
|
||||
* 查询能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param id 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开ID
|
||||
* @return 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*/
|
||||
public RentOrder selectRentOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开列表
|
||||
*
|
||||
* @param rentOrder 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
* @return 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开集合
|
||||
*/
|
||||
public List<RentOrder> selectRentOrderList(RentOrder rentOrder);
|
||||
|
||||
/**
|
||||
* 新增能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param rentOrder 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentOrder(RentOrder rentOrder);
|
||||
|
||||
/**
|
||||
* 修改能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param rentOrder 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentOrder(RentOrder rentOrder);
|
||||
|
||||
/**
|
||||
* 删除能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param id 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentOrderByIds(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.RentPackage;
|
||||
import com.ruoyi.system.domain.RentPackagePlus;
|
||||
|
||||
/**
|
||||
* 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentPackageMapper extends BaseMapper<RentPackagePlus>
|
||||
{
|
||||
/**
|
||||
* 查询能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param id 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变ID
|
||||
* @return 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*/
|
||||
public RentPackage selectRentPackageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变列表
|
||||
*
|
||||
* @param rentPackage 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
* @return 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变集合
|
||||
*/
|
||||
public List<RentPackage> selectRentPackageList(RentPackage rentPackage);
|
||||
|
||||
/**
|
||||
* 新增能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param rentPackage 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentPackage(RentPackage rentPackage);
|
||||
|
||||
/**
|
||||
* 修改能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param rentPackage 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentPackage(RentPackage rentPackage);
|
||||
|
||||
/**
|
||||
* 删除能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param id 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentPackageById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentPackageByIds(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.RentRefund;
|
||||
import com.ruoyi.system.domain.RentRefundPlus;
|
||||
|
||||
/**
|
||||
* 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentRefundMapper extends BaseMapper<RentRefundPlus>
|
||||
{
|
||||
/**
|
||||
* 查询内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param id 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史ID
|
||||
* @return 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*/
|
||||
public RentRefund selectRentRefundById(Long id);
|
||||
|
||||
/**
|
||||
* 查询内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史列表
|
||||
*
|
||||
* @param rentRefund 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
* @return 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史集合
|
||||
*/
|
||||
public List<RentRefund> selectRentRefundList(RentRefund rentRefund);
|
||||
|
||||
/**
|
||||
* 新增内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param rentRefund 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentRefund(RentRefund rentRefund);
|
||||
|
||||
/**
|
||||
* 修改内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param rentRefund 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentRefund(RentRefund rentRefund);
|
||||
|
||||
/**
|
||||
* 删除内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param id 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentRefundById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentRefundByIds(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.RentSettlementItem;
|
||||
import com.ruoyi.system.domain.RentSettlementItemPlus;
|
||||
|
||||
/**
|
||||
* 供应商订单应收与结算关联;首版每单全额结算一次Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentSettlementItemMapper extends BaseMapper<RentSettlementItemPlus>
|
||||
{
|
||||
/**
|
||||
* 查询供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param id 供应商订单应收与结算关联;首版每单全额结算一次ID
|
||||
* @return 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*/
|
||||
public RentSettlementItem selectRentSettlementItemById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应商订单应收与结算关联;首版每单全额结算一次列表
|
||||
*
|
||||
* @param rentSettlementItem 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
* @return 供应商订单应收与结算关联;首版每单全额结算一次集合
|
||||
*/
|
||||
public List<RentSettlementItem> selectRentSettlementItemList(RentSettlementItem rentSettlementItem);
|
||||
|
||||
/**
|
||||
* 新增供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param rentSettlementItem 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentSettlementItem(RentSettlementItem rentSettlementItem);
|
||||
|
||||
/**
|
||||
* 修改供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param rentSettlementItem 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentSettlementItem(RentSettlementItem rentSettlementItem);
|
||||
|
||||
/**
|
||||
* 删除供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param id 供应商订单应收与结算关联;首版每单全额结算一次ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentSettlementItemById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentSettlementItemByIds(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.RentSettlement;
|
||||
import com.ruoyi.system.domain.RentSettlementPlus;
|
||||
|
||||
/**
|
||||
* 供应商人工结算单;不自动链上出金Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentSettlementMapper extends BaseMapper<RentSettlementPlus>
|
||||
{
|
||||
/**
|
||||
* 查询供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param id 供应商人工结算单;不自动链上出金ID
|
||||
* @return 供应商人工结算单;不自动链上出金
|
||||
*/
|
||||
public RentSettlement selectRentSettlementById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应商人工结算单;不自动链上出金列表
|
||||
*
|
||||
* @param rentSettlement 供应商人工结算单;不自动链上出金
|
||||
* @return 供应商人工结算单;不自动链上出金集合
|
||||
*/
|
||||
public List<RentSettlement> selectRentSettlementList(RentSettlement rentSettlement);
|
||||
|
||||
/**
|
||||
* 新增供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param rentSettlement 供应商人工结算单;不自动链上出金
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentSettlement(RentSettlement rentSettlement);
|
||||
|
||||
/**
|
||||
* 修改供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param rentSettlement 供应商人工结算单;不自动链上出金
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentSettlement(RentSettlement rentSettlement);
|
||||
|
||||
/**
|
||||
* 删除供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param id 供应商人工结算单;不自动链上出金ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentSettlementById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentSettlementByIds(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.RentTask;
|
||||
import com.ruoyi.system.domain.RentTaskPlus;
|
||||
|
||||
/**
|
||||
* 委托或回收任务,兼作持久队列与资源预留明细Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentTaskMapper extends BaseMapper<RentTaskPlus>
|
||||
{
|
||||
/**
|
||||
* 查询委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param id 委托或回收任务,兼作持久队列与资源预留明细ID
|
||||
* @return 委托或回收任务,兼作持久队列与资源预留明细
|
||||
*/
|
||||
public RentTask selectRentTaskById(Long id);
|
||||
|
||||
/**
|
||||
* 查询委托或回收任务,兼作持久队列与资源预留明细列表
|
||||
*
|
||||
* @param rentTask 委托或回收任务,兼作持久队列与资源预留明细
|
||||
* @return 委托或回收任务,兼作持久队列与资源预留明细集合
|
||||
*/
|
||||
public List<RentTask> selectRentTaskList(RentTask rentTask);
|
||||
|
||||
/**
|
||||
* 新增委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param rentTask 委托或回收任务,兼作持久队列与资源预留明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentTask(RentTask rentTask);
|
||||
|
||||
/**
|
||||
* 修改委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param rentTask 委托或回收任务,兼作持久队列与资源预留明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentTask(RentTask rentTask);
|
||||
|
||||
/**
|
||||
* 删除委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param id 委托或回收任务,兼作持久队列与资源预留明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentTaskById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentTaskByIds(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.RentTransaction;
|
||||
import com.ruoyi.system.domain.RentTransactionPlus;
|
||||
|
||||
/**
|
||||
* 链上委托或回收证据;一任务只能构建一笔交易Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentTransactionMapper extends BaseMapper<RentTransactionPlus>
|
||||
{
|
||||
/**
|
||||
* 查询链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param id 链上委托或回收证据;一任务只能构建一笔交易ID
|
||||
* @return 链上委托或回收证据;一任务只能构建一笔交易
|
||||
*/
|
||||
public RentTransaction selectRentTransactionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询链上委托或回收证据;一任务只能构建一笔交易列表
|
||||
*
|
||||
* @param rentTransaction 链上委托或回收证据;一任务只能构建一笔交易
|
||||
* @return 链上委托或回收证据;一任务只能构建一笔交易集合
|
||||
*/
|
||||
public List<RentTransaction> selectRentTransactionList(RentTransaction rentTransaction);
|
||||
|
||||
/**
|
||||
* 新增链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param rentTransaction 链上委托或回收证据;一任务只能构建一笔交易
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentTransaction(RentTransaction rentTransaction);
|
||||
|
||||
/**
|
||||
* 修改链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param rentTransaction 链上委托或回收证据;一任务只能构建一笔交易
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentTransaction(RentTransaction rentTransaction);
|
||||
|
||||
/**
|
||||
* 删除链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param id 链上委托或回收证据;一任务只能构建一笔交易ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentTransactionById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentTransactionByIds(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.RentWallet;
|
||||
import com.ruoyi.system.domain.RentWalletPlus;
|
||||
|
||||
/**
|
||||
* 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentWalletMapper extends BaseMapper<RentWalletPlus>
|
||||
{
|
||||
/**
|
||||
* 查询供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param id 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点ID
|
||||
* @return 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*/
|
||||
public RentWallet selectRentWalletById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点列表
|
||||
*
|
||||
* @param rentWallet 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
* @return 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点集合
|
||||
*/
|
||||
public List<RentWallet> selectRentWalletList(RentWallet rentWallet);
|
||||
|
||||
/**
|
||||
* 新增供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param rentWallet 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentWallet(RentWallet rentWallet);
|
||||
|
||||
/**
|
||||
* 修改供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param rentWallet 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentWallet(RentWallet rentWallet);
|
||||
|
||||
/**
|
||||
* 删除供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param id 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentWalletById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentWalletByIds(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.RentWebhook;
|
||||
import com.ruoyi.system.domain.RentWebhookPlus;
|
||||
|
||||
/**
|
||||
* 订单回调持久队列;业务状态更新时同事务写入Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface RentWebhookMapper extends BaseMapper<RentWebhookPlus>
|
||||
{
|
||||
/**
|
||||
* 查询订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param id 订单回调持久队列;业务状态更新时同事务写入ID
|
||||
* @return 订单回调持久队列;业务状态更新时同事务写入
|
||||
*/
|
||||
public RentWebhook selectRentWebhookById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单回调持久队列;业务状态更新时同事务写入列表
|
||||
*
|
||||
* @param rentWebhook 订单回调持久队列;业务状态更新时同事务写入
|
||||
* @return 订单回调持久队列;业务状态更新时同事务写入集合
|
||||
*/
|
||||
public List<RentWebhook> selectRentWebhookList(RentWebhook rentWebhook);
|
||||
|
||||
/**
|
||||
* 新增订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param rentWebhook 订单回调持久队列;业务状态更新时同事务写入
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentWebhook(RentWebhook rentWebhook);
|
||||
|
||||
/**
|
||||
* 修改订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param rentWebhook 订单回调持久队列;业务状态更新时同事务写入
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentWebhook(RentWebhook rentWebhook);
|
||||
|
||||
/**
|
||||
* 删除订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param id 订单回调持久队列;业务状态更新时同事务写入ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentWebhookById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentWebhookByIds(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.RentAccount;
|
||||
import com.ruoyi.system.domain.RentAccountPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 独立租赁资金账户;仅USDT,按用户和网络隔离Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentAccountService extends IService<RentAccountPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param id 独立租赁资金账户;仅USDT,按用户和网络隔离ID
|
||||
* @return 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*/
|
||||
public RentAccount selectRentAccountById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询独立租赁资金账户;仅USDT,按用户和网络隔离列表
|
||||
*
|
||||
* @param rentAccount 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
* @return 独立租赁资金账户;仅USDT,按用户和网络隔离集合
|
||||
*/
|
||||
public List<RentAccount> selectRentAccountList(RentAccount rentAccount,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param rentAccount 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentAccount(RentAccount rentAccount,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param rentAccount 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentAccount(RentAccount rentAccount,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param ids 需要删除的独立租赁资金账户;仅USDT,按用户和网络隔离ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentAccountByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除独立租赁资金账户;仅USDT,按用户和网络隔离信息
|
||||
*
|
||||
* @param id 独立租赁资金账户;仅USDT,按用户和网络隔离ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentAccountById(Long id,boolean isUser);
|
||||
|
||||
List<RentAccountPlus> getByIds(List<Long> ids,boolean isUser, SFunction<RentAccountPlus, ?>... columns);
|
||||
|
||||
RentAccountPlus getById(Long id, SFunction<RentAccountPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentAccountPlus> getMapByIds(List<Long> ids, SFunction<RentAccountPlus, ?>... columns);
|
||||
|
||||
List<RentAccountPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentAccountPlus> 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.RentApp;
|
||||
import com.ruoyi.system.domain.RentAppPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 租赁独立商户应用;登录及权限共用若依Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentAppService extends IService<RentAppPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param id 租赁独立商户应用;登录及权限共用若依ID
|
||||
* @return 租赁独立商户应用;登录及权限共用若依
|
||||
*/
|
||||
public RentApp selectRentAppById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询租赁独立商户应用;登录及权限共用若依列表
|
||||
*
|
||||
* @param rentApp 租赁独立商户应用;登录及权限共用若依
|
||||
* @return 租赁独立商户应用;登录及权限共用若依集合
|
||||
*/
|
||||
public List<RentApp> selectRentAppList(RentApp rentApp,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param rentApp 租赁独立商户应用;登录及权限共用若依
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentApp(RentApp rentApp,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param rentApp 租赁独立商户应用;登录及权限共用若依
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentApp(RentApp rentApp,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param ids 需要删除的租赁独立商户应用;登录及权限共用若依ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentAppByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除租赁独立商户应用;登录及权限共用若依信息
|
||||
*
|
||||
* @param id 租赁独立商户应用;登录及权限共用若依ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentAppById(Long id,boolean isUser);
|
||||
|
||||
List<RentAppPlus> getByIds(List<Long> ids,boolean isUser, SFunction<RentAppPlus, ?>... columns);
|
||||
|
||||
RentAppPlus getById(Long id, SFunction<RentAppPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentAppPlus> getMapByIds(List<Long> ids, SFunction<RentAppPlus, ?>... columns);
|
||||
|
||||
List<RentAppPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentAppPlus> 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.RentCredential;
|
||||
import com.ruoyi.system.domain.RentCredentialPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 商户及节点统一HMAC凭证版本;不含RSAService接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentCredentialService extends IService<RentCredentialPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param id 商户及节点统一HMAC凭证版本;不含RSAID
|
||||
* @return 商户及节点统一HMAC凭证版本;不含RSA
|
||||
*/
|
||||
public RentCredential selectRentCredentialById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商户及节点统一HMAC凭证版本;不含RSA列表
|
||||
*
|
||||
* @param rentCredential 商户及节点统一HMAC凭证版本;不含RSA
|
||||
* @return 商户及节点统一HMAC凭证版本;不含RSA集合
|
||||
*/
|
||||
public List<RentCredential> selectRentCredentialList(RentCredential rentCredential);
|
||||
|
||||
/**
|
||||
* 新增商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param rentCredential 商户及节点统一HMAC凭证版本;不含RSA
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentCredential(RentCredential rentCredential);
|
||||
|
||||
/**
|
||||
* 修改商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param rentCredential 商户及节点统一HMAC凭证版本;不含RSA
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentCredential(RentCredential rentCredential);
|
||||
|
||||
/**
|
||||
* 批量删除商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param ids 需要删除的商户及节点统一HMAC凭证版本;不含RSAID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentCredentialByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除商户及节点统一HMAC凭证版本;不含RSA信息
|
||||
*
|
||||
* @param id 商户及节点统一HMAC凭证版本;不含RSAID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentCredentialById(Long id);
|
||||
|
||||
List<RentCredentialPlus> getByIds(List<Long> ids, SFunction<RentCredentialPlus, ?>... columns);
|
||||
|
||||
RentCredentialPlus getById(Long id, SFunction<RentCredentialPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentCredentialPlus> getMapByIds(List<Long> ids, SFunction<RentCredentialPlus, ?>... columns);
|
||||
|
||||
List<RentCredentialPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentCredentialPlus> 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.RentEvent;
|
||||
import com.ruoyi.system.domain.RentEventPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 业务操作和状态变更追加审计;关键事务同写Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentEventService extends IService<RentEventPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param id 业务操作和状态变更追加审计;关键事务同写ID
|
||||
* @return 业务操作和状态变更追加审计;关键事务同写
|
||||
*/
|
||||
public RentEvent selectRentEventById(Long id);
|
||||
|
||||
/**
|
||||
* 查询业务操作和状态变更追加审计;关键事务同写列表
|
||||
*
|
||||
* @param rentEvent 业务操作和状态变更追加审计;关键事务同写
|
||||
* @return 业务操作和状态变更追加审计;关键事务同写集合
|
||||
*/
|
||||
public List<RentEvent> selectRentEventList(RentEvent rentEvent);
|
||||
|
||||
/**
|
||||
* 新增业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param rentEvent 业务操作和状态变更追加审计;关键事务同写
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentEvent(RentEvent rentEvent);
|
||||
|
||||
/**
|
||||
* 修改业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param rentEvent 业务操作和状态变更追加审计;关键事务同写
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentEvent(RentEvent rentEvent);
|
||||
|
||||
/**
|
||||
* 批量删除业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param ids 需要删除的业务操作和状态变更追加审计;关键事务同写ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentEventByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除业务操作和状态变更追加审计;关键事务同写信息
|
||||
*
|
||||
* @param id 业务操作和状态变更追加审计;关键事务同写ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentEventById(Long id);
|
||||
|
||||
List<RentEventPlus> getByIds(List<Long> ids, SFunction<RentEventPlus, ?>... columns);
|
||||
|
||||
RentEventPlus getById(Long id, SFunction<RentEventPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentEventPlus> getMapByIds(List<Long> ids, SFunction<RentEventPlus, ?>... columns);
|
||||
|
||||
List<RentEventPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentEventPlus> 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.RentLedger;
|
||||
import com.ruoyi.system.domain.RentLedgerPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentLedgerService extends IService<RentLedgerPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param id 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖ID
|
||||
* @return 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*/
|
||||
public RentLedger selectRentLedgerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖列表
|
||||
*
|
||||
* @param rentLedger 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
* @return 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖集合
|
||||
*/
|
||||
public List<RentLedger> selectRentLedgerList(RentLedger rentLedger);
|
||||
|
||||
/**
|
||||
* 新增不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param rentLedger 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentLedger(RentLedger rentLedger);
|
||||
|
||||
/**
|
||||
* 修改不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param rentLedger 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentLedger(RentLedger rentLedger);
|
||||
|
||||
/**
|
||||
* 批量删除不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param ids 需要删除的不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentLedgerByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖信息
|
||||
*
|
||||
* @param id 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentLedgerById(Long id);
|
||||
|
||||
List<RentLedgerPlus> getByIds(List<Long> ids, SFunction<RentLedgerPlus, ?>... columns);
|
||||
|
||||
RentLedgerPlus getById(Long id, SFunction<RentLedgerPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentLedgerPlus> getMapByIds(List<Long> ids, SFunction<RentLedgerPlus, ?>... columns);
|
||||
|
||||
List<RentLedgerPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentLedgerPlus> 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.RentNode;
|
||||
import com.ruoyi.system.domain.RentNodePlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 供应商本地Agent节点;供应商直接关联共享用户,不另建成员Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentNodeService extends IService<RentNodePlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param id 供应商本地Agent节点;供应商直接关联共享用户,不另建成员ID
|
||||
* @return 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*/
|
||||
public RentNode selectRentNodeById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询供应商本地Agent节点;供应商直接关联共享用户,不另建成员列表
|
||||
*
|
||||
* @param rentNode 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
* @return 供应商本地Agent节点;供应商直接关联共享用户,不另建成员集合
|
||||
*/
|
||||
public List<RentNode> selectRentNodeList(RentNode rentNode,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param rentNode 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentNode(RentNode rentNode,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param rentNode 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentNode(RentNode rentNode,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param ids 需要删除的供应商本地Agent节点;供应商直接关联共享用户,不另建成员ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentNodeByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除供应商本地Agent节点;供应商直接关联共享用户,不另建成员信息
|
||||
*
|
||||
* @param id 供应商本地Agent节点;供应商直接关联共享用户,不另建成员ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentNodeById(Long id,boolean isUser);
|
||||
|
||||
List<RentNodePlus> getByIds(List<Long> ids,boolean isUser, SFunction<RentNodePlus, ?>... columns);
|
||||
|
||||
RentNodePlus getById(Long id, SFunction<RentNodePlus, ?>... columns);
|
||||
|
||||
Map<Long, RentNodePlus> getMapByIds(List<Long> ids, SFunction<RentNodePlus, ?>... columns);
|
||||
|
||||
List<RentNodePlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentNodePlus> 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.RentNonce;
|
||||
import com.ruoyi.system.domain.RentNoncePlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* HMAC请求防重放记录Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentNonceService extends IService<RentNoncePlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询HMAC请求防重放记录
|
||||
*
|
||||
* @param id HMAC请求防重放记录ID
|
||||
* @return HMAC请求防重放记录
|
||||
*/
|
||||
public RentNonce selectRentNonceById(Long id);
|
||||
|
||||
/**
|
||||
* 查询HMAC请求防重放记录列表
|
||||
*
|
||||
* @param rentNonce HMAC请求防重放记录
|
||||
* @return HMAC请求防重放记录集合
|
||||
*/
|
||||
public List<RentNonce> selectRentNonceList(RentNonce rentNonce);
|
||||
|
||||
/**
|
||||
* 新增HMAC请求防重放记录
|
||||
*
|
||||
* @param rentNonce HMAC请求防重放记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentNonce(RentNonce rentNonce);
|
||||
|
||||
/**
|
||||
* 修改HMAC请求防重放记录
|
||||
*
|
||||
* @param rentNonce HMAC请求防重放记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentNonce(RentNonce rentNonce);
|
||||
|
||||
/**
|
||||
* 批量删除HMAC请求防重放记录
|
||||
*
|
||||
* @param ids 需要删除的HMAC请求防重放记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentNonceByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除HMAC请求防重放记录信息
|
||||
*
|
||||
* @param id HMAC请求防重放记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentNonceById(Long id);
|
||||
|
||||
List<RentNoncePlus> getByIds(List<Long> ids, SFunction<RentNoncePlus, ?>... columns);
|
||||
|
||||
RentNoncePlus getById(Long id, SFunction<RentNoncePlus, ?>... columns);
|
||||
|
||||
Map<Long, RentNoncePlus> getMapByIds(List<Long> ids, SFunction<RentNoncePlus, ?>... columns);
|
||||
|
||||
List<RentNoncePlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentNoncePlus> 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.RentOrder;
|
||||
import com.ruoyi.system.domain.RentOrderPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentOrderService extends IService<RentOrderPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param id 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开ID
|
||||
* @return 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*/
|
||||
public RentOrder selectRentOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开列表
|
||||
*
|
||||
* @param rentOrder 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
* @return 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开集合
|
||||
*/
|
||||
public List<RentOrder> selectRentOrderList(RentOrder rentOrder);
|
||||
|
||||
/**
|
||||
* 新增能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param rentOrder 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentOrder(RentOrder rentOrder);
|
||||
|
||||
/**
|
||||
* 修改能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param rentOrder 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentOrder(RentOrder rentOrder);
|
||||
|
||||
/**
|
||||
* 批量删除能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param ids 需要删除的能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentOrderByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开信息
|
||||
*
|
||||
* @param id 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentOrderById(Long id);
|
||||
|
||||
List<RentOrderPlus> getByIds(List<Long> ids, SFunction<RentOrderPlus, ?>... columns);
|
||||
|
||||
RentOrderPlus getById(Long id, SFunction<RentOrderPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentOrderPlus> getMapByIds(List<Long> ids, SFunction<RentOrderPlus, ?>... columns);
|
||||
|
||||
List<RentOrderPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentOrderPlus> 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.RentPackage;
|
||||
import com.ruoyi.system.domain.RentPackagePlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentPackageService extends IService<RentPackagePlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param id 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变ID
|
||||
* @return 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*/
|
||||
public RentPackage selectRentPackageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变列表
|
||||
*
|
||||
* @param rentPackage 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
* @return 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变集合
|
||||
*/
|
||||
public List<RentPackage> selectRentPackageList(RentPackage rentPackage);
|
||||
|
||||
/**
|
||||
* 新增能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param rentPackage 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentPackage(RentPackage rentPackage);
|
||||
|
||||
/**
|
||||
* 修改能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param rentPackage 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentPackage(RentPackage rentPackage);
|
||||
|
||||
/**
|
||||
* 批量删除能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param ids 需要删除的能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentPackageByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变信息
|
||||
*
|
||||
* @param id 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentPackageById(Long id);
|
||||
|
||||
List<RentPackagePlus> getByIds(List<Long> ids, SFunction<RentPackagePlus, ?>... columns);
|
||||
|
||||
RentPackagePlus getById(Long id, SFunction<RentPackagePlus, ?>... columns);
|
||||
|
||||
Map<Long, RentPackagePlus> getMapByIds(List<Long> ids, SFunction<RentPackagePlus, ?>... columns);
|
||||
|
||||
List<RentPackagePlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentPackagePlus> 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.RentRefund;
|
||||
import com.ruoyi.system.domain.RentRefundPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentRefundService extends IService<RentRefundPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param id 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史ID
|
||||
* @return 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*/
|
||||
public RentRefund selectRentRefundById(Long id);
|
||||
|
||||
/**
|
||||
* 查询内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史列表
|
||||
*
|
||||
* @param rentRefund 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
* @return 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史集合
|
||||
*/
|
||||
public List<RentRefund> selectRentRefundList(RentRefund rentRefund);
|
||||
|
||||
/**
|
||||
* 新增内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param rentRefund 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentRefund(RentRefund rentRefund);
|
||||
|
||||
/**
|
||||
* 修改内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param rentRefund 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentRefund(RentRefund rentRefund);
|
||||
|
||||
/**
|
||||
* 批量删除内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param ids 需要删除的内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentRefundByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史信息
|
||||
*
|
||||
* @param id 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentRefundById(Long id);
|
||||
|
||||
List<RentRefundPlus> getByIds(List<Long> ids, SFunction<RentRefundPlus, ?>... columns);
|
||||
|
||||
RentRefundPlus getById(Long id, SFunction<RentRefundPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentRefundPlus> getMapByIds(List<Long> ids, SFunction<RentRefundPlus, ?>... columns);
|
||||
|
||||
List<RentRefundPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentRefundPlus> 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.RentSettlementItem;
|
||||
import com.ruoyi.system.domain.RentSettlementItemPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 供应商订单应收与结算关联;首版每单全额结算一次Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentSettlementItemService extends IService<RentSettlementItemPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param id 供应商订单应收与结算关联;首版每单全额结算一次ID
|
||||
* @return 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*/
|
||||
public RentSettlementItem selectRentSettlementItemById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应商订单应收与结算关联;首版每单全额结算一次列表
|
||||
*
|
||||
* @param rentSettlementItem 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
* @return 供应商订单应收与结算关联;首版每单全额结算一次集合
|
||||
*/
|
||||
public List<RentSettlementItem> selectRentSettlementItemList(RentSettlementItem rentSettlementItem);
|
||||
|
||||
/**
|
||||
* 新增供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param rentSettlementItem 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentSettlementItem(RentSettlementItem rentSettlementItem);
|
||||
|
||||
/**
|
||||
* 修改供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param rentSettlementItem 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentSettlementItem(RentSettlementItem rentSettlementItem);
|
||||
|
||||
/**
|
||||
* 批量删除供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param ids 需要删除的供应商订单应收与结算关联;首版每单全额结算一次ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentSettlementItemByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除供应商订单应收与结算关联;首版每单全额结算一次信息
|
||||
*
|
||||
* @param id 供应商订单应收与结算关联;首版每单全额结算一次ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentSettlementItemById(Long id);
|
||||
|
||||
List<RentSettlementItemPlus> getByIds(List<Long> ids, SFunction<RentSettlementItemPlus, ?>... columns);
|
||||
|
||||
RentSettlementItemPlus getById(Long id, SFunction<RentSettlementItemPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentSettlementItemPlus> getMapByIds(List<Long> ids, SFunction<RentSettlementItemPlus, ?>... columns);
|
||||
|
||||
List<RentSettlementItemPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentSettlementItemPlus> 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.RentSettlement;
|
||||
import com.ruoyi.system.domain.RentSettlementPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 供应商人工结算单;不自动链上出金Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentSettlementService extends IService<RentSettlementPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param id 供应商人工结算单;不自动链上出金ID
|
||||
* @return 供应商人工结算单;不自动链上出金
|
||||
*/
|
||||
public RentSettlement selectRentSettlementById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应商人工结算单;不自动链上出金列表
|
||||
*
|
||||
* @param rentSettlement 供应商人工结算单;不自动链上出金
|
||||
* @return 供应商人工结算单;不自动链上出金集合
|
||||
*/
|
||||
public List<RentSettlement> selectRentSettlementList(RentSettlement rentSettlement);
|
||||
|
||||
/**
|
||||
* 新增供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param rentSettlement 供应商人工结算单;不自动链上出金
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentSettlement(RentSettlement rentSettlement);
|
||||
|
||||
/**
|
||||
* 修改供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param rentSettlement 供应商人工结算单;不自动链上出金
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentSettlement(RentSettlement rentSettlement);
|
||||
|
||||
/**
|
||||
* 批量删除供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param ids 需要删除的供应商人工结算单;不自动链上出金ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentSettlementByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除供应商人工结算单;不自动链上出金信息
|
||||
*
|
||||
* @param id 供应商人工结算单;不自动链上出金ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentSettlementById(Long id);
|
||||
|
||||
List<RentSettlementPlus> getByIds(List<Long> ids, SFunction<RentSettlementPlus, ?>... columns);
|
||||
|
||||
RentSettlementPlus getById(Long id, SFunction<RentSettlementPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentSettlementPlus> getMapByIds(List<Long> ids, SFunction<RentSettlementPlus, ?>... columns);
|
||||
|
||||
List<RentSettlementPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentSettlementPlus> 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.RentTask;
|
||||
import com.ruoyi.system.domain.RentTaskPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 委托或回收任务,兼作持久队列与资源预留明细Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentTaskService extends IService<RentTaskPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param id 委托或回收任务,兼作持久队列与资源预留明细ID
|
||||
* @return 委托或回收任务,兼作持久队列与资源预留明细
|
||||
*/
|
||||
public RentTask selectRentTaskById(Long id);
|
||||
|
||||
/**
|
||||
* 查询委托或回收任务,兼作持久队列与资源预留明细列表
|
||||
*
|
||||
* @param rentTask 委托或回收任务,兼作持久队列与资源预留明细
|
||||
* @return 委托或回收任务,兼作持久队列与资源预留明细集合
|
||||
*/
|
||||
public List<RentTask> selectRentTaskList(RentTask rentTask);
|
||||
|
||||
/**
|
||||
* 新增委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param rentTask 委托或回收任务,兼作持久队列与资源预留明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentTask(RentTask rentTask);
|
||||
|
||||
/**
|
||||
* 修改委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param rentTask 委托或回收任务,兼作持久队列与资源预留明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentTask(RentTask rentTask);
|
||||
|
||||
/**
|
||||
* 批量删除委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param ids 需要删除的委托或回收任务,兼作持久队列与资源预留明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentTaskByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除委托或回收任务,兼作持久队列与资源预留明细信息
|
||||
*
|
||||
* @param id 委托或回收任务,兼作持久队列与资源预留明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentTaskById(Long id);
|
||||
|
||||
List<RentTaskPlus> getByIds(List<Long> ids, SFunction<RentTaskPlus, ?>... columns);
|
||||
|
||||
RentTaskPlus getById(Long id, SFunction<RentTaskPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentTaskPlus> getMapByIds(List<Long> ids, SFunction<RentTaskPlus, ?>... columns);
|
||||
|
||||
List<RentTaskPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentTaskPlus> 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.RentTransaction;
|
||||
import com.ruoyi.system.domain.RentTransactionPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 链上委托或回收证据;一任务只能构建一笔交易Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentTransactionService extends IService<RentTransactionPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param id 链上委托或回收证据;一任务只能构建一笔交易ID
|
||||
* @return 链上委托或回收证据;一任务只能构建一笔交易
|
||||
*/
|
||||
public RentTransaction selectRentTransactionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询链上委托或回收证据;一任务只能构建一笔交易列表
|
||||
*
|
||||
* @param rentTransaction 链上委托或回收证据;一任务只能构建一笔交易
|
||||
* @return 链上委托或回收证据;一任务只能构建一笔交易集合
|
||||
*/
|
||||
public List<RentTransaction> selectRentTransactionList(RentTransaction rentTransaction);
|
||||
|
||||
/**
|
||||
* 新增链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param rentTransaction 链上委托或回收证据;一任务只能构建一笔交易
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentTransaction(RentTransaction rentTransaction);
|
||||
|
||||
/**
|
||||
* 修改链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param rentTransaction 链上委托或回收证据;一任务只能构建一笔交易
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentTransaction(RentTransaction rentTransaction);
|
||||
|
||||
/**
|
||||
* 批量删除链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param ids 需要删除的链上委托或回收证据;一任务只能构建一笔交易ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentTransactionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除链上委托或回收证据;一任务只能构建一笔交易信息
|
||||
*
|
||||
* @param id 链上委托或回收证据;一任务只能构建一笔交易ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentTransactionById(Long id);
|
||||
|
||||
List<RentTransactionPlus> getByIds(List<Long> ids, SFunction<RentTransactionPlus, ?>... columns);
|
||||
|
||||
RentTransactionPlus getById(Long id, SFunction<RentTransactionPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentTransactionPlus> getMapByIds(List<Long> ids, SFunction<RentTransactionPlus, ?>... columns);
|
||||
|
||||
List<RentTransactionPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentTransactionPlus> 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.RentWallet;
|
||||
import com.ruoyi.system.domain.RentWalletPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentWalletService extends IService<RentWalletPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param id 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点ID
|
||||
* @return 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*/
|
||||
public RentWallet selectRentWalletById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点列表
|
||||
*
|
||||
* @param rentWallet 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
* @return 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点集合
|
||||
*/
|
||||
public List<RentWallet> selectRentWalletList(RentWallet rentWallet);
|
||||
|
||||
/**
|
||||
* 新增供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param rentWallet 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentWallet(RentWallet rentWallet);
|
||||
|
||||
/**
|
||||
* 修改供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param rentWallet 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentWallet(RentWallet rentWallet);
|
||||
|
||||
/**
|
||||
* 批量删除供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param ids 需要删除的供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentWalletByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点信息
|
||||
*
|
||||
* @param id 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentWalletById(Long id);
|
||||
|
||||
List<RentWalletPlus> getByIds(List<Long> ids, SFunction<RentWalletPlus, ?>... columns);
|
||||
|
||||
RentWalletPlus getById(Long id, SFunction<RentWalletPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentWalletPlus> getMapByIds(List<Long> ids, SFunction<RentWalletPlus, ?>... columns);
|
||||
|
||||
List<RentWalletPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentWalletPlus> 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.RentWebhook;
|
||||
import com.ruoyi.system.domain.RentWebhookPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 订单回调持久队列;业务状态更新时同事务写入Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
public interface IRentWebhookService extends IService<RentWebhookPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword);
|
||||
/**
|
||||
* 查询订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param id 订单回调持久队列;业务状态更新时同事务写入ID
|
||||
* @return 订单回调持久队列;业务状态更新时同事务写入
|
||||
*/
|
||||
public RentWebhook selectRentWebhookById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单回调持久队列;业务状态更新时同事务写入列表
|
||||
*
|
||||
* @param rentWebhook 订单回调持久队列;业务状态更新时同事务写入
|
||||
* @return 订单回调持久队列;业务状态更新时同事务写入集合
|
||||
*/
|
||||
public List<RentWebhook> selectRentWebhookList(RentWebhook rentWebhook);
|
||||
|
||||
/**
|
||||
* 新增订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param rentWebhook 订单回调持久队列;业务状态更新时同事务写入
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRentWebhook(RentWebhook rentWebhook);
|
||||
|
||||
/**
|
||||
* 修改订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param rentWebhook 订单回调持久队列;业务状态更新时同事务写入
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRentWebhook(RentWebhook rentWebhook);
|
||||
|
||||
/**
|
||||
* 批量删除订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param ids 需要删除的订单回调持久队列;业务状态更新时同事务写入ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentWebhookByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除订单回调持久队列;业务状态更新时同事务写入信息
|
||||
*
|
||||
* @param id 订单回调持久队列;业务状态更新时同事务写入ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRentWebhookById(Long id);
|
||||
|
||||
List<RentWebhookPlus> getByIds(List<Long> ids, SFunction<RentWebhookPlus, ?>... columns);
|
||||
|
||||
RentWebhookPlus getById(Long id, SFunction<RentWebhookPlus, ?>... columns);
|
||||
|
||||
Map<Long, RentWebhookPlus> getMapByIds(List<Long> ids, SFunction<RentWebhookPlus, ?>... columns);
|
||||
|
||||
List<RentWebhookPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, RentWebhookPlus> 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,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.RentAccount;
|
||||
import com.ruoyi.system.domain.RentAccountPlus;
|
||||
import com.ruoyi.system.mapper.RentAccountMapper;
|
||||
import com.ruoyi.system.service.IRentAccountService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
/**
|
||||
* 独立租赁资金账户;仅USDT,按用户和网络隔离Service业务层处理
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@Service
|
||||
public class RentAccountServiceImpl extends ServiceImpl<RentAccountMapper, RentAccountPlus> implements IRentAccountService
|
||||
{
|
||||
@Autowired
|
||||
private RentAccountMapper rentAccountMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentAccountPlus> getByIds(List<Long> ids ,boolean isUser, SFunction<RentAccountPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentAccountPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentAccountPlus>()
|
||||
.select(columns).in(RentAccountPlus::getId, ids);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(RentAccountPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<RentAccountPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
private void checkUserPlus(List<RentAccountPlus> list) {
|
||||
for (RentAccountPlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(List<RentAccount> list) {
|
||||
for (RentAccount item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(RentAccountPlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
private void checkUser(RentAccount item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
LambdaQueryWrapper<RentAccountPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentAccountPlus>()
|
||||
.select(RentAccountPlus::getId,RentAccountPlus::getUserId, RentAccountPlus::getUserId)
|
||||
.like(RentAccountPlus::getUserId, keyword);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(RentAccountPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<RentAccountPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentAccountPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getUserId()+"");
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentAccountPlus getById(Long id, SFunction<RentAccountPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentAccountPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentAccountPlus>()
|
||||
.select(columns).eq(RentAccountPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentAccountPlus> getMapByIds(List<Long> ids, SFunction<RentAccountPlus, ?>... columns) {
|
||||
List<RentAccountPlus> list = this.getByIds(ids,false, columns);
|
||||
Map<Long, RentAccountPlus> map = new HashMap<>();
|
||||
for (RentAccountPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentAccountPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentAccountPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentAccountPlus> map = new HashMap<>();
|
||||
for (RentAccountPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentAccountPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentAccountPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentAccountPlus>().in(RentAccountPlus::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 rent_account ");
|
||||
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(" rent_account ");
|
||||
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(" rent_account ");
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* 查询独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param id 独立租赁资金账户;仅USDT,按用户和网络隔离ID
|
||||
* @return 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*/
|
||||
@Override
|
||||
public RentAccount selectRentAccountById(Long id,boolean isUser)
|
||||
{
|
||||
RentAccount vo = rentAccountMapper.selectRentAccountById(id);
|
||||
if(isUser){
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询独立租赁资金账户;仅USDT,按用户和网络隔离列表
|
||||
*
|
||||
* @param rentAccount 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
* @return 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*/
|
||||
@Override
|
||||
public List<RentAccount> selectRentAccountList(RentAccount rentAccount,boolean isUser)
|
||||
{
|
||||
if(rentAccount == null){
|
||||
rentAccount = new RentAccount();
|
||||
}
|
||||
if(isUser){
|
||||
rentAccount.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<RentAccount> list = rentAccountMapper.selectRentAccountList(rentAccount);
|
||||
if(isUser){
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param rentAccount 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentAccount(RentAccount rentAccount,boolean isUser)
|
||||
{
|
||||
rentAccount.setCreatedAt(DateUtils.getNowDate());
|
||||
rentAccount.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
rentAccount.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return rentAccountMapper.insertRentAccount(rentAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param rentAccount 独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentAccount(RentAccount rentAccount,boolean isUser)
|
||||
{
|
||||
rentAccount.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
checkUser(rentAccount);
|
||||
}
|
||||
return rentAccountMapper.updateRentAccount(rentAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除独立租赁资金账户;仅USDT,按用户和网络隔离
|
||||
*
|
||||
* @param ids 需要删除的独立租赁资金账户;仅USDT,按用户和网络隔离ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentAccountByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<RentAccountPlus> list= getByIds(Arrays.asList(ids),false,RentAccountPlus::getUserId,RentAccountPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return rentAccountMapper.deleteRentAccountByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除独立租赁资金账户;仅USDT,按用户和网络隔离信息
|
||||
*
|
||||
* @param id 独立租赁资金账户;仅USDT,按用户和网络隔离ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentAccountById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
RentAccountPlus vo = getById(id,RentAccountPlus::getUserId,RentAccountPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return rentAccountMapper.deleteRentAccountById(id);
|
||||
}
|
||||
}
|
||||
@@ -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.RentApp;
|
||||
import com.ruoyi.system.domain.RentAppPlus;
|
||||
import com.ruoyi.system.mapper.RentAppMapper;
|
||||
import com.ruoyi.system.service.IRentAppService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentAppServiceImpl extends ServiceImpl<RentAppMapper, RentAppPlus> implements IRentAppService
|
||||
{
|
||||
@Autowired
|
||||
private RentAppMapper rentAppMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentAppPlus> getByIds(List<Long> ids ,boolean isUser, SFunction<RentAppPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentAppPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentAppPlus>()
|
||||
.select(columns).in(RentAppPlus::getId, ids);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(RentAppPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<RentAppPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
private void checkUserPlus(List<RentAppPlus> list) {
|
||||
for (RentAppPlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(List<RentApp> list) {
|
||||
for (RentApp item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(RentAppPlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
private void checkUser(RentApp item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
LambdaQueryWrapper<RentAppPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentAppPlus>()
|
||||
.select(RentAppPlus::getId,RentAppPlus::getUserId, RentAppPlus::getName)
|
||||
.like(RentAppPlus::getName, keyword);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(RentAppPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<RentAppPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentAppPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getName());
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentAppPlus getById(Long id, SFunction<RentAppPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentAppPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentAppPlus>()
|
||||
.select(columns).eq(RentAppPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentAppPlus> getMapByIds(List<Long> ids, SFunction<RentAppPlus, ?>... columns) {
|
||||
List<RentAppPlus> list = this.getByIds(ids,false, columns);
|
||||
Map<Long, RentAppPlus> map = new HashMap<>();
|
||||
for (RentAppPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentAppPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentAppPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentAppPlus> map = new HashMap<>();
|
||||
for (RentAppPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentAppPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentAppPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentAppPlus>().in(RentAppPlus::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 rent_app ");
|
||||
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(" rent_app ");
|
||||
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(" rent_app ");
|
||||
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 RentApp selectRentAppById(Long id,boolean isUser)
|
||||
{
|
||||
RentApp vo = rentAppMapper.selectRentAppById(id);
|
||||
if(isUser){
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询租赁独立商户应用;登录及权限共用若依列表
|
||||
*
|
||||
* @param rentApp 租赁独立商户应用;登录及权限共用若依
|
||||
* @return 租赁独立商户应用;登录及权限共用若依
|
||||
*/
|
||||
@Override
|
||||
public List<RentApp> selectRentAppList(RentApp rentApp,boolean isUser)
|
||||
{
|
||||
if(rentApp == null){
|
||||
rentApp = new RentApp();
|
||||
}
|
||||
if(isUser){
|
||||
rentApp.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<RentApp> list = rentAppMapper.selectRentAppList(rentApp);
|
||||
if(isUser){
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param rentApp 租赁独立商户应用;登录及权限共用若依
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentApp(RentApp rentApp,boolean isUser)
|
||||
{
|
||||
rentApp.setCreatedAt(DateUtils.getNowDate());
|
||||
rentApp.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
rentApp.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return rentAppMapper.insertRentApp(rentApp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param rentApp 租赁独立商户应用;登录及权限共用若依
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentApp(RentApp rentApp,boolean isUser)
|
||||
{
|
||||
rentApp.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
checkUser(rentApp);
|
||||
}
|
||||
return rentAppMapper.updateRentApp(rentApp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除租赁独立商户应用;登录及权限共用若依
|
||||
*
|
||||
* @param ids 需要删除的租赁独立商户应用;登录及权限共用若依ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentAppByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<RentAppPlus> list= getByIds(Arrays.asList(ids),false,RentAppPlus::getUserId,RentAppPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return rentAppMapper.deleteRentAppByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除租赁独立商户应用;登录及权限共用若依信息
|
||||
*
|
||||
* @param id 租赁独立商户应用;登录及权限共用若依ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentAppById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
RentAppPlus vo = getById(id,RentAppPlus::getUserId,RentAppPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return rentAppMapper.deleteRentAppById(id);
|
||||
}
|
||||
}
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentCredential;
|
||||
import com.ruoyi.system.domain.RentCredentialPlus;
|
||||
import com.ruoyi.system.mapper.RentCredentialMapper;
|
||||
import com.ruoyi.system.service.IRentCredentialService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
/**
|
||||
* 商户及节点统一HMAC凭证版本;不含RSAService业务层处理
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@Service
|
||||
public class RentCredentialServiceImpl extends ServiceImpl<RentCredentialMapper, RentCredentialPlus> implements IRentCredentialService
|
||||
{
|
||||
@Autowired
|
||||
private RentCredentialMapper rentCredentialMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentCredentialPlus> getByIds(List<Long> ids, SFunction<RentCredentialPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentCredentialPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentCredentialPlus>()
|
||||
.select(columns).in(RentCredentialPlus::getId, ids);
|
||||
List<RentCredentialPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentCredentialPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentCredentialPlus>()
|
||||
.select(RentCredentialPlus::getId, RentCredentialPlus::getApiKey)
|
||||
.like(RentCredentialPlus::getApiKey, keyword);
|
||||
List<RentCredentialPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentCredentialPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getApiKey()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentCredentialPlus getById(Long id, SFunction<RentCredentialPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentCredentialPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentCredentialPlus>()
|
||||
.select(columns).eq(RentCredentialPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentCredentialPlus> getMapByIds(List<Long> ids, SFunction<RentCredentialPlus, ?>... columns) {
|
||||
List<RentCredentialPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentCredentialPlus> map = new HashMap<>();
|
||||
for (RentCredentialPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentCredentialPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentCredentialPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentCredentialPlus> map = new HashMap<>();
|
||||
for (RentCredentialPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentCredentialPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentCredentialPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentCredentialPlus>().in(RentCredentialPlus::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 rent_credential ");
|
||||
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(" rent_credential ");
|
||||
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(" rent_credential ");
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* 查询商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param id 商户及节点统一HMAC凭证版本;不含RSAID
|
||||
* @return 商户及节点统一HMAC凭证版本;不含RSA
|
||||
*/
|
||||
@Override
|
||||
public RentCredential selectRentCredentialById(Long id)
|
||||
{
|
||||
RentCredential vo = rentCredentialMapper.selectRentCredentialById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商户及节点统一HMAC凭证版本;不含RSA列表
|
||||
*
|
||||
* @param rentCredential 商户及节点统一HMAC凭证版本;不含RSA
|
||||
* @return 商户及节点统一HMAC凭证版本;不含RSA
|
||||
*/
|
||||
@Override
|
||||
public List<RentCredential> selectRentCredentialList(RentCredential rentCredential)
|
||||
{
|
||||
if(rentCredential == null){
|
||||
rentCredential = new RentCredential();
|
||||
}
|
||||
List<RentCredential> list = rentCredentialMapper.selectRentCredentialList(rentCredential);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param rentCredential 商户及节点统一HMAC凭证版本;不含RSA
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentCredential(RentCredential rentCredential)
|
||||
{
|
||||
rentCredential.setCreatedAt(DateUtils.getNowDate());
|
||||
rentCredential.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentCredentialMapper.insertRentCredential(rentCredential);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param rentCredential 商户及节点统一HMAC凭证版本;不含RSA
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentCredential(RentCredential rentCredential)
|
||||
{
|
||||
rentCredential.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentCredentialMapper.updateRentCredential(rentCredential);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商户及节点统一HMAC凭证版本;不含RSA
|
||||
*
|
||||
* @param ids 需要删除的商户及节点统一HMAC凭证版本;不含RSAID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentCredentialByIds(Long[] ids)
|
||||
{
|
||||
return rentCredentialMapper.deleteRentCredentialByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商户及节点统一HMAC凭证版本;不含RSA信息
|
||||
*
|
||||
* @param id 商户及节点统一HMAC凭证版本;不含RSAID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentCredentialById(Long id)
|
||||
{
|
||||
return rentCredentialMapper.deleteRentCredentialById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentEvent;
|
||||
import com.ruoyi.system.domain.RentEventPlus;
|
||||
import com.ruoyi.system.mapper.RentEventMapper;
|
||||
import com.ruoyi.system.service.IRentEventService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentEventServiceImpl extends ServiceImpl<RentEventMapper, RentEventPlus> implements IRentEventService
|
||||
{
|
||||
@Autowired
|
||||
private RentEventMapper rentEventMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentEventPlus> getByIds(List<Long> ids, SFunction<RentEventPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentEventPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentEventPlus>()
|
||||
.select(columns).in(RentEventPlus::getId, ids);
|
||||
List<RentEventPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentEventPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentEventPlus>()
|
||||
.select(RentEventPlus::getId, RentEventPlus::getEventNo)
|
||||
.like(RentEventPlus::getEventNo, keyword);
|
||||
List<RentEventPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentEventPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getEventNo()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentEventPlus getById(Long id, SFunction<RentEventPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentEventPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentEventPlus>()
|
||||
.select(columns).eq(RentEventPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentEventPlus> getMapByIds(List<Long> ids, SFunction<RentEventPlus, ?>... columns) {
|
||||
List<RentEventPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentEventPlus> map = new HashMap<>();
|
||||
for (RentEventPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentEventPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentEventPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentEventPlus> map = new HashMap<>();
|
||||
for (RentEventPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentEventPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentEventPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentEventPlus>().in(RentEventPlus::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 rent_event ");
|
||||
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(" rent_event ");
|
||||
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(" rent_event ");
|
||||
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 RentEvent selectRentEventById(Long id)
|
||||
{
|
||||
RentEvent vo = rentEventMapper.selectRentEventById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务操作和状态变更追加审计;关键事务同写列表
|
||||
*
|
||||
* @param rentEvent 业务操作和状态变更追加审计;关键事务同写
|
||||
* @return 业务操作和状态变更追加审计;关键事务同写
|
||||
*/
|
||||
@Override
|
||||
public List<RentEvent> selectRentEventList(RentEvent rentEvent)
|
||||
{
|
||||
if(rentEvent == null){
|
||||
rentEvent = new RentEvent();
|
||||
}
|
||||
List<RentEvent> list = rentEventMapper.selectRentEventList(rentEvent);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param rentEvent 业务操作和状态变更追加审计;关键事务同写
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentEvent(RentEvent rentEvent)
|
||||
{
|
||||
rentEvent.setCreatedAt(DateUtils.getNowDate());
|
||||
rentEvent.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentEventMapper.insertRentEvent(rentEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param rentEvent 业务操作和状态变更追加审计;关键事务同写
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentEvent(RentEvent rentEvent)
|
||||
{
|
||||
rentEvent.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentEventMapper.updateRentEvent(rentEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除业务操作和状态变更追加审计;关键事务同写
|
||||
*
|
||||
* @param ids 需要删除的业务操作和状态变更追加审计;关键事务同写ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentEventByIds(Long[] ids)
|
||||
{
|
||||
return rentEventMapper.deleteRentEventByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务操作和状态变更追加审计;关键事务同写信息
|
||||
*
|
||||
* @param id 业务操作和状态变更追加审计;关键事务同写ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentEventById(Long id)
|
||||
{
|
||||
return rentEventMapper.deleteRentEventById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentLedger;
|
||||
import com.ruoyi.system.domain.RentLedgerPlus;
|
||||
import com.ruoyi.system.mapper.RentLedgerMapper;
|
||||
import com.ruoyi.system.service.IRentLedgerService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentLedgerServiceImpl extends ServiceImpl<RentLedgerMapper, RentLedgerPlus> implements IRentLedgerService
|
||||
{
|
||||
@Autowired
|
||||
private RentLedgerMapper rentLedgerMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentLedgerPlus> getByIds(List<Long> ids, SFunction<RentLedgerPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentLedgerPlus>()
|
||||
.select(columns).in(RentLedgerPlus::getId, ids);
|
||||
List<RentLedgerPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentLedgerPlus>()
|
||||
.select(RentLedgerPlus::getId, RentLedgerPlus::getBusinessKey)
|
||||
.like(RentLedgerPlus::getBusinessKey, keyword);
|
||||
List<RentLedgerPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentLedgerPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getBusinessKey()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentLedgerPlus getById(Long id, SFunction<RentLedgerPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentLedgerPlus>()
|
||||
.select(columns).eq(RentLedgerPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentLedgerPlus> getMapByIds(List<Long> ids, SFunction<RentLedgerPlus, ?>... columns) {
|
||||
List<RentLedgerPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentLedgerPlus> map = new HashMap<>();
|
||||
for (RentLedgerPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentLedgerPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentLedgerPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentLedgerPlus> map = new HashMap<>();
|
||||
for (RentLedgerPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentLedgerPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentLedgerPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentLedgerPlus>().in(RentLedgerPlus::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 rent_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(" rent_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(" rent_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 RentLedger selectRentLedgerById(Long id)
|
||||
{
|
||||
RentLedger vo = rentLedgerMapper.selectRentLedgerById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖列表
|
||||
*
|
||||
* @param rentLedger 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
* @return 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*/
|
||||
@Override
|
||||
public List<RentLedger> selectRentLedgerList(RentLedger rentLedger)
|
||||
{
|
||||
if(rentLedger == null){
|
||||
rentLedger = new RentLedger();
|
||||
}
|
||||
List<RentLedger> list = rentLedgerMapper.selectRentLedgerList(rentLedger);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param rentLedger 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentLedger(RentLedger rentLedger)
|
||||
{
|
||||
rentLedger.setCreatedAt(DateUtils.getNowDate());
|
||||
rentLedger.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentLedgerMapper.insertRentLedger(rentLedger);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param rentLedger 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentLedger(RentLedger rentLedger)
|
||||
{
|
||||
rentLedger.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentLedgerMapper.updateRentLedger(rentLedger);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖
|
||||
*
|
||||
* @param ids 需要删除的不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentLedgerByIds(Long[] ids)
|
||||
{
|
||||
return rentLedgerMapper.deleteRentLedgerByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖信息
|
||||
*
|
||||
* @param id 不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentLedgerById(Long id)
|
||||
{
|
||||
return rentLedgerMapper.deleteRentLedgerById(id);
|
||||
}
|
||||
}
|
||||
@@ -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.RentNode;
|
||||
import com.ruoyi.system.domain.RentNodePlus;
|
||||
import com.ruoyi.system.mapper.RentNodeMapper;
|
||||
import com.ruoyi.system.service.IRentNodeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
/**
|
||||
* 供应商本地Agent节点;供应商直接关联共享用户,不另建成员Service业务层处理
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@Service
|
||||
public class RentNodeServiceImpl extends ServiceImpl<RentNodeMapper, RentNodePlus> implements IRentNodeService
|
||||
{
|
||||
@Autowired
|
||||
private RentNodeMapper rentNodeMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentNodePlus> getByIds(List<Long> ids ,boolean isUser, SFunction<RentNodePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentNodePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentNodePlus>()
|
||||
.select(columns).in(RentNodePlus::getId, ids);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(RentNodePlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<RentNodePlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
private void checkUserPlus(List<RentNodePlus> list) {
|
||||
for (RentNodePlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(List<RentNode> list) {
|
||||
for (RentNode item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(RentNodePlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
private void checkUser(RentNode item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
LambdaQueryWrapper<RentNodePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentNodePlus>()
|
||||
.select(RentNodePlus::getId,RentNodePlus::getUserId, RentNodePlus::getName)
|
||||
.like(RentNodePlus::getName, keyword);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(RentNodePlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<RentNodePlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentNodePlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getName());
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentNodePlus getById(Long id, SFunction<RentNodePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentNodePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentNodePlus>()
|
||||
.select(columns).eq(RentNodePlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentNodePlus> getMapByIds(List<Long> ids, SFunction<RentNodePlus, ?>... columns) {
|
||||
List<RentNodePlus> list = this.getByIds(ids,false, columns);
|
||||
Map<Long, RentNodePlus> map = new HashMap<>();
|
||||
for (RentNodePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentNodePlus> getMapByIds(List<Long> ids) {
|
||||
List<RentNodePlus> list = this.getByIds(ids);
|
||||
Map<Long, RentNodePlus> map = new HashMap<>();
|
||||
for (RentNodePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentNodePlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentNodePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentNodePlus>().in(RentNodePlus::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 rent_node ");
|
||||
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(" rent_node ");
|
||||
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(" rent_node ");
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* 查询供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param id 供应商本地Agent节点;供应商直接关联共享用户,不另建成员ID
|
||||
* @return 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*/
|
||||
@Override
|
||||
public RentNode selectRentNodeById(Long id,boolean isUser)
|
||||
{
|
||||
RentNode vo = rentNodeMapper.selectRentNodeById(id);
|
||||
if(isUser){
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应商本地Agent节点;供应商直接关联共享用户,不另建成员列表
|
||||
*
|
||||
* @param rentNode 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
* @return 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*/
|
||||
@Override
|
||||
public List<RentNode> selectRentNodeList(RentNode rentNode,boolean isUser)
|
||||
{
|
||||
if(rentNode == null){
|
||||
rentNode = new RentNode();
|
||||
}
|
||||
if(isUser){
|
||||
rentNode.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<RentNode> list = rentNodeMapper.selectRentNodeList(rentNode);
|
||||
if(isUser){
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param rentNode 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentNode(RentNode rentNode,boolean isUser)
|
||||
{
|
||||
rentNode.setCreatedAt(DateUtils.getNowDate());
|
||||
rentNode.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
rentNode.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return rentNodeMapper.insertRentNode(rentNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param rentNode 供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentNode(RentNode rentNode,boolean isUser)
|
||||
{
|
||||
rentNode.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
checkUser(rentNode);
|
||||
}
|
||||
return rentNodeMapper.updateRentNode(rentNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除供应商本地Agent节点;供应商直接关联共享用户,不另建成员
|
||||
*
|
||||
* @param ids 需要删除的供应商本地Agent节点;供应商直接关联共享用户,不另建成员ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentNodeByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<RentNodePlus> list= getByIds(Arrays.asList(ids),false,RentNodePlus::getUserId,RentNodePlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return rentNodeMapper.deleteRentNodeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应商本地Agent节点;供应商直接关联共享用户,不另建成员信息
|
||||
*
|
||||
* @param id 供应商本地Agent节点;供应商直接关联共享用户,不另建成员ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentNodeById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
RentNodePlus vo = getById(id,RentNodePlus::getUserId,RentNodePlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return rentNodeMapper.deleteRentNodeById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentNonce;
|
||||
import com.ruoyi.system.domain.RentNoncePlus;
|
||||
import com.ruoyi.system.mapper.RentNonceMapper;
|
||||
import com.ruoyi.system.service.IRentNonceService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
/**
|
||||
* HMAC请求防重放记录Service业务层处理
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-22
|
||||
*/
|
||||
@Service
|
||||
public class RentNonceServiceImpl extends ServiceImpl<RentNonceMapper, RentNoncePlus> implements IRentNonceService
|
||||
{
|
||||
@Autowired
|
||||
private RentNonceMapper rentNonceMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentNoncePlus> getByIds(List<Long> ids, SFunction<RentNoncePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentNoncePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentNoncePlus>()
|
||||
.select(columns).in(RentNoncePlus::getId, ids);
|
||||
List<RentNoncePlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentNoncePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentNoncePlus>()
|
||||
.select(RentNoncePlus::getId, RentNoncePlus::getNonce)
|
||||
.like(RentNoncePlus::getNonce, keyword);
|
||||
List<RentNoncePlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentNoncePlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getNonce()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentNoncePlus getById(Long id, SFunction<RentNoncePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentNoncePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentNoncePlus>()
|
||||
.select(columns).eq(RentNoncePlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentNoncePlus> getMapByIds(List<Long> ids, SFunction<RentNoncePlus, ?>... columns) {
|
||||
List<RentNoncePlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentNoncePlus> map = new HashMap<>();
|
||||
for (RentNoncePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentNoncePlus> getMapByIds(List<Long> ids) {
|
||||
List<RentNoncePlus> list = this.getByIds(ids);
|
||||
Map<Long, RentNoncePlus> map = new HashMap<>();
|
||||
for (RentNoncePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentNoncePlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentNoncePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentNoncePlus>().in(RentNoncePlus::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 rent_nonce ");
|
||||
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(" rent_nonce ");
|
||||
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(" rent_nonce ");
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* 查询HMAC请求防重放记录
|
||||
*
|
||||
* @param id HMAC请求防重放记录ID
|
||||
* @return HMAC请求防重放记录
|
||||
*/
|
||||
@Override
|
||||
public RentNonce selectRentNonceById(Long id)
|
||||
{
|
||||
RentNonce vo = rentNonceMapper.selectRentNonceById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询HMAC请求防重放记录列表
|
||||
*
|
||||
* @param rentNonce HMAC请求防重放记录
|
||||
* @return HMAC请求防重放记录
|
||||
*/
|
||||
@Override
|
||||
public List<RentNonce> selectRentNonceList(RentNonce rentNonce)
|
||||
{
|
||||
if(rentNonce == null){
|
||||
rentNonce = new RentNonce();
|
||||
}
|
||||
List<RentNonce> list = rentNonceMapper.selectRentNonceList(rentNonce);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增HMAC请求防重放记录
|
||||
*
|
||||
* @param rentNonce HMAC请求防重放记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentNonce(RentNonce rentNonce)
|
||||
{
|
||||
rentNonce.setCreatedAt(DateUtils.getNowDate());
|
||||
rentNonce.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentNonceMapper.insertRentNonce(rentNonce);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改HMAC请求防重放记录
|
||||
*
|
||||
* @param rentNonce HMAC请求防重放记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentNonce(RentNonce rentNonce)
|
||||
{
|
||||
rentNonce.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentNonceMapper.updateRentNonce(rentNonce);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除HMAC请求防重放记录
|
||||
*
|
||||
* @param ids 需要删除的HMAC请求防重放记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentNonceByIds(Long[] ids)
|
||||
{
|
||||
return rentNonceMapper.deleteRentNonceByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除HMAC请求防重放记录信息
|
||||
*
|
||||
* @param id HMAC请求防重放记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentNonceById(Long id)
|
||||
{
|
||||
return rentNonceMapper.deleteRentNonceById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentOrder;
|
||||
import com.ruoyi.system.domain.RentOrderPlus;
|
||||
import com.ruoyi.system.mapper.RentOrderMapper;
|
||||
import com.ruoyi.system.service.IRentOrderService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentOrderServiceImpl extends ServiceImpl<RentOrderMapper, RentOrderPlus> implements IRentOrderService
|
||||
{
|
||||
@Autowired
|
||||
private RentOrderMapper rentOrderMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentOrderPlus> getByIds(List<Long> ids, SFunction<RentOrderPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentOrderPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentOrderPlus>()
|
||||
.select(columns).in(RentOrderPlus::getId, ids);
|
||||
List<RentOrderPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentOrderPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentOrderPlus>()
|
||||
.select(RentOrderPlus::getId, RentOrderPlus::getOrderNo)
|
||||
.like(RentOrderPlus::getOrderNo, keyword);
|
||||
List<RentOrderPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentOrderPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getOrderNo()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentOrderPlus getById(Long id, SFunction<RentOrderPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentOrderPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentOrderPlus>()
|
||||
.select(columns).eq(RentOrderPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentOrderPlus> getMapByIds(List<Long> ids, SFunction<RentOrderPlus, ?>... columns) {
|
||||
List<RentOrderPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentOrderPlus> map = new HashMap<>();
|
||||
for (RentOrderPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentOrderPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentOrderPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentOrderPlus> map = new HashMap<>();
|
||||
for (RentOrderPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentOrderPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentOrderPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentOrderPlus>().in(RentOrderPlus::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 rent_order ");
|
||||
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(" rent_order ");
|
||||
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(" rent_order ");
|
||||
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 RentOrder selectRentOrderById(Long id)
|
||||
{
|
||||
RentOrder vo = rentOrderMapper.selectRentOrderById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开列表
|
||||
*
|
||||
* @param rentOrder 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
* @return 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*/
|
||||
@Override
|
||||
public List<RentOrder> selectRentOrderList(RentOrder rentOrder)
|
||||
{
|
||||
if(rentOrder == null){
|
||||
rentOrder = new RentOrder();
|
||||
}
|
||||
List<RentOrder> list = rentOrderMapper.selectRentOrderList(rentOrder);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param rentOrder 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentOrder(RentOrder rentOrder)
|
||||
{
|
||||
rentOrder.setCreatedAt(DateUtils.getNowDate());
|
||||
rentOrder.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentOrderMapper.insertRentOrder(rentOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param rentOrder 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentOrder(RentOrder rentOrder)
|
||||
{
|
||||
rentOrder.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentOrderMapper.updateRentOrder(rentOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开
|
||||
*
|
||||
* @param ids 需要删除的能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentOrderByIds(Long[] ids)
|
||||
{
|
||||
return rentOrderMapper.deleteRentOrderByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开信息
|
||||
*
|
||||
* @param id 能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentOrderById(Long id)
|
||||
{
|
||||
return rentOrderMapper.deleteRentOrderById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentPackage;
|
||||
import com.ruoyi.system.domain.RentPackagePlus;
|
||||
import com.ruoyi.system.mapper.RentPackageMapper;
|
||||
import com.ruoyi.system.service.IRentPackageService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentPackageServiceImpl extends ServiceImpl<RentPackageMapper, RentPackagePlus> implements IRentPackageService
|
||||
{
|
||||
@Autowired
|
||||
private RentPackageMapper rentPackageMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentPackagePlus> getByIds(List<Long> ids, SFunction<RentPackagePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentPackagePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentPackagePlus>()
|
||||
.select(columns).in(RentPackagePlus::getId, ids);
|
||||
List<RentPackagePlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentPackagePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentPackagePlus>()
|
||||
.select(RentPackagePlus::getId, RentPackagePlus::getName)
|
||||
.like(RentPackagePlus::getName, keyword);
|
||||
List<RentPackagePlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentPackagePlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getName());
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentPackagePlus getById(Long id, SFunction<RentPackagePlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentPackagePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentPackagePlus>()
|
||||
.select(columns).eq(RentPackagePlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentPackagePlus> getMapByIds(List<Long> ids, SFunction<RentPackagePlus, ?>... columns) {
|
||||
List<RentPackagePlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentPackagePlus> map = new HashMap<>();
|
||||
for (RentPackagePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentPackagePlus> getMapByIds(List<Long> ids) {
|
||||
List<RentPackagePlus> list = this.getByIds(ids);
|
||||
Map<Long, RentPackagePlus> map = new HashMap<>();
|
||||
for (RentPackagePlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentPackagePlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentPackagePlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentPackagePlus>().in(RentPackagePlus::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 rent_package ");
|
||||
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(" rent_package ");
|
||||
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(" rent_package ");
|
||||
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 RentPackage selectRentPackageById(Long id)
|
||||
{
|
||||
RentPackage vo = rentPackageMapper.selectRentPackageById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变列表
|
||||
*
|
||||
* @param rentPackage 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
* @return 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*/
|
||||
@Override
|
||||
public List<RentPackage> selectRentPackageList(RentPackage rentPackage)
|
||||
{
|
||||
if(rentPackage == null){
|
||||
rentPackage = new RentPackage();
|
||||
}
|
||||
List<RentPackage> list = rentPackageMapper.selectRentPackageList(rentPackage);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param rentPackage 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentPackage(RentPackage rentPackage)
|
||||
{
|
||||
rentPackage.setCreatedAt(DateUtils.getNowDate());
|
||||
rentPackage.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentPackageMapper.insertRentPackage(rentPackage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param rentPackage 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentPackage(RentPackage rentPackage)
|
||||
{
|
||||
rentPackage.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentPackageMapper.updateRentPackage(rentPackage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变
|
||||
*
|
||||
* @param ids 需要删除的能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentPackageByIds(Long[] ids)
|
||||
{
|
||||
return rentPackageMapper.deleteRentPackageByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变信息
|
||||
*
|
||||
* @param id 能量或带宽固定套餐及价格版本;套餐代码的资源类型不可改变ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentPackageById(Long id)
|
||||
{
|
||||
return rentPackageMapper.deleteRentPackageById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentRefund;
|
||||
import com.ruoyi.system.domain.RentRefundPlus;
|
||||
import com.ruoyi.system.mapper.RentRefundMapper;
|
||||
import com.ruoyi.system.service.IRentRefundService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentRefundServiceImpl extends ServiceImpl<RentRefundMapper, RentRefundPlus> implements IRentRefundService
|
||||
{
|
||||
@Autowired
|
||||
private RentRefundMapper rentRefundMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentRefundPlus> getByIds(List<Long> ids, SFunction<RentRefundPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentRefundPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentRefundPlus>()
|
||||
.select(columns).in(RentRefundPlus::getId, ids);
|
||||
List<RentRefundPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentRefundPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentRefundPlus>()
|
||||
.select(RentRefundPlus::getId, RentRefundPlus::getRefundNo)
|
||||
.like(RentRefundPlus::getRefundNo, keyword);
|
||||
List<RentRefundPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentRefundPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getRefundNo()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentRefundPlus getById(Long id, SFunction<RentRefundPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentRefundPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentRefundPlus>()
|
||||
.select(columns).eq(RentRefundPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentRefundPlus> getMapByIds(List<Long> ids, SFunction<RentRefundPlus, ?>... columns) {
|
||||
List<RentRefundPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentRefundPlus> map = new HashMap<>();
|
||||
for (RentRefundPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentRefundPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentRefundPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentRefundPlus> map = new HashMap<>();
|
||||
for (RentRefundPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentRefundPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentRefundPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentRefundPlus>().in(RentRefundPlus::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 rent_refund ");
|
||||
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(" rent_refund ");
|
||||
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(" rent_refund ");
|
||||
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 RentRefund selectRentRefundById(Long id)
|
||||
{
|
||||
RentRefund vo = rentRefundMapper.selectRentRefundById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史列表
|
||||
*
|
||||
* @param rentRefund 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
* @return 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*/
|
||||
@Override
|
||||
public List<RentRefund> selectRentRefundList(RentRefund rentRefund)
|
||||
{
|
||||
if(rentRefund == null){
|
||||
rentRefund = new RentRefund();
|
||||
}
|
||||
List<RentRefund> list = rentRefundMapper.selectRentRefundList(rentRefund);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param rentRefund 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentRefund(RentRefund rentRefund)
|
||||
{
|
||||
rentRefund.setCreatedAt(DateUtils.getNowDate());
|
||||
rentRefund.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentRefundMapper.insertRentRefund(rentRefund);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param rentRefund 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentRefund(RentRefund rentRefund)
|
||||
{
|
||||
rentRefund.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentRefundMapper.updateRentRefund(rentRefund);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史
|
||||
*
|
||||
* @param ids 需要删除的内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentRefundByIds(Long[] ids)
|
||||
{
|
||||
return rentRefundMapper.deleteRentRefundByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史信息
|
||||
*
|
||||
* @param id 内部余额退款审批与幂等来源;部分退款逐次新增,不覆盖历史ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentRefundById(Long id)
|
||||
{
|
||||
return rentRefundMapper.deleteRentRefundById(id);
|
||||
}
|
||||
}
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentSettlementItem;
|
||||
import com.ruoyi.system.domain.RentSettlementItemPlus;
|
||||
import com.ruoyi.system.mapper.RentSettlementItemMapper;
|
||||
import com.ruoyi.system.service.IRentSettlementItemService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentSettlementItemServiceImpl extends ServiceImpl<RentSettlementItemMapper, RentSettlementItemPlus> implements IRentSettlementItemService
|
||||
{
|
||||
@Autowired
|
||||
private RentSettlementItemMapper rentSettlementItemMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentSettlementItemPlus> getByIds(List<Long> ids, SFunction<RentSettlementItemPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentSettlementItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentSettlementItemPlus>()
|
||||
.select(columns).in(RentSettlementItemPlus::getId, ids);
|
||||
List<RentSettlementItemPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentSettlementItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentSettlementItemPlus>()
|
||||
.select(RentSettlementItemPlus::getId, RentSettlementItemPlus::getOrderId)
|
||||
.like(RentSettlementItemPlus::getOrderId, keyword);
|
||||
List<RentSettlementItemPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentSettlementItemPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getOrderId()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentSettlementItemPlus getById(Long id, SFunction<RentSettlementItemPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentSettlementItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentSettlementItemPlus>()
|
||||
.select(columns).eq(RentSettlementItemPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentSettlementItemPlus> getMapByIds(List<Long> ids, SFunction<RentSettlementItemPlus, ?>... columns) {
|
||||
List<RentSettlementItemPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentSettlementItemPlus> map = new HashMap<>();
|
||||
for (RentSettlementItemPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentSettlementItemPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentSettlementItemPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentSettlementItemPlus> map = new HashMap<>();
|
||||
for (RentSettlementItemPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentSettlementItemPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentSettlementItemPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentSettlementItemPlus>().in(RentSettlementItemPlus::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 rent_settlement_item ");
|
||||
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(" rent_settlement_item ");
|
||||
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(" rent_settlement_item ");
|
||||
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 RentSettlementItem selectRentSettlementItemById(Long id)
|
||||
{
|
||||
RentSettlementItem vo = rentSettlementItemMapper.selectRentSettlementItemById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应商订单应收与结算关联;首版每单全额结算一次列表
|
||||
*
|
||||
* @param rentSettlementItem 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
* @return 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*/
|
||||
@Override
|
||||
public List<RentSettlementItem> selectRentSettlementItemList(RentSettlementItem rentSettlementItem)
|
||||
{
|
||||
if(rentSettlementItem == null){
|
||||
rentSettlementItem = new RentSettlementItem();
|
||||
}
|
||||
List<RentSettlementItem> list = rentSettlementItemMapper.selectRentSettlementItemList(rentSettlementItem);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param rentSettlementItem 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentSettlementItem(RentSettlementItem rentSettlementItem)
|
||||
{
|
||||
rentSettlementItem.setCreatedAt(DateUtils.getNowDate());
|
||||
rentSettlementItem.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentSettlementItemMapper.insertRentSettlementItem(rentSettlementItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param rentSettlementItem 供应商订单应收与结算关联;首版每单全额结算一次
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentSettlementItem(RentSettlementItem rentSettlementItem)
|
||||
{
|
||||
rentSettlementItem.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentSettlementItemMapper.updateRentSettlementItem(rentSettlementItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除供应商订单应收与结算关联;首版每单全额结算一次
|
||||
*
|
||||
* @param ids 需要删除的供应商订单应收与结算关联;首版每单全额结算一次ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentSettlementItemByIds(Long[] ids)
|
||||
{
|
||||
return rentSettlementItemMapper.deleteRentSettlementItemByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应商订单应收与结算关联;首版每单全额结算一次信息
|
||||
*
|
||||
* @param id 供应商订单应收与结算关联;首版每单全额结算一次ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentSettlementItemById(Long id)
|
||||
{
|
||||
return rentSettlementItemMapper.deleteRentSettlementItemById(id);
|
||||
}
|
||||
}
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentSettlement;
|
||||
import com.ruoyi.system.domain.RentSettlementPlus;
|
||||
import com.ruoyi.system.mapper.RentSettlementMapper;
|
||||
import com.ruoyi.system.service.IRentSettlementService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentSettlementServiceImpl extends ServiceImpl<RentSettlementMapper, RentSettlementPlus> implements IRentSettlementService
|
||||
{
|
||||
@Autowired
|
||||
private RentSettlementMapper rentSettlementMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentSettlementPlus> getByIds(List<Long> ids, SFunction<RentSettlementPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentSettlementPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentSettlementPlus>()
|
||||
.select(columns).in(RentSettlementPlus::getId, ids);
|
||||
List<RentSettlementPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentSettlementPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentSettlementPlus>()
|
||||
.select(RentSettlementPlus::getId, RentSettlementPlus::getSettlementNo)
|
||||
.like(RentSettlementPlus::getSettlementNo, keyword);
|
||||
List<RentSettlementPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentSettlementPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getSettlementNo()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentSettlementPlus getById(Long id, SFunction<RentSettlementPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentSettlementPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentSettlementPlus>()
|
||||
.select(columns).eq(RentSettlementPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentSettlementPlus> getMapByIds(List<Long> ids, SFunction<RentSettlementPlus, ?>... columns) {
|
||||
List<RentSettlementPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentSettlementPlus> map = new HashMap<>();
|
||||
for (RentSettlementPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentSettlementPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentSettlementPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentSettlementPlus> map = new HashMap<>();
|
||||
for (RentSettlementPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentSettlementPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentSettlementPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentSettlementPlus>().in(RentSettlementPlus::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 rent_settlement ");
|
||||
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(" rent_settlement ");
|
||||
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(" rent_settlement ");
|
||||
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 RentSettlement selectRentSettlementById(Long id)
|
||||
{
|
||||
RentSettlement vo = rentSettlementMapper.selectRentSettlementById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应商人工结算单;不自动链上出金列表
|
||||
*
|
||||
* @param rentSettlement 供应商人工结算单;不自动链上出金
|
||||
* @return 供应商人工结算单;不自动链上出金
|
||||
*/
|
||||
@Override
|
||||
public List<RentSettlement> selectRentSettlementList(RentSettlement rentSettlement)
|
||||
{
|
||||
if(rentSettlement == null){
|
||||
rentSettlement = new RentSettlement();
|
||||
}
|
||||
List<RentSettlement> list = rentSettlementMapper.selectRentSettlementList(rentSettlement);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param rentSettlement 供应商人工结算单;不自动链上出金
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentSettlement(RentSettlement rentSettlement)
|
||||
{
|
||||
rentSettlement.setCreatedAt(DateUtils.getNowDate());
|
||||
rentSettlement.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentSettlementMapper.insertRentSettlement(rentSettlement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param rentSettlement 供应商人工结算单;不自动链上出金
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentSettlement(RentSettlement rentSettlement)
|
||||
{
|
||||
rentSettlement.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentSettlementMapper.updateRentSettlement(rentSettlement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除供应商人工结算单;不自动链上出金
|
||||
*
|
||||
* @param ids 需要删除的供应商人工结算单;不自动链上出金ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentSettlementByIds(Long[] ids)
|
||||
{
|
||||
return rentSettlementMapper.deleteRentSettlementByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应商人工结算单;不自动链上出金信息
|
||||
*
|
||||
* @param id 供应商人工结算单;不自动链上出金ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentSettlementById(Long id)
|
||||
{
|
||||
return rentSettlementMapper.deleteRentSettlementById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentTask;
|
||||
import com.ruoyi.system.domain.RentTaskPlus;
|
||||
import com.ruoyi.system.mapper.RentTaskMapper;
|
||||
import com.ruoyi.system.service.IRentTaskService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentTaskServiceImpl extends ServiceImpl<RentTaskMapper, RentTaskPlus> implements IRentTaskService
|
||||
{
|
||||
@Autowired
|
||||
private RentTaskMapper rentTaskMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentTaskPlus> getByIds(List<Long> ids, SFunction<RentTaskPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentTaskPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentTaskPlus>()
|
||||
.select(columns).in(RentTaskPlus::getId, ids);
|
||||
List<RentTaskPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentTaskPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentTaskPlus>()
|
||||
.select(RentTaskPlus::getId, RentTaskPlus::getTaskNo)
|
||||
.like(RentTaskPlus::getTaskNo, keyword);
|
||||
List<RentTaskPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentTaskPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getTaskNo()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentTaskPlus getById(Long id, SFunction<RentTaskPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentTaskPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentTaskPlus>()
|
||||
.select(columns).eq(RentTaskPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentTaskPlus> getMapByIds(List<Long> ids, SFunction<RentTaskPlus, ?>... columns) {
|
||||
List<RentTaskPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentTaskPlus> map = new HashMap<>();
|
||||
for (RentTaskPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentTaskPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentTaskPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentTaskPlus> map = new HashMap<>();
|
||||
for (RentTaskPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentTaskPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentTaskPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentTaskPlus>().in(RentTaskPlus::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 rent_task ");
|
||||
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(" rent_task ");
|
||||
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(" rent_task ");
|
||||
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 RentTask selectRentTaskById(Long id)
|
||||
{
|
||||
RentTask vo = rentTaskMapper.selectRentTaskById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询委托或回收任务,兼作持久队列与资源预留明细列表
|
||||
*
|
||||
* @param rentTask 委托或回收任务,兼作持久队列与资源预留明细
|
||||
* @return 委托或回收任务,兼作持久队列与资源预留明细
|
||||
*/
|
||||
@Override
|
||||
public List<RentTask> selectRentTaskList(RentTask rentTask)
|
||||
{
|
||||
if(rentTask == null){
|
||||
rentTask = new RentTask();
|
||||
}
|
||||
List<RentTask> list = rentTaskMapper.selectRentTaskList(rentTask);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param rentTask 委托或回收任务,兼作持久队列与资源预留明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentTask(RentTask rentTask)
|
||||
{
|
||||
rentTask.setCreatedAt(DateUtils.getNowDate());
|
||||
rentTask.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentTaskMapper.insertRentTask(rentTask);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param rentTask 委托或回收任务,兼作持久队列与资源预留明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentTask(RentTask rentTask)
|
||||
{
|
||||
rentTask.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentTaskMapper.updateRentTask(rentTask);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除委托或回收任务,兼作持久队列与资源预留明细
|
||||
*
|
||||
* @param ids 需要删除的委托或回收任务,兼作持久队列与资源预留明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentTaskByIds(Long[] ids)
|
||||
{
|
||||
return rentTaskMapper.deleteRentTaskByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除委托或回收任务,兼作持久队列与资源预留明细信息
|
||||
*
|
||||
* @param id 委托或回收任务,兼作持久队列与资源预留明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentTaskById(Long id)
|
||||
{
|
||||
return rentTaskMapper.deleteRentTaskById(id);
|
||||
}
|
||||
}
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentTransaction;
|
||||
import com.ruoyi.system.domain.RentTransactionPlus;
|
||||
import com.ruoyi.system.mapper.RentTransactionMapper;
|
||||
import com.ruoyi.system.service.IRentTransactionService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentTransactionServiceImpl extends ServiceImpl<RentTransactionMapper, RentTransactionPlus> implements IRentTransactionService
|
||||
{
|
||||
@Autowired
|
||||
private RentTransactionMapper rentTransactionMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentTransactionPlus> getByIds(List<Long> ids, SFunction<RentTransactionPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentTransactionPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentTransactionPlus>()
|
||||
.select(columns).in(RentTransactionPlus::getId, ids);
|
||||
List<RentTransactionPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentTransactionPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentTransactionPlus>()
|
||||
.select(RentTransactionPlus::getId, RentTransactionPlus::getTxId)
|
||||
.like(RentTransactionPlus::getTxId, keyword);
|
||||
List<RentTransactionPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentTransactionPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getTxId()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentTransactionPlus getById(Long id, SFunction<RentTransactionPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentTransactionPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentTransactionPlus>()
|
||||
.select(columns).eq(RentTransactionPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentTransactionPlus> getMapByIds(List<Long> ids, SFunction<RentTransactionPlus, ?>... columns) {
|
||||
List<RentTransactionPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentTransactionPlus> map = new HashMap<>();
|
||||
for (RentTransactionPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentTransactionPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentTransactionPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentTransactionPlus> map = new HashMap<>();
|
||||
for (RentTransactionPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentTransactionPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentTransactionPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentTransactionPlus>().in(RentTransactionPlus::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 rent_transaction ");
|
||||
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(" rent_transaction ");
|
||||
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(" rent_transaction ");
|
||||
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 RentTransaction selectRentTransactionById(Long id)
|
||||
{
|
||||
RentTransaction vo = rentTransactionMapper.selectRentTransactionById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询链上委托或回收证据;一任务只能构建一笔交易列表
|
||||
*
|
||||
* @param rentTransaction 链上委托或回收证据;一任务只能构建一笔交易
|
||||
* @return 链上委托或回收证据;一任务只能构建一笔交易
|
||||
*/
|
||||
@Override
|
||||
public List<RentTransaction> selectRentTransactionList(RentTransaction rentTransaction)
|
||||
{
|
||||
if(rentTransaction == null){
|
||||
rentTransaction = new RentTransaction();
|
||||
}
|
||||
List<RentTransaction> list = rentTransactionMapper.selectRentTransactionList(rentTransaction);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param rentTransaction 链上委托或回收证据;一任务只能构建一笔交易
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentTransaction(RentTransaction rentTransaction)
|
||||
{
|
||||
rentTransaction.setCreatedAt(DateUtils.getNowDate());
|
||||
rentTransaction.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentTransactionMapper.insertRentTransaction(rentTransaction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param rentTransaction 链上委托或回收证据;一任务只能构建一笔交易
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentTransaction(RentTransaction rentTransaction)
|
||||
{
|
||||
rentTransaction.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentTransactionMapper.updateRentTransaction(rentTransaction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除链上委托或回收证据;一任务只能构建一笔交易
|
||||
*
|
||||
* @param ids 需要删除的链上委托或回收证据;一任务只能构建一笔交易ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentTransactionByIds(Long[] ids)
|
||||
{
|
||||
return rentTransactionMapper.deleteRentTransactionByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除链上委托或回收证据;一任务只能构建一笔交易信息
|
||||
*
|
||||
* @param id 链上委托或回收证据;一任务只能构建一笔交易ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentTransactionById(Long id)
|
||||
{
|
||||
return rentTransactionMapper.deleteRentTransactionById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentWallet;
|
||||
import com.ruoyi.system.domain.RentWalletPlus;
|
||||
import com.ruoyi.system.mapper.RentWalletMapper;
|
||||
import com.ruoyi.system.service.IRentWalletService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentWalletServiceImpl extends ServiceImpl<RentWalletMapper, RentWalletPlus> implements IRentWalletService
|
||||
{
|
||||
@Autowired
|
||||
private RentWalletMapper rentWalletMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentWalletPlus> getByIds(List<Long> ids, SFunction<RentWalletPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentWalletPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentWalletPlus>()
|
||||
.select(columns).in(RentWalletPlus::getId, ids);
|
||||
List<RentWalletPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentWalletPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentWalletPlus>()
|
||||
.select(RentWalletPlus::getId, RentWalletPlus::getAddress)
|
||||
.like(RentWalletPlus::getAddress, keyword);
|
||||
List<RentWalletPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentWalletPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getAddress()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentWalletPlus getById(Long id, SFunction<RentWalletPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentWalletPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentWalletPlus>()
|
||||
.select(columns).eq(RentWalletPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentWalletPlus> getMapByIds(List<Long> ids, SFunction<RentWalletPlus, ?>... columns) {
|
||||
List<RentWalletPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentWalletPlus> map = new HashMap<>();
|
||||
for (RentWalletPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentWalletPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentWalletPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentWalletPlus> map = new HashMap<>();
|
||||
for (RentWalletPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentWalletPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentWalletPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentWalletPlus>().in(RentWalletPlus::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 rent_wallet ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" rent_wallet ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" rent_wallet ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
stringBuffer.append(" group by ");
|
||||
stringBuffer.append(groupby);
|
||||
List result = jdbcTemplate.queryForList(stringBuffer.toString());
|
||||
List<T> tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass);
|
||||
return tList;
|
||||
}
|
||||
/**
|
||||
* 查询供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param id 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点ID
|
||||
* @return 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*/
|
||||
@Override
|
||||
public RentWallet selectRentWalletById(Long id)
|
||||
{
|
||||
RentWallet vo = rentWalletMapper.selectRentWalletById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点列表
|
||||
*
|
||||
* @param rentWallet 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
* @return 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*/
|
||||
@Override
|
||||
public List<RentWallet> selectRentWalletList(RentWallet rentWallet)
|
||||
{
|
||||
if(rentWallet == null){
|
||||
rentWallet = new RentWallet();
|
||||
}
|
||||
List<RentWallet> list = rentWalletMapper.selectRentWalletList(rentWallet);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param rentWallet 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentWallet(RentWallet rentWallet)
|
||||
{
|
||||
rentWallet.setCreatedAt(DateUtils.getNowDate());
|
||||
rentWallet.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentWalletMapper.insertRentWallet(rentWallet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param rentWallet 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentWallet(RentWallet rentWallet)
|
||||
{
|
||||
rentWallet.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentWalletMapper.updateRentWallet(rentWallet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点
|
||||
*
|
||||
* @param ids 需要删除的供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentWalletByIds(Long[] ids)
|
||||
{
|
||||
return rentWalletMapper.deleteRentWalletByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点信息
|
||||
*
|
||||
* @param id 供应钱包及能量带宽独立资源池投影;一个钱包绑定一个执行节点ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentWalletById(Long id)
|
||||
{
|
||||
return rentWalletMapper.deleteRentWalletById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
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.StringUtils;
|
||||
import com.ruoyi.system.domain.RentWebhook;
|
||||
import com.ruoyi.system.domain.RentWebhookPlus;
|
||||
import com.ruoyi.system.mapper.RentWebhookMapper;
|
||||
import com.ruoyi.system.service.IRentWebhookService;
|
||||
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-22
|
||||
*/
|
||||
@Service
|
||||
public class RentWebhookServiceImpl extends ServiceImpl<RentWebhookMapper, RentWebhookPlus> implements IRentWebhookService
|
||||
{
|
||||
@Autowired
|
||||
private RentWebhookMapper rentWebhookMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<RentWebhookPlus> getByIds(List<Long> ids, SFunction<RentWebhookPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentWebhookPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentWebhookPlus>()
|
||||
.select(columns).in(RentWebhookPlus::getId, ids);
|
||||
List<RentWebhookPlus> list = this.list(lambdaQueryWrapper);
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword) {
|
||||
LambdaQueryWrapper<RentWebhookPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentWebhookPlus>()
|
||||
.select(RentWebhookPlus::getId, RentWebhookPlus::getEventNo)
|
||||
.like(RentWebhookPlus::getEventNo, keyword);
|
||||
List<RentWebhookPlus> list = this.list(lambdaQueryWrapper);
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (RentWebhookPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(String.valueOf(item.getEventNo()));
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public RentWebhookPlus getById(Long id, SFunction<RentWebhookPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<RentWebhookPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentWebhookPlus>()
|
||||
.select(columns).eq(RentWebhookPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentWebhookPlus> getMapByIds(List<Long> ids, SFunction<RentWebhookPlus, ?>... columns) {
|
||||
List<RentWebhookPlus> list = this.getByIds(ids, columns);
|
||||
Map<Long, RentWebhookPlus> map = new HashMap<>();
|
||||
for (RentWebhookPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, RentWebhookPlus> getMapByIds(List<Long> ids) {
|
||||
List<RentWebhookPlus> list = this.getByIds(ids);
|
||||
Map<Long, RentWebhookPlus> map = new HashMap<>();
|
||||
for (RentWebhookPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RentWebhookPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<RentWebhookPlus> lambdaQueryWrapper = new LambdaQueryWrapper<RentWebhookPlus>().in(RentWebhookPlus::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 rent_webhook ");
|
||||
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(" rent_webhook ");
|
||||
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(" rent_webhook ");
|
||||
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 RentWebhook selectRentWebhookById(Long id)
|
||||
{
|
||||
RentWebhook vo = rentWebhookMapper.selectRentWebhookById(id);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单回调持久队列;业务状态更新时同事务写入列表
|
||||
*
|
||||
* @param rentWebhook 订单回调持久队列;业务状态更新时同事务写入
|
||||
* @return 订单回调持久队列;业务状态更新时同事务写入
|
||||
*/
|
||||
@Override
|
||||
public List<RentWebhook> selectRentWebhookList(RentWebhook rentWebhook)
|
||||
{
|
||||
if(rentWebhook == null){
|
||||
rentWebhook = new RentWebhook();
|
||||
}
|
||||
List<RentWebhook> list = rentWebhookMapper.selectRentWebhookList(rentWebhook);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param rentWebhook 订单回调持久队列;业务状态更新时同事务写入
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRentWebhook(RentWebhook rentWebhook)
|
||||
{
|
||||
rentWebhook.setCreatedAt(DateUtils.getNowDate());
|
||||
rentWebhook.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentWebhookMapper.insertRentWebhook(rentWebhook);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param rentWebhook 订单回调持久队列;业务状态更新时同事务写入
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRentWebhook(RentWebhook rentWebhook)
|
||||
{
|
||||
rentWebhook.setUpdatedAt(DateUtils.getNowDate());
|
||||
return rentWebhookMapper.updateRentWebhook(rentWebhook);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单回调持久队列;业务状态更新时同事务写入
|
||||
*
|
||||
* @param ids 需要删除的订单回调持久队列;业务状态更新时同事务写入ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentWebhookByIds(Long[] ids)
|
||||
{
|
||||
return rentWebhookMapper.deleteRentWebhookByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单回调持久队列;业务状态更新时同事务写入信息
|
||||
*
|
||||
* @param id 订单回调持久队列;业务状态更新时同事务写入ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRentWebhookById(Long id)
|
||||
{
|
||||
return rentWebhookMapper.deleteRentWebhookById(id);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user