Quellcode durchsuchen

Merge branch 'test' of ssh://anderx@git.jishutao.com:55555/jishutao/jitao-server.git into test

anderx vor 7 Jahren
Ursprung
Commit
d38e986a1a

+ 7 - 0
src/main/java/com/goafanti/app/bo/ExpertsListBo.java

@@ -22,6 +22,7 @@ public class ExpertsListBo {
 	private Integer consultantType;
 	private String consultantTypeName;
 	private String keyword;
+	private String typicalCase;
 	public String getUid() {
 		return uid;
 	}
@@ -136,6 +137,12 @@ public class ExpertsListBo {
 	public void setKeyword(String keyword) {
 		this.keyword = keyword;
 	}
+	public String getTypicalCase() {
+		return typicalCase;
+	}
+	public void setTypicalCase(String typicalCase) {
+		this.typicalCase = typicalCase;
+	}
 	
 
 }

+ 26 - 2
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -513,11 +513,17 @@ public class WebpageController extends BaseController {
 		} else
 			modelview.addObject("newly", false);
 		String owner = "平台管理员";
-		if (jtBusinessProject.getOwnerId() != null) {
+		/*if (jtBusinessProject.getOwnerId() != null) {
 			User user = userService.selectByPrimaryKey(jtBusinessProject.getOwnerId());
 			if (user != null && user.getIdentifyName() != null) {
 				owner = user.getIdentifyName();
 			}
+		}*/
+		if (jtBusinessProject.getOwnerId() != null) {
+			User user = userService.selectByPrimaryKey(jtBusinessProject.getOwnerId());
+			if (user != null && user.getNickname() != null) {
+				owner = user.getNickname();
+			}
 		}
 		modelview.addObject("owner", owner);
 		modelview.addObject("pj", jtBusinessProject);
@@ -569,11 +575,17 @@ public class WebpageController extends BaseController {
 		} else
 			modelview.addObject("newly", false);
 		String owner = "平台管理员";
-		if (jtBusinessProject.getOwnerId() != null) {
+		/*if (jtBusinessProject.getOwnerId() != null) {
 			User user = userService.selectByPrimaryKey(jtBusinessProject.getOwnerId());
 			if (user != null && user.getIdentifyName() != null) {
 				owner = user.getIdentifyName();
 			}
+		}*/
+		if (jtBusinessProject.getOwnerId() != null) {
+			User user = userService.selectByPrimaryKey(jtBusinessProject.getOwnerId());
+			if (user != null && user.getNickname() != null) {
+				owner = user.getNickname();
+			}
 		}
 		modelview.addObject("owner", owner);
 		modelview.addObject("pj", jtBusinessProject);
@@ -1383,6 +1395,8 @@ public class WebpageController extends BaseController {
 	 */
 	@RequestMapping(value = "/portal/service/safeguarding", method = RequestMethod.GET)
 	public ModelAndView portalServiceSafeguarding(HttpServletRequest request, ModelAndView modelview){
+		//获得法律顾问列表数据
+		//userIdentityService.consultantList( name, sortType,  consultantType,  province, city, area,  pageNo,  pageSize)
 		modelview.setViewName("/portal/service/safeguarding");
 		return modelview;
 	}
@@ -1480,5 +1494,15 @@ public class WebpageController extends BaseController {
 		return res;
 	} 
 	
+	/**
+	 * 法律顾问列表
+	 * @param modelview
+	 * @return
+	 */
+	@RequestMapping("/portal/service/safeguardingList")
+	public ModelAndView safeguardingList(ModelAndView modelview){
+		modelview.setViewName("/portal/service/safeguardingList");
+		return modelview;
+	}
 	
 }

+ 3 - 0
src/main/java/com/goafanti/common/enums/UserIdentityFields.java

@@ -23,6 +23,9 @@ public enum UserIdentityFields {
 	PROCESS("process", "实名认证流程"),
 	WRONGCOUNT("wrongCount", "输入错误打款金额次数"),
 	PAYMENTDATE("paymentDate", "打款日期"),
+	BUSINESSSCOPE("businessScope", "业务范围"),
+	INTRODUCTION("introduction", "企业简介"),
+	TYPICALCASE("typicalCase", "典型案例"),
 	OTHER("", "未知参数");
 	
 	private String	code;

+ 58 - 7
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -40,6 +40,7 @@
     <result column="email" jdbcType="VARCHAR" property="email" />
     <result column="professional_title" jdbcType="VARCHAR" property="professionalTitle" />
     <result column="work_unit" jdbcType="VARCHAR" property="workUnit" />
+    <result column="work_unit1" jdbcType="VARCHAR" property="workUnit1" />
     <result column="education" jdbcType="VARCHAR" property="education" />
     <result column="major_category" jdbcType="VARCHAR" property="majorCategory" />
     <result column="qualification" jdbcType="VARCHAR" property="qualification" />
@@ -53,6 +54,8 @@
     <result column="society_tag" jdbcType="VARCHAR" property="societyTag" />
     <result column="introduction" jdbcType="VARCHAR" property="introduction" />
     <result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
+    <result column="typical_case" jdbcType="VARCHAR" property="typicalCase" />
+    <result column="consultant_certificate_url" jdbcType="VARCHAR" property="consultantCertificateUrl" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
@@ -133,7 +136,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 , consultant_type
+    graduate_school, consultation_price , consultant_type, typical_case, consultant_certificate_url
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultMap="BaseResultMap">
     <!--
@@ -204,7 +207,8 @@
       contacts, email, professional_title, 
       work_unit, education, major_category, 
       qualification, graduate_school, 
-      consultation_price,consultant_type)
+      consultation_price,consultant_type,
+      typical_case, consultant_certificate_url)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, 
       #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR}, #{dateOfBirthMonth,jdbcType=VARCHAR}, 
       #{idNumber,jdbcType=VARCHAR}, #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR}, 
@@ -218,7 +222,9 @@
       #{contacts,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{professionalTitle,jdbcType=VARCHAR}, 
       #{workUnit,jdbcType=VARCHAR}, #{education,jdbcType=VARCHAR}, #{majorCategory,jdbcType=VARCHAR}, 
       #{qualification,jdbcType=VARCHAR}, #{graduateSchool,jdbcType=VARCHAR}, 
-      #{consultationPrice,jdbcType=DECIMAL},#{consultantType,jdbcType=VARCHAR})
+      #{consultationPrice,jdbcType=DECIMAL},#{consultantType,jdbcType=VARCHAR},
+      #{typicalCase,jdbcType=VARCHAR}, #{consultantCertificateUrl,jdbcType=VARCHAR}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity">
     <!--
@@ -342,6 +348,12 @@
       <if test="consultationPrice != null">
         consultation_price,
       </if>
+      <if test="typicalCase != null">
+        typical_case
+      </if>
+      <if test="consultantCertificateUrl != null">
+        consultant_certificate_url,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -458,6 +470,12 @@
       <if test="consultationPrice != null">
         #{consultationPrice,jdbcType=DECIMAL},
       </if>
+      <if test="typicalCase != null">
+        #{typicalCase,jdbcType=VARCHAR},
+      </if>
+      <if test="consultantCertificateUrl != null">
+        #{consultantCertificateUrl,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultType="java.lang.Long">
@@ -593,6 +611,12 @@
       <if test="record.consultationPrice != null">
         consultation_price = #{record.consultationPrice,jdbcType=DECIMAL},
       </if>
+      <if test="record.typicalCase != null">
+        typical_case = #{record.typicalCase,jdbcType=VARCHAR},
+      </if>
+      <if test="record.consultantCertificateUrl != null">
+        consultant_certificate_url = #{record.consultantCertificateUrl,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -642,6 +666,8 @@
       major_category = #{record.majorCategory,jdbcType=VARCHAR},
       qualification = #{record.qualification,jdbcType=VARCHAR},
       graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
+      typical_case = #{record.typicalCase,jdbcType=VARCHAR},
+      consultant_certificate_url = #{record.consultantCertificateUrl,jdbcType=VARCHAR},
       consultation_price = #{record.consultationPrice,jdbcType=DECIMAL}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -772,6 +798,12 @@
       <if test="releaseStatus != null">
         release_status = #{releaseStatus,jdbcType=DECIMAL},
       </if>
+      <if test="typicalCase != null">
+        typical_case = #{typicalCase,jdbcType=VARCHAR},
+      </if>
+      <if test="consultantCertificateUrl != null">
+        consultant_certificate_url = #{consultantCertificateUrl,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -818,6 +850,8 @@
       major_category = #{majorCategory,jdbcType=VARCHAR},
       qualification = #{qualification,jdbcType=VARCHAR},
       graduate_school = #{graduateSchool,jdbcType=VARCHAR},
+      typical_case = #{typical_case,jdbcType=VARCHAR},
+      consultant_certificate_url = #{consultant_certificate_url,jdbcType=VARCHAR},
       consultation_price = #{consultationPrice,jdbcType=DECIMAL}
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -861,8 +895,11 @@
 		b.audit_status as auditStatus,
 		b.expert as expert,
 		b.work_unit as workUnit,
+		b.work_unit as workUnit1,
 		b.consultant_type as consultantType,
-		b.audit_info as auditInfo
+		b.audit_info as auditInfo,
+		b.typical_case as typicalCase, 
+		b.consultant_certificate_url as consultantCertificateUrl
 	from
 		user a left join user_identity b on
 		a.id = b.uid
@@ -1289,7 +1326,7 @@ select a.id as uid,a.nickname as username,a.head_portrait_url as personPortraitU
 		b.industry,b.work_unit as workUnit,b.professional_title as professionalTitle,a.introduction,
 		ifnull(c.count,0) as countInterest,b.expert,ifnull(x.a,0) as favorable,ifnull(x.b,0) as general,
 		ifnull(x.c,0) as inferior,ifnull(x.d,0) as commentCount,ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate,
-		if(isnull(d.to_uid),0,1) as interested
+		if(isnull(d.to_uid),0,1) as interested, b.typical_case as typicalCase
 		from `user` a left join user_identity b on a.id=b.uid left join (select a.commodity_id as uid,
 			sum(case when a.star &gt; 3 then 1 else 0 end) as a,
 			sum(case when a.star=3 then 1 else 0 end) as b,
@@ -1307,6 +1344,7 @@ where a.id=#{id,jdbcType=VARCHAR}
 	ifnull( a.count, 0 ) as countInterest, if( isnull(b.to_uid), 0, 1 ) as interested,ui.expert,
 	ifnull( x.a, 0 ) as favorable, ifnull( x.b, 0 ) as general, ifnull( x.c, 0 ) as inferior,
 	ifnull( x.d, 0 ) as commentCount, ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate
+	,ui.typical_case as typicalCase
 from
 	`user` u left join user_identity ui on ui.uid = u.id 
 	left join(select a.commodity_id as uid,
@@ -1321,6 +1359,9 @@ from
 	on u.id = b.to_uid 
 	where u.status = 0 and u.source = 0 
 	and ui.expert = 2 and ui.audit_status=2
+	<if test='consultantType == null or consultantType ==""'>
+	and ui.consultant_type &lt; 4
+	</if>
 	<if test="consultantType != null">
 	and ui.consultant_type=#{consultantType,jdbcType=INTEGER}
 	</if>
@@ -1352,6 +1393,9 @@ from
 	`user` u left join user_identity ui on ui.uid = u.id 
 	where u.status = 0 and u.source = 0
 	and ui.expert = 2 and ui.audit_status=2
+	<if test='consultantType == null or consultantType ==""'>
+	and ui.consultant_type &lt; 4
+	</if>
 	<if test="consultantType != null">
 	and ui.consultant_type=#{consultantType,jdbcType=INTEGER}
 	</if>
@@ -1373,7 +1417,7 @@ from
 <select id="getExpertAuditList" resultMap="BaseResultMap">
 	select 
 	i.id, i.uid, i.username,  id_number, positive_id_url,  i.audit_status, expert, i.audit_status, fixed_tel, industry,
-    u.mobile as contact_mobile, c.name as contacts, identify_name 
+    u.mobile as contact_mobile, c.name as contacts, identify_name, consultant_type
 	from user_identity i 
 	inner join user u on i.uid = u.id
 	left join industry_category c on c.id = i.industry
@@ -1390,6 +1434,9 @@ from
 	<if test="expert == null ">
 	and expert &gt; 0
 	</if>
+	<if test="consultantType != null ">
+	and consultant_type = #{consultantType,jdbcType=INTEGER}
+	</if>
 	<if test='username != null and username != ""'>
 	<bind name="un" value="'%' + username + '%'"/>
 	and (i.username like #{un,jdbcType=VARCHAR} or u.identify_name like #{un,jdbcType=VARCHAR} or u.nickname like #{un,jdbcType=VARCHAR} or u.username like #{un,jdbcType=VARCHAR})
@@ -1416,6 +1463,9 @@ from
 	<if test="expert == null ">
 	and expert &gt; 0
 	</if>
+	<if test="consultantType != null ">
+	and consultant_type = #{consultantType,jdbcType=INTEGER}
+	</if>
 	<if test="username != null">
 	<bind name="un" value="'%' + username + '%'"/>
 	and (i.username like #{un,jdbcType=VARCHAR} or u.identify_name like #{un,jdbcType=VARCHAR} or u.nickname like #{un,jdbcType=VARCHAR} or u.username like #{un,jdbcType=VARCHAR})
@@ -1433,7 +1483,8 @@ from
 	u.introduction, u.audit_opinion, 
 	i.expert, i.audit_status, i.positive_id_url, i.opposite_id_url, u.head_portrait_url, 
 	i.education, i.major_category, i.consultant_type, i.graduate_school, i.work_unit, 
-	i.qualification, i.professional_title, i.process, i.id, i.uid, i.audit_info
+	i.qualification, i.professional_title, i.process, i.id, i.uid, i.audit_info,
+	i.typical_case, i.consultant_certificate_url, i.work_unit as work_unit1
 	from `user` u
 	inner join user_identity i on u.id = i.uid
 	where u.id = #{uid,jdbcType=VARCHAR}

+ 18 - 0
src/main/java/com/goafanti/common/model/UserIdentity.java

@@ -217,7 +217,25 @@ public class UserIdentity {
 	
 	private String consultantCertificateUrl;
 
+	private String typicalCase;
+
+	private String workUnit1;
 	
+	public String getWorkUnit1() {
+		return workUnit1;
+	}
+
+	public void setWorkUnit1(String workUnit1) {
+		this.workUnit1 = workUnit1;
+	}
+
+	public String getTypicalCase() {
+		return typicalCase;
+	}
+
+	public void setTypicalCase(String typicalCase) {
+		this.typicalCase = typicalCase;
+	}
 
 	public Integer getReleaseStatus() {
 		return releaseStatus;

+ 1 - 1
src/main/java/com/goafanti/user/bo/InputOrganizationIdentity.java

@@ -188,7 +188,7 @@ public class InputOrganizationIdentity {
 	@Size(min = 0, max = 1, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String societyTag;
 	
-	@Size(min = 0, max = 512, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size( min = 0, max = 512, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String introduction;
 	
 	private String honorPicture;

+ 23 - 1
src/main/java/com/goafanti/user/bo/InputUserIdentity.java

@@ -117,6 +117,9 @@ public class InputUserIdentity {
 	@Size(min = 0, max = 64, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String workUnit;
 	
+	@Size(min = 0, max = 64, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String workUnit1;
+	
 	@Size(min = 0, max = 32, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String qualification;
 	
@@ -134,14 +137,33 @@ public class InputUserIdentity {
 	private String graduateSchool;
 	
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	@Max(value = 3, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Max(value = 4, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer consultantType;
 	
 	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String consultantCertificateUrl;
 	
+	@Size(min = 0, max = 1000, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String typicalCase;
+	
 	private String auditInfo;
 	
+	public String getTypicalCase() {
+		return typicalCase;
+	}
+
+	public void setTypicalCase(String typicalCase) {
+		this.typicalCase = typicalCase;
+	}
+
+	public String getWorkUnit1() {
+		return workUnit1;
+	}
+
+	public void setWorkUnit1(String workUnit1) {
+		this.workUnit1 = workUnit1;
+	}
+
 	public String getAuditInfo() {
 		return auditInfo;
 	}

+ 6 - 0
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -520,6 +520,7 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 		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(null != identity.getConsultantType())  params.put("consultantType", identity.getConsultantType());
 		if(StringUtils.isBlank(identity.getUsername())) params.put("username", identity.getIdentifyName());
 		return (Pagination<MyInterestedBo>) findPage("getExpertAuditList", "getExpertAuditListCount", params, pageNo, pageSize);
 	}
@@ -632,6 +633,11 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 		
 		UserIdentity ui = new UserIdentity();
 		BeanUtils.copyProperties(identity, ui);
+		
+		//如果是法律顾问
+		if(null != identity.getConsultantType() && identity.getConsultantType() == 4){
+			ui.setWorkUnit(identity.getWorkUnit1());
+		}
 		if (null == u) {
 			ui.setId(UUID.randomUUID().toString());
 			ui.setUid(user.getId());