111
This commit is contained in:
1 parent
81eca8933a
commit
345f906c35
540 files changed
+494222
-90
No files matched your search
+103
@@ -0,0 +1,103 @@
|
||||
package com.ruoyi.custom.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.custom.domain.CustomParcelNumber;
|
||||
import com.ruoyi.custom.service.ICustomParcelNumberService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 行邮税号Controller
|
||||
*
|
||||
* @author luqj
|
||||
* @date 2021-10-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/custom/parcelNumber")
|
||||
public class CustomParcelNumberController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICustomParcelNumberService customParcelNumberService;
|
||||
|
||||
/**
|
||||
* 查询行邮税号列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('custom:parcelNumber:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CustomParcelNumber customParcelNumber)
|
||||
{
|
||||
startPage();
|
||||
List<CustomParcelNumber> list = customParcelNumberService.selectCustomParcelNumberList(customParcelNumber);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出行邮税号列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('custom:parcelNumber:export')")
|
||||
@Log(title = "行邮税号", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(CustomParcelNumber customParcelNumber)
|
||||
{
|
||||
List<CustomParcelNumber> list = customParcelNumberService.selectCustomParcelNumberList(customParcelNumber);
|
||||
ExcelUtil<CustomParcelNumber> util = new ExcelUtil<CustomParcelNumber>(CustomParcelNumber.class);
|
||||
return util.exportExcel(list, "parcelNumber");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行邮税号详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('custom:parcelNumber:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(customParcelNumberService.selectCustomParcelNumberById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增行邮税号
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('custom:parcelNumber:add')")
|
||||
@Log(title = "行邮税号", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CustomParcelNumber customParcelNumber)
|
||||
{
|
||||
return toAjax(customParcelNumberService.insertCustomParcelNumber(customParcelNumber));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改行邮税号
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('custom:parcelNumber:edit')")
|
||||
@Log(title = "行邮税号", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CustomParcelNumber customParcelNumber)
|
||||
{
|
||||
return toAjax(customParcelNumberService.updateCustomParcelNumber(customParcelNumber));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除行邮税号
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('custom:parcelNumber:remove')")
|
||||
@Log(title = "行邮税号", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(customParcelNumberService.deleteCustomParcelNumberByIds(ids));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user