|
@@ -8,6 +8,7 @@ import com.microsvc.toolkit.common.response.paging.QueryInfo;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.auth.api.enums.SysUserType;
|
|
|
import com.ym.mec.auth.api.enums.YesOrNoEnum;
|
|
|
+import com.ym.mec.biz.dal.dao.CooperationOrganDao;
|
|
|
import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
|
import com.ym.mec.biz.dal.entity.CooperationOrgan;
|
|
|
import com.ym.mec.biz.dal.entity.SchoolStaff;
|
|
@@ -18,6 +19,7 @@ import com.ym.mec.biz.dal.wrapper.SchoolStaffWrapper;
|
|
|
import com.ym.mec.biz.dal.wrapper.StatGroupWrapper;
|
|
|
import com.ym.mec.biz.service.CooperationOrganService;
|
|
|
import com.ym.mec.biz.service.SchoolStaffService;
|
|
|
+import com.ym.mec.biz.service.SmsCodeService;
|
|
|
import com.ym.mec.biz.service.SysConfigService;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -27,6 +29,7 @@ import org.joda.time.DateTime;
|
|
|
import org.redisson.api.RBucket;
|
|
|
import org.redisson.api.RedissonClient;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -57,6 +60,14 @@ public class SchoolStaffServiceImpl extends ServiceImpl<SchoolStaffMapper, Schoo
|
|
|
private TeacherDao teacherDao;
|
|
|
@Autowired
|
|
|
private SysConfigService sysConfigService;
|
|
|
+ @Autowired
|
|
|
+ private CooperationOrganDao cooperationOrganDao;
|
|
|
+ @Autowired
|
|
|
+ private SmsCodeService smsCodeService;
|
|
|
+
|
|
|
+
|
|
|
+ @Value("${message.debugMode:false}")
|
|
|
+ private boolean debugMode;
|
|
|
|
|
|
/**
|
|
|
* 查询详情
|
|
@@ -98,7 +109,11 @@ public class SchoolStaffServiceImpl extends ServiceImpl<SchoolStaffMapper, Schoo
|
|
|
}
|
|
|
|
|
|
// 验证码合法性校验
|
|
|
+ if(smsCodeService.verifyValidCode(schoolStaff.getMobile(), schoolStaff.getSmsCode())
|
|
|
+ && !debugMode) {
|
|
|
|
|
|
+ throw new BizException("验证码错误");
|
|
|
+ }
|
|
|
|
|
|
// 合作单位编号
|
|
|
CooperationOrgan cooperation = cooperationOrganService.get(schoolStaff.getSchoolId().intValue());
|
|
@@ -354,4 +369,16 @@ public class SchoolStaffServiceImpl extends ServiceImpl<SchoolStaffMapper, Schoo
|
|
|
.build();
|
|
|
}
|
|
|
|
|
|
+ /***
|
|
|
+ * 更新合作单位信息
|
|
|
+ * @param info SchoolStaffWrapper.Cooperation
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void updateCooperation(SchoolStaffWrapper.Cooperation info) {
|
|
|
+
|
|
|
+ // 合作单位信息
|
|
|
+ cooperationOrganDao.update(JSON.parseObject(info.jsonString(), CooperationOrgan.class));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|