# Conflicts: # src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java # src/main/java/com/yipin/liuwanr/service/ExperimentalClassService.java # src/test/java/com/yipin/liuwanr/ExperimentalClassServiceTest.javamaster
commit
a8d7762779
20 changed files with 2230 additions and 932 deletions
@ -0,0 +1,217 @@ |
||||
package com.yipin.liuwanr; |
||||
|
||||
import com.yipin.liuwanr.entity.*; |
||||
import com.yipin.liuwanr.service.OrderService; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.boot.test.context.SpringBootTest; |
||||
import org.springframework.test.context.junit4.SpringRunner; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.text.ParseException; |
||||
import java.util.ArrayList; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
|
||||
@RunWith(SpringRunner.class) |
||||
@SpringBootTest |
||||
public class OrderServiceTest { |
||||
@Autowired |
||||
private OrderService orderService; |
||||
|
||||
//添加合同信息
|
||||
@Test |
||||
@Transactional |
||||
public void addOrder() { |
||||
Order order = new Order(); |
||||
order.setOrderNumber("1596424017647"); |
||||
order.setCustomerName("测试"); |
||||
order.setOrderName("测试"); |
||||
order.setOrderAmount("120"); |
||||
order.setOrderType(1); |
||||
order.setProvinceId(1); |
||||
order.setCityId(1); |
||||
order.setOrderContact("张三"); |
||||
order.setPhone("15267668899"); |
||||
order.setEmail("123@qq.com"); |
||||
order.setCustomerId(126); |
||||
HashMap<String, Object> map = orderService.addOrder(order); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void addContractInformation() { |
||||
ContractInformation contractInformation = new ContractInformation(); |
||||
contractInformation.setContractInformationName("1"); |
||||
contractInformation.setContractInformationNumber("1"); |
||||
contractInformation.setContractInformationSum("1"); |
||||
contractInformation.setContractInformationLink("1"); |
||||
contractInformation.setOrderId(20); |
||||
HashMap<String, Object> map = orderService.addContractInformation(contractInformation); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
//添加课程权限
|
||||
@Test |
||||
@Transactional |
||||
public void addCoursePermissionss() throws ParseException { |
||||
List<CoursePermissions> coursePermissionss = new ArrayList<>(); |
||||
CoursePermissions coursePermissions = new CoursePermissions(); |
||||
coursePermissions.setCourseId(77); |
||||
coursePermissions.setUsePeriod(30); |
||||
coursePermissions.setMarketPrice(12.8); |
||||
coursePermissions.setTransactionPrice(1); |
||||
coursePermissions.setDiscount(7); |
||||
coursePermissions.setPortAddressId(1); |
||||
coursePermissions.setIsDeliverGoods(1); |
||||
coursePermissions.setOrderId(118); |
||||
coursePermissionss.add(coursePermissions); |
||||
HashMap<String, Object> map = orderService.addCoursePermissionss(coursePermissionss); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
//绑定应用权限
|
||||
@Test |
||||
@Transactional |
||||
public void bindingApplicationPermissions() { |
||||
ApplicationPermissions applicationPermissions = new ApplicationPermissions(); |
||||
applicationPermissions.setSystemId("2"); |
||||
applicationPermissions.setOrderId(2); |
||||
HashMap<String, Object> map = orderService.bindingApplicationPermissions(applicationPermissions); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void queryCoursePermissions() { |
||||
String courseId = "1"; |
||||
HashMap<String, Object> map = orderService.queryCoursePermissions(courseId); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void queryOrder() { |
||||
Order order = new Order(); |
||||
Integer pageNo = 1; |
||||
Integer pageSize = 10; |
||||
HashMap<String, Object> map = orderService.queryOrder(order, pageNo, pageSize); |
||||
Integer retcode = (Integer) map.get("retcode"); |
||||
System.out.println(retcode); |
||||
if (retcode == 200) { |
||||
PageResult pageResult = (PageResult) map.get("retvalue"); |
||||
Long total = pageResult.getTotal(); |
||||
System.out.println("total = " + total); |
||||
List<Order> rows = (List<Order>) pageResult.getRows(); |
||||
rows.forEach(item -> System.out.println(item.toString())); |
||||
} else { |
||||
String msg = (String) map.get("retvalue"); |
||||
System.out.println(msg); |
||||
} |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void queryOrderDetails() { |
||||
Integer orderId = 1; |
||||
HashMap<String, Object> map = orderService.queryOrderDetails(orderId); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void deleteOrder() { |
||||
List<Integer> orderId = new ArrayList<>(); |
||||
orderId.add(1); |
||||
orderId.add(2); |
||||
orderId.add(3); |
||||
HashMap<String, Object> map = orderService.deleteOrder(orderId); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void updateOrder() { |
||||
Order order = new Order(); |
||||
HashMap<String, Object> map = orderService.updateOrder(order); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void deleteCoursePermissions() { |
||||
Integer orderId = 1; |
||||
HashMap<String, Object> map = orderService.deleteCoursePermissions(orderId); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void updateCoursePermissions() { |
||||
List<CoursePermissions> coursePermissionss = new ArrayList<>(); |
||||
CoursePermissions coursePermissions = new CoursePermissions(); |
||||
coursePermissionss.add(coursePermissions); |
||||
HashMap<String, Object> map = orderService.updateCoursePermissions(coursePermissionss); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void updateContractInformation() { |
||||
ContractInformation contractInformation = new ContractInformation(); |
||||
HashMap<String, Object> map = orderService.updateContractInformation(contractInformation); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
//绑定应用权限
|
||||
@Test |
||||
@Transactional |
||||
public void isDeliverGoods() { |
||||
CoursePermissions coursePermissions = new CoursePermissions(); |
||||
HashMap<String, Object> map = orderService.isDeliverGoods(coursePermissions); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void queryOrderCustomer() { |
||||
Integer cityId = 1; |
||||
Integer provinceId = 1; |
||||
HashMap<String, Object> map = orderService.queryOrderCustomer(cityId, provinceId); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void queryOrderCustomerContact() { |
||||
Integer customerId = 1; |
||||
HashMap<String, Object> map = orderService.queryOrderCustomerContact(customerId); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
//查询订单课程列表
|
||||
@Test |
||||
@Transactional |
||||
public void queryCourseList() { |
||||
String searchContent = ""; |
||||
List<Integer> courseId = new ArrayList<>(); |
||||
Integer pageNo = 1; |
||||
Integer pageSize = 10; |
||||
HashMap<String, Object> map = orderService.queryCourseList(searchContent, courseId, pageNo, pageSize); |
||||
Integer retcode = (Integer) map.get("retcode"); |
||||
System.out.println(retcode); |
||||
if (retcode == 200) { |
||||
PageResult pageResult = (PageResult) map.get("retvalue"); |
||||
Long total = pageResult.getTotal(); |
||||
System.out.println("total = " + total); |
||||
List<Course> rows = (List<Course>) pageResult.getRows(); |
||||
rows.forEach(item -> System.out.println(item.toString())); |
||||
} else { |
||||
String msg = (String) map.get("retvalue"); |
||||
System.out.println(msg); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,83 @@ |
||||
package com.yipin.liuwanr; |
||||
|
||||
import com.yipin.liuwanr.entity.PageResult; |
||||
import com.yipin.liuwanr.entity.ServiceConfig; |
||||
import com.yipin.liuwanr.service.ServiceConfigService; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.boot.test.context.SpringBootTest; |
||||
import org.springframework.test.context.junit4.SpringRunner; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
|
||||
@RunWith(SpringRunner.class) |
||||
@SpringBootTest |
||||
public class ServiceConfigServiceTest { |
||||
@Autowired |
||||
private ServiceConfigService serviceConfigService; |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void addServiceConfig() { |
||||
ServiceConfig serviceConfig = new ServiceConfig(); |
||||
serviceConfig.setSystemName("测试"); |
||||
serviceConfig.setSystemType(2); |
||||
serviceConfig.setSystemAttribution(2); |
||||
serviceConfig.setSystemStatus(1); |
||||
HashMap<String, Object> map = serviceConfigService.addServiceConfig(serviceConfig); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
public void queryServiceConfig() { |
||||
ServiceConfig serviceConfig = new ServiceConfig(); |
||||
Integer pageNo = 1; |
||||
Integer pageSize = 10; |
||||
HashMap<String, Object> map = serviceConfigService.queryServiceConfig(serviceConfig, pageNo, pageSize); |
||||
Integer retcode = (Integer) map.get("retcode"); |
||||
System.out.println(retcode); |
||||
if (retcode == 200) { |
||||
PageResult pageResult = (PageResult) map.get("retvalue"); |
||||
Long total = pageResult.getTotal(); |
||||
System.out.println("total = " + total); |
||||
List<ServiceConfig> rows = (List<ServiceConfig>) pageResult.getRows(); |
||||
rows.forEach(item -> System.out.println(item.toString())); |
||||
} else { |
||||
String msg = (String) map.get("retvalue"); |
||||
System.out.println(msg); |
||||
} |
||||
} |
||||
|
||||
@Test |
||||
public void queryServiceConfigDetails() { |
||||
Integer systemId = 1; |
||||
HashMap<String, Object> map = serviceConfigService.queryServiceConfigDetails(systemId); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void deleteServiceConfig() { |
||||
ServiceConfig serviceConfig = new ServiceConfig(); |
||||
serviceConfig.setSystemId(1); |
||||
HashMap<String, Object> map = serviceConfigService.deleteServiceConfig(serviceConfig); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
@Test |
||||
@Transactional |
||||
public void updateServiceConfig() { |
||||
ServiceConfig serviceConfig = new ServiceConfig(); |
||||
serviceConfig.setSystemName("测试"); |
||||
serviceConfig.setSystemType(2); |
||||
serviceConfig.setSystemAttribution(2); |
||||
serviceConfig.setSystemStatus(1); |
||||
serviceConfig.setSystemId(1); |
||||
HashMap<String, Object> map = serviceConfigService.updateServiceConfig(serviceConfig); |
||||
map.forEach((key, value) -> System.out.println("key = " + key + " ===> value = " + value.toString())); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,165 @@ |
||||
package com.yipin.liuwanr.service; |
||||
|
||||
import org.apache.commons.io.IOUtils; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.boot.test.context.SpringBootTest; |
||||
import org.springframework.lang.Nullable; |
||||
import org.springframework.mock.web.MockMultipartFile; |
||||
import org.springframework.test.context.junit4.SpringRunner; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
|
||||
import java.io.*; |
||||
import java.text.ParseException; |
||||
import java.text.SimpleDateFormat; |
||||
import java.util.HashMap; |
||||
|
||||
/** |
||||
* @auther River |
||||
* @date 2020/8/19 9:39 |
||||
*/ |
||||
@SpringBootTest |
||||
@RunWith(SpringRunner.class) |
||||
public class MakeuplistServiceTest { |
||||
|
||||
@Autowired |
||||
private MakeuplistService makeuplistService; |
||||
|
||||
/** |
||||
* 查询数据 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryAllMakeuplistTest(){ |
||||
Integer staffId = 1; |
||||
long uploadTime = 0L; |
||||
Integer uploadType = 1; |
||||
Integer schoolId = 5; |
||||
String time = "2020-07-24 18:51"; |
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
||||
try { |
||||
uploadTime = sdf.parse(time).getTime() / 1000; |
||||
} catch (ParseException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
HashMap<String, Object> queryAllMakeuplist = makeuplistService.queryAllMakeuplist(staffId, uploadTime, uploadType, schoolId); |
||||
for (String s : queryAllMakeuplist.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + queryAllMakeuplist.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 获取学生信息 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void getStudentTest(){ |
||||
Integer staffId = 1; |
||||
long uploadTime = 0L; |
||||
Integer uploadType = 1; |
||||
Integer schoolId = 5; |
||||
String time = "2020-07-24 18:51"; |
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
||||
try { |
||||
uploadTime = sdf.parse(time).getTime() / 1000; |
||||
} catch (ParseException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
HashMap<String, Object> student = makeuplistService.getStudent(staffId, uploadTime, uploadType, schoolId); |
||||
for (String s : student.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + student.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 获取补考信息 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void getByMakeuplistTest(){ |
||||
Integer staffId = 1; |
||||
long uploadTime = 0L; |
||||
Integer uploadType = 1; |
||||
Integer schoolId = 5; |
||||
String time = "2020-07-24 18:51"; |
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
||||
try { |
||||
uploadTime = sdf.parse(time).getTime() / 1000; |
||||
} catch (ParseException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
HashMap<String, Object> makeuplist = makeuplistService.getByMakeuplist(staffId, uploadTime, uploadType, schoolId); |
||||
for (String s : makeuplist.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + makeuplist.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 导入数据 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void addMakeuplistTest(){ |
||||
MultipartFile file = new MultipartFile() { |
||||
@Override |
||||
public String getName() { |
||||
return null; |
||||
} |
||||
@Nullable |
||||
@Override |
||||
public String getOriginalFilename() { |
||||
return null; |
||||
} |
||||
@Nullable |
||||
@Override |
||||
public String getContentType() { |
||||
return null; |
||||
} |
||||
@Override |
||||
public boolean isEmpty() { |
||||
return false; |
||||
} |
||||
@Override |
||||
public long getSize() { |
||||
return 0; |
||||
} |
||||
@Override |
||||
public byte[] getBytes() throws IOException { |
||||
return new byte[0]; |
||||
} |
||||
@Override |
||||
public InputStream getInputStream() throws IOException { |
||||
return null; |
||||
} |
||||
@Override |
||||
public void transferTo(File dest) throws IOException, IllegalStateException { |
||||
} |
||||
}; |
||||
Integer schoolId = 5; |
||||
Integer staffId = 1; |
||||
long uploadTime = 0L; |
||||
String time = "2020-07-24 18:51"; |
||||
File file1 = new File("C:\\Users\\Hello\\Desktop\\aaaa.xlsx"); |
||||
try { |
||||
//将file类型文件转换为MultipartFile类型文件
|
||||
FileInputStream input = new FileInputStream(file1); |
||||
file = new MockMultipartFile("file", file1.getName(), "text/plain", IOUtils.toByteArray(input)); |
||||
} catch (FileNotFoundException e) { |
||||
e.printStackTrace(); |
||||
} catch (IOException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
||||
try { |
||||
uploadTime = sdf.parse(time).getTime() / 1000; |
||||
} catch (ParseException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
HashMap<String, Object> makeuplist = makeuplistService.addMakeuplist(file, schoolId, staffId, uploadTime); |
||||
for (String s : makeuplist.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + makeuplist.get(s)); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,120 @@ |
||||
package com.yipin.liuwanr.service; |
||||
|
||||
import com.yipin.liuwanr.entity.CourseSchedule; |
||||
import com.yipin.liuwanr.entity.Project_Management; |
||||
import com.yipin.liuwanr.vo.CourseAndProjectVo; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.boot.test.context.SpringBootTest; |
||||
import org.springframework.test.context.junit4.SpringRunner; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.util.HashMap; |
||||
|
||||
/** |
||||
* @auther River |
||||
* @date 2020/8/21 11:38 |
||||
*/ |
||||
@SpringBootTest |
||||
@RunWith(SpringRunner.class) |
||||
public class ProjectAndCourseServiceTest { |
||||
|
||||
@Autowired |
||||
private ProjectAndCourseService projectAndCourseService; |
||||
|
||||
/** |
||||
* 根据课程查询实验项目信息 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryProjectTest(){ |
||||
Integer courseId = 77; |
||||
Integer experimentalClassId = 87; |
||||
Integer pageNo = 1; |
||||
Integer pageSize = 10; |
||||
HashMap<String, Object> project = projectAndCourseService.queryProject(courseId, experimentalClassId, pageNo, pageSize); |
||||
for (String s : project.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + project.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 修改项目状态 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void updateIsExperimentTest(){ |
||||
CourseAndProjectVo vo = new CourseAndProjectVo(); |
||||
vo.setCourseId(77); |
||||
vo.setExperimentalClassId(87); |
||||
vo.setProject(new Project_Management(1,289)); |
||||
HashMap<String, Object> experiment = projectAndCourseService.updateIsExperiment(vo); |
||||
for (String s : experiment.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + experiment.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 修改考勤状态 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void updateIsAttendanceTest(){ |
||||
CourseAndProjectVo vo = new CourseAndProjectVo(); |
||||
vo.setCourseId(77); |
||||
vo.setExperimentalClassId(87); |
||||
vo.setProject(new Project_Management(1,289,null)); |
||||
HashMap<String, Object> attendance = projectAndCourseService.updateIsAttendance(vo); |
||||
for (String s : attendance.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + attendance.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 获取课程进度 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void getCourseScheduleTest(){ |
||||
Integer courseId = 77; |
||||
Integer experimentalClassId = 87; |
||||
Integer studentId = null; |
||||
HashMap<String, Object> courseSchedule = projectAndCourseService.getCourseSchedule(courseId, experimentalClassId, studentId); |
||||
for (String s : courseSchedule.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + courseSchedule.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 添加课程进度 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void addCourseScheduleTest(){ |
||||
CourseSchedule courseSchedule = new CourseSchedule(); |
||||
courseSchedule.setScheduleId(1); |
||||
courseSchedule.setProjectId(5); |
||||
courseSchedule.setCourseId(5); |
||||
courseSchedule.setExperimentalClassId(0); |
||||
HashMap<String, Object> courseSchedule1 = projectAndCourseService.addCourseSchedule(courseSchedule); |
||||
for (String s : courseSchedule1.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + courseSchedule1.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 课程视频 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void getCoursevideoTest(){ |
||||
Integer courseId = 77; |
||||
Integer experimentalClassId = 87; |
||||
Integer studentId = null; |
||||
HashMap<String, Object> coursevideo = projectAndCourseService.getCoursevideo(courseId, experimentalClassId, studentId); |
||||
for (String s : coursevideo.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + coursevideo.get(s)); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,101 @@ |
||||
package com.yipin.liuwanr.service; |
||||
|
||||
import com.yipin.liuwanr.entity.School; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.boot.test.context.SpringBootTest; |
||||
import org.springframework.test.context.junit4.SpringRunner; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.util.HashMap; |
||||
|
||||
/** |
||||
* @auther River |
||||
* @date 2020/8/24 9:14 |
||||
*/ |
||||
@SpringBootTest |
||||
@RunWith(SpringRunner.class) |
||||
public class SchoolServiceTest { |
||||
|
||||
@Autowired |
||||
private SchoolService schoolService; |
||||
|
||||
/** |
||||
* 添加学校 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void addSchoolTest(){ |
||||
School school = new School(); |
||||
school.setSchoolName("北京大学"); |
||||
school.setProvinceId(1); |
||||
school.setCityId(1); |
||||
school.setLevel(1); |
||||
HashMap<String, Object> addSchool = schoolService.addSchool(school); |
||||
for (String s : addSchool.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + addSchool.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询学校 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void querySchoolTest(){ |
||||
School school = new School(); |
||||
school.setProvinceId(1); |
||||
school.setCityId(1); |
||||
school.setLevel(1); |
||||
HashMap<String, Object> querySchool = schoolService.querySchool(school); |
||||
for (String s : querySchool.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + querySchool.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询学校详情 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void querySchoolDetailsTest(){ |
||||
Integer schoolId = 1; |
||||
HashMap<String, Object> schoolDetails = schoolService.querySchoolDetails(schoolId); |
||||
for (String s : schoolDetails.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + schoolDetails.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 删除学校 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void deleteSchoolTest(){ |
||||
School school = new School(); |
||||
school.setSchoolId(1); |
||||
HashMap<String, Object> deleteSchool = schoolService.deleteSchool(school); |
||||
for (String s : deleteSchool.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + deleteSchool.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 更新学校 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void updateSchoolTest(){ |
||||
School school = new School(); |
||||
school.setSchoolId(1); |
||||
school.setProvinceId(1); |
||||
school.setCityId(1); |
||||
school.setLevel(1); |
||||
school.setSchoolName("北京大学"); |
||||
HashMap<String, Object> updateSchool = schoolService.updateSchool(school); |
||||
for (String s : updateSchool.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + updateSchool.get(s)); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,93 @@ |
||||
package com.yipin.liuwanr.service; |
||||
|
||||
import com.yipin.liuwanr.entity.StaffGrade; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.boot.test.context.SpringBootTest; |
||||
import org.springframework.test.context.junit4.SpringRunner; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.util.HashMap; |
||||
|
||||
/** |
||||
* @auther River |
||||
* @date 2020/8/20 10:57 |
||||
*/ |
||||
@SpringBootTest |
||||
@RunWith(SpringRunner.class) |
||||
public class StaffGradServiceTest { |
||||
|
||||
@Autowired |
||||
private StaffGradeService staffGradeService; |
||||
|
||||
/** |
||||
* 添加员工年级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void addStaffGradeTest(){ |
||||
StaffGrade staffGrade = new StaffGrade(); |
||||
staffGrade.setStaffGradeName("教导处"); |
||||
staffGrade.setStaffProfessionalArchitectureId(1); |
||||
HashMap<String, Object> addStaffGrade = staffGradeService.addStaffGrade(staffGrade); |
||||
for (String s : addStaffGrade.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + addStaffGrade.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询员工年级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStaffGradeTest(){ |
||||
Integer staffProfessionalArchitectureId = 1; |
||||
HashMap<String, Object> staffGrade = staffGradeService.queryStaffGrade(staffProfessionalArchitectureId); |
||||
for (String s : staffGrade.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + staffGrade.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 删除员工年级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void deleteStaffGradeTest(){ |
||||
Integer staffGradeId = 1; |
||||
HashMap<String, Object> staffGrade = staffGradeService.deleteStaffGrade(staffGradeId); |
||||
for (String s : staffGrade.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + staffGrade.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询员工年级详情 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStaffGradeDetailsTest(){ |
||||
Integer staffGradeId = 1; |
||||
HashMap<String, Object> staffGradeDetails = staffGradeService.queryStaffGradeDetails(staffGradeId); |
||||
for (String s : staffGradeDetails.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + staffGradeDetails.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 更新员工年级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void updateStaffGradeTest(){ |
||||
StaffGrade staffGrade = new StaffGrade(); |
||||
staffGrade.setStaffProfessionalArchitectureId(1); |
||||
staffGrade.setStaffGradeName("教务处"); |
||||
staffGrade.setStaffGradeId(1); |
||||
HashMap<String, Object> staffGrade1 = staffGradeService.updateStaffGrade(staffGrade); |
||||
for (String s : staffGrade1.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + staffGrade1.get(s)); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,194 @@ |
||||
package com.yipin.liuwanr.service; |
||||
|
||||
import com.yipin.liuwanr.entity.Staff; |
||||
import com.yipin.liuwanr.entity.UserM; |
||||
import com.yipin.liuwanr.vo.UserVO; |
||||
import org.apache.commons.io.IOUtils; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.boot.test.context.SpringBootTest; |
||||
import org.springframework.lang.Nullable; |
||||
import org.springframework.mock.web.MockMultipartFile; |
||||
import org.springframework.test.context.junit4.SpringRunner; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
|
||||
import java.io.*; |
||||
import java.util.HashMap; |
||||
|
||||
/** |
||||
* @auther River |
||||
* @date 2020/8/24 9:45 |
||||
*/ |
||||
@SpringBootTest |
||||
@RunWith(SpringRunner.class) |
||||
public class StaffServiceTest { |
||||
|
||||
@Autowired |
||||
private StaffService staffService; |
||||
|
||||
/** |
||||
* 读取员工表 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void readStaffTest(){ |
||||
MultipartFile file = new MultipartFile() { |
||||
@Override |
||||
public String getName() { |
||||
return null; |
||||
} |
||||
@Nullable |
||||
@Override |
||||
public String getOriginalFilename() { |
||||
return null; |
||||
} |
||||
@Nullable |
||||
@Override |
||||
public String getContentType() { |
||||
return null; |
||||
} |
||||
@Override |
||||
public boolean isEmpty() { |
||||
return false; |
||||
} |
||||
@Override |
||||
public long getSize() { |
||||
return 0; |
||||
} |
||||
@Override |
||||
public byte[] getBytes() throws IOException { |
||||
return new byte[0]; |
||||
} |
||||
@Override |
||||
public InputStream getInputStream() throws IOException { |
||||
return null; |
||||
} |
||||
@Override |
||||
public void transferTo(File dest) throws IOException, IllegalStateException { |
||||
} |
||||
}; |
||||
Integer schoolId = 1; |
||||
File file1 = new File("C:\\Users\\Hello\\Desktop\\aaaa.xlsx"); |
||||
try { |
||||
//将file类型文件转换为MultipartFile类型文件
|
||||
FileInputStream input = new FileInputStream(file1); |
||||
file = new MockMultipartFile("file", file1.getName(), "text/plain", IOUtils.toByteArray(input)); |
||||
} catch (FileNotFoundException e) { |
||||
e.printStackTrace(); |
||||
} catch (IOException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
HashMap<String, Object> readStaff = staffService.readStaff(file, schoolId); |
||||
for (String s : readStaff.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + readStaff.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 添加员工 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void addStaffTest(){ |
||||
Staff staff = new Staff(); |
||||
staff.setSchoolId(2043); |
||||
staff.setEmail("4867687@qq.com"); |
||||
staff.setPhone("18873465488"); |
||||
staff.setRoleId(3); |
||||
staff.setStaffGradeId(2050); |
||||
staff.setStaffName("zha"); |
||||
staff.setStaffProfessionalArchitectureId(2057); |
||||
staff.setStaffWorkNumber("1222"); |
||||
staff.setUniqueIdentificationAccount("204312221598238094000"); |
||||
HashMap<String, Object> addStaff = staffService.addStaff(staff); |
||||
for (String s : addStaff.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + addStaff.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询员工 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStaffTest(){ |
||||
Staff staff = new Staff(); |
||||
Integer pageNo = 1; |
||||
Integer pageSize = 10; |
||||
staff.setSchoolId(2043); |
||||
HashMap<String, Object> queryStaff = staffService.queryStaff(staff, pageNo, pageSize); |
||||
for (String s : queryStaff.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + queryStaff.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 删除员工 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void deleteStaffTest(){ |
||||
Integer staffId = 118; |
||||
String phone = "13137366427"; |
||||
HashMap<String, Object> deleteStaff = staffService.deleteStaff(staffId, phone); |
||||
for (String s : deleteStaff.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + deleteStaff.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询员工详情 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStaffDetailsTest(){ |
||||
Integer staffId = 118; |
||||
HashMap<String, Object> staffDetails = staffService.queryStaffDetails(staffId); |
||||
for (String s : staffDetails.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + staffDetails.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 更新员工 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void updateStaffTest(){ |
||||
UserVO userVO = new UserVO(); |
||||
Staff staff = new Staff(); |
||||
UserM user = new UserM(); |
||||
staff.setEmail("123@qq.com"); |
||||
staff.setPhone("13137366427"); |
||||
staff.setRoleId(4); |
||||
staff.setSchoolId(2043); |
||||
staff.setStaffGradeId(2050); |
||||
staff.setStaffId(118); |
||||
staff.setStaffName("世杰-教师"); |
||||
staff.setStaffProfessionalArchitectureId(2057); |
||||
staff.setStaffWorkNumber("123"); |
||||
staff.setUniqueIdentificationAccount("20431231596424406000"); |
||||
userVO.setStaff(staff); |
||||
user.setAccountRole(3); |
||||
user.setCityId(1); |
||||
user.setDisciplineId(1); |
||||
user.setEmail("123@qq.com"); |
||||
user.setName("世杰-教师"); |
||||
user.setPhone("13137366427"); |
||||
user.setProfessionalClassId(1); |
||||
user.setProvinceId(4); |
||||
user.setProfessionalId(4); |
||||
user.setSchoolId(2043); |
||||
user.setUniqueIdentificationAccount("20431231596424406000"); |
||||
user.setUserAccount("123"); |
||||
user.setUserId(461); |
||||
user.setWorkNumber("123"); |
||||
userVO.setUser(user); |
||||
HashMap<String, Object> updateStaff = staffService.updateStaff(userVO); |
||||
for (String s : updateStaff.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + updateStaff.get(s)); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,258 @@ |
||||
package com.yipin.liuwanr.service; |
||||
|
||||
import com.yipin.liuwanr.entity.StuProfessionalArchitecture; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.boot.test.context.SpringBootTest; |
||||
import org.springframework.test.context.junit4.SpringRunner; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.util.HashMap; |
||||
|
||||
/** |
||||
* @auther River |
||||
* @date 2020/8/25 9:46 |
||||
*/ |
||||
@SpringBootTest |
||||
@RunWith(SpringRunner.class) |
||||
public class StuProfessionalArchitectureServiceTest { |
||||
|
||||
@Autowired |
||||
private StuProfessionalArchitectureService stuProfessionalArchitectureService; |
||||
|
||||
/** |
||||
* 添加学生专业组织 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void addStuProfessionalArchitectureTest(){ |
||||
StuProfessionalArchitecture stuPA = new StuProfessionalArchitecture(); |
||||
stuPA.setSchoolId(2043); |
||||
stuPA.setStuProfessionalArchitectureName("计算机学院"); |
||||
HashMap<String, Object> stuProfessionalArchitecture = stuProfessionalArchitectureService.addStuProfessionalArchitecture(stuPA); |
||||
for (String s : stuProfessionalArchitecture.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + stuProfessionalArchitecture.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询学生专业架构 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStuProfessionalArchitectureTest(){ |
||||
Integer schoolId = 1; |
||||
HashMap<String, Object> professionalArchitecture = stuProfessionalArchitectureService.queryStuProfessionalArchitecture(schoolId); |
||||
for (String s : professionalArchitecture.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + professionalArchitecture.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询学生专业架构详情 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStuPADTest(){ |
||||
Integer stuProfessionalArchitectureId = 34; |
||||
HashMap<String, Object> stuPAD = stuProfessionalArchitectureService.queryStuPAD(stuProfessionalArchitectureId); |
||||
for (String s : stuPAD.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + stuPAD.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 删除学生专业 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void deleteStuProfessionalArchitectureTest(){ |
||||
Integer stuProfessionalArchitectureId = 34; |
||||
HashMap<String, Object> professionalArchitecture = stuProfessionalArchitectureService.deleteStuProfessionalArchitecture(stuProfessionalArchitectureId); |
||||
for (String s : professionalArchitecture.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + professionalArchitecture.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 删除学生转年级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void deleteStuGradeTest(){ |
||||
Integer gradeId = 1; |
||||
HashMap<String, Object> stuGrade = stuProfessionalArchitectureService.deleteStuGrade(gradeId); |
||||
for (String s : stuGrade.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + stuGrade.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 删除学生转班级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void deleteStuClassTest(){ |
||||
Integer classId = 1; |
||||
HashMap<String, Object> stuClass = stuProfessionalArchitectureService.deleteStuClass(classId); |
||||
for (String s : stuClass.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + stuClass.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 更新学生专业架构 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void updateStuProfessionalArchitectureTest(){ |
||||
StuProfessionalArchitecture stuPA = new StuProfessionalArchitecture(); |
||||
stuPA.setSchoolId(2043); |
||||
stuPA.setStuProfessionalArchitectureId(34); |
||||
stuPA.setStuProfessionalArchitectureName("英语"); |
||||
HashMap<String, Object> professionalArchitecture = stuProfessionalArchitectureService.updateStuProfessionalArchitecture(stuPA); |
||||
for (String s : professionalArchitecture.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + professionalArchitecture.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询全部学生专业架构 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStudentProfessionalArchitectureTest(){ |
||||
Integer schoolId = 1; |
||||
HashMap<String, Object> professionalArchitecture = stuProfessionalArchitectureService.queryStuProfessionalArchitecture(schoolId); |
||||
for (String s : professionalArchitecture.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + professionalArchitecture.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询学生年级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStuGradeTest(){ |
||||
Integer stuProfessionalArchitectureId = 34; |
||||
HashMap<String, Object> queryStuGrade = stuProfessionalArchitectureService.queryStuGrade(stuProfessionalArchitectureId); |
||||
for (String s : queryStuGrade.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + queryStuGrade.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询学生年级详情 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStuGradeDTest(){ |
||||
Integer gradeId = 1; |
||||
HashMap<String, Object> stuGradeD = stuProfessionalArchitectureService.queryStuGradeD(gradeId); |
||||
for (String s : stuGradeD.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + stuGradeD.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询学生班级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStuClassTest(){ |
||||
Integer gradeId = 1; |
||||
HashMap<String, Object> stuClass = stuProfessionalArchitectureService.queryStuClass(gradeId); |
||||
for (String s : stuClass.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + stuClass.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询学生班级详情 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStuClassDTest(){ |
||||
Integer classId = 1; |
||||
HashMap<String, Object> stuClassD = stuProfessionalArchitectureService.queryStuClassD(classId); |
||||
for (String s : stuClassD.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + stuClassD.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 添加班级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void addStuClassTest(){ |
||||
StuProfessionalArchitecture stuPA = new StuProfessionalArchitecture(); |
||||
stuPA.setClassName("12"); |
||||
stuPA.setGradeId(20); |
||||
HashMap<String, Object> addStuClass = stuProfessionalArchitectureService.addStuClass(stuPA); |
||||
for (String s : addStuClass.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + addStuClass.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 修改班级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void updateStuClassTest(){ |
||||
StuProfessionalArchitecture stuPA = new StuProfessionalArchitecture(); |
||||
stuPA.setClassName("13"); |
||||
stuPA.setClassId(76); |
||||
HashMap<String, Object> stuClass = stuProfessionalArchitectureService.updateStuClass(stuPA); |
||||
for (String s : stuClass.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + stuClass.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 添加年级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void addStuGradeTest(){ |
||||
StuProfessionalArchitecture stuPA = new StuProfessionalArchitecture(); |
||||
stuPA.setGradeName("2020"); |
||||
stuPA.setStuProfessionalArchitectureId(37); |
||||
HashMap<String, Object> stuGrade = stuProfessionalArchitectureService.addStuGrade(stuPA); |
||||
for (String s : stuGrade.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + stuGrade.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 修改年级 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void updateStuGradeTest(){ |
||||
StuProfessionalArchitecture stuPA = new StuProfessionalArchitecture(); |
||||
stuPA.setGradeId(50); |
||||
stuPA.setGradeName("2018"); |
||||
stuPA.setStuProfessionalArchitectureId(37); |
||||
HashMap<String, Object> stuGrade = stuProfessionalArchitectureService.updateStuGrade(stuPA); |
||||
for (String s : stuGrade.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + stuGrade.get(s)); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询学生 |
||||
*/ |
||||
@Test |
||||
@Transactional |
||||
public void queryStudentTest(){ |
||||
Integer classId = 1; |
||||
HashMap<String, Object> student = stuProfessionalArchitectureService.queryStudent(classId); |
||||
for (String s : student.keySet()) { |
||||
System.out.println("key:" + s + "," + "value:" + student.get(s)); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue