Browse Source

Merge branch 'master' of https://git.coding.net/aft/AFT.git

Conflicts:
	src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml
Michael 8 years ago
parent
commit
a64062279c

+ 30 - 0
src/main/java/com/goafanti/achievement/controller/AdminAchievementApiController.java

@@ -526,6 +526,36 @@ public class AdminAchievementApiController extends CertifyApiController {
             res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到合作方式", "合作方式"));
             return res;
         }
+        if (null == ia.getMaturity()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成熟度", "成熟度"));
+            return res;
+        }
+        if (null == ia.getInnovation()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到创新度", "创新度"));
+            return res;
+        }
+        if (null == ia.getBargainingMode()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到议价方式", "议价方式"));
+            return res;
+        }
+        if (null == ia.getOwnerName()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果所有人", "成果所有人"));
+            return res;
+        }
+        if (null == ia.getBreakthrough()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到技术突破", "技术突破"));
+            return res;
+        }
+        if (null == ia.getPatentCase()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到专利情况", "专利情况"));
+            return res;
+        }if (null == ia.getParameter()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到技术参数", "技术参数"));
+            return res;
+        }if (null == ia.getTechnicalPictureUrl()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到上传图片", "上传图片"));
+            return res;
+        }
         for (int i = 0; i < keywords.length; i++) {
             if (AFTConstants.KEYWORDLENTH < keywords[i].length()) {
                 res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "关键词长度"));

+ 1 - 0
src/main/java/com/goafanti/achievement/service/impl/AchievementInterestServiceImpl.java

@@ -95,6 +95,7 @@ public class AchievementInterestServiceImpl extends BaseMybatisDao<AchievementIn
 	@Override
 	public String saveInterest(String uid,Integer type,String objectId,String interest) {
 		int i=0; 
+		
 		if (type==InterestType.POLICY.getCode()) {
 			NewsInterest n=new NewsInterest();
 			n.setId(UUID.randomUUID().toString());

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

@@ -184,7 +184,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 					up=userMapper.findPersonalCustomerDetail(ownerId);
 				}
 			}
-		}
+		} 
 		a.setCreateTime(now.getTime());
 		a.setOwnerType(ownerType);
 		a.setOwnerMobile(ownerMobile);

+ 4 - 4
src/main/java/com/goafanti/app/controller/AppUserController.java

@@ -526,11 +526,11 @@ public class AppUserController extends BaseApiController {
     public Result uploadPicture(HttpServletRequest req, String sign) {
         Result res = new Result();
         AttachmentType attachmentType = AttachmentType.getField(sign);
-        if (attachmentType == AttachmentType.ACHIEVEMENT_TECHNICAL_PICTURE
-                || attachmentType == AttachmentType.ACHIEVEMENT_MATURITY_PICTURE
-                || attachmentType == AttachmentType.ACHIEVEMENT_COVER_PICTURE) {
+        if (attachmentType == AttachmentType.ACHIEVEMENT_TECHNICAL_PICTURE) {
             res.setData(handleFiles(res, "/achievement/", false, req, sign, "achievement"));
-        } else {
+        } else if (attachmentType==AttachmentType.DEMAND_PICTURE){
+        	 res.setData(handleFiles(res, "/demand/", false, req, sign, "demand"));
+        }else {
             res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
         }
         return res;

+ 0 - 1
src/main/java/com/goafanti/app/controller/OpenAppServiceController.java

@@ -61,7 +61,6 @@ public class OpenAppServiceController extends BaseApiController {
 			return res;
 		}
 		res.setData(businessProjectService.getBusinessProject(id,pNo, pSize));
-		//res.setData(new Pagination<ProjectBo>());
 		return res;
 	}
 	/**

+ 1 - 1
src/main/java/com/goafanti/business/controller/AdminVarietiesApiController.java

@@ -17,7 +17,7 @@ import com.goafanti.common.dao.BusinessVarietiesMapper;
 import com.goafanti.common.enums.AttachmentType;
 import com.goafanti.common.utils.StringUtils;
 @RestController
-@RequestMapping("/open/api/admin/Varieties")
+@RequestMapping("/api/admin/Varieties")
 public class AdminVarietiesApiController extends CertifyApiController{
 	@Resource
 	private BusinessVarietiesService businessVarietiesService;

+ 3 - 1
src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java

@@ -151,7 +151,9 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 	@Override
 	public ProjectDetailBo orgProject(String id) {
 		ProjectDetailBo pd=businessProjectMapper.selectAppProjectDetail(id);
-		if (TokenManager.isLogin()&&projectInterestMapper.checkUidAndDid(id,TokenManager.getUserId())>0) {
+		int i=projectInterestMapper.checkUidAndDid(id,TokenManager.getUserId());
+		
+		if (TokenManager.isLogin()&&i>0) {
 			pd.setInterest("1");
 		}else {
 			pd.setInterest("0");

+ 6 - 4
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1763,13 +1763,15 @@
   	</select>
   	
   	 <select id="findMyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
-  	select 
+  	  
+  select 
 	  a.id, a.boutique,a.name,a.category, a.audit_status as auditStatus,ifnull(t.x,0) as buyIntention,
 	  a.release_date as releaseDate,ifnull(i.y,0) as countInterest
 	from  achievement a 
-	left join (select count(0) as x,commodity_id from t_order
-				where order_status != 4
-				group by  commodity_id ) t on a.id=t.commodity_id 
+	left join (select count(0) as x, tl.commodity_id from t_order tr
+				left join t_order_detail tl on tr.order_no=tl.order_no
+				where tr.order_status != 4
+				group by  tl.commodity_id ) t on a.id=t.commodity_id 
 	left join (select count(0) as y,achievement_id from achievement_interest
 				group by achievement_id ) i on a.id=i.achievement_id	
 	where a.deleted_sign = 0

+ 6 - 4
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -1535,13 +1535,15 @@
   </select>
   
   <select id="findAppMyDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandListBo">
-  			select 
+  		
+	select 
 	  d.id, d.boutique,d.name, d.audit_status as auditStatus,ifnull(t.x,0) as orderCount,
 	  d.release_date as releaseDate,ifnull(i.y,0) as countInterest
 	from  demand d 
-	left join (select count(0) as x,commodity_id from t_order
-				where order_status != 4 and order_status != 0
-				group by  commodity_id ) t on d.id=t.commodity_id
+	left join (select count(0) as x,tl.commodity_id from t_order tr
+				left join t_order_detail tl on tl.order_no=tr.order_no
+				where tr.order_status != 4 and tr.order_status != 0
+				group by  tl.commodity_id ) t on d.id=t.commodity_id
 	left join (select count(0) as y,demand_id from demand_interest
 				group by demand_id ) i on d.id=i.demand_id	
 	where d.deleted_sign = 0 

+ 9 - 7
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -126,7 +126,8 @@
     opposite_id_url, province, city, area, contact_mobile, bank_name, bank_account, bank_card_number, 
     amount_money, audit_status, process, wrong_count, payment_date, expert, celebrity, 
     international, fixed_tel, qq, postal_address, postcode, review_instructions, industry, 
-    contacts, email, professional_title, work_unit, education, major_category, qualification, 
+    contacts, email, professional_title, work_unit, education, major_category, qualification,
+    graduate_school, consultation_price 
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultMap="BaseResultMap">
     <!--
@@ -1011,14 +1012,15 @@
 		limit 0,6	
 	</select> 
 	 <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
-	 	select 	t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
+	 	  select 	t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
 			t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
 	from user_identity t left JOIN user u on t.uid = u.id
 	left join jpush_easemob_account j on t.uid=j.uid
 	left join (select count(0) as x,seller_id from t_order
 				where order_status != 4
 				group by  seller_id ) o on t.uid=o.seller_id
-	where t.uid=#{uid,jdbcType=VARCHAR}
+	where t.expert=1
+	and t.uid=#{uid,jdbcType=VARCHAR}
 	 </select>
 	 
  <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
@@ -1059,14 +1061,14 @@
   
   <select id="findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo">
 	 select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
-	  t.consultant,ifnull(x.n,0) as reservationCount
+	  t.expert as consultant,t.celebrity,ifnull(x.n,0) as reservationCount
 	  from user_identity t
 	  left join `user` u on t.uid=u.id
 	  left join ( select y.x  as n, y.seller_id
 	from (select count( 0 ) as x,seller_id from t_order
 			where order_status != 4
 			group by seller_id)y)x on t.uid=x.seller_id 
-  where t.celebrity=1
+  where t.expert=2
    <if test="page_sql!=null">
 			${page_sql}
 	</if>
@@ -1076,7 +1078,7 @@
    	select count(0) 
   from user_identity t
   left join `user` u on t.uid=u.id
-  where t.consultant=1
+  where t.expert=2
   </select>
   
   
@@ -1090,7 +1092,7 @@
   	left join (select count(0) as x,seller_id from t_order
 				where order_status != 4
 				group by  seller_id ) o on t.uid=o.seller_id
-  	where t.celebrity = 1
+  	where t.expert=2
   	and t.uid = #{uid,jdbcType=VARCHAR}
   </select>
 </mapper>

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

@@ -158,6 +158,9 @@ public class PortalNewsController extends BaseController {
 	@RequestMapping(value = "/portal/news/appCognizance", method = RequestMethod.GET)
 	public ModelAndView appCognizance(HttpServletRequest request, ModelAndView modelview,String id) {
 		ProjectDetailBo bo = businessProjectService.orgProject(id);
+		bo.setIntroduce(bo.getIntroduce().replace("\n", "</br>"));
+		bo.setValueEffect(bo.getValueEffect().replace("\n", "</br>"));
+		bo.setClientSize(bo.getClientSize().replace("\n", "</br>"));
 		modelview.addObject("bo", bo);
 		modelview.setViewName("/portal/news/appCognizance");
 		return modelview;

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

@@ -21,14 +21,14 @@
 					<h3><img th:src="${portalHost + '/img/appCognizance02.jpg'}"  alt="" /><span>项目描述</span></h3>
 					<hr>
 					<div class="promiseText" id="describe">
-						<p th:text="${bo.introduce}">
+						<p th:utext="${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}">
+						<p th:utext="${bo.valueEffect}">
 					</div>
 				</div>
 				<div class="service servicebj">