|
@@ -13,6 +13,7 @@ import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.YesOrNoEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo;
|
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
|
+import com.yonge.toolset.utils.string.StringUtil;
|
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -21,10 +22,8 @@ import com.yonge.cooleshow.biz.dal.dao.TeacherAuthEntryRecordDao;
|
|
|
import com.yonge.cooleshow.biz.dal.service.TeacherAuthEntryRecordService;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import java.lang.reflect.InvocationTargetException;
|
|
|
import java.util.Date;
|
|
|
|
|
|
-
|
|
|
@Service
|
|
|
public class TeacherAuthEntryRecordServiceImpl extends ServiceImpl<TeacherAuthEntryRecordDao, TeacherAuthEntryRecord> implements TeacherAuthEntryRecordService {
|
|
|
|
|
@@ -50,12 +49,21 @@ public class TeacherAuthEntryRecordServiceImpl extends ServiceImpl<TeacherAuthEn
|
|
|
build.setVerifyUserId(sysUser.getId());
|
|
|
|
|
|
//修改teacher表
|
|
|
- Teacher teacher = new Teacher();
|
|
|
- BeanUtils.copyProperties(teacher,build);
|
|
|
-
|
|
|
+ Teacher teacher = teacherDao.selectById(build.getUserId());
|
|
|
+ if (null == teacher) {
|
|
|
+ return HttpResponseResult.failed("未找到用户信息");
|
|
|
+ }
|
|
|
+ if (AuthStatusEnum.PASS.equals(authOperaReq.getPass())) {
|
|
|
+ teacher.setSubjectId(StringUtil.isEmpty(teacher.getSubjectId()) ? build.getSubjectId() : teacher.getSubjectId());
|
|
|
+ teacher.setIntroduction(StringUtil.isEmpty(teacher.getIntroduction()) ? build.getIntroduction() : teacher.getIntroduction());
|
|
|
+ teacher.setGraduateSchool(StringUtil.isEmpty(teacher.getGraduateSchool()) ? build.getGraduateSchool() : teacher.getGraduateSchool());
|
|
|
+ teacher.setSubject(StringUtil.isEmpty(teacher.getSubject()) ? build.getSubject() : teacher.getSubject());
|
|
|
+ teacher.setGradCertificate(StringUtil.isEmpty(teacher.getGradCertificate()) ? build.getGradCertificate() : teacher.getGradCertificate());
|
|
|
+ teacher.setDegreeCertificate(StringUtil.isEmpty(teacher.getDegreeCertificate()) ? build.getDegreeCertificate() : teacher.getDegreeCertificate());
|
|
|
+ teacher.setTeacherCertificate(StringUtil.isEmpty(teacher.getTeacherCertificate())? build.getTeacherCertificate():teacher.getTeacherCertificate());
|
|
|
+ }
|
|
|
teacher.setEntryFlag(authOperaReq.getPass() ? YesOrNoEnum.YES : YesOrNoEnum.NO);
|
|
|
teacher.setEntryAuthDate(new Date());
|
|
|
-
|
|
|
teacherDao.updateById(teacher);
|
|
|
return HttpResponseResult.succeed(baseMapper.updateById(build) > 0);
|
|
|
}
|