Browse Source

Merge remote-tracking branch 'origin/dev' into test

wanghui 8 years ago
parent
commit
ad657c74a0

+ 0 - 84
src/main/java/com/goafanti/common/mapper/UserBusinessMapper.xml

@@ -348,90 +348,6 @@
       remarks = #{remarks,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
-  <select id="selectBusinessList" resultType="com.goafanti.customer.bo.BusinessListBo">
-	  select
-		c.name as businessName,
-		b.identify_name as identifyName,
-		a.id as businessId,
-		a.create_time as createTime,
-		a.update_time as updateTime,
-		a.follow_situation as followSituation,
-		a.customer_status as customerStatus,
-		d.name as adminName
-	from
-		user_business a inner join user b on
-		a.uid = b.id left join business_glossory c on
-		a.business_glossory_id = c.id left join admin d on
-		a.aid = d.id
-	where 1 = 1
-	<if test="aid != null and aid != ''">
-		and a.aid = #{aid,jdbcType=VARCHAR}
-	</if>
-	<if test="uid != null and uid !=''">
-		and a.uid = #{uid,jdbcType=VARCHAR}
-	</if>
-	<if test="businessGlossoryId !=null and businessGlossoryId != ''">
-		and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
-	</if>
-	<if test="identifyName != null and identifyName != ''">
-		and b.identify_name like concat('%', #{identifyName},'%')
-	</if>
-	<if test="followSituation != null">
-		and a.follow_situation = #{followSituation,jdbcType=INTEGER}
-	</if>
-	<if test="customerStatus != null">
-		and a.customer_status = #{customerStatus,jdbcType=INTEGER}
-	</if>
-	<if test="adminName != null and adminName != ''">
-		and d.name = #{adminName,jdbcType=VARCHAR}
-	</if>
-	<if test="startDate != null and startDate != ''">
-		and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
-	</if>
-	<if test="endDate != null and endDate != ''">
-		and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
-	</if>
-	<if test="page_sql != null">
-    	${page_sql}
-    </if>
-  </select>
-  <select id="selectBusinessCount" parameterType="com.goafanti.customer.bo.BusinessListBo" resultType="java.lang.Integer">
-  	select
-  		count(0)
-  	from
-		user_business a inner join user b on
-		a.uid = b.id left join business_glossory c on
-		a.business_glossory_id = c.id left join admin d on
-		a.aid = d.id
-	where 1 = 1
-	<if test="aid != null and aid != ''">
-		and a.aid = #{aid,jdbcType=VARCHAR}
-	</if>
-	<if test="uid != null and uid !=''">
-		and a.uid = #{uid,jdbcType=VARCHAR}
-	</if>
-	<if test="businessGlossoryId !=null and businessGlossoryId != ''">
-		and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
-	</if>
-	<if test="identifyName != null and identifyName != ''">
-		and b.identify_name like concat('%', #{identifyName},'%')
-	</if>
-	<if test="followSituation != null">
-		and a.follow_situation = #{followSituation,jdbcType=INTEGER}
-	</if>
-	<if test="customerStatus != null">
-		and a.customer_status = #{customerStatus,jdbcType=INTEGER}
-	</if>
-	<if test="adminName != null and adminName != ''">
-		and d.name = #{adminName,jdbcType=VARCHAR}
-	</if>
-	<if test="startDate != null and startDate != ''">
-		and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
-	</if>
-	<if test="endDate != null and endDate != ''">
-		and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
-	</if>		
-  </select>
   
   <select id="findBusinessGlossory" resultType="com.goafanti.customer.bo.BusinessListBo">
   	select id as businessGlossoryId,name as businessName from business_glossory

+ 85 - 0
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -763,4 +763,89 @@
 		where a.follow_id = #{followId,jdbcType=VARCHAR}
 	</select>
 	
+	<select id="selectBusinessList" resultType="com.goafanti.customer.bo.BusinessListBo">
+	  select
+		c.name as businessName,
+		b.identify_name as identifyName,
+		a.id as businessId,
+		a.create_time as createTime,
+		a.update_time as updateTime,
+		a.follow_situation as followSituation,
+		a.customer_status as customerStatus,
+		d.name as adminName
+	from
+		user_business a inner join user b on
+		a.uid = b.id left join business_glossory c on
+		a.business_glossory_id = c.id left join admin d on
+		a.aid = d.id
+	where 1 = 1
+	<if test="aid != null and aid != ''">
+		and a.aid = #{aid,jdbcType=VARCHAR}
+	</if>
+	<if test="uid != null and uid !=''">
+		and a.uid = #{uid,jdbcType=VARCHAR}
+	</if>
+	<if test="businessGlossoryId !=null and businessGlossoryId != ''">
+		and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
+	</if>
+	<if test="identifyName != null and identifyName != ''">
+		and b.identify_name like concat('%', #{identifyName},'%')
+	</if>
+	<if test="followSituation != null">
+		and a.follow_situation = #{followSituation,jdbcType=INTEGER}
+	</if>
+	<if test="customerStatus != null">
+		and a.customer_status = #{customerStatus,jdbcType=INTEGER}
+	</if>
+	<if test="adminName != null and adminName != ''">
+		and d.name = #{adminName,jdbcType=VARCHAR}
+	</if>
+	<if test="startDate != null and startDate != ''">
+		and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+	</if>
+	<if test="endDate != null and endDate != ''">
+		and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+	</if>
+	<if test="page_sql != null">
+    	${page_sql}
+    </if>
+  </select>
+  
+  <select id="selectBusinessCount" parameterType="com.goafanti.customer.bo.BusinessListBo" resultType="java.lang.Integer">
+  	select
+  		count(0)
+  	from
+		user_business a inner join user b on
+		a.uid = b.id left join business_glossory c on
+		a.business_glossory_id = c.id left join admin d on
+		a.aid = d.id
+	where 1 = 1
+	<if test="aid != null and aid != ''">
+		and a.aid = #{aid,jdbcType=VARCHAR}
+	</if>
+	<if test="uid != null and uid !=''">
+		and a.uid = #{uid,jdbcType=VARCHAR}
+	</if>
+	<if test="businessGlossoryId !=null and businessGlossoryId != ''">
+		and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
+	</if>
+	<if test="identifyName != null and identifyName != ''">
+		and b.identify_name like concat('%', #{identifyName},'%')
+	</if>
+	<if test="followSituation != null">
+		and a.follow_situation = #{followSituation,jdbcType=INTEGER}
+	</if>
+	<if test="customerStatus != null">
+		and a.customer_status = #{customerStatus,jdbcType=INTEGER}
+	</if>
+	<if test="adminName != null and adminName != ''">
+		and d.name = #{adminName,jdbcType=VARCHAR}
+	</if>
+	<if test="startDate != null and startDate != ''">
+		and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+	</if>
+	<if test="endDate != null and endDate != ''">
+		and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+	</if>		
+  </select>
 </mapper>

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

@@ -12,8 +12,10 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
+import com.goafanti.app.bo.ProjectDetailBo;
 import com.goafanti.banners.enums.BannersType;
 import com.goafanti.banners.service.BannersService;
+import com.goafanti.business.service.BusinessProjectService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
@@ -32,7 +34,8 @@ public class PortalNewsController extends BaseController {
 	NewsService				newsService;
 	@Resource
 	private BannersService	bannersService;
-
+	@Resource
+	private BusinessProjectService	businessProjectService;
 	/**
 	 * 策源地
 	 * 
@@ -153,7 +156,9 @@ public class PortalNewsController extends BaseController {
 	 * 高新认定APP
 	 */
 	@RequestMapping(value = "/portal/news/appCognizance", method = RequestMethod.GET)
-	public ModelAndView appCognizance(HttpServletRequest request, ModelAndView modelview) {
+	public ModelAndView appCognizance(HttpServletRequest request, ModelAndView modelview,String id) {
+		ProjectDetailBo bo = businessProjectService.orgProject(id);
+		modelview.addObject("bo", bo);
 		modelview.setViewName("/portal/news/appCognizance");
 		return modelview;
 	}

+ 8 - 6
src/main/webapp/WEB-INF/views/portal/news/appCognizance.html

@@ -14,34 +14,36 @@
 			<img th:src="${portalHost + '/img/appCognizance01.jpg'}"  alt="高企认定" id="imgs"/>
 			<div class="contant">
 				<div class="service">
-					<h3 id="dataName"></h3>
+					<h3 id="dataName" th:text="${bo.name}"></h3>
 				</div>
 				<div class="service">
 					<h3><img th:src="${portalHost + '/img/appCognizance02.jpg'}"  alt="" /><span>项目描述</span></h3>
 					<hr>
 					<div class="promiseText" id="describe">
-						
+						<p th:text="${bo.introduce}">
 					</div>
 				</div>
 				<div class="service">
 					<h3><img th:src="${portalHost + '/img/appCognizance02.jpg'}" alt="" /><span>项目价值</span></h3>
 					<hr>
 					<div class="promiseText" id="data">
-						
+						<p th:text="${bo.valueEffect}">
 					</div>
 				</div>
 				<div class="service servicebj">
 					<h3><img th:src="${portalHost + '/img/appCognizance02.jpg'}" alt="" /><span>服务规格</span></h3>
 					<hr>
-					<div class="specifications" >
-					
+					<div class="specifications">
+						<div th:each="item:${bo.projectSize}">
+							<p th:text="${item}"></p>
+						</div>
 					</div>
 				</div>
 				<div class="service">
 					<h3><img th:src="${portalHost + '/img/appCognizance02.jpg'}" alt="" /><span>所需资料</span></h3>
 					<hr>
 					<div class="promiseText" id="promise">
-					
+						<p th:utext="${bo.clientSize}">
 					</div>
 				</div>