|
|
@@ -1,6 +1,7 @@
|
|
|
package com.goafanti.user.controller;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.util.Base64;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -14,7 +15,6 @@ import org.springframework.util.Assert;
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import com.goafanti.business.service.JtBusinessService;
|
|
|
@@ -44,7 +44,6 @@ 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;
|
|
|
@@ -526,6 +525,7 @@ public class UserApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
if (res.getError().isEmpty()) {
|
|
|
+
|
|
|
OrganizationIdentity oi = new OrganizationIdentity();
|
|
|
User user = new User();
|
|
|
BeanUtils.copyProperties(organizationIdentity, oi);
|
|
|
@@ -552,7 +552,7 @@ public class UserApiController extends BaseApiController {
|
|
|
return res;
|
|
|
}
|
|
|
if(StringUtils.isBlank(organizationIdentity.getQq())) {
|
|
|
- res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "QQ"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "企业QQ"));
|
|
|
return res;
|
|
|
}
|
|
|
if(StringUtils.isBlank(organizationIdentity.getIdentifyName())) {
|
|
|
@@ -575,10 +575,14 @@ public class UserApiController extends BaseApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "荣誉资质"));
|
|
|
return res;
|
|
|
}
|
|
|
- if(null==organizationIdentity.getLicenceProvince()||null==organizationIdentity.getLicenceCity()) {
|
|
|
- res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "地区"));
|
|
|
+ if(StringUtils.isBlank(organizationIdentity.getEmail())) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "企业邮箱"));
|
|
|
return res;
|
|
|
}
|
|
|
+ /*if(null==organizationIdentity.getLicenceProvince()||null==organizationIdentity.getLicenceCity()) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "地区"));
|
|
|
+ return res;
|
|
|
+ }*/
|
|
|
if(organizationIdentity.getAuthentication() == UserAuthentication.AUTHENTICATION.getCode()
|
|
|
&& organizationIdentity.getType() == UserType.PERSONAL.getCode()){
|
|
|
res.getError().add(buildError(null, "", "用户已经个人认证"));
|
|
|
@@ -956,6 +960,20 @@ public class UserApiController extends BaseApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping(value="/uploadPicture64")
|
|
|
+ public Result uploadPicture64(String picturebase, String filename,String sign){
|
|
|
+ Result res = new Result();
|
|
|
+ byte[] bs=Base64.getDecoder().decode(picturebase);
|
|
|
+ AttachmentType attachmentType = AttachmentType.getField(sign);
|
|
|
+ if (attachmentType == AttachmentType.USER_PICTURE) {
|
|
|
+ filename = filename.substring(filename.indexOf("."));
|
|
|
+ res.setData(handleBaseFiles(res, "/user/", false,bs, sign, TokenManager.getUserId(),filename));
|
|
|
+ } else {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
+
|
|
|
}
|