|
|
@@ -28,6 +28,7 @@ import com.goafanti.common.dao.UserIdentityMapper;
|
|
|
import com.goafanti.common.dao.UserInterestMapper;
|
|
|
import com.goafanti.common.dao.UserMapper;
|
|
|
import com.goafanti.common.dao.UserRoleMapper;
|
|
|
+import com.goafanti.common.enums.AchievementAuditStatus;
|
|
|
import com.goafanti.common.enums.CertifySubmitType;
|
|
|
import com.goafanti.common.enums.IdentityAuditStatus;
|
|
|
import com.goafanti.common.enums.NoticeReadStatus;
|
|
|
@@ -505,21 +506,20 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
if(pageNo==null || pageNo<1)pageNo=1;
|
|
|
if(pageSize==null ||pageSize<1)pageSize=10;
|
|
|
Map<String, Object> params=new HashMap<String,Object>();
|
|
|
- //将查询参数弄到map中?
|
|
|
- if(null != identity.getExpertAudit()) params.put("auditStatus", identity.getAuditStatus());
|
|
|
+ //将查询参数弄到map中
|
|
|
+ if(null != identity.getAuditStatus()) params.put("auditStatus", identity.getAuditStatus());
|
|
|
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.getUsername());
|
|
|
- System.out.println("查询审核列表");
|
|
|
+ if(StringUtils.isBlank(identity.getUsername())) params.put("username", identity.getIdentifyName());
|
|
|
return (Pagination<MyInterestedBo>) findPage("getExpertAuditList", "getExpertAuditListCount", params, pageNo, pageSize);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public UserIdentity getUserIdentityByUid(String uid) {
|
|
|
- //获得用户的认证信�?
|
|
|
- UserIdentity u = userIdentityMapper.selectUserIdentityByUserId(uid);
|
|
|
+ //获得用户的认证信息
|
|
|
+ UserIdentity u = userIdentityMapper.getUserIdentityByUid(uid);
|
|
|
return u;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
@@ -570,6 +570,67 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
if(StringUtils.isNotBlank(TokenManager.getUserId()))params.put("uid", TokenManager.getUserId());
|
|
|
return (Pagination<ExpertsListBo>) findPage("appConsultantList", "appConsultantCount", params, pageNo, pageSize);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Integer updateAuditing(UserIdentity identity) {
|
|
|
+ /*int auditStatus = AchievementAuditStatus.AUDITED.getCode().intValue();
|
|
|
+ if(identity.getAuditStatus().intValue() == 0) {
|
|
|
+ auditStatus=AchievementAuditStatus.UNAUDITED.getCode().intValue();
|
|
|
+ }
|
|
|
+ else auditStatus=AchievementAuditStatus.AUDITED.getCode().intValue();
|
|
|
+ identity.setAuditStatus(auditStatus);*/
|
|
|
+ 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;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|