ソースを参照

知识产权项目内容富文本修改,
修改个人中心资料和认证部分

limin 7 年 前
コミット
12d84bc1eb

+ 3 - 1
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -46,6 +46,7 @@
     <result column="graduate_school" jdbcType="VARCHAR" property="graduateSchool" />
     <result column="consultant" jdbcType="INTEGER" property="consultant" />
     <result column="consultation_price" jdbcType="DECIMAL" property="consultationPrice" />
+    <result column="expert_audit" jdbcType="INTEGER" property="expertAudit" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
@@ -126,7 +127,7 @@
     amount_money, audit_status, process, wrong_count, payment_date, expert, 
     international, fixed_tel, qq, postal_address, postcode, review_instructions, industry, 
     contacts, email, professional_title, work_unit, education, major_category, qualification,
-    graduate_school, consultation_price 
+    graduate_school, consultation_price , expert_audit
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultMap="BaseResultMap">
     <!--
@@ -852,6 +853,7 @@
 		b.qualification,
 		b.professional_title as professionalTitle,
 		b.expert_audit as expertAudit,
+		b.expert as expert,
 		b.work_unit as workUnit
 	from
 		user a left join user_identity b on

+ 71 - 2
src/main/java/com/goafanti/user/bo/InputUserIdentity.java

@@ -74,7 +74,7 @@ public class InputUserIdentity {
 
 	private Date		paymentDate;
 
-	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Max(value = 2, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer		expert;
 
@@ -114,8 +114,45 @@ public class InputUserIdentity {
 	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer authentication;
 	
-	String workUnit;
+	@Size(min = 0, max = 64, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String workUnit;
+	
+	@Size(min = 0, max = 32, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String qualification;
+	
+	@Size(min = 0, max = 32, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String professionalTitle;
+	
+	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String majorCategory;
+	
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Max(value = 3, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer expertAudit;
+	
+	@Size(min = 0, max = 32, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String graduateSchool;
 	
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Max(value = 3, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer consultantType;
+	
+	public Integer getConsultantType() {
+		return consultantType;
+	}
+
+	public void setConsultantType(Integer consultantType) {
+		this.consultantType = consultantType;
+	}
+
+	public String getGraduateSchool() {
+		return graduateSchool;
+	}
+
+	public void setGraduateSchool(String graduateSchool) {
+		this.graduateSchool = graduateSchool;
+	}
+
 	public String getWorkUnit() {
 		return workUnit;
 	}
@@ -124,6 +161,38 @@ public class InputUserIdentity {
 		this.workUnit = workUnit;
 	}
 
+	public String getQualification() {
+		return qualification;
+	}
+
+	public void setQualification(String qualification) {
+		this.qualification = qualification;
+	}
+
+	public String getProfessionalTitle() {
+		return professionalTitle;
+	}
+
+	public void setProfessionalTitle(String professionalTitle) {
+		this.professionalTitle = professionalTitle;
+	}
+
+	public String getMajorCategory() {
+		return majorCategory;
+	}
+
+	public void setMajorCategory(String majorCategory) {
+		this.majorCategory = majorCategory;
+	}
+
+	public Integer getExpertAudit() {
+		return expertAudit;
+	}
+
+	public void setExpertAudit(Integer expertAudit) {
+		this.expertAudit = expertAudit;
+	}
+
 	public Integer getExpert() {
 		return expert;
 	}

+ 11 - 1
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.alibaba.druid.sql.parser.Token;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
@@ -425,17 +424,28 @@ 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());
 				ui.setUid(TokenManager.getUserId());
 				userIdentityService.insert(ui);
 			} else {
+				//判断审核状态
+				if (userIdentity.getExpertAudit() == 0 || userIdentity.getExpertAudit() == 3) {
+					ui.setExpertAudit(1);
+				} else {
+					res.getError().add(buildError("", "已经提交审核或者审核已经通过"));
+					return res;
+				}
 				ui.setId(u.getId());
 				userIdentityService.updateByPrimaryKeySelective(ui);
 			}
 			user.setId(TokenManager.getUserId());
 			userService.updateByPrimaryKeySelective(user);
+			userIdentity.setGraduateSchool(ui.getGraduateSchool());
+			//userIdentity.setExpert(u.getExpert());
+			userIdentity.setExpertAudit(ui.getExpertAudit());
 		}
 		res.setData(userIdentity);
 		return res;

File diff suppressed because it is too large
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceDetails.html