|
@@ -44,13 +44,18 @@ public class InstitutionalInformationServiceImpl extends ServiceImpl<Institution
|
|
|
private String path;
|
|
|
@Override
|
|
|
public HttpRespMsg add(InstitutionalInformationVO institutionalInformationVO) {
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
SystemUser institution = new SystemUser();
|
|
|
+ Integer count = systemUserMapper.selectCount(new QueryWrapper<SystemUser>().eq("account", institutionalInformationVO.getAccount()));
|
|
|
+ if(count > 0){
|
|
|
+ msg.setError("账号已存在!");
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
institution.setAccount(institutionalInformationVO.getAccount());
|
|
|
institution.setRoleName(institutionalInformationVO.getName());
|
|
|
institution.setPassword(MD5Util.getPassword("000000"));
|
|
|
institution.setRoleType(1);
|
|
|
systemUserMapper.insert(institution);
|
|
|
- HttpRespMsg msg = new HttpRespMsg();
|
|
|
InstitutionalInformation information = new InstitutionalInformation();
|
|
|
BeanUtils.copyProperties(institutionalInformationVO,information);
|
|
|
information.setSysId(institution.getId());
|