service api code

This commit is contained in:
liulu
2024-12-16 16:14:15 +08:00
parent 1a6f527fbd
commit 34b7b79bf6
6 changed files with 122 additions and 19 deletions
@@ -1,6 +1,7 @@
package com.sunyard.chsm.controller;
import com.sunyard.chsm.auth.AuthCode;
import com.sunyard.chsm.constant.AuthCodeConst;
import com.sunyard.chsm.model.R;
import com.sunyard.chsm.model.dto.KeyInfoDTO;
import com.sunyard.chsm.service.KeyInfoService;
@@ -32,7 +33,7 @@ public class KeyManageController {
* @return id
*/
@PostMapping("/enable")
@AuthCode("12312312")
@AuthCode(AuthCodeConst.key_enable)
public R<Void> enableKey(@Validated @RequestBody KeyInfoDTO.IDs param) {
keyInfoService.enableKey(param.getIds());
return R.ok();
@@ -0,0 +1,8 @@
package com.sunyard.chsm.service;
/**
* @author liulu
* @since 2024/12/16
*/
public interface KeyManageService {
}
@@ -0,0 +1,16 @@
package com.sunyard.chsm.service.impl;
import com.sunyard.chsm.service.KeyManageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* @author liulu
* @since 2024/12/16
*/
@Slf4j
@Service
@Transactional
public class KeyManageServiceImpl implements KeyManageService {
}