|
@@ -1,42 +0,0 @@
|
|
|
-package com.dragon.tj.portal.controller;
|
|
|
-
|
|
|
-
|
|
|
-import com.dragon.tj.portal.component.log.dto.SysLogDTO;
|
|
|
-import com.dragon.tj.portal.common.base.R;
|
|
|
-import com.dragon.tj.portal.component.log.annotation.SysLog;
|
|
|
-import com.dragon.tj.portal.component.redis.StringCacheUtil;
|
|
|
-import com.dragon.tj.portal.entity.Test;
|
|
|
-import com.dragon.tj.portal.service.TestService;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-
|
|
|
-/**
|
|
|
- * <p>
|
|
|
- * 前端控制器
|
|
|
- * </p>
|
|
|
- *
|
|
|
- * @author huey
|
|
|
- * @since 2023-06-11
|
|
|
- */
|
|
|
-@RestController
|
|
|
-@RequestMapping("/test")
|
|
|
-public class TestController {
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private TestService testService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private StringCacheUtil stringCacheUtil;
|
|
|
-
|
|
|
- @RequestMapping("/test1")
|
|
|
- @SysLog("huey测试日志记录")
|
|
|
- public R test1(@Validated @RequestBody SysLogDTO sysLogDTO) {
|
|
|
- Test byId = testService.getById(1);
|
|
|
- stringCacheUtil.set("huey", "huey-test");
|
|
|
- return R.ok(byId.getContent());
|
|
|
- }
|
|
|
-}
|
|
|
-
|