|
|
@@ -2,7 +2,6 @@ package com.goafanti.user.service.impl;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Calendar;
|
|
|
-import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
@@ -35,7 +34,6 @@ import com.goafanti.common.enums.IdentityAuditStatus;
|
|
|
import com.goafanti.common.enums.NoticeReadStatus;
|
|
|
import com.goafanti.common.enums.NoticeStatus;
|
|
|
import com.goafanti.common.enums.UserLevel;
|
|
|
-import com.goafanti.common.model.Achievement;
|
|
|
import com.goafanti.common.model.Notice;
|
|
|
import com.goafanti.common.model.User;
|
|
|
import com.goafanti.common.model.UserIdentity;
|
|
|
@@ -512,8 +510,6 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
if(null != identity.getIndustry()) params.put("industry", identity.getIndustry());
|
|
|
if(null != identity.getExpert()) params.put("expert", identity.getExpert());
|
|
|
if(StringUtils.isBlank(identity.getUsername())) params.put("username", identity.getIdentifyName());
|
|
|
- System.out.println("查询审核列表");
|
|
|
- System.out.println(params);
|
|
|
return (Pagination<MyInterestedBo>) findPage("getExpertAuditList", "getExpertAuditListCount", params, pageNo, pageSize);
|
|
|
}
|
|
|
|
|
|
@@ -580,7 +576,57 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
}
|
|
|
else auditStatus=AchievementAuditStatus.AUDITED.getCode().intValue();
|
|
|
identity.setAuditStatus(auditStatus);*/
|
|
|
- return userIdentityMapper.updateByPrimaryKeySelective(identity);
|
|
|
+ return userIdentityMapper.updateAuditing(identity);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Integer updateUserIdentityDetail(InputUserIdentity identity) {
|
|
|
+ Integer count = 0;
|
|
|
+ //修改用户信息
|
|
|
+ User user = new User();
|
|
|
+ BeanUtils.copyProperties(identity, user);
|
|
|
+ user.setId(TokenManager.getUserId());
|
|
|
+ count += userMapper.updateByPrimaryKeySelective(user);
|
|
|
+
|
|
|
+ //获得用户的认证信信息
|
|
|
+ UserIdentity u = userIdentityMapper.selectUserIdentityByUserId(user.getId());
|
|
|
+
|
|
|
+ UserIdentity ui = new UserIdentity();
|
|
|
+ BeanUtils.copyProperties(identity, ui);
|
|
|
+ if (null == u) {
|
|
|
+ ui.setId(UUID.randomUUID().toString());
|
|
|
+ ui.setUid(user.getId());
|
|
|
+ count += userIdentityMapper.insert(ui);
|
|
|
+ } else {
|
|
|
+ //暂不认证 或者认证审核中/通过,只修改认证信息中的用户信息 1, 2
|
|
|
+ if(identity.getExpert() == 0 || u.getAuditStatus() == AchievementAuditStatus.SUBMIT.getCode().intValue() || u.getAuditStatus() == AchievementAuditStatus.AUDITED.getCode().intValue()){
|
|
|
+ UserIdentity ui1 = new UserIdentity();
|
|
|
+ ui1.setId(u.getId());// 认证表id
|
|
|
+ //允许修改为空字符但是不能是null(以防引发空指针异常)
|
|
|
+ if(null != ui.getQq()) ui1.setQq(ui.getQq());
|
|
|
+ if(null != ui.getSex()) ui1.setSex(ui.getSex());
|
|
|
+ if(null != ui.getIdNumber()) ui1.setIdNumber(ui.getIdNumber());
|
|
|
+ if(null != ui.getPostalAddress()) ui1.setPostalAddress(ui.getPostalAddress());
|
|
|
+ if(null != ui.getFixedTel()) ui1.setFixedTel(ui.getFixedTel());
|
|
|
+ if(null != ui.getEmail()) ui1.setEmail(ui.getEmail());
|
|
|
+ if(null != ui.getDateOfBirthYear()) ui1.setDateOfBirthYear(ui.getDateOfBirthYear());
|
|
|
+ if(null != ui.getDateOfBirthMonth()) ui1.setDateOfBirthMonth(ui.getDateOfBirthMonth());
|
|
|
+ if(null != ui.getProvince()) ui1.setProvince(ui.getProvince());
|
|
|
+ if(null != ui.getCity()) ui1.setCity(ui.getCity());
|
|
|
+ if(null != ui.getArea()) ui1.setArea(ui.getArea());
|
|
|
+ if(null != ui.getIndustry()) ui1.setIndustry(ui.getIndustry());
|
|
|
+ count += userIdentityMapper.updateByPrimaryKeySelective(ui1);
|
|
|
+ }
|
|
|
+ //判断审核状态 当未审核或者审核不通过时 0, 3
|
|
|
+ if (identity.getExpert() > 0 && (identity.getAuditStatus() == AchievementAuditStatus.CREATE.getCode().intValue() || identity.getAuditStatus() == AchievementAuditStatus.UNAUDITED.getCode().intValue())) {
|
|
|
+ ui.setId(u.getId());
|
|
|
+ ui.setAuditStatus(AchievementAuditStatus.SUBMIT.getCode().intValue());
|
|
|
+ count += userIdentityMapper.updateByPrimaryKeySelective(ui);
|
|
|
+ }else{// 正在审核中或者审核通过
|
|
|
+ count = -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return count;
|
|
|
}
|
|
|
|
|
|
|