Commit cf02d413 authored by hanshuai's avatar hanshuai

Merge branch 'V2.0.3' of ssh://103.249.252.28:10022/lcy/education

hanshuai
parent 32527a74
...@@ -40,6 +40,9 @@ public class BTeacherController extends PaginationController<BTeacher> { ...@@ -40,6 +40,9 @@ public class BTeacherController extends PaginationController<BTeacher> {
@ApiOperation(value="添加/编辑教师信息", notes="businessId为空时是添加方法,不为空时是修改方法") @ApiOperation(value="添加/编辑教师信息", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "教师工号(1-11)", required = true, dataType = "varchar"), @ApiImplicitParam(name = "code", value = "教师工号(1-11)", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "email", value = "邮箱", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "name", value = "教室姓名", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "sex", value = "性别", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"), @ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"), @ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"), @ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"),
......
...@@ -82,7 +82,7 @@ public class BTeacherServiceImpl implements BTeacherService { ...@@ -82,7 +82,7 @@ public class BTeacherServiceImpl implements BTeacherService {
ArrayList<UserRole> userRoles = new ArrayList<UserRole>(); ArrayList<UserRole> userRoles = new ArrayList<UserRole>();
String[] headers = {"教师工号", "教师姓名", "性别","教学单位编号"}; String[] headers = {"教师工号", "教师姓名", "性别","邮箱","教学单位编号"};
ArrayList<String[]> values = ExcelUtil.importExcel(hwb, headers,true,1); //获取excel数据 ArrayList<String[]> values = ExcelUtil.importExcel(hwb, headers,true,1); //获取excel数据
if (values.size() == 0){ if (values.size() == 0){
throw new ServiceException(ResultServiceEnums.EXCEL_IMPORT_DATA_NOT_EXIST); throw new ServiceException(ResultServiceEnums.EXCEL_IMPORT_DATA_NOT_EXIST);
...@@ -123,7 +123,7 @@ public class BTeacherServiceImpl implements BTeacherService { ...@@ -123,7 +123,7 @@ public class BTeacherServiceImpl implements BTeacherService {
boolean emailCheck = RegexValidateUtil.checkEmail(value[3]); boolean emailCheck = RegexValidateUtil.checkEmail(value[3]);
boolean emailRepeat = sysUserMapper.selectOne(user2)!=null; boolean emailRepeat = sysUserMapper.selectOne(user2)!=null;
if(nullEmail||!emailCheck||emailRepeat){ if(nullEmail||!emailCheck||emailRepeat){
valuesEmailExist.add(value[1]); valuesEmailExist.add(value[3]);
continue; continue;
} }
......
...@@ -26,9 +26,9 @@ public interface SysUserMapper extends BaseMapper<SysUser> { ...@@ -26,9 +26,9 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
List<SysUser> queryUserByName(String username); List<SysUser> queryUserByName(String username);
@Insert("<script>INSERT INTO s_user" + @Insert("<script>INSERT INTO s_user" +
"(create_date,update_date,create_by,update_by,remarks,del_flag,flag,business_id,login_name,password,name,sex,git_lab_id,git_lab_username,git_lab_impression_token,head_pic,email,agency_code)VALUES" + "(create_date,update_date,create_by,update_by,remarks,del_flag,flag,business_id,login_name,password,name,sex,git_lab_id,git_lab_username,git_lab_impression_token,head_pic,email)VALUES" +
"<foreach collection=\"list\" item=\"item\" separator=\",\">" + "<foreach collection=\"list\" item=\"item\" separator=\",\">" +
"( #{item.createDate},#{item.updateDate},#{item.createBy},#{item.updateBy},#{item.remarks},#{item.delFlag},#{item.flag},#{item.businessId},#{item.loginName},#{item.password},#{item.name},#{item.sex},#{item.gitLabId},#{item.gitLabUsername},#{item.gitLabImpressionToken},#{item.headPic},#{item.email},#{item.agencyCode})" + "( #{item.createDate},#{item.updateDate},#{item.createBy},#{item.updateBy},#{item.remarks},#{item.delFlag},#{item.flag},#{item.businessId},#{item.loginName},#{item.password},#{item.name},#{item.sex},#{item.gitLabId},#{item.gitLabUsername},#{item.gitLabImpressionToken},#{item.headPic},#{item.email})" +
"</foreach></script>") "</foreach></script>")
int insertList(List<SysUser> users); int insertList(List<SysUser> users);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment