Parcourir la source

网站BUG修复与优化

anderx il y a 7 ans
Parent
commit
511385e99f

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

@@ -90,15 +90,11 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 		if (pageNo == null || pageNo < 0) {
 			pageNo = 1;
 		}
-
 		if (pageSize == null || pageSize < 0 ) {
 			pageSize = 10;
 		} 
-		
-		
-		
 		Map<String, Object> params=disposeParams(topId, secondId, name);
-if(auditStatus!=null ) {
+		if(auditStatus!=null ) {
 			params.put("auditStatus", auditStatus);
 		}
 		if(privateProject!=null && privateProject ==0)

+ 42 - 0
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -400,6 +400,48 @@ public class WebpageController extends BaseController {
 	}
 	
 	
+	/*
+	 * 服务详情2
+	 * 
+	 * @param id String
+	 * */
+	@RequestMapping(value = "/portal/service/patentDetail", method = RequestMethod.GET)
+	public ModelAndView portalServicePatentDetail(HttpServletRequest request, ModelAndView modelview,String id) {
+	modelview.setViewName("/portal/service/serviceDetails");
+	JtBusinessProject jtBusinessProject=jtBusinessService.getBusinessProjectDetail(id);
+	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());
+		if(user!=null && user.getIdentifyName()!=null) {
+			owner=user.getIdentifyName();
+		}
+	}
+	modelview.addObject("owner",owner);
+	modelview.addObject("pj",jtBusinessProject);
+	System.out.println(jtBusinessProject.toString());
+	if(jtBusinessProject!=null) {
+	JtBusinessCategoryTree tree=jtBusinessService.getCategoryTree(jtBusinessProject.getCategoryId());
+	modelview.addObject("tree",tree);}
+	JtBusinessCategory jtBusinessCategory=jtBusinessService.getCategoryById(jtBusinessProject.getCategoryId());
+	if(jtBusinessCategory!=null && jtBusinessCategory.getModule()!=null)modelview.addObject("module",jtBusinessCategory.getModule());
+	else modelview.addObject("module",0);
+	
+	//是否关注
+	if(StringUtils.isNotBlank(TokenManager.getUserId())) {
+		int projectInterest=projectInterestMapper.checkUidAndDid(id, TokenManager.getUserId());
+		if(projectInterest>0)modelview.addObject("interested",true);
+	}
+	return modelview;
+	}
+	
+	
 	@RequestMapping(value="/portal/service/serviceList",method=RequestMethod.GET)
 	public ModelAndView serviceList(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/service/serviceList");

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

@@ -650,7 +650,7 @@
   and jtbp.audit_status=#{auditStatus,jdbcType=INTEGER}
   </if>
   <if test="orderType!=null and orderType==0">
-  order by release_date desc
+  order by release_date 
   </if>
   <if test="orderType!=null and orderType==1">
   order by jtbp.price
@@ -659,7 +659,8 @@
   order by dct.dealCount
   </if>
   <if test="orderSort!=null and orderSort==0">
-   desc</if>
+   desc
+   </if>
   	<if test="page_sql!=null">
 		${page_sql}
 	</if>

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/patent.html


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/service/patenteDetails.html


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/service/serviceDetails.html