소스 검색

姓名展示修改

liliang4869 7 년 전
부모
커밋
83bc6026c9

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

@@ -343,8 +343,8 @@ public class WebpageController extends BaseController {
 	String owner="平台管理员";
 	if(jtBusinessProject.getOwnerId()!=null) {
 		User user=userService.selectByPrimaryKey(jtBusinessProject.getOwnerId());
-		if(user!=null && user.getUsername()!=null) {
-			owner=user.getUsername();
+		if(user!=null && user.getIdentifyName()!=null) {
+			owner=user.getIdentifyName();
 		}
 	}
 	modelview.addObject("owner",owner);
@@ -550,6 +550,11 @@ public class WebpageController extends BaseController {
 		}
 		//专家
 				List<UserIdentityBo>aExperts=userIdentityService.getExperts(8);
+				for(UserIdentityBo u:aExperts) {
+					if(u.getHeadPortraitUrl()!=null && u.getHeadPortraitUrl().length()<=0) {
+						u.setHeadPortraitUrl(null);
+					}
+				}
 				modelview.addObject("experts",aExperts);
 		modelview.addObject("demands",demandListBos);
 		

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

@@ -1049,7 +1049,7 @@
 	and t.uid=#{uid,jdbcType=VARCHAR}
 	 </select>
 	 <select id="getExperts" resultType="com.goafanti.user.bo.UserIdentityBo">
-	 	select 	t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,
+	 	select 	t.id ,t.uid,u.identifyName as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,
 			u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount
 	from user_identity t left JOIN user u on t.uid = u.id
 	left join (select count(0) as x,seller_id from t_order

+ 2 - 2
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1135,7 +1135,7 @@
    	<select id="findUserPartnerDetail" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
 		select
 		u.id,i.username,i.work_unit as workUnit,i.professional_title as position,u.introduction as achievement,
-		u.head_portrait_url as personPortraitUrl,
+		u.head_portrait_url as personPortraitUrl,u.identify_name as username,
 		i.province,
 		u.introduction as personalProfile,
 		ua.ability_label as abilityLabel,i.qualification,
@@ -1158,7 +1158,7 @@
 	
 	  <select id="findUserPartner" parameterType="String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
 		select
-		u.id,i.username,c.work_unit as work_unit,c.position,c.achievement,
+		u.id,u.identify_name as username,c.work_unit as work_unit,c.position,c.achievement,
 		u.head_portrait_url as personPortraitUrl,
 		i.province,
 		u.introduction as personalProfile,

+ 5 - 1
src/main/java/com/goafanti/portal/controller/PortalNewsController.java

@@ -155,6 +155,8 @@ public class PortalNewsController extends BaseController {
 		}
 		if(newsDetail.getTitleImg()!=null) {
 			String[] imgs=newsDetail.getTitleImg().split(",");
+			if(imgs[0]==null || imgs[0].length()<1)modelview.addObject("imgs",null);
+			else
 			modelview.addObject("imgs",imgs[0]);
 		}
 		modelview.addObject("newsDetail", newsDetail);
@@ -182,7 +184,9 @@ public class PortalNewsController extends BaseController {
 			List<PolicyEntity> la = (List<PolicyEntity>) newsList;
 			if(newsDetail.getTitleImg()!=null) {
 				String[] imgs=newsDetail.getTitleImg().split(",");
-				modelview.addObject("imgs",imgs);
+				if(imgs[0]==null || imgs[0].length()<1)modelview.addObject("imgs",null);
+				else
+				modelview.addObject("imgs",imgs[0]);
 			}
 			modelview.addObject("newsDetail", newsDetail);
 			modelview.addObject("newsList", newsList);

+ 2 - 2
src/main/webapp/WEB-INF/views/user/subscriberDetail.html

@@ -25,7 +25,7 @@
 		<div th:if="${rePartnerDetail.personPortraitUrl != null and rePartnerDetail.personPortraitUrl != ''}" class="man_img">
 			<img th:src="${avatarUploadHost+ rePartnerDetail.personPortraitUrl}" alt="" />
 		</div>
-		<div class="man_name" th:text="${rePartnerDetail.username}"></div>
+		<div class="man_name" th:text="${rePartnerDetail.identifyName}"></div>
 	</div>
 	<div class="think_basc">
 		<div class="basc_img">
@@ -89,7 +89,7 @@
 						<img th:src="${reuserPartner.personPortraitUrl}?${avatarUploadHost+reuserPartner.personPortraitUrl}:${avatarUploadHost+ '/default/person.jpg'}"
 								alt="" />
 						<div class="about_name">
-							<span class="about_man" th:text="${reuserPartner.username}?${reuserPartner.username}:佚名"></span>
+							<span class="about_man" th:text="${reuserPartner.identifyName}?${reuserPartner.identifyName}:佚名"></span>
 							<span class="about_manp" th:text="${reuserPartner.position}?${reuserPartner.position}:未公开"></span>
 						</div>
 						<div class="about_p" th:text="${reuserPartner.personalProfile}?${reuserPartner.personalProfile}:暂无简介">