|
|
@@ -43,6 +43,7 @@ import com.goafanti.common.utils.TimeUtils;
|
|
|
import com.goafanti.common.utils.VerifyCodeUtils;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.easemob.EasemobUtils;
|
|
|
+import com.goafanti.order.enums.AuditState;
|
|
|
import com.goafanti.user.bo.ExpertUserIdentity;
|
|
|
import com.goafanti.user.bo.InputOrgPro;
|
|
|
import com.goafanti.user.bo.InputOrganizationIdentity;
|
|
|
@@ -114,7 +115,7 @@ public class UserApiController extends BaseApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "密码"));
|
|
|
}
|
|
|
if (password.equals(newPassword)) {
|
|
|
- res.getError().add(buildError(ErrorConstants.PWD_SAME_ERROR, "新密码必须与原密码不��?!"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.PWD_SAME_ERROR, "新密码必须与原密码不匹配!"));
|
|
|
}
|
|
|
|
|
|
if (res.getError().isEmpty() && TokenManager.isLogin()) {
|
|
|
@@ -144,21 +145,21 @@ public class UserApiController extends BaseApiController {
|
|
|
public Result updateMobile(String mobile, String mobileCode) {
|
|
|
Result res = new Result();
|
|
|
if (StringUtils.isBlank(mobile)) {
|
|
|
- res.getError().add(buildError(ErrorConstants.MOBILE_EMPTY_ERROR, "手机号不能为��?!"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.MOBILE_EMPTY_ERROR, "手机号不能为�?!"));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isBlank(mobileCode)) {
|
|
|
- res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "手机验证��?"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "手机验证�?"));
|
|
|
return res;
|
|
|
}
|
|
|
- // 验证��?15分钟有效
|
|
|
+ // 验证�?15分钟有效
|
|
|
if (TimeUtils.checkOverTime("register")) {
|
|
|
- res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失��?"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失�?"));
|
|
|
return res;
|
|
|
}
|
|
|
if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE).equals(mobileCode)) {
|
|
|
- res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错��?"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错�?"));
|
|
|
return res;
|
|
|
}
|
|
|
User user = userService.selectByPrimaryKey(TokenManager.getUserId());
|
|
|
@@ -194,7 +195,7 @@ public class UserApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 公共可替��?
|
|
|
+ * 公共可替�?
|
|
|
*/
|
|
|
@RequestMapping(value = "/avatar/uploadReplace", method = RequestMethod.POST)
|
|
|
public Result avatarReplace(HttpServletRequest req, String sign) {
|
|
|
@@ -345,14 +346,14 @@ public class UserApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isBlank(pro.getCompanyName())) {
|
|
|
- res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到单位名��?", "单位名称"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到单位名�?", "单位名称"));
|
|
|
return res;
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 团体会员��?术能��?
|
|
|
+ * 团体会员�?术能�?
|
|
|
*
|
|
|
* @param orgTech
|
|
|
* @return
|
|
|
@@ -409,7 +410,7 @@ public class UserApiController extends BaseApiController {
|
|
|
return res;
|
|
|
}
|
|
|
if(null == userIdentity.getExpertAudit()){
|
|
|
- res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "审核状�?�未提交"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "审核状�?�未提交"));
|
|
|
return res;
|
|
|
}
|
|
|
if(StringUtils.isBlank(userIdentity.getUid())) {
|
|
|
@@ -429,7 +430,7 @@ public class UserApiController extends BaseApiController {
|
|
|
User user = new User();
|
|
|
BeanUtils.copyProperties(userIdentity, ui);
|
|
|
BeanUtils.copyProperties(userIdentity, user);
|
|
|
- //获得用户的认证信��?
|
|
|
+ //获得用户的认证信�?
|
|
|
UserIdentity u = userIdentityService.selectUserIdentityByUserId(TokenManager.getUserId());
|
|
|
if (null == u) {
|
|
|
ui.setId(UUID.randomUUID().toString());
|
|
|
@@ -437,11 +438,11 @@ public class UserApiController extends BaseApiController {
|
|
|
userIdentityService.insert(ui);
|
|
|
} else {
|
|
|
System.out.println(u.getAuditStatus());
|
|
|
- //判断审核状�??
|
|
|
- if (userIdentity.getExpertAudit() == 0 || userIdentity.getExpertAudit() == 3) {
|
|
|
- ui.setExpertAudit(1);
|
|
|
+ //判断审核状�??
|
|
|
+ if (userIdentity.getAuditStatus() == 0 || userIdentity.getAuditStatus() == 3) {
|
|
|
+ ui.setAuditStatus(1);
|
|
|
} else {
|
|
|
- res.getError().add(buildError("", "已经提交审核或�?�审核已经�?�过"));
|
|
|
+ res.getError().add(buildError("", "已经提交审核或�?�审核已经�?�过"));
|
|
|
return res;
|
|
|
}
|
|
|
ui.setId(u.getId());
|
|
|
@@ -452,7 +453,7 @@ public class UserApiController extends BaseApiController {
|
|
|
userService.updateByPrimaryKeySelective(user);
|
|
|
userIdentity.setGraduateSchool(ui.getGraduateSchool());
|
|
|
userIdentity.setExpert(ui.getExpert());
|
|
|
- userIdentity.setExpertAudit(ui.getExpertAudit());
|
|
|
+ userIdentity.setAuditStatus(ui.getAuditStatus());
|
|
|
}
|
|
|
res.setData(userIdentity);
|
|
|
return res;
|
|
|
@@ -595,7 +596,7 @@ public class UserApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 个人会员职业信息/团体会员��?术能��?
|
|
|
+ * 个人会员职业信息/团体会员�?术能�?
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -633,7 +634,7 @@ public class UserApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/nickname", method = RequestMethod.GET)
|
|
|
public Result nickname() {
|
|
|
User u = userService.selectByPrimaryKey(TokenManager.getUserId());
|
|
|
- Assert.notNull(u, "用户不存��?");
|
|
|
+ Assert.notNull(u, "用户不存�?");
|
|
|
return res().data(u.getNickname());
|
|
|
}
|
|
|
|
|
|
@@ -683,7 +684,7 @@ public class UserApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 登陆后返回用户基本信��?
|
|
|
+ * 登陆后返回用户基本信�?
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -712,7 +713,7 @@ public class UserApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 个人实名认证流程下一��?
|
|
|
+ * 个人实名认证流程下一�?
|
|
|
*/
|
|
|
@RequestMapping(value = "/userNextPro", method = RequestMethod.POST)
|
|
|
public Result userNextProcess(UserIdentity userIdentity, String verificationCode) {
|
|
|
@@ -815,13 +816,13 @@ public class UserApiController extends BaseApiController {
|
|
|
private Result checkCertify(Result res) {
|
|
|
OrganizationIdentity o = organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId());
|
|
|
if (null == o || !IdentityAuditStatus.PASSED.getCode().equals(o.getAuditStatus())) {
|
|
|
- res.getError().add(buildError(ErrorConstants.NON_CERTIFIED, "未�?�过实名认证,无法操作!"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.NON_CERTIFIED, "未�?�过实名认证,无法操作!"));
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 新增客户联系��?
|
|
|
+ * 新增客户联系�?
|
|
|
* @param bo
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -841,7 +842,7 @@ public class UserApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 修改客户联系��?
|
|
|
+ * 修改客户联系�?
|
|
|
* @param bo
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -861,7 +862,7 @@ public class UserApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 删除客户联系��?
|
|
|
+ * 删除客户联系�?
|
|
|
* @param id
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -877,7 +878,7 @@ public class UserApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取用户联系��?
|
|
|
+ * 获取用户联系�?
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getUserContacts", method = RequestMethod.GET)
|