添加资金流水等表逻辑
This commit is contained in:
1 parent
8d3cb18a46
commit
a8e2a507d9
23 files changed
+3305
-2
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.UsdtFundFlow;
|
||||
import com.ruoyi.system.domain.UsdtFundFlowPlus;
|
||||
import com.ruoyi.system.service.IUsdtFundFlowService;
|
||||
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 2025-12-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/usdt_flow")
|
||||
public class UsdtFundFlowController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IUsdtFundFlowService usdtFundFlowService;
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtFundFlowPlus> list = usdtFundFlowService.getByIds(ids.getLongIds(),false,UsdtFundFlowPlus::getRemark,UsdtFundFlowPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtFundFlowPlus> list = usdtFundFlowService.getByIds(ids.getLongIds(),true,UsdtFundFlowPlus::getUserId,UsdtFundFlowPlus::getRemark,UsdtFundFlowPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtFundFlowService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtFundFlowService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
startPage();
|
||||
List<UsdtFundFlow> list = usdtFundFlowService.selectUsdtFundFlowList(usdtFundFlow,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
startPage();
|
||||
List<UsdtFundFlow> list = usdtFundFlowService.selectUsdtFundFlowList(usdtFundFlow,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:export')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
List<UsdtFundFlow> list = usdtFundFlowService.selectUsdtFundFlowList(usdtFundFlow,false);
|
||||
ExcelUtil<UsdtFundFlow> util = new ExcelUtil<UsdtFundFlow>(UsdtFundFlow.class);
|
||||
return util.exportExcel(list, "usdt_flow");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资金流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtFundFlowService.selectUsdtFundFlowById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取资金流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtFundFlowService.selectUsdtFundFlowById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:add')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.insertUsdtFundFlow(usdtFundFlow,false));
|
||||
}
|
||||
/**
|
||||
* 新增资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-add')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.insertUsdtFundFlow(usdtFundFlow,true));
|
||||
}
|
||||
/**
|
||||
* 修改资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:edit')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.updateUsdtFundFlow(usdtFundFlow,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-edit')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody UsdtFundFlow usdtFundFlow)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.updateUsdtFundFlow(usdtFundFlow,true));
|
||||
}
|
||||
/**
|
||||
* 删除资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:remove')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.deleteUsdtFundFlowByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-remove')")
|
||||
@Log(title = "资金流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(usdtFundFlowService.deleteUsdtFundFlowByIds(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.UsdtOrders;
|
||||
import com.ruoyi.system.domain.UsdtOrdersPlus;
|
||||
import com.ruoyi.system.service.IUsdtOrdersService;
|
||||
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 2025-12-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/usdt_orders")
|
||||
public class UsdtOrdersController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IUsdtOrdersService usdtOrdersService;
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtOrdersPlus> list = usdtOrdersService.getByIds(ids.getLongIds(),false,UsdtOrdersPlus::getAmount,UsdtOrdersPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtOrdersPlus> list = usdtOrdersService.getByIds(ids.getLongIds(),true,UsdtOrdersPlus::getUserId,UsdtOrdersPlus::getAmount,UsdtOrdersPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtOrdersService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtOrdersService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UsdtOrders usdtOrders)
|
||||
{
|
||||
startPage();
|
||||
List<UsdtOrders> list = usdtOrdersService.selectUsdtOrdersList(usdtOrders,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(UsdtOrders usdtOrders)
|
||||
{
|
||||
startPage();
|
||||
List<UsdtOrders> list = usdtOrdersService.selectUsdtOrdersList(usdtOrders,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:export')")
|
||||
@Log(title = "订单", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(UsdtOrders usdtOrders)
|
||||
{
|
||||
List<UsdtOrders> list = usdtOrdersService.selectUsdtOrdersList(usdtOrders,false);
|
||||
ExcelUtil<UsdtOrders> util = new ExcelUtil<UsdtOrders>(UsdtOrders.class);
|
||||
return util.exportExcel(list, "usdt_orders");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtOrdersService.selectUsdtOrdersById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取订单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtOrdersService.selectUsdtOrdersById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:add')")
|
||||
@Log(title = "订单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UsdtOrders usdtOrders)
|
||||
{
|
||||
return toAjax(usdtOrdersService.insertUsdtOrders(usdtOrders,false));
|
||||
}
|
||||
/**
|
||||
* 新增订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:user-add')")
|
||||
@Log(title = "订单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody UsdtOrders usdtOrders)
|
||||
{
|
||||
return toAjax(usdtOrdersService.insertUsdtOrders(usdtOrders,true));
|
||||
}
|
||||
/**
|
||||
* 修改订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:edit')")
|
||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UsdtOrders usdtOrders)
|
||||
{
|
||||
return toAjax(usdtOrdersService.updateUsdtOrders(usdtOrders,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:user-edit')")
|
||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody UsdtOrders usdtOrders)
|
||||
{
|
||||
return toAjax(usdtOrdersService.updateUsdtOrders(usdtOrders,true));
|
||||
}
|
||||
/**
|
||||
* 删除订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:remove')")
|
||||
@Log(title = "订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(usdtOrdersService.deleteUsdtOrdersByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_orders:user-remove')")
|
||||
@Log(title = "订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(usdtOrdersService.deleteUsdtOrdersByIds(ids,true));
|
||||
}
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.select.Ids;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfiguration;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus;
|
||||
import com.ruoyi.system.service.IUsdtUserSettlementConfigurationService;
|
||||
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 2025-12-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/usdt_user_configuration")
|
||||
public class UsdtUserSettlementConfigurationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IUsdtUserSettlementConfigurationService usdtUserSettlementConfigurationService;
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtUserSettlementConfigurationPlus> list = usdtUserSettlementConfigurationService.getByIds(ids.getLongIds(),false,UsdtUserSettlementConfigurationPlus::getRemark,UsdtUserSettlementConfigurationPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<UsdtUserSettlementConfigurationPlus> list = usdtUserSettlementConfigurationService.getByIds(ids.getLongIds(),true,UsdtUserSettlementConfigurationPlus::getUserId,UsdtUserSettlementConfigurationPlus::getRemark,UsdtUserSettlementConfigurationPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtUserSettlementConfigurationService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = usdtUserSettlementConfigurationService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询商户配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
startPage();
|
||||
List<UsdtUserSettlementConfiguration> list = usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询商户配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
startPage();
|
||||
List<UsdtUserSettlementConfiguration> list = usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出商户配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:export')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
List<UsdtUserSettlementConfiguration> list = usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration,false);
|
||||
ExcelUtil<UsdtUserSettlementConfiguration> util = new ExcelUtil<UsdtUserSettlementConfiguration>(UsdtUserSettlementConfiguration.class);
|
||||
return util.exportExcel(list, "usdt_user_configuration");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商户配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取商户配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增商户配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:add')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.insertUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,false));
|
||||
}
|
||||
/**
|
||||
* 新增商户配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-add')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.insertUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,true));
|
||||
}
|
||||
/**
|
||||
* 修改商户配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:edit')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.updateUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-edit')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.updateUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,true));
|
||||
}
|
||||
/**
|
||||
* 删除商户配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:remove')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.deleteUsdtUserSettlementConfigurationByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除商户配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-remove')")
|
||||
@Log(title = "商户配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(usdtUserSettlementConfigurationService.deleteUsdtUserSettlementConfigurationByIds(ids,true));
|
||||
}
|
||||
}
|
||||
@@ -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_fund_flow
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public class UsdtFundFlow extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 订单ID */
|
||||
@Excel(name = "订单ID")
|
||||
private Long orderId;
|
||||
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
private Long appId;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
|
||||
/** 操作金额 */
|
||||
@Excel(name = "操作金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 操作类型 */
|
||||
@Excel(name = "操作类型")
|
||||
private Long opType;
|
||||
|
||||
/** Token地址 */
|
||||
@Excel(name = "Token地址")
|
||||
private String token;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setOpType(Long opType)
|
||||
{
|
||||
this.opType = opType;
|
||||
}
|
||||
|
||||
public Long getOpType()
|
||||
{
|
||||
return opType;
|
||||
}
|
||||
public void setToken(String token)
|
||||
{
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getToken()
|
||||
{
|
||||
return token;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("userId", getUserId())
|
||||
.append("appId", getAppId())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("amount", getAmount())
|
||||
.append("opType", getOpType())
|
||||
.append("token", getToken())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
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_fund_flow
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@TableName(value = "usdt_fund_flow")
|
||||
public class UsdtFundFlowPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 订单ID */
|
||||
@Excel(name = "订单ID")
|
||||
private Long orderId;
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
private Long appId;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
/** 操作金额 */
|
||||
@Excel(name = "操作金额")
|
||||
private BigDecimal amount;
|
||||
/** 操作类型 */
|
||||
@Excel(name = "操作类型")
|
||||
private Long opType;
|
||||
/** Token地址 */
|
||||
@Excel(name = "Token地址")
|
||||
private String token;
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setOpType(Long opType)
|
||||
{
|
||||
this.opType = opType;
|
||||
}
|
||||
|
||||
public Long getOpType()
|
||||
{
|
||||
return opType;
|
||||
}
|
||||
public void setToken(String token)
|
||||
{
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getToken()
|
||||
{
|
||||
return token;
|
||||
}
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("userId", getUserId())
|
||||
.append("appId", getAppId())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("amount", getAmount())
|
||||
.append("opType", getOpType())
|
||||
.append("token", getToken())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,279 @@
|
||||
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;
|
||||
/**
|
||||
* 订单对象 orders
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public class UsdtOrders extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String tradeId;
|
||||
|
||||
/** 交易单号 */
|
||||
@Excel(name = "交易单号")
|
||||
private String orderId;
|
||||
|
||||
/** 区块编号 */
|
||||
@Excel(name = "区块编号")
|
||||
private String blockTransactionId;
|
||||
|
||||
/** 实际金额 */
|
||||
@Excel(name = "实际金额")
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
/** 订单金额 */
|
||||
@Excel(name = "订单金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 钱包地址 */
|
||||
@Excel(name = "钱包地址")
|
||||
private String token;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long status;
|
||||
|
||||
/** 异步地址 */
|
||||
@Excel(name = "异步地址")
|
||||
private String notifyUrl;
|
||||
|
||||
/** 同步地址 */
|
||||
@Excel(name = "同步地址")
|
||||
private String redirectUrl;
|
||||
|
||||
/** 回调次数 */
|
||||
@Excel(name = "回调次数")
|
||||
private Long callbackNum;
|
||||
|
||||
/** 回调确认 */
|
||||
@Excel(name = "回调确认")
|
||||
private Long callbackConfirm;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
private Long appId;
|
||||
|
||||
/** 结算状态 */
|
||||
@Excel(name = "结算状态")
|
||||
private Long settlementStatus;
|
||||
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTradeId(String tradeId)
|
||||
{
|
||||
this.tradeId = tradeId;
|
||||
}
|
||||
|
||||
public String getTradeId()
|
||||
{
|
||||
return tradeId;
|
||||
}
|
||||
public void setOrderId(String orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setBlockTransactionId(String blockTransactionId)
|
||||
{
|
||||
this.blockTransactionId = blockTransactionId;
|
||||
}
|
||||
|
||||
public String getBlockTransactionId()
|
||||
{
|
||||
return blockTransactionId;
|
||||
}
|
||||
public void setActualAmount(BigDecimal actualAmount)
|
||||
{
|
||||
this.actualAmount = actualAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getActualAmount()
|
||||
{
|
||||
return actualAmount;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setToken(String token)
|
||||
{
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getToken()
|
||||
{
|
||||
return token;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setNotifyUrl(String notifyUrl)
|
||||
{
|
||||
this.notifyUrl = notifyUrl;
|
||||
}
|
||||
|
||||
public String getNotifyUrl()
|
||||
{
|
||||
return notifyUrl;
|
||||
}
|
||||
public void setRedirectUrl(String redirectUrl)
|
||||
{
|
||||
this.redirectUrl = redirectUrl;
|
||||
}
|
||||
|
||||
public String getRedirectUrl()
|
||||
{
|
||||
return redirectUrl;
|
||||
}
|
||||
public void setCallbackNum(Long callbackNum)
|
||||
{
|
||||
this.callbackNum = callbackNum;
|
||||
}
|
||||
|
||||
public Long getCallbackNum()
|
||||
{
|
||||
return callbackNum;
|
||||
}
|
||||
public void setCallbackConfirm(Long callbackConfirm)
|
||||
{
|
||||
this.callbackConfirm = callbackConfirm;
|
||||
}
|
||||
|
||||
public Long getCallbackConfirm()
|
||||
{
|
||||
return callbackConfirm;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setSettlementStatus(Long settlementStatus)
|
||||
{
|
||||
this.settlementStatus = settlementStatus;
|
||||
}
|
||||
|
||||
public Long getSettlementStatus()
|
||||
{
|
||||
return settlementStatus;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tradeId", getTradeId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("blockTransactionId", getBlockTransactionId())
|
||||
.append("actualAmount", getActualAmount())
|
||||
.append("amount", getAmount())
|
||||
.append("token", getToken())
|
||||
.append("status", getStatus())
|
||||
.append("notifyUrl", getNotifyUrl())
|
||||
.append("redirectUrl", getRedirectUrl())
|
||||
.append("callbackNum", getCallbackNum())
|
||||
.append("callbackConfirm", getCallbackConfirm())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("appId", getAppId())
|
||||
.append("settlementStatus", getSettlementStatus())
|
||||
.append("userId", getUserId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,264 @@
|
||||
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;
|
||||
/**
|
||||
* 订单对象 orders
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@TableName(value = "orders")
|
||||
public class UsdtOrdersPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String tradeId;
|
||||
/** 交易单号 */
|
||||
@Excel(name = "交易单号")
|
||||
private String orderId;
|
||||
/** 区块编号 */
|
||||
@Excel(name = "区块编号")
|
||||
private String blockTransactionId;
|
||||
/** 实际金额 */
|
||||
@Excel(name = "实际金额")
|
||||
private BigDecimal actualAmount;
|
||||
/** 订单金额 */
|
||||
@Excel(name = "订单金额")
|
||||
private BigDecimal amount;
|
||||
/** 钱包地址 */
|
||||
@Excel(name = "钱包地址")
|
||||
private String token;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long status;
|
||||
/** 异步地址 */
|
||||
@Excel(name = "异步地址")
|
||||
private String notifyUrl;
|
||||
/** 同步地址 */
|
||||
@Excel(name = "同步地址")
|
||||
private String redirectUrl;
|
||||
/** 回调次数 */
|
||||
@Excel(name = "回调次数")
|
||||
private Long callbackNum;
|
||||
/** 回调确认 */
|
||||
@Excel(name = "回调确认")
|
||||
private Long callbackConfirm;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
/** 应用 */
|
||||
@Excel(name = "应用")
|
||||
private Long appId;
|
||||
/** 结算状态 */
|
||||
@Excel(name = "结算状态")
|
||||
private Long settlementStatus;
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
private Long userId;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTradeId(String tradeId)
|
||||
{
|
||||
this.tradeId = tradeId;
|
||||
}
|
||||
|
||||
public String getTradeId()
|
||||
{
|
||||
return tradeId;
|
||||
}
|
||||
public void setOrderId(String orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setBlockTransactionId(String blockTransactionId)
|
||||
{
|
||||
this.blockTransactionId = blockTransactionId;
|
||||
}
|
||||
|
||||
public String getBlockTransactionId()
|
||||
{
|
||||
return blockTransactionId;
|
||||
}
|
||||
public void setActualAmount(BigDecimal actualAmount)
|
||||
{
|
||||
this.actualAmount = actualAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getActualAmount()
|
||||
{
|
||||
return actualAmount;
|
||||
}
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setToken(String token)
|
||||
{
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getToken()
|
||||
{
|
||||
return token;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setNotifyUrl(String notifyUrl)
|
||||
{
|
||||
this.notifyUrl = notifyUrl;
|
||||
}
|
||||
|
||||
public String getNotifyUrl()
|
||||
{
|
||||
return notifyUrl;
|
||||
}
|
||||
public void setRedirectUrl(String redirectUrl)
|
||||
{
|
||||
this.redirectUrl = redirectUrl;
|
||||
}
|
||||
|
||||
public String getRedirectUrl()
|
||||
{
|
||||
return redirectUrl;
|
||||
}
|
||||
public void setCallbackNum(Long callbackNum)
|
||||
{
|
||||
this.callbackNum = callbackNum;
|
||||
}
|
||||
|
||||
public Long getCallbackNum()
|
||||
{
|
||||
return callbackNum;
|
||||
}
|
||||
public void setCallbackConfirm(Long callbackConfirm)
|
||||
{
|
||||
this.callbackConfirm = callbackConfirm;
|
||||
}
|
||||
|
||||
public Long getCallbackConfirm()
|
||||
{
|
||||
return callbackConfirm;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setSettlementStatus(Long settlementStatus)
|
||||
{
|
||||
this.settlementStatus = settlementStatus;
|
||||
}
|
||||
|
||||
public Long getSettlementStatus()
|
||||
{
|
||||
return settlementStatus;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tradeId", getTradeId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("blockTransactionId", getBlockTransactionId())
|
||||
.append("actualAmount", getActualAmount())
|
||||
.append("amount", getAmount())
|
||||
.append("token", getToken())
|
||||
.append("status", getStatus())
|
||||
.append("notifyUrl", getNotifyUrl())
|
||||
.append("redirectUrl", getRedirectUrl())
|
||||
.append("callbackNum", getCallbackNum())
|
||||
.append("callbackConfirm", getCallbackConfirm())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("appId", getAppId())
|
||||
.append("settlementStatus", getSettlementStatus())
|
||||
.append("userId", getUserId())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
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_user_settlement_configuration
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public class UsdtUserSettlementConfiguration extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 佣金比例 */
|
||||
@Excel(name = "佣金比例")
|
||||
private BigDecimal commissionRate;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
|
||||
/** 提现手续费 */
|
||||
@Excel(name = "提现手续费")
|
||||
private BigDecimal withdrawalFee;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long status;
|
||||
|
||||
/** 预留配置 */
|
||||
@Excel(name = "预留配置")
|
||||
private String extInfo;
|
||||
|
||||
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 setCommissionRate(BigDecimal commissionRate)
|
||||
{
|
||||
this.commissionRate = commissionRate;
|
||||
}
|
||||
|
||||
public BigDecimal getCommissionRate()
|
||||
{
|
||||
return commissionRate;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setWithdrawalFee(BigDecimal withdrawalFee)
|
||||
{
|
||||
this.withdrawalFee = withdrawalFee;
|
||||
}
|
||||
|
||||
public BigDecimal getWithdrawalFee()
|
||||
{
|
||||
return withdrawalFee;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setExtInfo(String extInfo)
|
||||
{
|
||||
this.extInfo = extInfo;
|
||||
}
|
||||
|
||||
public String getExtInfo()
|
||||
{
|
||||
return extInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("commissionRate", getCommissionRate())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("withdrawalFee", getWithdrawalFee())
|
||||
.append("status", getStatus())
|
||||
.append("extInfo", getExtInfo())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
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_user_settlement_configuration
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@TableName(value = "usdt_user_settlement_configuration")
|
||||
public class UsdtUserSettlementConfigurationPlus implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
/** 佣金比例 */
|
||||
@Excel(name = "佣金比例")
|
||||
private BigDecimal commissionRate;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
/** 删除时间 */
|
||||
private Date deletedAt;
|
||||
/** 提现手续费 */
|
||||
@Excel(name = "提现手续费")
|
||||
private BigDecimal withdrawalFee;
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long status;
|
||||
/** 预留配置 */
|
||||
@Excel(name = "预留配置")
|
||||
private String extInfo;
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
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 setCommissionRate(BigDecimal commissionRate)
|
||||
{
|
||||
this.commissionRate = commissionRate;
|
||||
}
|
||||
|
||||
public BigDecimal getCommissionRate()
|
||||
{
|
||||
return commissionRate;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setDeletedAt(Date deletedAt)
|
||||
{
|
||||
this.deletedAt = deletedAt;
|
||||
}
|
||||
|
||||
public Date getDeletedAt()
|
||||
{
|
||||
return deletedAt;
|
||||
}
|
||||
public void setWithdrawalFee(BigDecimal withdrawalFee)
|
||||
{
|
||||
this.withdrawalFee = withdrawalFee;
|
||||
}
|
||||
|
||||
public BigDecimal getWithdrawalFee()
|
||||
{
|
||||
return withdrawalFee;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setExtInfo(String extInfo)
|
||||
{
|
||||
this.extInfo = extInfo;
|
||||
}
|
||||
|
||||
public String getExtInfo()
|
||||
{
|
||||
return extInfo;
|
||||
}
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("commissionRate", getCommissionRate())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("withdrawalFee", getWithdrawalFee())
|
||||
.append("status", getStatus())
|
||||
.append("extInfo", getExtInfo())
|
||||
.append("remark", getRemark())
|
||||
.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.UsdtFundFlow;
|
||||
import com.ruoyi.system.domain.UsdtFundFlowPlus;
|
||||
|
||||
/**
|
||||
* 资金流水Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface UsdtFundFlowMapper extends BaseMapper<UsdtFundFlowPlus>
|
||||
{
|
||||
/**
|
||||
* 查询资金流水
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 资金流水
|
||||
*/
|
||||
public UsdtFundFlow selectUsdtFundFlowById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资金流水列表
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 资金流水集合
|
||||
*/
|
||||
public List<UsdtFundFlow> selectUsdtFundFlowList(UsdtFundFlow usdtFundFlow);
|
||||
|
||||
/**
|
||||
* 新增资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUsdtFundFlow(UsdtFundFlow usdtFundFlow);
|
||||
|
||||
/**
|
||||
* 修改资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUsdtFundFlow(UsdtFundFlow usdtFundFlow);
|
||||
|
||||
/**
|
||||
* 删除资金流水
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtFundFlowById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除资金流水
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtFundFlowByIds(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.UsdtOrders;
|
||||
import com.ruoyi.system.domain.UsdtOrdersPlus;
|
||||
|
||||
/**
|
||||
* 订单Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface UsdtOrdersMapper extends BaseMapper<UsdtOrdersPlus>
|
||||
{
|
||||
/**
|
||||
* 查询订单
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return 订单
|
||||
*/
|
||||
public UsdtOrders selectUsdtOrdersById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param usdtOrders 订单
|
||||
* @return 订单集合
|
||||
*/
|
||||
public List<UsdtOrders> selectUsdtOrdersList(UsdtOrders usdtOrders);
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
*
|
||||
* @param usdtOrders 订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUsdtOrders(UsdtOrders usdtOrders);
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
* @param usdtOrders 订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUsdtOrders(UsdtOrders usdtOrders);
|
||||
|
||||
/**
|
||||
* 删除订单
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtOrdersById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtOrdersByIds(Long[] ids);
|
||||
}
|
||||
+65
@@ -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.UsdtUserSettlementConfiguration;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus;
|
||||
|
||||
/**
|
||||
* 商户配置Mapper接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface UsdtUserSettlementConfigurationMapper extends BaseMapper<UsdtUserSettlementConfigurationPlus>
|
||||
{
|
||||
/**
|
||||
* 查询商户配置
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 商户配置
|
||||
*/
|
||||
public UsdtUserSettlementConfiguration selectUsdtUserSettlementConfigurationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商户配置列表
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 商户配置集合
|
||||
*/
|
||||
public List<UsdtUserSettlementConfiguration> selectUsdtUserSettlementConfigurationList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration);
|
||||
|
||||
/**
|
||||
* 新增商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration);
|
||||
|
||||
/**
|
||||
* 修改商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration);
|
||||
|
||||
/**
|
||||
* 删除商户配置
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtUserSettlementConfigurationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除商户配置
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtUserSettlementConfigurationByIds(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.UsdtFundFlow;
|
||||
import com.ruoyi.system.domain.UsdtFundFlowPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 资金流水Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface IUsdtFundFlowService extends IService<UsdtFundFlowPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询资金流水
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 资金流水
|
||||
*/
|
||||
public UsdtFundFlow selectUsdtFundFlowById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询资金流水列表
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 资金流水集合
|
||||
*/
|
||||
public List<UsdtFundFlow> selectUsdtFundFlowList(UsdtFundFlow usdtFundFlow,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除资金流水
|
||||
*
|
||||
* @param ids 需要删除的资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtFundFlowByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除资金流水信息
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtFundFlowById(Long id,boolean isUser);
|
||||
|
||||
List<UsdtFundFlowPlus> getByIds(List<Long> ids,boolean isUser, SFunction<UsdtFundFlowPlus, ?>... columns);
|
||||
|
||||
UsdtFundFlowPlus getById(Long id, SFunction<UsdtFundFlowPlus, ?>... columns);
|
||||
|
||||
Map<Long, UsdtFundFlowPlus> getMapByIds(List<Long> ids, SFunction<UsdtFundFlowPlus, ?>... columns);
|
||||
|
||||
List<UsdtFundFlowPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, UsdtFundFlowPlus> 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.UsdtOrders;
|
||||
import com.ruoyi.system.domain.UsdtOrdersPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 订单Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface IUsdtOrdersService extends IService<UsdtOrdersPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询订单
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return 订单
|
||||
*/
|
||||
public UsdtOrders selectUsdtOrdersById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param usdtOrders 订单
|
||||
* @return 订单集合
|
||||
*/
|
||||
public List<UsdtOrders> selectUsdtOrdersList(UsdtOrders usdtOrders,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
*
|
||||
* @param usdtOrders 订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUsdtOrders(UsdtOrders usdtOrders,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
* @param usdtOrders 订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUsdtOrders(UsdtOrders usdtOrders,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
* @param ids 需要删除的订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtOrdersByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除订单信息
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtOrdersById(Long id,boolean isUser);
|
||||
|
||||
List<UsdtOrdersPlus> getByIds(List<Long> ids,boolean isUser, SFunction<UsdtOrdersPlus, ?>... columns);
|
||||
|
||||
UsdtOrdersPlus getById(Long id, SFunction<UsdtOrdersPlus, ?>... columns);
|
||||
|
||||
Map<Long, UsdtOrdersPlus> getMapByIds(List<Long> ids, SFunction<UsdtOrdersPlus, ?>... columns);
|
||||
|
||||
List<UsdtOrdersPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, UsdtOrdersPlus> 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);
|
||||
}
|
||||
+91
@@ -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.UsdtUserSettlementConfiguration;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* 商户配置Service接口
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface IUsdtUserSettlementConfigurationService extends IService<UsdtUserSettlementConfigurationPlus>
|
||||
{
|
||||
|
||||
List<SelectItem> select(String keyword,boolean isUser);
|
||||
/**
|
||||
* 查询商户配置
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 商户配置
|
||||
*/
|
||||
public UsdtUserSettlementConfiguration selectUsdtUserSettlementConfigurationById(Long id,boolean isUser);
|
||||
|
||||
/**
|
||||
* 查询商户配置列表
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 商户配置集合
|
||||
*/
|
||||
public List<UsdtUserSettlementConfiguration> selectUsdtUserSettlementConfigurationList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser);
|
||||
|
||||
/**
|
||||
* 新增商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser);
|
||||
|
||||
/**
|
||||
* 修改商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser);
|
||||
|
||||
/**
|
||||
* 批量删除商户配置
|
||||
*
|
||||
* @param ids 需要删除的商户配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtUserSettlementConfigurationByIds(Long[] ids,boolean isUser);
|
||||
|
||||
/**
|
||||
* 删除商户配置信息
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUsdtUserSettlementConfigurationById(Long id,boolean isUser);
|
||||
|
||||
List<UsdtUserSettlementConfigurationPlus> getByIds(List<Long> ids,boolean isUser, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns);
|
||||
|
||||
UsdtUserSettlementConfigurationPlus getById(Long id, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns);
|
||||
|
||||
Map<Long, UsdtUserSettlementConfigurationPlus> getMapByIds(List<Long> ids, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns);
|
||||
|
||||
List<UsdtUserSettlementConfigurationPlus> getByIds(List<Long> ids);
|
||||
|
||||
Map<Long, UsdtUserSettlementConfigurationPlus> 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);
|
||||
}
|
||||
+270
@@ -0,0 +1,270 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.UsdtFundFlow;
|
||||
import com.ruoyi.system.domain.UsdtFundFlowPlus;
|
||||
import com.ruoyi.system.mapper.UsdtFundFlowMapper;
|
||||
import com.ruoyi.system.service.IUsdtFundFlowService;
|
||||
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 2025-12-04
|
||||
*/
|
||||
@Service
|
||||
public class UsdtFundFlowServiceImpl extends ServiceImpl<UsdtFundFlowMapper, UsdtFundFlowPlus> implements IUsdtFundFlowService
|
||||
{
|
||||
@Autowired
|
||||
private UsdtFundFlowMapper usdtFundFlowMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<UsdtFundFlowPlus> getByIds(List<Long> ids ,boolean isUser, SFunction<UsdtFundFlowPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtFundFlowPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtFundFlowPlus>()
|
||||
.select(columns).in(UsdtFundFlowPlus::getId, ids);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(UsdtFundFlowPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtFundFlowPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
private void checkUserPlus(List<UsdtFundFlowPlus> list) {
|
||||
for (UsdtFundFlowPlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(List<UsdtFundFlow> list) {
|
||||
for (UsdtFundFlow item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(UsdtFundFlowPlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
private void checkUser(UsdtFundFlow item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
LambdaQueryWrapper<UsdtFundFlowPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtFundFlowPlus>()
|
||||
.select(UsdtFundFlowPlus::getId,UsdtFundFlowPlus::getUserId, UsdtFundFlowPlus::getRemark)
|
||||
.like(UsdtFundFlowPlus::getRemark, keyword);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(UsdtFundFlowPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtFundFlowPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (UsdtFundFlowPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getRemark());
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public UsdtFundFlowPlus getById(Long id, SFunction<UsdtFundFlowPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtFundFlowPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtFundFlowPlus>()
|
||||
.select(columns).eq(UsdtFundFlowPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtFundFlowPlus> getMapByIds(List<Long> ids, SFunction<UsdtFundFlowPlus, ?>... columns) {
|
||||
List<UsdtFundFlowPlus> list = this.getByIds(ids,false, columns);
|
||||
Map<Long, UsdtFundFlowPlus> map = new HashMap<>();
|
||||
for (UsdtFundFlowPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtFundFlowPlus> getMapByIds(List<Long> ids) {
|
||||
List<UsdtFundFlowPlus> list = this.getByIds(ids);
|
||||
Map<Long, UsdtFundFlowPlus> map = new HashMap<>();
|
||||
for (UsdtFundFlowPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UsdtFundFlowPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<UsdtFundFlowPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtFundFlowPlus>().in(UsdtFundFlowPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from usdt_fund_flow ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" usdt_fund_flow ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" usdt_fund_flow ");
|
||||
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 UsdtFundFlow selectUsdtFundFlowById(Long id,boolean isUser)
|
||||
{
|
||||
UsdtFundFlow vo = usdtFundFlowMapper.selectUsdtFundFlowById(id);
|
||||
if(isUser){
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资金流水列表
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 资金流水
|
||||
*/
|
||||
@Override
|
||||
public List<UsdtFundFlow> selectUsdtFundFlowList(UsdtFundFlow usdtFundFlow,boolean isUser)
|
||||
{
|
||||
if(usdtFundFlow == null){
|
||||
usdtFundFlow = new UsdtFundFlow();
|
||||
}
|
||||
if(isUser){
|
||||
usdtFundFlow.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtFundFlow> list = usdtFundFlowMapper.selectUsdtFundFlowList(usdtFundFlow);
|
||||
if(isUser){
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser)
|
||||
{
|
||||
usdtFundFlow.setCreatedAt(DateUtils.getNowDate());
|
||||
usdtFundFlow.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
usdtFundFlow.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return usdtFundFlowMapper.insertUsdtFundFlow(usdtFundFlow);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资金流水
|
||||
*
|
||||
* @param usdtFundFlow 资金流水
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser)
|
||||
{
|
||||
usdtFundFlow.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
checkUser(usdtFundFlow);
|
||||
}
|
||||
return usdtFundFlowMapper.updateUsdtFundFlow(usdtFundFlow);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除资金流水
|
||||
*
|
||||
* @param ids 需要删除的资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtFundFlowByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<UsdtFundFlowPlus> list= getByIds(Arrays.asList(ids),false,UsdtFundFlowPlus::getUserId,UsdtFundFlowPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return usdtFundFlowMapper.deleteUsdtFundFlowByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资金流水信息
|
||||
*
|
||||
* @param id 资金流水ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtFundFlowById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
UsdtFundFlowPlus vo = getById(id,UsdtFundFlowPlus::getUserId,UsdtFundFlowPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return usdtFundFlowMapper.deleteUsdtFundFlowById(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.UsdtOrders;
|
||||
import com.ruoyi.system.domain.UsdtOrdersPlus;
|
||||
import com.ruoyi.system.mapper.UsdtOrdersMapper;
|
||||
import com.ruoyi.system.service.IUsdtOrdersService;
|
||||
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 2025-12-04
|
||||
*/
|
||||
@Service
|
||||
public class UsdtOrdersServiceImpl extends ServiceImpl<UsdtOrdersMapper, UsdtOrdersPlus> implements IUsdtOrdersService
|
||||
{
|
||||
@Autowired
|
||||
private UsdtOrdersMapper usdtOrdersMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<UsdtOrdersPlus> getByIds(List<Long> ids ,boolean isUser, SFunction<UsdtOrdersPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtOrdersPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtOrdersPlus>()
|
||||
.select(columns).in(UsdtOrdersPlus::getId, ids);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(UsdtOrdersPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtOrdersPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
private void checkUserPlus(List<UsdtOrdersPlus> list) {
|
||||
for (UsdtOrdersPlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(List<UsdtOrders> list) {
|
||||
for (UsdtOrders item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(UsdtOrdersPlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
private void checkUser(UsdtOrders item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
LambdaQueryWrapper<UsdtOrdersPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtOrdersPlus>()
|
||||
.select(UsdtOrdersPlus::getId,UsdtOrdersPlus::getUserId, UsdtOrdersPlus::getAmount)
|
||||
.like(UsdtOrdersPlus::getAmount, keyword);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(UsdtOrdersPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtOrdersPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (UsdtOrdersPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getAmount().toString());
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public UsdtOrdersPlus getById(Long id, SFunction<UsdtOrdersPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtOrdersPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtOrdersPlus>()
|
||||
.select(columns).eq(UsdtOrdersPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtOrdersPlus> getMapByIds(List<Long> ids, SFunction<UsdtOrdersPlus, ?>... columns) {
|
||||
List<UsdtOrdersPlus> list = this.getByIds(ids,false, columns);
|
||||
Map<Long, UsdtOrdersPlus> map = new HashMap<>();
|
||||
for (UsdtOrdersPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtOrdersPlus> getMapByIds(List<Long> ids) {
|
||||
List<UsdtOrdersPlus> list = this.getByIds(ids);
|
||||
Map<Long, UsdtOrdersPlus> map = new HashMap<>();
|
||||
for (UsdtOrdersPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UsdtOrdersPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<UsdtOrdersPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtOrdersPlus>().in(UsdtOrdersPlus::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 orders ");
|
||||
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(" orders ");
|
||||
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(" orders ");
|
||||
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 UsdtOrders selectUsdtOrdersById(Long id,boolean isUser)
|
||||
{
|
||||
UsdtOrders vo = usdtOrdersMapper.selectUsdtOrdersById(id);
|
||||
if(isUser){
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param usdtOrders 订单
|
||||
* @return 订单
|
||||
*/
|
||||
@Override
|
||||
public List<UsdtOrders> selectUsdtOrdersList(UsdtOrders usdtOrders,boolean isUser)
|
||||
{
|
||||
if(usdtOrders == null){
|
||||
usdtOrders = new UsdtOrders();
|
||||
}
|
||||
if(isUser){
|
||||
usdtOrders.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtOrders> list = usdtOrdersMapper.selectUsdtOrdersList(usdtOrders);
|
||||
if(isUser){
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
*
|
||||
* @param usdtOrders 订单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUsdtOrders(UsdtOrders usdtOrders,boolean isUser)
|
||||
{
|
||||
usdtOrders.setCreatedAt(DateUtils.getNowDate());
|
||||
usdtOrders.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
usdtOrders.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return usdtOrdersMapper.insertUsdtOrders(usdtOrders);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
* @param usdtOrders 订单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUsdtOrders(UsdtOrders usdtOrders,boolean isUser)
|
||||
{
|
||||
usdtOrders.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
checkUser(usdtOrders);
|
||||
}
|
||||
return usdtOrdersMapper.updateUsdtOrders(usdtOrders);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
* @param ids 需要删除的订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtOrdersByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<UsdtOrdersPlus> list= getByIds(Arrays.asList(ids),false,UsdtOrdersPlus::getUserId,UsdtOrdersPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return usdtOrdersMapper.deleteUsdtOrdersByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单信息
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtOrdersById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
UsdtOrdersPlus vo = getById(id,UsdtOrdersPlus::getUserId,UsdtOrdersPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return usdtOrdersMapper.deleteUsdtOrdersById(id);
|
||||
}
|
||||
}
|
||||
+270
@@ -0,0 +1,270 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfiguration;
|
||||
import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus;
|
||||
import com.ruoyi.system.mapper.UsdtUserSettlementConfigurationMapper;
|
||||
import com.ruoyi.system.service.IUsdtUserSettlementConfigurationService;
|
||||
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 2025-12-04
|
||||
*/
|
||||
@Service
|
||||
public class UsdtUserSettlementConfigurationServiceImpl extends ServiceImpl<UsdtUserSettlementConfigurationMapper, UsdtUserSettlementConfigurationPlus> implements IUsdtUserSettlementConfigurationService
|
||||
{
|
||||
@Autowired
|
||||
private UsdtUserSettlementConfigurationMapper usdtUserSettlementConfigurationMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public List<UsdtUserSettlementConfigurationPlus> getByIds(List<Long> ids ,boolean isUser, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus>()
|
||||
.select(columns).in(UsdtUserSettlementConfigurationPlus::getId, ids);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(UsdtUserSettlementConfigurationPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtUserSettlementConfigurationPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
private void checkUserPlus(List<UsdtUserSettlementConfigurationPlus> list) {
|
||||
for (UsdtUserSettlementConfigurationPlus item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(List<UsdtUserSettlementConfiguration> list) {
|
||||
for (UsdtUserSettlementConfiguration item : list){
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void checkUser(UsdtUserSettlementConfigurationPlus item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
private void checkUser(UsdtUserSettlementConfiguration item) {
|
||||
if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){
|
||||
throw new RuntimeException("无权限");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public List<SelectItem> select(String keyword,boolean isUser) {
|
||||
LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus>()
|
||||
.select(UsdtUserSettlementConfigurationPlus::getId,UsdtUserSettlementConfigurationPlus::getUserId, UsdtUserSettlementConfigurationPlus::getRemark)
|
||||
.like(UsdtUserSettlementConfigurationPlus::getRemark, keyword);
|
||||
if(isUser){
|
||||
lambdaQueryWrapper.eq(UsdtUserSettlementConfigurationPlus::getUserId, SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtUserSettlementConfigurationPlus> list = this.list(lambdaQueryWrapper);
|
||||
if(isUser){
|
||||
checkUserPlus(list);
|
||||
}
|
||||
List<SelectItem> result =new ArrayList<>();
|
||||
for (UsdtUserSettlementConfigurationPlus item : list){
|
||||
SelectItem selectItem = new SelectItem();
|
||||
selectItem.setName(item.getRemark());
|
||||
selectItem.setId(item.getId());
|
||||
result.add(selectItem);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public UsdtUserSettlementConfigurationPlus getById(Long id, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns) {
|
||||
LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus>()
|
||||
.select(columns).eq(UsdtUserSettlementConfigurationPlus::getId, id);
|
||||
return baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtUserSettlementConfigurationPlus> getMapByIds(List<Long> ids, SFunction<UsdtUserSettlementConfigurationPlus, ?>... columns) {
|
||||
List<UsdtUserSettlementConfigurationPlus> list = this.getByIds(ids,false, columns);
|
||||
Map<Long, UsdtUserSettlementConfigurationPlus> map = new HashMap<>();
|
||||
for (UsdtUserSettlementConfigurationPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, UsdtUserSettlementConfigurationPlus> getMapByIds(List<Long> ids) {
|
||||
List<UsdtUserSettlementConfigurationPlus> list = this.getByIds(ids);
|
||||
Map<Long, UsdtUserSettlementConfigurationPlus> map = new HashMap<>();
|
||||
for (UsdtUserSettlementConfigurationPlus item : list) {
|
||||
map.put(item.getId(), item);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UsdtUserSettlementConfigurationPlus> getByIds(List<Long> ids) {
|
||||
LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus> lambdaQueryWrapper = new LambdaQueryWrapper<UsdtUserSettlementConfigurationPlus>().in(UsdtUserSettlementConfigurationPlus::getId, ids);
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
public <T> T sum(String field, String where, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" sum(" + field + ") as total ");
|
||||
stringBuffer.append(" from usdt_user_settlement_configuration ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Long count(String where) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(" count(1)");
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" usdt_user_settlement_configuration ");
|
||||
if (StringUtils.isNotBlank(where)) {
|
||||
stringBuffer.append(" where ");
|
||||
stringBuffer.append(where);
|
||||
}
|
||||
Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
public <T> List<T> countByGroupBy(String select, String where, String groupby, Class<T> tClass) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select ");
|
||||
stringBuffer.append(select);
|
||||
stringBuffer.append(" from ");
|
||||
stringBuffer.append(" usdt_user_settlement_configuration ");
|
||||
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 UsdtUserSettlementConfiguration selectUsdtUserSettlementConfigurationById(Long id,boolean isUser)
|
||||
{
|
||||
UsdtUserSettlementConfiguration vo = usdtUserSettlementConfigurationMapper.selectUsdtUserSettlementConfigurationById(id);
|
||||
if(isUser){
|
||||
checkUser(vo);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商户配置列表
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 商户配置
|
||||
*/
|
||||
@Override
|
||||
public List<UsdtUserSettlementConfiguration> selectUsdtUserSettlementConfigurationList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser)
|
||||
{
|
||||
if(usdtUserSettlementConfiguration == null){
|
||||
usdtUserSettlementConfiguration = new UsdtUserSettlementConfiguration();
|
||||
}
|
||||
if(isUser){
|
||||
usdtUserSettlementConfiguration.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<UsdtUserSettlementConfiguration> list = usdtUserSettlementConfigurationMapper.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration);
|
||||
if(isUser){
|
||||
checkUser(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser)
|
||||
{
|
||||
usdtUserSettlementConfiguration.setCreatedAt(DateUtils.getNowDate());
|
||||
usdtUserSettlementConfiguration.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
usdtUserSettlementConfiguration.setUserId(SecurityUtils.getUserId());
|
||||
}
|
||||
return usdtUserSettlementConfigurationMapper.insertUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商户配置
|
||||
*
|
||||
* @param usdtUserSettlementConfiguration 商户配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser)
|
||||
{
|
||||
usdtUserSettlementConfiguration.setUpdatedAt(DateUtils.getNowDate());
|
||||
if(isUser){
|
||||
checkUser(usdtUserSettlementConfiguration);
|
||||
}
|
||||
return usdtUserSettlementConfigurationMapper.updateUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商户配置
|
||||
*
|
||||
* @param ids 需要删除的商户配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtUserSettlementConfigurationByIds(Long[] ids,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
List<UsdtUserSettlementConfigurationPlus> list= getByIds(Arrays.asList(ids),false,UsdtUserSettlementConfigurationPlus::getUserId,UsdtUserSettlementConfigurationPlus::getId);
|
||||
checkUserPlus(list);
|
||||
}
|
||||
return usdtUserSettlementConfigurationMapper.deleteUsdtUserSettlementConfigurationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商户配置信息
|
||||
*
|
||||
* @param id 商户配置ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUsdtUserSettlementConfigurationById(Long id,boolean isUser)
|
||||
{
|
||||
if(isUser){
|
||||
UsdtUserSettlementConfigurationPlus vo = getById(id,UsdtUserSettlementConfigurationPlus::getUserId,UsdtUserSettlementConfigurationPlus::getId);
|
||||
checkUser(vo);
|
||||
}
|
||||
return usdtUserSettlementConfigurationMapper.deleteUsdtUserSettlementConfigurationById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.UsdtFundFlowMapper">
|
||||
|
||||
<resultMap type="UsdtFundFlow" id="UsdtFundFlowResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="opType" column="op_type" />
|
||||
<result property="token" column="token" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUsdtFundFlowVo">
|
||||
select id, order_id, user_id, app_id, created_at, updated_at, deleted_at, amount, op_type, token, remark from usdt_fund_flow
|
||||
</sql>
|
||||
|
||||
<select id="selectUsdtFundFlowList" parameterType="UsdtFundFlow" resultMap="UsdtFundFlowResult">
|
||||
<include refid="selectUsdtFundFlowVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="opType != null "> and op_type = #{opType}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUsdtFundFlowById" parameterType="Long" resultMap="UsdtFundFlowResult">
|
||||
<include refid="selectUsdtFundFlowVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUsdtFundFlow" parameterType="UsdtFundFlow" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into usdt_fund_flow
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="appId != null">app_id,</if>
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="updatedAt != null">updated_at,</if>
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="opType != null">op_type,</if>
|
||||
<if test="token != null">token,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="appId != null">#{appId},</if>
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="updatedAt != null">#{updatedAt},</if>
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="opType != null">#{opType},</if>
|
||||
<if test="token != null">#{token},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUsdtFundFlow" parameterType="UsdtFundFlow">
|
||||
update usdt_fund_flow
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="opType != null">op_type = #{opType},</if>
|
||||
<if test="token != null">token = #{token},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUsdtFundFlowById" parameterType="Long">
|
||||
delete from usdt_fund_flow where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUsdtFundFlowByIds" parameterType="String">
|
||||
delete from usdt_fund_flow where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.UsdtOrdersMapper">
|
||||
|
||||
<resultMap type="UsdtOrders" id="UsdtOrdersResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="tradeId" column="trade_id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="blockTransactionId" column="block_transaction_id" />
|
||||
<result property="actualAmount" column="actual_amount" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="token" column="token" />
|
||||
<result property="status" column="status" />
|
||||
<result property="notifyUrl" column="notify_url" />
|
||||
<result property="redirectUrl" column="redirect_url" />
|
||||
<result property="callbackNum" column="callback_num" />
|
||||
<result property="callbackConfirm" column="callback_confirm" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="settlementStatus" column="settlement_status" />
|
||||
<result property="userId" column="user_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUsdtOrdersVo">
|
||||
select id, trade_id, order_id, block_transaction_id, actual_amount, amount, token, status, notify_url, redirect_url, callback_num, callback_confirm, created_at, updated_at, deleted_at, app_id, settlement_status, user_id from orders
|
||||
</sql>
|
||||
|
||||
<select id="selectUsdtOrdersList" parameterType="UsdtOrders" resultMap="UsdtOrdersResult">
|
||||
<include refid="selectUsdtOrdersVo"/>
|
||||
<where>
|
||||
<if test="tradeId != null and tradeId != ''"> and trade_id like concat('%', #{tradeId}, '%')</if>
|
||||
<if test="orderId != null and orderId != ''"> and order_id like concat('%', #{orderId}, '%')</if>
|
||||
<if test="token != null and token != ''"> and token = #{token}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="callbackConfirm != null "> and callback_confirm = #{callbackConfirm}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="settlementStatus != null "> and settlement_status = #{settlementStatus}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUsdtOrdersById" parameterType="Long" resultMap="UsdtOrdersResult">
|
||||
<include refid="selectUsdtOrdersVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUsdtOrders" parameterType="UsdtOrders" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into orders
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="tradeId != null and tradeId != ''">trade_id,</if>
|
||||
<if test="orderId != null and orderId != ''">order_id,</if>
|
||||
<if test="blockTransactionId != null">block_transaction_id,</if>
|
||||
<if test="actualAmount != null">actual_amount,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="token != null and token != ''">token,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="notifyUrl != null and notifyUrl != ''">notify_url,</if>
|
||||
<if test="redirectUrl != null">redirect_url,</if>
|
||||
<if test="callbackNum != null">callback_num,</if>
|
||||
<if test="callbackConfirm != null">callback_confirm,</if>
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="updatedAt != null">updated_at,</if>
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
<if test="appId != null">app_id,</if>
|
||||
<if test="settlementStatus != null">settlement_status,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tradeId != null and tradeId != ''">#{tradeId},</if>
|
||||
<if test="orderId != null and orderId != ''">#{orderId},</if>
|
||||
<if test="blockTransactionId != null">#{blockTransactionId},</if>
|
||||
<if test="actualAmount != null">#{actualAmount},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="token != null and token != ''">#{token},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="notifyUrl != null and notifyUrl != ''">#{notifyUrl},</if>
|
||||
<if test="redirectUrl != null">#{redirectUrl},</if>
|
||||
<if test="callbackNum != null">#{callbackNum},</if>
|
||||
<if test="callbackConfirm != null">#{callbackConfirm},</if>
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="updatedAt != null">#{updatedAt},</if>
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
<if test="appId != null">#{appId},</if>
|
||||
<if test="settlementStatus != null">#{settlementStatus},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUsdtOrders" parameterType="UsdtOrders">
|
||||
update orders
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tradeId != null and tradeId != ''">trade_id = #{tradeId},</if>
|
||||
<if test="orderId != null and orderId != ''">order_id = #{orderId},</if>
|
||||
<if test="blockTransactionId != null">block_transaction_id = #{blockTransactionId},</if>
|
||||
<if test="actualAmount != null">actual_amount = #{actualAmount},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="token != null and token != ''">token = #{token},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="notifyUrl != null and notifyUrl != ''">notify_url = #{notifyUrl},</if>
|
||||
<if test="redirectUrl != null">redirect_url = #{redirectUrl},</if>
|
||||
<if test="callbackNum != null">callback_num = #{callbackNum},</if>
|
||||
<if test="callbackConfirm != null">callback_confirm = #{callbackConfirm},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="settlementStatus != null">settlement_status = #{settlementStatus},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUsdtOrdersById" parameterType="Long">
|
||||
delete from orders where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUsdtOrdersByIds" parameterType="String">
|
||||
delete from orders where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.UsdtUserSettlementConfigurationMapper">
|
||||
|
||||
<resultMap type="UsdtUserSettlementConfiguration" id="UsdtUserSettlementConfigurationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="commissionRate" column="commission_rate" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
<result property="withdrawalFee" column="withdrawal_fee" />
|
||||
<result property="status" column="status" />
|
||||
<result property="extInfo" column="ext_info" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUsdtUserSettlementConfigurationVo">
|
||||
select id, user_id, commission_rate, created_at, updated_at, deleted_at, withdrawal_fee, status, ext_info, remark from usdt_user_settlement_configuration
|
||||
</sql>
|
||||
|
||||
<select id="selectUsdtUserSettlementConfigurationList" parameterType="UsdtUserSettlementConfiguration" resultMap="UsdtUserSettlementConfigurationResult">
|
||||
<include refid="selectUsdtUserSettlementConfigurationVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUsdtUserSettlementConfigurationById" parameterType="Long" resultMap="UsdtUserSettlementConfigurationResult">
|
||||
<include refid="selectUsdtUserSettlementConfigurationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUsdtUserSettlementConfiguration" parameterType="UsdtUserSettlementConfiguration" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into usdt_user_settlement_configuration
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="commissionRate != null">commission_rate,</if>
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="updatedAt != null">updated_at,</if>
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
<if test="withdrawalFee != null">withdrawal_fee,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="extInfo != null">ext_info,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="commissionRate != null">#{commissionRate},</if>
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="updatedAt != null">#{updatedAt},</if>
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
<if test="withdrawalFee != null">#{withdrawalFee},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="extInfo != null">#{extInfo},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUsdtUserSettlementConfiguration" parameterType="UsdtUserSettlementConfiguration">
|
||||
update usdt_user_settlement_configuration
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="commissionRate != null">commission_rate = #{commissionRate},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
<if test="withdrawalFee != null">withdrawal_fee = #{withdrawalFee},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="extInfo != null">ext_info = #{extInfo},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUsdtUserSettlementConfigurationById" parameterType="Long">
|
||||
delete from usdt_user_settlement_configuration where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUsdtUserSettlementConfigurationByIds" parameterType="String">
|
||||
delete from usdt_user_settlement_configuration where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user