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

Merge remote-tracking branch 'origin/master' into prod

wanghui лет назад: 8
Родитель
Сommit
62c86faa4b

+ 12 - 1
src/main/java/com/goafanti/achievement/bo/InputAchievement.java

@@ -162,7 +162,11 @@ public class InputAchievement {
 	@Max(value = 3, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Max(value = 3, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer		contacts;
 	private Integer		contacts;
-
+	
+	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer     jmrhFlag;
+	
 	public String getId() {
 	public String getId() {
 		return id;
 		return id;
 	}
 	}
@@ -531,4 +535,11 @@ public class InputAchievement {
 		this.contacts = contacts;
 		this.contacts = contacts;
 	}
 	}
 
 
+	public Integer getJmrhFlag() {
+		return jmrhFlag;
+	}
+
+	public void setJmrhFlag(Integer jmrhFlag) {
+		this.jmrhFlag = jmrhFlag;
+	}
 }
 }

+ 2 - 1
src/main/java/com/goafanti/common/dao/NewsMapper.java

@@ -29,5 +29,6 @@ public interface NewsMapper {
 	List<NewsPortalList> findPortalList(Map<String, Object> params);
 	List<NewsPortalList> findPortalList(Map<String, Object> params);
 
 
 	List<NewsSummary> findIndexNewsList(Map<String, Object> params);
 	List<NewsSummary> findIndexNewsList(Map<String, Object> params);
-
+	
+	List<NewsSummary> findJmrhNewsList(Map<String, Object> params);
 }
 }

+ 18 - 5
src/main/java/com/goafanti/common/mapper/NewsMapper.xml

@@ -13,13 +13,14 @@
     <result column="source" jdbcType="VARCHAR" property="source" />
     <result column="source" jdbcType="VARCHAR" property="source" />
     <result column="source_url" jdbcType="VARCHAR" property="sourceUrl" />
     <result column="source_url" jdbcType="VARCHAR" property="sourceUrl" />
     <result column="summary" jdbcType="VARCHAR" property="summary" />
     <result column="summary" jdbcType="VARCHAR" property="summary" />
+    <result column="jmrh_flag" jdbcType="INTEGER" property="jmrhFlag" />
   </resultMap>
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.News">
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.News">
     <result column="content" jdbcType="LONGVARCHAR" property="content" />
     <result column="content" jdbcType="LONGVARCHAR" property="content" />
   </resultMap>
   </resultMap>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
     id, create_time, edit_time, title, title_img, author, type, hot, source, source_url, 
     id, create_time, edit_time, title, title_img, author, type, hot, source, source_url, 
-    summary
+    summary,jmrh_flag
   </sql>
   </sql>
   <sql id="Blob_Column_List">
   <sql id="Blob_Column_List">
     content
     content
@@ -40,12 +41,13 @@
     insert into news (id, create_time, edit_time, 
     insert into news (id, create_time, edit_time, 
       title, title_img, author, 
       title, title_img, author, 
       type, hot, source, 
       type, hot, source, 
-      source_url, summary, content
+      source_url, summary, content,jmrh_flag
       )
       )
     values (#{id,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{editTime,jdbcType=TIMESTAMP}, 
     values (#{id,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{editTime,jdbcType=TIMESTAMP}, 
       #{title,jdbcType=VARCHAR}, #{titleImg,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, 
       #{title,jdbcType=VARCHAR}, #{titleImg,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, 
       #{type,jdbcType=INTEGER}, #{hot,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, 
       #{type,jdbcType=INTEGER}, #{hot,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, 
-      #{sourceUrl,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
+      #{sourceUrl,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR},
+      #{jmrhFlag,jdbcType=INTEGER}
       )
       )
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.News">
   <insert id="insertSelective" parameterType="com.goafanti.common.model.News">
@@ -87,6 +89,9 @@
       <if test="content != null">
       <if test="content != null">
         content,
         content,
       </if>
       </if>
+      <if test="jmrhFlag != null">
+      	jmrhFlag,
+      </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
       <if test="id != null">
@@ -125,6 +130,9 @@
       <if test="content != null">
       <if test="content != null">
         #{content,jdbcType=LONGVARCHAR},
         #{content,jdbcType=LONGVARCHAR},
       </if>
       </if>
+       <if test="jmrhFlag != null">
+        #{content,jdbcType=INTEGER},
+      </if>
     </trim>
     </trim>
   </insert>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.News">
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.News">
@@ -163,6 +171,9 @@
       <if test="content != null">
       <if test="content != null">
         content = #{content,jdbcType=LONGVARCHAR},
         content = #{content,jdbcType=LONGVARCHAR},
       </if>
       </if>
+      <if test="jmrhFlag != null">
+        content = #{jmrhFlag,jdbcType=INTEGER},
+      </if>
     </set>
     </set>
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </update>
   </update>
@@ -178,7 +189,8 @@
       source = #{source,jdbcType=VARCHAR},
       source = #{source,jdbcType=VARCHAR},
       source_url = #{sourceUrl,jdbcType=VARCHAR},
       source_url = #{sourceUrl,jdbcType=VARCHAR},
       summary = #{summary,jdbcType=VARCHAR},
       summary = #{summary,jdbcType=VARCHAR},
-      content = #{content,jdbcType=LONGVARCHAR}
+      content = #{content,jdbcType=LONGVARCHAR},
+      jmrh_flag = #{jmrhFlag,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </update>
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.News">
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.News">
@@ -192,7 +204,8 @@
       hot = #{hot,jdbcType=INTEGER},
       hot = #{hot,jdbcType=INTEGER},
       source = #{source,jdbcType=VARCHAR},
       source = #{source,jdbcType=VARCHAR},
       source_url = #{sourceUrl,jdbcType=VARCHAR},
       source_url = #{sourceUrl,jdbcType=VARCHAR},
-      summary = #{summary,jdbcType=VARCHAR}
+      summary = #{summary,jdbcType=VARCHAR},
+       jmrh_flag = #{jmrhFlag,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </update>
   </update>
   
   

+ 10 - 0
src/main/java/com/goafanti/common/mapper/NewsMapperExt.xml

@@ -133,4 +133,14 @@
 		order by create_time desc
 		order by create_time desc
 		limit #{pageNo,jdbcType=INTEGER}, #{pageSize,jdbcType=INTEGER}
 		limit #{pageNo,jdbcType=INTEGER}, #{pageSize,jdbcType=INTEGER}
 	</select>
 	</select>
+	
+	<select id="findJmrhNewsList" parameterType="String" resultMap="SummaryResultMap">
+		select 
+			id,title,create_time 
+		from 
+			news
+		where 
+			jmrh_flag = 1 and type = #{type,jdbcType=INTEGER}
+		limit 3;
+	</select>
 </mapper>
 </mapper>

+ 9 - 1
src/main/java/com/goafanti/common/model/Achievement.java

@@ -283,7 +283,7 @@ public class Achievement {
     /**
     /**
      *  是否属于军民融合成果 0 - 否	, 1 - 是
      *  是否属于军民融合成果 0 - 否	, 1 - 是
      */
      */
-    private Integer jmrhFlagp;
+    private Integer jmrhFlag;
     
     
 	public String getId() {
 	public String getId() {
 		return id;
 		return id;
@@ -738,6 +738,14 @@ public class Achievement {
 		this.internationalFlag = internationalFlag;
 		this.internationalFlag = internationalFlag;
 	}
 	}
 
 
+	public Integer getJmrhFlag() {
+		return jmrhFlag;
+	}
+
+	public void setJmrhFlag(Integer jmrhFlag) {
+		this.jmrhFlag = jmrhFlag;
+	}
+
 	public String getReleaseDateFormattedDate() {
 	public String getReleaseDateFormattedDate() {
 		if (this.releaseDate == null) {
 		if (this.releaseDate == null) {
 			return null;
 			return null;

+ 13 - 0
src/main/java/com/goafanti/common/model/News.java

@@ -69,6 +69,11 @@ public class News {
 	 */
 	 */
 	private String	content;
 	private String	content;
 	
 	
+	/**
+	 * 是否属于军民融合 
+	 */
+	private Integer jmrhFlag;
+	
 	@JsonFormat(shape = Shape.STRING)
 	@JsonFormat(shape = Shape.STRING)
 	public Long getId() {
 	public Long getId() {
 		return id;
 		return id;
@@ -166,6 +171,14 @@ public class News {
 		this.content = content;
 		this.content = content;
 	}
 	}
 
 
+	public Integer getJmrhFlag() {
+		return jmrhFlag;
+	}
+
+	public void setJmrhFlag(Integer jmrhFlag) {
+		this.jmrhFlag = jmrhFlag;
+	}
+
 	public String getCreateTimeFormattedDate() {
 	public String getCreateTimeFormattedDate() {
 		if (this.createTime == null) {
 		if (this.createTime == null) {
 			return null;
 			return null;

+ 11 - 0
src/main/java/com/goafanti/news/bo/InputNews.java

@@ -36,6 +36,10 @@ public class InputNews {
 	@Size(min = 0, max = 144, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	@Size(min = 0, max = 144, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	summary;
 	private String	summary;
 	
 	
+	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+    private Integer jmrhFlagp;
+    
 	private String	content;
 	private String	content;
 
 
 	public Long getId() {
 	public Long getId() {
@@ -118,4 +122,11 @@ public class InputNews {
 		this.content = content;
 		this.content = content;
 	}
 	}
 
 
+	public Integer getJmrhFlagp() {
+		return jmrhFlagp;
+	}
+
+	public void setJmrhFlagp(Integer jmrhFlagp) {
+		this.jmrhFlagp = jmrhFlagp;
+	}
 }
 }

+ 5 - 1
src/main/java/com/goafanti/news/service/NewsService.java

@@ -156,6 +156,10 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 		
 		
 	}
 	}
 
 
-	
+	public List<NewsSummary> findJmrhNewsList(String type){
+		Map<String, Object> params = new HashMap<String, Object>();
+		params.put("type", type);
+		return newsMapper.findJmrhNewsList(params);
+	}
 
 
 }
 }

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

@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.ModelAndView;
 
 
 import com.goafanti.common.controller.BaseController;
 import com.goafanti.common.controller.BaseController;
+import com.goafanti.news.bo.NewsSummary;
+import com.goafanti.news.service.NewsService;
 import com.goafanti.residentIntegration.bo.ResidentIntegrationBo;
 import com.goafanti.residentIntegration.bo.ResidentIntegrationBo;
 import com.goafanti.residentIntegration.service.ResidentIntegrationService;
 import com.goafanti.residentIntegration.service.ResidentIntegrationService;
 
 
@@ -16,15 +18,20 @@ import com.goafanti.residentIntegration.service.ResidentIntegrationService;
 public class PoralResidentIntegrationController extends BaseController{
 public class PoralResidentIntegrationController extends BaseController{
 	@Resource
 	@Resource
 	private ResidentIntegrationService residentIntegrationService;
 	private ResidentIntegrationService residentIntegrationService;
-	
+	@Resource
+	private NewsService				   newsService;
 	@RequestMapping(value="/portal/residentIntegration/index")
 	@RequestMapping(value="/portal/residentIntegration/index")
 	public ModelAndView residentIntegrationIndex(ModelAndView mv){
 	public ModelAndView residentIntegrationIndex(ModelAndView mv){
 		List<ResidentIntegrationBo> jmrhAchievementList = residentIntegrationService.selectJmrhAchievement();
 		List<ResidentIntegrationBo> jmrhAchievementList = residentIntegrationService.selectJmrhAchievement();
 		List<ResidentIntegrationBo> jmrhTechnologyList = residentIntegrationService.selectJmrTechnology();
 		List<ResidentIntegrationBo> jmrhTechnologyList = residentIntegrationService.selectJmrTechnology();
 		List<ResidentIntegrationBo> jmrhProjectList = residentIntegrationService.selectJmrProject();
 		List<ResidentIntegrationBo> jmrhProjectList = residentIntegrationService.selectJmrProject();
+		List<NewsSummary> gjzcNewsList = newsService.findJmrhNewsList("4");
+		List<NewsSummary> dfzcNewsList = newsService.findJmrhNewsList("5");
 		mv.addObject("jmrhAchievementList", jmrhAchievementList);
 		mv.addObject("jmrhAchievementList", jmrhAchievementList);
 		mv.addObject("jmrhTechnologyList",jmrhTechnologyList);
 		mv.addObject("jmrhTechnologyList",jmrhTechnologyList);
 		mv.addObject("jmrhProjectList",jmrhProjectList);
 		mv.addObject("jmrhProjectList",jmrhProjectList);
+		mv.addObject("gjzcNewsList",gjzcNewsList);
+		mv.addObject("dfzcNewsList",dfzcNewsList);
 		mv.setViewName("/portal/residentIntegration/index");
 		mv.setViewName("/portal/residentIntegration/index");
 		return mv;
 		return mv;
 	}
 	}

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 
 app.name=AFT
 app.name=AFT
 
 
-static.host=//sb.jishutao.com/1.0.39
+static.host=//sb.jishutao.com/1.0.40
 
 
 upload.path=/Users/xiaolong/Sites/upload
 upload.path=/Users/xiaolong/Sites/upload
 upload.private.path=/Users/xiaolong/Sites/doc
 upload.private.path=/Users/xiaolong/Sites/doc

+ 3 - 0
src/main/webapp/WEB-INF/views/portal/residentIntegration/index.html

@@ -58,6 +58,9 @@
 			<h3>解密专利</h3>
 			<h3>解密专利</h3>
 			<div class="patent_top row">
 			<div class="patent_top row">
 				<div class="col-xs-6 bg-left">
 				<div class="col-xs-6 bg-left">
+					<!-- <a th:each="it: ${jmrhAchievementList}" href="${basePath+ 'portal/detail/achievementDetail.html?id=' + it.id}">
+						<span class="note" th:text="${it.name}"></span>
+					</a> -->
 					<a href="/portal/search/achievement.html"><span class="note">平衡力距传动增衡器怒我很期待</span><span class="node">使用新型</span></a>
 					<a href="/portal/search/achievement.html"><span class="note">平衡力距传动增衡器怒我很期待</span><span class="node">使用新型</span></a>
 					<a href="/portal/search/achievement.html"><span class="note">平衡力距传动增衡器怒我很期待</span><span class="node">使用新型</span></a>
 					<a href="/portal/search/achievement.html"><span class="note">平衡力距传动增衡器怒我很期待</span><span class="node">使用新型</span></a>
 					<a th:href="${basePath +'/portal/search/achievement.html'}" class="more">MORE</a>
 					<a th:href="${basePath +'/portal/search/achievement.html'}" class="more">MORE</a>