Browse Source

品类下项目显示BUG修复

anderx 8 years ago
parent
commit
8ef63aa6e4

+ 3 - 0
src/main/java/com/goafanti/app/bo/ProjectBo.java

@@ -50,6 +50,9 @@ public class ProjectBo {
 	}
 
 	public String getInterestCount() {
+		if (StringUtils.isBlank(interestCount)) {
+			return "20"; 
+		}
 		return String.valueOf(Integer.valueOf(interestCount)+20);
 
 

+ 6 - 1
src/main/java/com/goafanti/app/controller/AppServiceController.java

@@ -4,7 +4,10 @@ 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.alibaba.fastjson.JSONObject;
 import com.goafanti.admin.service.AdminService;
+import com.goafanti.app.bo.ProjectBo;
 import com.goafanti.app.bo.ServiceImages;
 import com.goafanti.business.service.BusinessVarietiesService;
 import com.goafanti.business.service.BusinessProjectService;
@@ -12,11 +15,12 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.utils.StringUtils;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.user.service.UserIdentityService;
 
 
 @RestController
-@RequestMapping(path = "/app/service", method = RequestMethod.GET)
+@RequestMapping(path = "/open/app/service", method = RequestMethod.GET)
 public class AppServiceController extends BaseApiController {
 	@Resource
 	private BusinessVarietiesService	adminVarietiesService;
@@ -57,6 +61,7 @@ public class AppServiceController extends BaseApiController {
 			return res;
 		}
 		res.setData(businessProjectService.getBusinessProject(id,pNo, pSize));
+		//res.setData(new Pagination<ProjectBo>());
 		return res;
 	}
 	/**

+ 4 - 2
src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java

@@ -381,9 +381,11 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 		if (StringUtils.isNotBlank(id)) {
 			params.put("id", id);
 		}
-		Pagination<ProjectBo> p=(Pagination<ProjectBo>)findPage("getBusinessProject", "getBusinessProjectCount",
+		
+		Pagination<ProjectBo> data =  (Pagination<ProjectBo>)findPage("getBusinessProject", "getBusinessProjectCount",
 				params,pNo,pSize);
-		return p;
+		return data;
+		
 	}
 	@SuppressWarnings("unchecked")
 	@Override