mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 19:06:49 +08:00
Merge branch 'third' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/baseservers into third
This commit is contained in:
@@ -151,7 +151,7 @@ public class CasesApi extends ApiBaseController {
|
||||
}
|
||||
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-disposition", "attachment;filename=Teachers.xls");
|
||||
response.setHeader("Content-disposition", "attachment;filename=cases.xls");
|
||||
ExportsExcelSenderUtil.export(map,exportVos, OutputStream,"yyyy-MM-dd HH:mm:ss");
|
||||
}catch (Exception e){
|
||||
log.error("导出失败",e.getMessage());
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.util.Map;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.xboe.module.teacher.dto.TeacherFiledVo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -280,7 +281,7 @@ public class TeacherApi extends ApiBaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/update-teacher")
|
||||
public JsonResponse<Teacher> updateTeacher(@RequestBody Teacher teacher) {
|
||||
public JsonResponse<TeacherFiledVo> updateTeacher(@RequestBody TeacherFiledVo teacher) {
|
||||
if (teacher == null) {
|
||||
return error("缺少必要参数");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.xboe.module.teacher.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TeacherFiledVo {
|
||||
|
||||
private String id;
|
||||
|
||||
private String photo;
|
||||
|
||||
private String workExperience;
|
||||
|
||||
private String courses;
|
||||
|
||||
private String expertise;
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.xboe.common.PageList;
|
||||
import com.xboe.core.exception.XaskException;
|
||||
import com.xboe.module.teacher.dto.TeacherFiledVo;
|
||||
import com.xboe.module.teacher.dto.TeacherSyncUpdateDto;
|
||||
import com.xboe.module.teacher.entity.Teacher;
|
||||
import com.xboe.module.teacher.vo.TeacherQuery;
|
||||
@@ -67,7 +68,7 @@ public interface ITeacherService {
|
||||
* @param entity
|
||||
* @throws XaskException
|
||||
*/
|
||||
void updateTeacher(Teacher entity);
|
||||
void updateTeacher(TeacherFiledVo entity);
|
||||
|
||||
/*
|
||||
* 更新同步信息
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.xboe.module.teacher.dto.TeacherFiledVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -205,8 +206,14 @@ public class TeacherServiceImpl implements ITeacherService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTeacher(Teacher entity) {
|
||||
dao.update(entity);
|
||||
@Transactional
|
||||
public void updateTeacher(TeacherFiledVo entity) {
|
||||
Teacher teacher = dao.get(entity.getId());
|
||||
teacher.setPhoto(entity.getPhoto());
|
||||
teacher.setWorkExperience(entity.getWorkExperience());
|
||||
teacher.setCourses(entity.getCourses());
|
||||
teacher.setExpertise(entity.getExpertise());
|
||||
dao.update(teacher);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user