设备和token

This commit is contained in:
liulu
2024-12-06 15:38:22 +08:00
parent bcf8dfb5f3
commit 04cfab2f82
25 changed files with 588 additions and 25 deletions
@@ -0,0 +1,39 @@
package com.sunyard.chsm.controller;
import com.sunyard.chsm.model.R;
import com.sunyard.chsm.model.dto.KeyInfoDTO;
import com.sunyard.chsm.service.KeyInfoService;
import org.springframework.validation.annotation.Validated;
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;
/**
* 密钥管理类接口
*
* @author liulu
* @since 2024/12/6
*/
@RestController
@RequestMapping("/key/manage")
public class KeyManageController {
@Resource
private KeyInfoService keyInfoService;
/**
* 启用密钥
*
* @param param 密钥id
* @return id
*/
@PostMapping("/enable")
public R<Void> enableKey(@Validated @RequestBody KeyInfoDTO.IDs param) {
keyInfoService.enableKey(param.getIds());
return R.ok();
}
}