|
@@ -108,14 +108,13 @@ public class ClubServiceImpl implements ClubService {
|
|
|
*/
|
|
|
@Override
|
|
|
public ResponseJson<ClubUpdateDto> updateClubUserInfo(ClubUpdateDto club) {
|
|
|
- //设置日期时间格式
|
|
|
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ // 参数校验
|
|
|
if (club.getClubId() == null) {
|
|
|
return ResponseJson.error("参数异常", null);
|
|
|
}
|
|
|
UserPo user = new UserPo();
|
|
|
Integer userIdByEmail = baseMapper.getUserIdByEmail(club.getContractEmail());
|
|
|
- if (null != userIdByEmail && userIdByEmail > 0 ) {
|
|
|
+ if (null != userIdByEmail && !userIdByEmail.equals(club.getUserId()) ) {
|
|
|
return ResponseJson.error("该邮箱已被使用", null);
|
|
|
}
|
|
|
// 邮箱
|
|
@@ -128,8 +127,6 @@ public class ClubServiceImpl implements ClubService {
|
|
|
user.setName(club.getName());
|
|
|
// 更新机构用户信息
|
|
|
clubMapper.updateClubUserByUpdateInfo(user);
|
|
|
- // 最后修改时间
|
|
|
- club.setLastModifyTime(dateFormat.format(new Date()));
|
|
|
// 更新机构信息
|
|
|
clubMapper.updateClubByUpdateInfo(club);
|
|
|
return ResponseJson.success("修改机构资料成功", club);
|