anderx лет назад: 3
Родитель
Сommit
c965f778d5

+ 19 - 0
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -13,9 +13,11 @@ import javax.servlet.http.HttpServletRequest;
 
 import com.goafanti.common.model.*;
 import com.goafanti.news.bo.InputJtNews;
+import com.goafanti.news.bo.OutJtNews;
 import com.goafanti.news.service.EventPlanningService;
 import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
@@ -1637,4 +1639,21 @@ public class WebpageController extends BaseController {
 		return modelAndView;
 	}
 
+	/**
+	 * 新闻详情
+	 * @param request
+	 * @param modelview
+	 * @return
+	 */
+	@SuppressWarnings("unchecked")
+	@RequestMapping(value = "/eventPlanning/{id}", method = RequestMethod.GET)
+	public ModelAndView newsDetails( ModelAndView modelview,@PathVariable Integer id) {
+		modelview.setViewName("/portal/eventDetails");
+		InputJtNews in = new InputJtNews();
+		in.setId(id);
+		OutJtNews out =eventPlanningService.selectNews(in);
+		modelview.addObject("news",out);
+		return modelview;
+	}
+
 }

+ 1 - 0
src/main/resources/shiro_base_auth.ini

@@ -1,6 +1,7 @@
 [base_auth]
 /=device
 /index=anon
+/eventPlanning/**=anon
 /login=anon
 /user/login.html=anon
 /user/login=anon

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


+ 1 - 0
src/main/webapp/WEB-INF/views/portal/eventPlanning.html

@@ -33,6 +33,7 @@
             <div th:replace="common::copyright"></div>
             <div th:replace="common::login"></div>
         </footer>
+    </div>
         <div th:replace="common::footer(~{::script})">
             <script type="text/javascript" th:src="${portalHost + '/dll/dll.js'}"></script>
             <script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>