|
@@ -17,7 +17,6 @@ class TeacherService extends CrudService {
|
|
|
}
|
|
|
|
|
|
async query(info, { skip, limit }) {
|
|
|
- console.log(skip, limit);
|
|
|
let res = await this.model
|
|
|
.find(info)
|
|
|
.skip(Number(skip))
|
|
@@ -81,10 +80,8 @@ class TeacherService extends CrudService {
|
|
|
detail = '您已通过审核被正式录入教师库';
|
|
|
}
|
|
|
const date = await this.ctx.service.util.updatedate();
|
|
|
- console.log(teacher.id);
|
|
|
|
|
|
const user = await this.umodel.findOne({ uid: teacher.id, type: '3' });
|
|
|
- console.log(user);
|
|
|
|
|
|
if (user && user.openid) {
|
|
|
await this.ctx.service.weixin.sendTemplateMsg(
|
|
@@ -112,7 +109,6 @@ class TeacherService extends CrudService {
|
|
|
assert(filepath, 'filepath不能为空');
|
|
|
// 取得excle中数据
|
|
|
const _filepath = this.ctx.app.config.baseUrl + filepath;
|
|
|
- console.log(_filepath);
|
|
|
const teadatas = await this.getImportXLSXData(_filepath);
|
|
|
// 将得到的数据校验
|
|
|
const datacheck = await this.datacheck(teadatas);
|
|
@@ -135,7 +131,6 @@ class TeacherService extends CrudService {
|
|
|
|
|
|
// 获取导入的XLSX文件中的数据
|
|
|
async getImportXLSXData(filepath) {
|
|
|
- console.log(filepath);
|
|
|
const file = await this.ctx.curl(filepath);
|
|
|
const workbook = XLSX.read(file.data);
|
|
|
// 读取内容
|