Просмотр исходного кода

Merge branch 'test' of jishutao/jitao-server into prod

liliang4869 лет назад: 7
Родитель
Сommit
4111a3e6ca

+ 14 - 4
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -26,6 +26,7 @@ import com.goafanti.common.model.JtBusinessCategory;
 import com.goafanti.common.model.JtBusinessProject;
 import com.goafanti.common.model.News;
 import com.goafanti.common.model.Policy;
+import com.goafanti.common.model.User;
 import com.goafanti.common.utils.LimitLengthUtil;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -34,9 +35,7 @@ import com.goafanti.demand.service.DemandService;
 import com.goafanti.user.bo.UserIdentityBo;
 import com.goafanti.user.service.OrganizationIdentityService;
 import com.goafanti.user.service.UserIdentityService;
-
-
-
+import com.goafanti.user.service.UserService;
 import com.goafanti.news.bo.NewsPortalList;
 import com.goafanti.news.bo.PolicyResult;
 import com.goafanti.news.enums.NewsType;
@@ -69,7 +68,10 @@ public class WebpageController extends BaseController {
 	private PolicyService policyService;
 	
 	@Resource 
-	private JtBusinessService jtBusinessService; 
+	private JtBusinessService jtBusinessService;
+	
+	@Resource
+	private UserService userService;
 
 	@RequestMapping(value = "/user/account/index", method = RequestMethod.GET)
 	public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
@@ -338,6 +340,14 @@ public class WebpageController extends BaseController {
 	if(jtBusinessProject!=null) {
 		if(jtBusinessProject.getMaxImgUrl()!=null && jtBusinessProject.getMaxImgUrl().length()<=0)jtBusinessProject.setMaxImgUrl(null);
 	}
+	String owner="平台管理员";
+	if(jtBusinessProject.getOwnerId()!=null) {
+		User user=userService.selectByPrimaryKey(jtBusinessProject.getOwnerId());
+		if(user!=null && user.getUsername()!=null) {
+			owner=user.getUsername();
+		}
+	}
+	modelview.addObject("owner",owner);
 	modelview.addObject("pj",jtBusinessProject);
 	System.out.println(jtBusinessProject.toString());
 	if(jtBusinessProject!=null) {

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

@@ -100,7 +100,7 @@
       This element was generated on Wed Jun 20 11:08:54 CST 2018.
     -->
     id, name, category_id as categoryId, number, price, activity_price as activityPrice, member_price as memberPrice, offset, activity_flag as activityFlag, 
-    introduce, province, city, create_time as createTime, min_img_url as minImgUrl, max_img_url as maxImgUrl, value, apply_conditions as applyConditions
+    introduce, province, city, create_time as createTime, min_img_url as minImgUrl, max_img_url as maxImgUrl, value, apply_conditions as applyConditions,owner_id as ownerId
   </sql>
   
     <sql id="My_Base_Column_List">

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

@@ -155,7 +155,7 @@ public class PortalNewsController extends BaseController {
 		}
 		if(newsDetail.getTitleImg()!=null) {
 			String[] imgs=newsDetail.getTitleImg().split(",");
-			modelview.addObject("imgs",imgs);
+			modelview.addObject("imgs",imgs[0]);
 		}
 		modelview.addObject("newsDetail", newsDetail);
 		modelview.addObject("newsList", newsList.getList());

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceDetails.html