|
@@ -0,0 +1,108 @@
|
|
|
+package com.ruoyi.web.controller.system;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+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.system.domain.PoIssuer;
|
|
|
+import com.ruoyi.system.service.IPoIssuerService;
|
|
|
+import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
+import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 发行人信息操作处理Controller
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ * @date 2023-02-18
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/system/issuer")
|
|
|
+public class PoIssuerController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private IPoIssuerService poIssuerService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询发行人列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:issuer:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(PoIssuer poIssuer)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<PoIssuer> list = poIssuerService.selectPoIssuerList(poIssuer);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取发行人列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:issuer:export')")
|
|
|
+ @Log(title = "获取发行人列表", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/export")
|
|
|
+ public void export(HttpServletResponse response, PoIssuer poIssuer)
|
|
|
+ {
|
|
|
+ List<PoIssuer> list = poIssuerService.selectPoIssuerList(poIssuer);
|
|
|
+ ExcelUtil<PoIssuer> util = new ExcelUtil<PoIssuer>(PoIssuer.class);
|
|
|
+ util.exportExcel(response, list, "发行人数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据发行人编号获取详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:issuer:query')")
|
|
|
+ @GetMapping(value = "/{issuerId}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("issuerId") Long issuerId)
|
|
|
+ {
|
|
|
+ return success(poIssuerService.selectPoIssuerByIssuerId(issuerId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增发行人
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:issuer:add')")
|
|
|
+ @Log(title = "新增发行人", businessType = BusinessType.INSERT)
|
|
|
+ @ApiOperation("新增发行人")
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@RequestBody PoIssuer poIssuer)
|
|
|
+ {
|
|
|
+ return toAjax(poIssuerService.insertPoIssuer(poIssuer));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改发行人
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:issuer:edit')")
|
|
|
+ @Log(title = "修改发行人", businessType = BusinessType.UPDATE)
|
|
|
+ @ApiOperation("修改发行人")
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody PoIssuer poIssuer)
|
|
|
+ {
|
|
|
+ return toAjax(poIssuerService.updatePoIssuer(poIssuer));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除发行人
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:issuer:remove')")
|
|
|
+ @Log(title = "删除发行人", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{issuerIds}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] issuerIds)
|
|
|
+ {
|
|
|
+ return toAjax(poIssuerService.deletePoIssuerByIssuerIds(issuerIds));
|
|
|
+ }
|
|
|
+}
|