108 lines
4.1 KiB
Java
108 lines
4.1 KiB
Java
package com.ruoyi.system.controller;
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
import com.ruoyi.common.select.Ids;
|
|
import com.ruoyi.common.select.SelectItem;
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
import com.ruoyi.system.domain.UsdtOtherToDelegation;
|
|
import com.ruoyi.system.domain.UsdtOtherToDelegationPlus;
|
|
import com.ruoyi.system.service.IUsdtOtherToProxyService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 其他地址代理Controller
|
|
*
|
|
* @author luqj
|
|
* @date 2026-10-12
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/system/otherToDelegation")
|
|
public class UsdtOtherToDelegationController extends BaseController {
|
|
@Autowired
|
|
private IUsdtOtherToProxyService usdtOtherToProxyService;
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:getByIds')")
|
|
@PostMapping("/getByIds")
|
|
public AjaxResult getByIds(@RequestBody Ids ids) {
|
|
List<UsdtOtherToDelegationPlus> list = usdtOtherToProxyService.getByIds(ids.getLongIds(), UsdtOtherToDelegationPlus::getToken, UsdtOtherToDelegationPlus::getId);
|
|
return AjaxResult.success(list);
|
|
}
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:select')")
|
|
@GetMapping("/select")
|
|
public AjaxResult select(String keyword) {
|
|
List<SelectItem> list = usdtOtherToProxyService.select(keyword);
|
|
return AjaxResult.success(list);
|
|
}
|
|
|
|
/**
|
|
* 查询其他地址代理列表
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:list')")
|
|
@GetMapping("/list")
|
|
public TableDataInfo list(UsdtOtherToDelegation usdtOtherToDelegation) {
|
|
startPage();
|
|
List<UsdtOtherToDelegation> list = usdtOtherToProxyService.selectUsdtOtherToDelegationList(usdtOtherToDelegation);
|
|
return getDataTable(list);
|
|
}
|
|
|
|
/**
|
|
* 导出其他地址代理列表
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:export')")
|
|
@Log(title = "其他地址代理", businessType = BusinessType.EXPORT)
|
|
@GetMapping("/export")
|
|
public AjaxResult export(UsdtOtherToDelegation usdtOtherToDelegation) {
|
|
List<UsdtOtherToDelegation> list = usdtOtherToProxyService.selectUsdtOtherToDelegationList(usdtOtherToDelegation);
|
|
ExcelUtil<UsdtOtherToDelegation> util = new ExcelUtil<UsdtOtherToDelegation>(UsdtOtherToDelegation.class);
|
|
return util.exportExcel(list, "delegationToOther");
|
|
}
|
|
|
|
/**
|
|
* 获取其他地址代理详细信息
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:query')")
|
|
@GetMapping(value = "/{id}")
|
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
return AjaxResult.success(usdtOtherToProxyService.selectUsdtOtherToDelegationById(id));
|
|
}
|
|
|
|
/**
|
|
* 新增其他地址代理
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:add')")
|
|
@Log(title = "其他地址代理", businessType = BusinessType.INSERT)
|
|
@PostMapping
|
|
public AjaxResult add(@RequestBody UsdtOtherToDelegation usdtOtherToDelegation) {
|
|
return toAjax(usdtOtherToProxyService.insertUsdtOtherToDelegation(usdtOtherToDelegation));
|
|
}
|
|
|
|
/**
|
|
* 修改其他地址代理
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:edit')")
|
|
@Log(title = "其他地址代理", businessType = BusinessType.UPDATE)
|
|
@PutMapping
|
|
public AjaxResult edit(@RequestBody UsdtOtherToDelegation usdtOtherToDelegation) {
|
|
return toAjax(usdtOtherToProxyService.updateUsdtOtherToDelegation(usdtOtherToDelegation));
|
|
}
|
|
|
|
/**
|
|
* 删除其他地址代理
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:otherToDelegation:remove')")
|
|
@Log(title = "其他地址代理", businessType = BusinessType.DELETE)
|
|
@DeleteMapping("/{ids}")
|
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
|
return toAjax(usdtOtherToProxyService.deleteUsdtOtherToDelegationByIds(ids));
|
|
}
|
|
}
|