feat: complete review workflow support

This commit is contained in:
2026-06-20 09:16:20 +08:00
parent 81543969d8
commit f170e85297
20 changed files with 718 additions and 50 deletions
@@ -1,7 +1,9 @@
package com.guo.learningprogresstracker;
import cn.dev33.satoken.stp.StpUtil;
import com.guo.learningprogresstracker.entity.TestTableEntity;
import com.guo.learningprogresstracker.service.impl.TestTableServiceImpl;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@@ -19,6 +21,11 @@ public class DataSourceTest {
@Autowired
TestTableServiceImpl testTableService;
@BeforeEach
void setUp() {
StpUtil.login("1", "test_driver");
}
@Test
public void testAdd(){
TestTableEntity testTableEntity = new TestTableEntity();
@@ -30,8 +37,12 @@ public class DataSourceTest {
@Test
public void testDelete(){
TestTableEntity testTableEntity = new TestTableEntity();
testTableEntity.setIdName("guo_test_delete");
testTableService.save(testTableEntity);
HashMap<String, Object> stringStringHashMap = new HashMap<>();
stringStringHashMap.put("id_name", "guo_test");
stringStringHashMap.put("id_name", "guo_test_delete");
boolean delete = testTableService.removeByMap(stringStringHashMap);
assertTrue(delete,"删除idName为guo_test的数据失败");