Browse Source

科技交易模块

wanghui 8 years ago
parent
commit
7f75ded949
21 changed files with 472 additions and 158 deletions
  1. 14 0
      src/main/java/com/goafanti/achievement/bo/AchievementListBo.java
  2. 12 0
      src/main/java/com/goafanti/achievement/bo/InputAchievement.java
  3. 6 2
      src/main/java/com/goafanti/achievement/service/AchievementService.java
  4. 22 1
      src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java
  5. 14 1
      src/main/java/com/goafanti/common/controller/WebpageController.java
  6. 70 7
      src/main/java/com/goafanti/common/mapper/AchievementMapper.xml
  7. 52 7
      src/main/java/com/goafanti/common/mapper/DemandMapper.xml
  8. 16 1
      src/main/java/com/goafanti/common/model/Achievement.java
  9. 14 1
      src/main/java/com/goafanti/common/model/Demand.java
  10. 2 1
      src/main/java/com/goafanti/demand/bo/DemandManageDetailBo.java
  11. 12 0
      src/main/java/com/goafanti/demand/bo/DemandManageListBo.java
  12. 11 0
      src/main/java/com/goafanti/demand/bo/InputDemand.java
  13. 3 1
      src/main/java/com/goafanti/demand/service/DemandService.java
  14. 9 1
      src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java
  15. 14 0
      src/main/java/com/goafanti/portal/bo/AchievementSearchListBo.java
  16. 37 3
      src/main/java/com/goafanti/portal/controller/PortalSearchController.java
  17. 4 2
      src/main/resources/applicationContext.xml
  18. 1 4
      src/main/resources/spring/spring-shiro.xml
  19. 8 4
      src/main/webapp/WEB-INF/views/common.html
  20. 0 3
      src/main/webapp/WEB-INF/views/portal/index.html
  21. 151 119
      src/main/webapp/WEB-INF/views/portal/technologyTrading/index.html

+ 14 - 0
src/main/java/com/goafanti/achievement/bo/AchievementListBo.java

@@ -82,6 +82,11 @@ public class AchievementListBo {
 	 */
 	private Integer	contacts;
 
+    /**
+     *  是否属于精品 0 - 否	, 1 - 是
+     */
+    private Integer boutique;
+	
 	public String getOrgId() {
 		return orgId;
 	}
@@ -206,6 +211,15 @@ public class AchievementListBo {
 	public void setOwnerId(String ownerId) {
 		this.ownerId = ownerId;
 	}
+	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getBoutique() {
+		return boutique;
+	}
+
+	public void setBoutique(Integer boutique) {
+		this.boutique = boutique;
+	}
 
 	public String getReleaseDateFormattedDate() {
 		if (this.releaseDate == null) {

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

@@ -167,6 +167,10 @@ public class InputAchievement {
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer     jmrhFlag;
 	
+	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer    boutique;
+	
 	public String getId() {
 		return id;
 	}
@@ -542,4 +546,12 @@ public class InputAchievement {
 	public void setJmrhFlag(Integer jmrhFlag) {
 		this.jmrhFlag = jmrhFlag;
 	}
+
+	public Integer getBoutique() {
+		return boutique;
+	}
+
+	public void setBoutique(Integer boutique) {
+		this.boutique = boutique;
+	}
 }

+ 6 - 2
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -15,6 +15,7 @@ import com.goafanti.portal.bo.AchievementDetailBo;
 import com.goafanti.portal.bo.AchievementPortalDetailBo;
 import com.goafanti.portal.bo.AchievementPortalSimilarListBo;
 import com.goafanti.portal.bo.AchievementSearchListBo;
+import com.goafanti.portal.bo.BoutiqueListBo;
 import com.goafanti.portal.bo.InternationalListBo;
 
 public interface AchievementService {
@@ -53,7 +54,7 @@ public interface AchievementService {
 
 	Pagination<AchievementSearchListBo> listAchievementSearchList(Integer bargainingMode, Integer category,
 			Integer maturity, BigDecimal transferPriceLower, BigDecimal transferPriceUpper, Integer transferMode,
-			String keyword, Integer fieldA, Integer fieldB, Integer pageNo, Integer pageSize);
+			String keyword, Integer fieldA, Integer fieldB, Integer pageNo, Integer pageSize ,String technicalPictureUrl);
 
 	AchievementDetailBo selectAchievementSearchDetail(String uid, String id);
 	
@@ -72,5 +73,8 @@ public interface AchievementService {
 	int updateByPrimaryKeySelective(Achievement a);
 	
 	/** 查询国际化技术 **/
-	List<InternationalListBo> selectInternationalAchievement(Integer internationalAchievementKey);
+	List<InternationalListBo> selectInternationalAchievement(Integer internationalAchievementKey);
+	
+	/** 查询精品成果  **/
+	Pagination<BoutiqueListBo> boutiqueSearchList(Integer dataCategory,Integer category,Integer fieldA,Integer pageNo, Integer pageSize);
 }

+ 22 - 1
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -62,6 +62,7 @@ import com.goafanti.portal.bo.AchievementDetailBo;
 import com.goafanti.portal.bo.AchievementPortalDetailBo;
 import com.goafanti.portal.bo.AchievementPortalSimilarListBo;
 import com.goafanti.portal.bo.AchievementSearchListBo;
+import com.goafanti.portal.bo.BoutiqueListBo;
 import com.goafanti.portal.bo.InternationalListBo;
 
 @Service
@@ -412,7 +413,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	@Override
 	public Pagination<AchievementSearchListBo> listAchievementSearchList(Integer bargainingMode, Integer category,
 			Integer maturity, BigDecimal transferPriceLower, BigDecimal transferPriceUpper, Integer transferMode,
-			String keyword, Integer fieldA, Integer fieldB, Integer pNo, Integer pSize) {
+			String keyword, Integer fieldA, Integer fieldB, Integer pNo, Integer pSize ,String technicalPictureUrl) {
 		Map<String, Object> params = new HashMap<>();
 		if (!StringUtils.isBlank(keyword)) {
 			params.put("keyword", keyword);
@@ -450,6 +451,10 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			params.put("fieldB", fieldB);
 		}
 
+		if (null != technicalPictureUrl) {
+			params.put("technicalPictureUrl", technicalPictureUrl);
+		}
+		
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
 		}
@@ -618,5 +623,21 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	@Override
 	public Achievement selectAchievementDetail(String id) {
 		return achievementMapper.selectByPrimaryKey(id);
+	}
+
+	@Override
+	public Pagination<BoutiqueListBo> boutiqueSearchList(Integer dataCategory, Integer category, Integer fieldA,
+			Integer pNo, Integer pSize) {
+		Map<String, Object> params = new HashMap<>();
+		if(null != dataCategory){
+			params.put("dataCategory", dataCategory);
+		}
+		if(null != category){
+			params.put("category", category);
+		}
+		if(null != fieldA){
+			params.put("fieldA", fieldA);
+		}
+		return (Pagination<BoutiqueListBo>)findPage("findBoutiqueListByPage","findBoutiqueCount",params, pNo, pSize);
 	}
 }

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

@@ -414,7 +414,20 @@ public class WebpageController extends BaseController {
 		handleBanners(modelview, BannersType.JI_SHU_JIAO_YI);
 		return modelview;
 	}
-
+	
+	/**
+	 * 
+	 * 智库咨询
+	 * @param request
+	 * @param modelview
+	 * @return
+	 */
+	@RequestMapping(value="/portal/thinkTank/index",method = RequestMethod.GET)
+	public ModelAndView thinkTank(HttpServletRequest request, ModelAndView modelview){
+		modelview.setViewName("/portal/thinkTank/index");
+		return modelview;
+	}
+	
 	private void handleBanners(ModelAndView modelview, BannersType bannersType) {
 		List<Banners> banners = bannersService.findPortalBanners(bannersType.getKey());
 		if (!banners.isEmpty()) {

+ 70 - 7
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -57,6 +57,7 @@
     <result column="country_name_zh" jdbcType="VARCHAR" property="countryNameZh" />
     <result column="international_flag" jdbcType="INTEGER" property="internationalFlag" />
     <result column="jmrh_flag" jdbcType="INTEGER" property="jmrhFlag" />
+    <result column="boutique" jdbcType="INTEGER" property="boutique" />
   </resultMap>
   <sql id="Base_Column_List">
     id, serial_number, data_category, name, keyword, category, summary, introduction, 
@@ -67,7 +68,7 @@
     team_des, parameter, tech_plan_url, business_plan_url, org_id, org_name, org_address, 
     org_email, org_contacts, org_contacts_mobile, contacts, manager_id, salesman_id, 
     status, create_time, release_status, release_date, deleted_sign, audit_status, tech_broker_id,
-    country_name_zh,international_flag,jmrh_flag
+    country_name_zh,international_flag,jmrh_flag,boutique
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     select 
@@ -97,7 +98,7 @@
       manager_id, salesman_id, status, 
       create_time, release_status, release_date, 
       deleted_sign, audit_status, tech_broker_id,
-      country_name_zh,international_flag,jmrh_flag)
+      country_name_zh,international_flag,jmrh_flag,boutique)
     values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER}, 
       #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{category,jdbcType=INTEGER}, 
       #{summary,jdbcType=VARCHAR}, #{introduction,jdbcType=VARCHAR}, #{technicalPictureUrl,jdbcType=VARCHAR}, 
@@ -115,7 +116,7 @@
       #{managerId,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
       #{createTime,jdbcType=TIMESTAMP}, #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP}, 
       #{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{techBrokerId,jdbcType=VARCHAR},
-      #{countryNameZh,jdbcType=VARCHAR}, #{internationalFlag,jdbcType=INTEGER},#{jmrhFlag,jdbcType=INTEGER})
+      #{countryNameZh,jdbcType=VARCHAR}, #{internationalFlag,jdbcType=INTEGER},#{jmrhFlag,jdbcType=INTEGER},#{boutique,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Achievement">
     insert into achievement
@@ -285,6 +286,9 @@
        <if test="jmrhFlag != null">
       	jmrh_flag,
       </if>
+      <if test="boutique !=null">
+      	boutique,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -452,6 +456,9 @@
       <if test="jmrhFlag != null">
       	#{jmrhFlag,jdbcType=INTEGER},
       </if>
+      <if test="boutique != null">
+      	#{boutique,jdbcType=INTEGER}
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Achievement">
@@ -619,6 +626,9 @@
      <if test="jmrhFlag != null">
       	jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
       </if>
+       <if test="boutique != null">
+        boutique = #{boutique,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -677,7 +687,8 @@
       tech_broker_id = #{techBrokerId,jdbcType=VARCHAR},
       country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
       international_flag = #{internationalFlag,jdbcType=INTEGER},
-      jmrh_flag = #{jmrhFlag,jdbcType=INTEGER}
+      jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
+      boutique = #{boutique,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -791,7 +802,7 @@
   		a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
   		a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType, 
   		oi.unit_name as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,
-  		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId
+  		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
   	from achievement a
   	LEFT JOIN admin ad on ad.id = a.tech_broker_id
   	LEFT JOIN organization_identity oi on a.owner_id = oi.uid
@@ -1030,7 +1041,7 @@
 		    a.create_time as createTime, a.release_status as releaseStatus, 
 		    a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
 		    oi.unit_name as iOwnerName, oi.postal_address as iOwnerPostalAddress, u.email as iOwnerEmail,
-		    oi.org_code as iOwnerIdNumber, u.mobile as iOwnerMobile,a.jmrh_flag as jmrhFlag
+		    oi.org_code as iOwnerIdNumber, u.mobile as iOwnerMobile,a.jmrh_flag as jmrhFlag , a.boutique as boutique
     from achievement a
     left join organization_identity oi on a.owner_id = oi.uid
     left join user u on u.id = a.owner_id
@@ -1061,7 +1072,7 @@
   
   <select id="findSearchAchievementListByPage" parameterType="String" resultType="com.goafanti.portal.bo.AchievementSearchListBo">
   	select 
-  		a.id, a.name, a.keyword,
+  		a.id, a.name, a.keyword,a.technical_picture_url,
   		a.serial_number as serialNumber, a.data_category as dataCategory, a.category,
   		a.release_date as releaseDate, a.owner_type as ownerType, 
   		a.owner_name as ownerName,
@@ -1071,12 +1082,18 @@
   	from achievement a 
   	left join user u on u.id = a.owner_id
   	where a.deleted_sign = 0 
+  	and fieldA = #{fieldA,jdbcType=INTEGER} 
+  	and dataCategory = #{dataCategory,jdbcType=INTEGER}
+  	and category = #{category,jdbcType=INTEGER}
   	<if test="keyword != null">
   		and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
   	</if>
   	<if test="category != null">
   		and a.category = #{category,jdbcType=INTEGER}
   	</if>
+  	<if test="dataCategory != null">
+  		and a.dataCategory = #{dataCategory,jdbcType=INTEGER}
+  	</if>
   	<if test="bargainingMode != null">
   		and a.bargaining_mode = #{bargainingMode,jdbcType=INTEGER}
   	</if>
@@ -1426,4 +1443,50 @@
 		a.create_time asc
 	limit 5;
   </select>
+  <select id="findBoutiqueListByPage" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.BoutiqueListBo">
+  	select 
+		a.id ,
+		a.name,
+		a.transfer_price as price,
+		a.summary as sketch,
+		a.technical_picture_url as pictureUrl,
+		b.name as industryCatalog,
+		a.owner_name as personName
+	from 
+		achievement a 
+	left join 
+		field_glossory b 
+	on 
+		a.field_a = b.id 	
+	where 
+		a.boutique = 1  and a.audit_status = 3 and a.field_a = #{industryCategory,jdbcType=INTEGER}
+	<if test="dataCategory != null and dataCategory != ''">
+		and data_category = #{dataCategory,jdbcType=INTEGER}
+	</if>
+	<if test="category != null and category != ''">
+		and category = #{category,jdbcType=INTEGER}
+	</if>
+	order by a.create_time desc
+	<if test="page_sql!=null">
+		${page_sql}
+	</if>
+  </select>
+  <select id="findBoutiqueCount" parameterType="java.lang.String" resultType="java.lang.Integer">
+  	select 
+  		count(0)
+  	from 
+		achievement a 
+	left join 
+		field_glossory b 
+	on 
+		a.field_a = b.id 
+	where 
+		a.boutique = 1  and a.audit_status = 3 and a.field_a = #{industryCategory,jdbcType=INTEGER}
+	<if test="dataCategory != null and dataCategory != ''">
+		and data_category = #{dataCategory,jdbcType=INTEGER}
+	</if>
+	<if test="category != null and category != ''">
+		and category = #{category,jdbcType=INTEGER}
+	</if>	
+  </select>
 </mapper>

+ 52 - 7
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -39,6 +39,7 @@
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
     <result column="audit_status" property="auditStatus" jdbcType="INTEGER" />
     <result column="tech_broker_id" property="techBrokerId" jdbcType="VARCHAR" />
+    <result column="boutique" property="boutique" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, serial_number, data_category, name, keyword, info_sources, industry_category_a, 
@@ -47,7 +48,7 @@
     fixed_scheme, cost_escrow, budget_cost, validity_period, employer_id, employer_name, 
     employer_address, employer_contacts, employer_contacts_mobile, employer_contacts_mailbox, 
     contacts, status, release_status, release_date, create_time, principal_id, deleted_sign,
-    audit_status, tech_broker_id
+    audit_status, tech_broker_id,boutique
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -71,7 +72,7 @@
       employer_address, employer_contacts, employer_contacts_mobile, 
       employer_contacts_mailbox, contacts, status, 
       release_status, release_date, create_time, 
-      principal_id, deleted_sign, audit_status, tech_broker_id)
+      principal_id, deleted_sign, audit_status, tech_broker_id,boutique)
     values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER}, 
       #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{infoSources,jdbcType=INTEGER}, 
       #{industryCategoryA,jdbcType=INTEGER}, #{industryCategoryB,jdbcType=INTEGER}, #{industryCategoryC,jdbcType=INTEGER}, 
@@ -84,7 +85,7 @@
       #{employerContactsMailbox,jdbcType=VARCHAR}, #{contacts,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
       #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, 
       #{principalId,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER},
-      #{techBrokerId,jdbcType=VARCHAR})
+      #{techBrokerId,jdbcType=VARCHAR},#{boutique,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Demand" >
     insert into demand
@@ -200,6 +201,9 @@
       <if test="techBrokerId != null" >
         tech_broker_id,
       </if>
+      <if test="boutique != null" >
+        boutique,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -313,6 +317,9 @@
       <if test="techBrokerId != null" >
         #{techBrokerId,jdbcType=VARCHAR},
       </if>
+      <if test="boutique != null" >
+        #{boutique,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Demand" >
@@ -426,6 +433,9 @@
       <if test="techBrokerId != null" >
         tech_broker_id = #{techBrokerId,jdbcType=VARCHAR},
       </if>
+      <if test="boutique != null">
+      	boutique = #{boutique,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -466,7 +476,8 @@
       principal_id = #{principalId,jdbcType=VARCHAR},
       deleted_sign = #{deletedSign,jdbcType=INTEGER},
       audit_status = #{auditStatus,jdbcType=INTEGER},
-      tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
+      tech_broker_id = #{techBrokerId,jdbcType=VARCHAR},
+      boutique = #{boutique,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -615,7 +626,7 @@
 	  d.employer_name as employerName, oi.licence_province as province, d.status, 
 	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,
 	  d.employer_id as employerId, d.audit_status as auditStatus,
-	  d.tech_broker_id as techBrokerId
+	  d.tech_broker_id as techBrokerId,d.boutique
 	from  demand d 
 	LEFT JOIN organization_identity oi on d.employer_id = oi.uid
 	LEFT JOIN admin a on a.id = d.tech_broker_id
@@ -790,7 +801,7 @@
   		oi.postal_address as address, u.email as mailbox,  d.contacts, d.audit_status as auditStatus,
   		d.tech_broker_id as techBrokerId,
   		d.employer_address as employerAddress, d.employer_contacts_mobile as employerContactsMobile,
-  		d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName
+  		d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName,d.boutique
   	from demand d 
   	left join organization_identity oi on oi.uid = d.employer_id
   	left join user u on u.id = d.employer_id
@@ -1156,5 +1167,39 @@
   	where id = #{id,jdbcType=VARCHAR}
   </update>
   
-    
+  <select id="findBoutiqueListByPage" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.BoutiqueListBo">
+   	select 
+   		a.id,a.name,
+   		b.name as industryCategory,
+   		a.picture_url as pictureUrl,
+   		a.problem_des as sketch,
+   		a.employer_name as personName
+	from 
+		demand a 
+	left join 
+		field_glossory b 
+	on 
+		a.industry_category_a = b.id
+	<!-- where 
+		a.boutique = 1 and a.audit_status =3 and a.industry_category_a = #{industryCategory,jdbcType=INTEGER} 
+	-->
+	order by 
+		a.create_time desc
+	<if test="page_sql!=null">
+		${page_sql}
+	</if>
+  </select>
+  <select id="findBoutiqueCount"  parameterType="java.lang.String" resultType="java.lang.Integer">
+  	select 
+  		count(1)
+  	from 
+		demand a 
+	left 
+		join field_glossory b 
+	on 
+		a.industry_category_a = b.id
+	<!-- where 
+		a.boutique = 1 and a.audit_status =3 and a.industry_category_a = #{industryCategory,jdbcType=INTEGER} 
+	-->
+  </select>
 </mapper>

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

@@ -285,6 +285,12 @@ public class Achievement {
      */
     private Integer jmrhFlag;
     
+
+    /**
+     *  是否属于精品 0 - 否	, 1 - 是
+     */
+    private Integer boutique;
+    
 	public String getId() {
 		return id;
 	}
@@ -744,10 +750,19 @@ public class Achievement {
 		return jmrhFlag;
 		
 	}
-
+	
 	public void setJmrhFlag(Integer jmrhFlag) {
 		this.jmrhFlag = jmrhFlag;
 	}
+	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getBoutique() {
+		return boutique;
+	}
+
+	public void setBoutique(Integer boutique) {
+		this.boutique = boutique;
+	}
 
 	public String getReleaseDateFormattedDate() {
 		if (this.releaseDate == null) {

+ 14 - 1
src/main/java/com/goafanti/common/model/Demand.java

@@ -109,6 +109,11 @@ public class Demand {
     * 费用托管
     */
     private BigDecimal costEscrow;
+    
+    /**
+     * 精品需求
+     */
+     private Integer boutique;
 
     /**
     * 预算费用
@@ -357,8 +362,16 @@ public class Demand {
     public void setCostEscrow(BigDecimal costEscrow) {
         this.costEscrow = costEscrow;
     }
+    
+	public Integer getBoutique() {
+		return boutique;
+	}
+
+	public void setBoutique(Integer boutique) {
+		this.boutique = boutique;
+	}
 
-    public BigDecimal getBudgetCost() {
+	public BigDecimal getBudgetCost() {
         return budgetCost;
     }
 

+ 2 - 1
src/main/java/com/goafanti/demand/bo/DemandManageDetailBo.java

@@ -49,6 +49,8 @@ public class DemandManageDetailBo extends DemandManageListBo {
 
 	private String		employerContactsMailbox;
 
+	
+	
 	public String getEmployerAddress() {
 		return employerAddress;
 	}
@@ -217,5 +219,4 @@ public class DemandManageDetailBo extends DemandManageListBo {
 	public void setMailbox(String mailbox) {
 		this.mailbox = mailbox;
 	}
-
 }

+ 12 - 0
src/main/java/com/goafanti/demand/bo/DemandManageListBo.java

@@ -17,6 +17,10 @@ public class DemandManageListBo extends DemandListBo {
 	private Integer	province;
 
 	/**
+	 * 是否属于精品  0- 否 1-是
+	 */
+	private Integer boutique;
+	/**
 	 * 负责人(营销员)
 	 */
 	private String	principalId;
@@ -74,5 +78,13 @@ public class DemandManageListBo extends DemandListBo {
 	public void setPrincipalId(String principalId) {
 		this.principalId = principalId;
 	}
+	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getBoutique() {
+		return boutique;
+	}
 
+	public void setBoutique(Integer boutique) {
+		this.boutique = boutique;
+	}
 }

+ 11 - 0
src/main/java/com/goafanti/demand/bo/InputDemand.java

@@ -129,6 +129,10 @@ public class InputDemand {
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		techBrokerId;
 
+	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer boutique;
+	
 	public String getId() {
 		return id;
 	}
@@ -409,4 +413,11 @@ public class InputDemand {
 		this.techBrokerId = techBrokerId;
 	}
 
+	public Integer getBoutique() {
+		return boutique;
+	}
+
+	public void setBoutique(Integer boutique) {
+		this.boutique = boutique;
+	}
 }

+ 3 - 1
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -11,6 +11,7 @@ import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
+import com.goafanti.portal.bo.BoutiqueListBo;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
 import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
@@ -74,5 +75,6 @@ public interface DemandService {
 
 	Demand selectDemandDetail(String id);
 
-
+	/** 精品需求 **/
+	Pagination<BoutiqueListBo> boutiqueSearchList(Integer industryCategoryA,Integer pNo, Integer pSize);
 }

+ 9 - 1
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -55,6 +55,7 @@ import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.portal.bo.BoutiqueListBo;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
 import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
@@ -82,7 +83,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	private UserIdentityMapper				userIdentityMapper;
 	@Autowired
 	private OrganizationIdentityMapper		organizationIdentityMapper;
-
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<DemandManageListBo> selectUserDemandManageList(String employerName, Integer auditStatus,
@@ -727,4 +727,12 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return demandMapper.selectByPrimaryKey(id);
 	}
 
+	@Override
+	public Pagination<BoutiqueListBo> boutiqueSearchList(Integer industryCategoryA, Integer pNo, Integer pSize) {
+		Map<String, Object> params = new HashMap<>();
+		if(null != industryCategoryA) params.put("industryCategoryA", industryCategoryA);
+		return (Pagination<BoutiqueListBo>)findPage("findBoutiqueListByPage","findBoutiqueCount",
+				params,pNo,pSize);
+	}
+
 }

+ 14 - 0
src/main/java/com/goafanti/portal/bo/AchievementSearchListBo.java

@@ -86,6 +86,11 @@ public class AchievementSearchListBo {
 	 * 用户等级
 	 */
 	private Integer		level;
+	
+	/**
+	 * 图片链接
+	 */
+	private String		technicalPictureUrl;
 
 	public Integer getLevel() {
 		return level;
@@ -187,6 +192,15 @@ public class AchievementSearchListBo {
 	public void setFieldA(Integer fieldA) {
 		this.fieldA = fieldA;
 	}
+	
+	@JsonFormat(shape = Shape.STRING)
+	public String getTechnicalPictureUrl() {
+		return technicalPictureUrl;
+	}
+
+	public void setTechnicalPictureUrl(String technicalPictureUrl) {
+		this.technicalPictureUrl = technicalPictureUrl;
+	}
 
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getFieldB() {

+ 37 - 3
src/main/java/com/goafanti/portal/controller/PortalSearchController.java

@@ -38,7 +38,7 @@ public class PortalSearchController extends BaseController {
 	@RequestMapping(value = "/achievementList", method = RequestMethod.GET)
 	public Result achievementSearchList(Integer bargainingMode, Integer category, Integer maturity,
 			BigDecimal transferPriceLower, BigDecimal transferPriceUpper, Integer transferMode, String keyword,
-			Integer fieldA, Integer fieldB, String pageNo, String pageSize) {
+			Integer fieldA, Integer fieldB, String pageNo, String pageSize,String technicalPictureUrl) {
 		Result res = new Result();
 		Integer pNo = 1;
 		Integer pSize = 20;
@@ -49,7 +49,7 @@ public class PortalSearchController extends BaseController {
 			pNo = Integer.parseInt(pageNo);
 		}
 		res.setData(achievementService.listAchievementSearchList(bargainingMode, category, maturity, transferPriceLower,
-				transferPriceUpper, transferMode, keyword, fieldA, fieldB, pNo, pSize));
+				transferPriceUpper, transferMode, keyword, fieldA, fieldB, pNo, pSize,technicalPictureUrl));
 		return res;
 	}
 
@@ -122,5 +122,39 @@ public class PortalSearchController extends BaseController {
 		}
 		return res;
 	}
-
+	
+	/**
+	 * 
+	 * @param boutiqueType 0 - 专利 , 1 - 技术, 2 - 成果
+	 * @param industryCatalog 行业类别
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	@RequestMapping(value="/boutiqueSearchList",method = RequestMethod.POST)
+	public Result boutiqueSearchList(Integer boutiqueType, Integer industryCatalog,String pageNo, String pageSize){
+		Result res = new Result();
+		if(null == industryCatalog){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "精品类型"));
+		}
+		if(null == industryCatalog){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","行业类别"));
+		}
+		Integer pNo = 1;
+		Integer pSize = 9;
+		if (StringUtils.isNumeric(pageSize)) {
+			pSize = Integer.parseInt(pageSize);
+		}
+		if (StringUtils.isNumeric(pageNo)) {
+			pNo = Integer.parseInt(pageNo);
+		}
+		if(boutiqueType == 0){
+			res.setData(achievementService.boutiqueSearchList(null, 0, industryCatalog, pNo, pSize));
+		}else if(boutiqueType == 1){
+			res.setData(achievementService.boutiqueSearchList(1, null, industryCatalog, pNo, pSize));
+		}else if(boutiqueType == 2){
+			res.setData(demandService.boutiqueSearchList(industryCatalog, pNo, pSize));
+		}
+		return res;
+	}
 }

+ 4 - 2
src/main/resources/applicationContext.xml

@@ -6,9 +6,11 @@
 	 http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
 	 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
 
-	<context:property-placeholder
-		location="classpath:props/config_${spring.profiles.active}.properties" />
+<!-- 	<context:property-placeholder
+		location="classpath:props/config_${spring.profiles.active}.properties" /> -->
 
+<context:property-placeholder
+		location="classpath:props/config_local.properties" />
 	<!-- Resources -->
 	<bean id="errorResource"
 		class="org.springframework.core.io.support.ResourcePropertySource">

+ 1 - 4
src/main/resources/spring/spring-shiro.xml

@@ -140,7 +140,6 @@
 		<property name="loginUrl" value="/user/login" />
 		<property name="successUrl" value="/" />
 		<property name="unauthorizedUrl" value="/user/login" />
-
 		<property name="filterChainDefinitions" value="#{shiroManager.loadFilterChainDefinitions()}" />
 		<property name="filters">
 			<util:map>
@@ -162,6 +161,4 @@
 	</bean>
 	<!-- -->
 	<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor" />
-
-</beans>
-
+</beans>

+ 8 - 4
src/main/webapp/WEB-INF/views/common.html

@@ -31,8 +31,12 @@
   						<a th:href="${basePath + '/portal/service/serviceIndex.html'}">科技服务</a>
   						<img th:src="${portalHost+'/img/hot.png'}"/>
   					</li>
-  					<li><a href="#">技术交易</a></li>
-  					<li><a href="#">智库咨询</a></li>
+  					<li>
+  						<a th:href="${basePath + '/portal/technologyTrading/index.html'}">技术交易</a>
+  					</li>
+  					<li>
+  						<a th:href="${basePath + '/portal/thinkTank/index.html'}">智库咨询</a>
+  					</li>
   					<li><a href="#">科技金融</a></li>
   					<li><a href="#">科技活动</a></li>
   					<li><a href="#">平台共建</a></li> 					
@@ -249,12 +253,12 @@
 					<form id="form_login">
 						<div class="login_uesr">
 							<label for="uesname"><img th:src="${portalHost+'/img/login_use.png'}" /></label> <input
-								type="text" name="mobile" id="Lo_user" value="用户名/邮箱/手机" /> <img
+								type="text" name="mobile" id="Lo_user" placeholder="用户名/邮箱/手机" /> <img
 								th:src="${portalHost+'/img/login_del.png'}" class="log_del" />
 						</div>
 						<div class="login_pass">
 							<label for="pass"><img th:src="${portalHost+'/img/login_password.png'}" /></label>
-							<input type="text" name="password" id="Lo_pass" value="请输入密码" />
+							<input type="text" name="password" id="Lo_pass" placeholder="请输入密码" />
 						</div>
 						<div class="login_check">
 							 <label for="checks" class="lab_check"> 

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

@@ -285,9 +285,6 @@
 	</div>
 	<footer>
 		<div th:replace="common::copyright"></div>
-		<!-- <div th:replace="common::copyright(~{::img})">
-			<img alt="" th:src="${portalHost + '/img/bottom1_02.jpg'}">
-		</div> -->
 		<div th:replace="common::login"></div>
 	</footer>
 	<div class="smg"><input type="text" name="msg" value="" id="msg"/></div>

File diff suppressed because it is too large
+ 151 - 119
src/main/webapp/WEB-INF/views/portal/technologyTrading/index.html