Procházet zdrojové kódy

修改密码,成果需求列表,服务首页修改

liliang4869 před 7 roky
rodič
revize
dd6e37d8d6

+ 36 - 36
src/main/java/com/goafanti/business/controller/JtBusinessController.java

@@ -1,36 +1,36 @@
-package com.goafanti.business.controller;
-
-import java.util.List;
-
-import javax.annotation.Resource;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.business.service.JtBusinessService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.controller.CertifyApiController;
-
-@RestController
-@RequestMapping(value = "/portal/service")
-public class JtBusinessController extends CertifyApiController {
-	@Resource 
-	private JtBusinessService jtBusinessService;
-	
-	@RequestMapping(value = "/jtBusiness/getCategoryList" , method = RequestMethod.GET)
-	public Result getCategoryList() {
-		Result result=new Result();
-result.setData(jtBusinessService.getCategoryBoList());
-		return result;
-	}
-	
-	
-	@RequestMapping(value="/jtProject/list", method=RequestMethod.GET)
-	public Result getProjectList(String topId,String secondId,String name,Integer pageSize,Integer pageNo) {
-		Result result=new Result();
-		result.setData(jtBusinessService.getProjects(topId,secondId,name,pageSize,pageNo));
-		return result;
-	}
-	
-}
+package com.goafanti.business.controller;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.business.service.JtBusinessService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.controller.CertifyApiController;
+
+@RestController
+@RequestMapping(value = "/portal/service")
+public class JtBusinessController extends CertifyApiController {
+	@Resource 
+	private JtBusinessService jtBusinessService;
+	
+	@RequestMapping(value = "/jtBusiness/getCategoryList" , method = RequestMethod.GET)
+	public Result getCategoryList() {
+		Result result=new Result();
+result.setData(jtBusinessService.getCategoryBoList());
+		return result;
+	}
+	
+	
+	@RequestMapping(value="/jtProject/list", method=RequestMethod.GET)
+	public Result getProjectList(String topId,String secondId,String name,Integer pageSize,Integer pageNo,Integer privateProject) {
+		Result result=new Result();
+		result.setData(jtBusinessService.getProjects(topId,secondId,name,pageSize,pageNo,privateProject));
+		return result;
+	}
+	
+}

+ 27 - 27
src/main/java/com/goafanti/business/service/JtBusinessService.java

@@ -1,27 +1,27 @@
-package com.goafanti.business.service;
-
-import java.util.List;
-
-import com.goafanti.business.bo.JtBusinessCategoryBo;
-import com.goafanti.business.bo.JtBusinessCategoryTree;
-import com.goafanti.common.model.JtBusinessCategory;
-import com.goafanti.common.model.JtBusinessProject;
-import com.goafanti.core.mybatis.page.Pagination;
-
-public interface JtBusinessService {
-JtBusinessCategory getBusinessCategoryByLayerAndName(Integer layer,String name);
-List<JtBusinessCategory> getBusinessCategoryBySuperId(String id,Integer size);
-List<JtBusinessProject>getBusinessProjectByCategoryId(String id,Integer size);
-JtBusinessProject getBusinessProjectDetail(String id);
-JtBusinessCategoryTree getCategoryTree(String id);
-List<JtBusinessCategoryBo>getCategoryBoList();
-Pagination<JtBusinessProject>getProjects(String topId,String secondId,String name,Integer pageSize,Integer pageNo); 
-int insertCategory(JtBusinessCategory jtBusinessCategory);
-int deleteCategoryById(String id);
-JtBusinessCategory getCategoryById(String id);
-int updateCategory(JtBusinessCategory jtBusinessCategory);
-int insertProject(JtBusinessProject jtBusinessProject);
-int deleteProjectById(String id);
-int updateProject(JtBusinessProject jtBusinessProject);
-List<JtBusinessProject>getProjectsLimit(Integer size);
-}
+package com.goafanti.business.service;
+
+import java.util.List;
+
+import com.goafanti.business.bo.JtBusinessCategoryBo;
+import com.goafanti.business.bo.JtBusinessCategoryTree;
+import com.goafanti.common.model.JtBusinessCategory;
+import com.goafanti.common.model.JtBusinessProject;
+import com.goafanti.core.mybatis.page.Pagination;
+
+public interface JtBusinessService {
+JtBusinessCategory getBusinessCategoryByLayerAndName(Integer layer,String name);
+List<JtBusinessCategory> getBusinessCategoryBySuperId(String id,Integer size);
+List<JtBusinessProject>getBusinessProjectByCategoryId(String id,Integer size);
+JtBusinessProject getBusinessProjectDetail(String id);
+JtBusinessCategoryTree getCategoryTree(String id);
+List<JtBusinessCategoryBo>getCategoryBoList();
+Pagination<JtBusinessProject>getProjects(String topId,String secondId,String name,Integer pageSize,Integer pageNo,Integer privateProject); 
+int insertCategory(JtBusinessCategory jtBusinessCategory);
+int deleteCategoryById(String id);
+JtBusinessCategory getCategoryById(String id);
+int updateCategory(JtBusinessCategory jtBusinessCategory);
+int insertProject(JtBusinessProject jtBusinessProject);
+int deleteProjectById(String id);
+int updateProject(JtBusinessProject jtBusinessProject);
+List<JtBusinessProject>getProjectsLimit(Integer size);
+}

+ 2 - 1
src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java

@@ -65,7 +65,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<JtBusinessProject> getProjects(String topId, String secondId, String name, Integer pageSize,
-			Integer pageNo) {
+			Integer pageNo,Integer privateProject) {
 		// TODO Auto-generated method stub
 		if (pageNo == null || pageNo < 0) {
 			pageNo = 1;
@@ -75,6 +75,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 			pageSize = 10;
 		} 
 		Map<String, Object> params=disposeParams(topId, secondId, name);
+		if(privateProject!=null && privateProject ==0)
 		params.put("ownerId", TokenManager.getUserId());
 		
 		return (Pagination<JtBusinessProject>)findPage("findJtBusinessProjectByPage","findJtBusinessCountByPage",params,pageNo,pageSize);

+ 3 - 0
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -502,6 +502,9 @@ public class PublicController extends BaseController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "用户名"));
 			return res;
 		}
+		User user=userService.selectByNameAndType(userName, null);
+		user.setPassword(newPwd);
+		userService.updateByPrimaryKeySelective(user);
 		return res;
 		
 	}

+ 11 - 2
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -1,5 +1,6 @@
 package com.goafanti.common.controller;
 
+import java.util.Date;
 import java.util.List;
 
 import javax.annotation.Resource;
@@ -290,7 +291,7 @@ public class WebpageController extends BaseController {
 		{
 		List<JtBusinessProject>gaoqiList=jtBusinessService.getBusinessProjectByCategoryId(gaoqi2.getId(),6);
 		for(JtBusinessProject project:gaoqiList) {
-			if(project.getMinImgUrl()!=null && project.getMaxImgUrl().length()<=0)project.setMinImgUrl(null);
+			if(project.getMinImgUrl()!=null && project.getMinImgUrl().length()<=0)project.setMinImgUrl(null);
 		}
 		modelview.addObject("gaoqiList",gaoqiList); 
 		modelview.addObject("gqc1",gaoqi);}
@@ -341,6 +342,10 @@ public class WebpageController extends BaseController {
 	if(jtBusinessProject!=null) {
 		if(jtBusinessProject.getMaxImgUrl()!=null && jtBusinessProject.getMaxImgUrl().length()<=0)jtBusinessProject.setMaxImgUrl(null);
 	}
+	if(jtBusinessProject.getCreateTime()!=null && 7>=differentDaysByMillisecond(jtBusinessProject.getCreateTime(),new Date())) {
+		modelview.addObject("newly",true);
+	}
+	else modelview.addObject("newly",false);
 	String owner="平台管理员";
 	if(jtBusinessProject.getOwnerId()!=null) {
 		User user=userService.selectByPrimaryKey(jtBusinessProject.getOwnerId());
@@ -740,6 +745,10 @@ public class WebpageController extends BaseController {
 		
 	}
 	
-	
+	 public static int differentDaysByMillisecond(Date date1,Date date2)
+	    {
+	        int days = (int) ((date2.getTime() - date1.getTime()) / (1000*3600*24));
+	        return days;
+	    }
 
 }

+ 2 - 1
src/main/java/com/goafanti/common/mapper/JtBusinessProjectMapper.xml

@@ -501,7 +501,8 @@
   	name,
   	introduce
   	from 
-  	jt_business_project
+  	jt_business_project,
+  	min_img_url as minImgUrl
   	where 
   	category_id=#{0}
   	 order by create_time

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

@@ -222,7 +222,7 @@
 						<h3 th:text="${'什么是'+pj.name+'?'}"></h3>
 						<p th:text="${#strings.abbreviate(pj.introduce,90)}"></p>
 						</div>
-						<img th:src="${pj.maxImgUrl}==null?${portalHost+'/img/initPic/serviceInit.jpg'}:${avatarUploadHost+pj.maxImgUrl}" alt="" />
+						<img th:src="${pj.maxImgUrl}==null?${portalHost+'/img/indexNew25.jpg'}:${avatarUploadHost+pj.maxImgUrl}" alt="" />
 					</div>
 					<div class="indexServe_bot">
 						<div>认定好处</div>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceDetails.html


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/achievementList.html


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/demandList.html