流水表基础代码生成
This commit is contained in:
1 parent
cdf32a86cb
commit
8cc7bd0c17
14 files changed
+3356
No files matched your search
+170
@@ -0,0 +1,170 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.select.Ids;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.AppsBalanceLedger;
|
||||
import com.ruoyi.system.domain.AppsBalanceLedgerPlus;
|
||||
import com.ruoyi.system.service.IAppsBalanceLedgerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用账面余额流水Controller
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/appsBalanceLedger")
|
||||
public class AppsBalanceLedgerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppsBalanceLedgerService appsBalanceLedgerService;
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<AppsBalanceLedgerPlus> list = appsBalanceLedgerService.getByIds(ids.getLongIds(),false,AppsBalanceLedgerPlus::getAppId,AppsBalanceLedgerPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<AppsBalanceLedgerPlus> list = appsBalanceLedgerService.getByIds(ids.getLongIds(),true,AppsBalanceLedgerPlus::getUserId,AppsBalanceLedgerPlus::getAppId,AppsBalanceLedgerPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = appsBalanceLedgerService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = appsBalanceLedgerService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询应用账面余额流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
startPage();
|
||||
List<AppsBalanceLedger> list = appsBalanceLedgerService.selectAppsBalanceLedgerList(appsBalanceLedger,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询应用账面余额流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
startPage();
|
||||
List<AppsBalanceLedger> list = appsBalanceLedgerService.selectAppsBalanceLedgerList(appsBalanceLedger,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出应用账面余额流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:export')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
List<AppsBalanceLedger> list = appsBalanceLedgerService.selectAppsBalanceLedgerList(appsBalanceLedger,false);
|
||||
ExcelUtil<AppsBalanceLedger> util = new ExcelUtil<AppsBalanceLedger>(AppsBalanceLedger.class);
|
||||
return util.exportExcel(list, "appsBalanceLedger");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取应用账面余额流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(appsBalanceLedgerService.selectAppsBalanceLedgerById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取应用账面余额流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(appsBalanceLedgerService.selectAppsBalanceLedgerById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增应用账面余额流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:add')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.insertAppsBalanceLedger(appsBalanceLedger,false));
|
||||
}
|
||||
/**
|
||||
* 新增应用账面余额流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-add')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.insertAppsBalanceLedger(appsBalanceLedger,true));
|
||||
}
|
||||
/**
|
||||
* 修改应用账面余额流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:edit')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.updateAppsBalanceLedger(appsBalanceLedger,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-edit')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody AppsBalanceLedger appsBalanceLedger)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.updateAppsBalanceLedger(appsBalanceLedger,true));
|
||||
}
|
||||
/**
|
||||
* 删除应用账面余额流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:remove')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.deleteAppsBalanceLedgerByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除应用账面余额流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:appsBalanceLedger:user-remove')")
|
||||
@Log(title = "应用账面余额流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appsBalanceLedgerService.deleteAppsBalanceLedgerByIds(ids,true));
|
||||
}
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.select.Ids;
|
||||
import com.ruoyi.common.select.SelectItem;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.WalletAddressLedger;
|
||||
import com.ruoyi.system.domain.WalletAddressLedgerPlus;
|
||||
import com.ruoyi.system.service.IWalletAddressLedgerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 钱包地址资金流水Controller
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2026-10-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/walletAddressLedger")
|
||||
public class WalletAddressLedgerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWalletAddressLedgerService walletAddressLedgerService;
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:getByIds')")
|
||||
@PostMapping("/getByIds")
|
||||
public AjaxResult getByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<WalletAddressLedgerPlus> list = walletAddressLedgerService.getByIds(ids.getLongIds(),false,WalletAddressLedgerPlus::getWalletAddress,WalletAddressLedgerPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-getByIds')")
|
||||
@PostMapping("/user/getByIds")
|
||||
public AjaxResult userGetByIds(@RequestBody Ids ids)
|
||||
{
|
||||
List<WalletAddressLedgerPlus> list = walletAddressLedgerService.getByIds(ids.getLongIds(),true,WalletAddressLedgerPlus::getUserId,WalletAddressLedgerPlus::getWalletAddress,WalletAddressLedgerPlus::getId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:select')")
|
||||
@GetMapping("/select")
|
||||
public AjaxResult select(String keyword)
|
||||
{
|
||||
List<SelectItem> list = walletAddressLedgerService.select(keyword,false);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-select')")
|
||||
@GetMapping("/user/select")
|
||||
public AjaxResult userSelect(String keyword)
|
||||
{
|
||||
List<SelectItem> list = walletAddressLedgerService.select(keyword,true);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 查询钱包地址资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
startPage();
|
||||
List<WalletAddressLedger> list = walletAddressLedgerService.selectWalletAddressLedgerList(walletAddressLedger,false);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 查询钱包地址资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-list')")
|
||||
@GetMapping("/user/list")
|
||||
public TableDataInfo userList(WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
startPage();
|
||||
List<WalletAddressLedger> list = walletAddressLedgerService.selectWalletAddressLedgerList(walletAddressLedger,true);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出钱包地址资金流水列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:export')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
List<WalletAddressLedger> list = walletAddressLedgerService.selectWalletAddressLedgerList(walletAddressLedger,false);
|
||||
ExcelUtil<WalletAddressLedger> util = new ExcelUtil<WalletAddressLedger>(WalletAddressLedger.class);
|
||||
return util.exportExcel(list, "walletAddressLedger");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取钱包地址资金流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(walletAddressLedgerService.selectWalletAddressLedgerById(id,false));
|
||||
}
|
||||
/**
|
||||
* 获取钱包地址资金流水详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-query')")
|
||||
@GetMapping(value = "/user/{id}")
|
||||
public AjaxResult userGetInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(walletAddressLedgerService.selectWalletAddressLedgerById(id,true));
|
||||
}
|
||||
/**
|
||||
* 新增钱包地址资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:add')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.insertWalletAddressLedger(walletAddressLedger,false));
|
||||
}
|
||||
/**
|
||||
* 新增钱包地址资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-add')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/user")
|
||||
public AjaxResult userAdd(@RequestBody WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.insertWalletAddressLedger(walletAddressLedger,true));
|
||||
}
|
||||
/**
|
||||
* 修改钱包地址资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:edit')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.updateWalletAddressLedger(walletAddressLedger,false));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-edit')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/user")
|
||||
public AjaxResult userEdit(@RequestBody WalletAddressLedger walletAddressLedger)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.updateWalletAddressLedger(walletAddressLedger,true));
|
||||
}
|
||||
/**
|
||||
* 删除钱包地址资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:remove')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.deleteWalletAddressLedgerByIds(ids,false));
|
||||
}
|
||||
/**
|
||||
* 删除钱包地址资金流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:walletAddressLedger:user-remove')")
|
||||
@Log(title = "钱包地址资金流水", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/user/{ids}")
|
||||
public AjaxResult userRemove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(walletAddressLedgerService.deleteWalletAddressLedgerByIds(ids,true));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user