add:新增手持接口

This commit is contained in:
2024-04-03 14:13:26 +08:00
parent 73cdc561f1
commit 4592e16ddf
19 changed files with 542 additions and 10 deletions

View File

@@ -2,8 +2,13 @@ package org.nl;
import org.junit.jupiter.api.Test;
import org.nl.system.service.user.ISysUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.scheduling.annotation.Scheduled;
import java.util.Scanner;
/**
* @Author: lyd
@@ -14,8 +19,41 @@ import org.springframework.boot.test.context.SpringBootTest;
public class ApplicationTest {
@Autowired
private ISysUserService userService;
private Logger logger = LoggerFactory.getLogger(ApplicationTest.class);
@Test
void contextLoads() {
System.out.println(userService.list());
Scanner scanner = new Scanner(System.in);
System.out.println("请输入第一个数:");
int a = scanner.nextInt();
System.out.println("请输入第一个数:");
int b = scanner.nextInt();
System.out.println("请输入第一个数:");
int c = scanner.nextInt();
//求最小值
int min = (((a < b) ? a : b) < c) ?((a < b) ? a : b):c;
//求最大值
int max = (((a > b) ? a : b) > c) ?((a > b) ? a : b):c;
//求中间值
int mid = a + b + c - max - min;
//排序
System.out.println("最小值为:" + min + "中间值为:" + mid + "最大值为:" + max);
}
@Test
@Scheduled(cron = "0/5 * * * * ?")
void testOrderTask() {
logger.info(Thread.currentThread().getName() + "===task run");
}
@org.testng.annotations.Test
void demo1() {
}
}