|
|
|
@ -214,6 +214,13 @@ public class EmailMaintainController extends AbstractController { |
|
|
|
|
errorMsgList.add("第" + resultIndex + "行,用户邮箱地址重复,请核实!"); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int i = emailMaintainService.selectByEmail(maintainExcel.getEmailAddress()); |
|
|
|
|
if(i>0){ |
|
|
|
|
errorMsgList.add("第" + resultIndex + "行,邮箱数据已存在,请核实!"); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
mailTitleList.add(maintainExcel.getEmailAddress()); |
|
|
|
|
|
|
|
|
|
EmailMaintainVo maintainVo = new EmailMaintainVo(); |
|
|
|
@ -227,7 +234,8 @@ public class EmailMaintainController extends AbstractController { |
|
|
|
|
String encode = Base64Encoding.encode(password); |
|
|
|
|
maintainVo.setEmailPassword(encode); |
|
|
|
|
maintainVo.setDelStatus("0"); |
|
|
|
|
maintainVo.setCreateUser(getUserInfo().getLoginname()); |
|
|
|
|
maintainVo.setCreateUser("yf"); |
|
|
|
|
// maintainVo.setCreateUser(getUserInfo().getLoginname());
|
|
|
|
|
maintainVo.setCreateTime(new Date()); |
|
|
|
|
maintainVo.setModifyTime(new Date()); |
|
|
|
|
mailList.add(maintainVo); |
|
|
|
@ -261,16 +269,16 @@ public class EmailMaintainController extends AbstractController { |
|
|
|
|
if(StringUtils.isEmpty(userCode)){ |
|
|
|
|
return ResponseEntity.ok(R.error("数据不能为空!")); |
|
|
|
|
} |
|
|
|
|
DynamicContextHolder.push(DbConstant.BASICS_READ); |
|
|
|
|
String userName = emailMaintainService.getUserName(userCode); |
|
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
|
if(StringUtils.isNotEmpty(userName)){ |
|
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
|
json.put("datalist", userName); |
|
|
|
|
log.debug("返回结果:{}", json.toJSONString()); |
|
|
|
|
String jsonString = Base64.encode(json.toJSONString()); |
|
|
|
|
return ResponseEntity.ok(R.ok().put("data",jsonString)); |
|
|
|
|
}else{ |
|
|
|
|
return ResponseEntity.ok(R.ok().put("data","未查询到用户名为"+userName+"数据")); |
|
|
|
|
} |
|
|
|
|
return ResponseEntity.ok(R.error("未查询到相应数据!")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|