证书管理
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
package com.sunyard.chsm.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sunyard.chsm.dto.CertDTO;
|
||||
import com.sunyard.chsm.model.R;
|
||||
import com.sunyard.chsm.service.AppCertService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 应用证书管理接口
|
||||
*
|
||||
* @author liulu
|
||||
* @since 2024/11/6
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/app/cert")
|
||||
public class AppCertController {
|
||||
|
||||
@Resource
|
||||
private AppCertService appCertService;
|
||||
|
||||
/**
|
||||
* 分页查询应用证书列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @return 应用列表
|
||||
*/
|
||||
@GetMapping("/pageList")
|
||||
public R<Page<CertDTO.ACView>> queryPageList(CertDTO.Query query) {
|
||||
|
||||
Page<CertDTO.ACView> page = appCertService.selectPageList(query);
|
||||
|
||||
return R.data(page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导入证书
|
||||
*
|
||||
* @param importCert 证书
|
||||
*/
|
||||
@PostMapping("/import")
|
||||
public void importCert(@Valid @RequestBody CertDTO.ImportCert importCert) {
|
||||
appCertService.importCert(importCert);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.sunyard.chsm.controller;
|
||||
|
||||
import com.sunyard.chsm.dto.CertDTO;
|
||||
import com.sunyard.chsm.service.CertService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 应用证书管理接口
|
||||
*
|
||||
* @author liulu
|
||||
* @since 2024/11/6
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping
|
||||
public class CertController {
|
||||
|
||||
@Resource
|
||||
private CertService certService;
|
||||
|
||||
|
||||
/**
|
||||
* 导入证书
|
||||
*
|
||||
* @param importCert 证书
|
||||
*/
|
||||
@PostMapping("/app/cert/import")
|
||||
public void importCert(@Valid @RequestBody CertDTO.ImportCert importCert) {
|
||||
certService.importCert(importCert);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user