|
@@ -1,6 +1,8 @@
|
|
|
package com.goafanti.app.controller;
|
|
package com.goafanti.app.controller;
|
|
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -11,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
-import com.goafanti.app.service.AppHomePageService;
|
|
|
|
|
|
|
+import com.goafanti.app.bo.HomeImgBo;
|
|
|
import com.goafanti.business.service.JtBusinessService;
|
|
import com.goafanti.business.service.JtBusinessService;
|
|
|
import com.goafanti.business.service.JtTagService;
|
|
import com.goafanti.business.service.JtTagService;
|
|
|
import com.goafanti.comment.bo.CommentResult;
|
|
import com.goafanti.comment.bo.CommentResult;
|
|
@@ -25,8 +27,7 @@ import com.goafanti.common.utils.StringUtils;
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping(path = "/open/app/home")
|
|
@RequestMapping(path = "/open/app/home")
|
|
|
public class OpenAppHomeController extends BaseApiController{
|
|
public class OpenAppHomeController extends BaseApiController{
|
|
|
- @Resource
|
|
|
|
|
- private AppHomePageService appHomePageService;
|
|
|
|
|
|
|
+
|
|
|
@Resource
|
|
@Resource
|
|
|
private JtBusinessService jtBusinessService;
|
|
private JtBusinessService jtBusinessService;
|
|
|
@Resource
|
|
@Resource
|
|
@@ -35,15 +36,8 @@ public class OpenAppHomeController extends BaseApiController{
|
|
|
private JtTagService jtTagService;
|
|
private JtTagService jtTagService;
|
|
|
|
|
|
|
|
|
|
|
|
|
- /**App首页轮播图、导航、知产*/
|
|
|
|
|
- @RequestMapping(value = "/getHomePageData", method = RequestMethod.GET)
|
|
|
|
|
- public Result getHomePageData(HttpServletRequest request){
|
|
|
|
|
- Result res = new Result();
|
|
|
|
|
- res.setData(appHomePageService.getAppHomePage(request));
|
|
|
|
|
- return res;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- /**技淘推荐*/
|
|
|
|
|
|
|
+ /**技淘推荐*//*
|
|
|
@RequestMapping(value = "/getHomeRecommended", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/getHomeRecommended", method = RequestMethod.GET)
|
|
|
public Result getHomeRecommended(Integer type){
|
|
public Result getHomeRecommended(Integer type){
|
|
|
Result res = new Result();
|
|
Result res = new Result();
|
|
@@ -53,7 +47,8 @@ public class OpenAppHomeController extends BaseApiController{
|
|
|
}
|
|
}
|
|
|
res.setData(appHomePageService.getHomeRecommended(type));
|
|
res.setData(appHomePageService.getHomeRecommended(type));
|
|
|
return res;
|
|
return res;
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 项目列表
|
|
* 项目列表
|
|
|
* @param topId
|
|
* @param topId
|
|
@@ -141,8 +136,8 @@ public class OpenAppHomeController extends BaseApiController{
|
|
|
Result result=new Result();
|
|
Result result=new Result();
|
|
|
if (null==pageNo)pageNo=1;
|
|
if (null==pageNo)pageNo=1;
|
|
|
if (null==pageSize)pageSize=3;
|
|
if (null==pageSize)pageSize=3;
|
|
|
- //1 赚钱数据 2首页数据
|
|
|
|
|
Map<String, Object> map=new HashMap<>();
|
|
Map<String, Object> map=new HashMap<>();
|
|
|
|
|
+ //1 赚钱数据 2首页数据
|
|
|
map.put("recommended", jtBusinessService.recommendedApplication(1,pageNo,pageSize));
|
|
map.put("recommended", jtBusinessService.recommendedApplication(1,pageNo,pageSize));
|
|
|
map.put("tag", jtTagService.selectListJtTag(null, pageNo, pageSize));
|
|
map.put("tag", jtTagService.selectListJtTag(null, pageNo, pageSize));
|
|
|
result.setData(map);
|
|
result.setData(map);
|
|
@@ -157,9 +152,18 @@ public class OpenAppHomeController extends BaseApiController{
|
|
|
Result result=new Result();
|
|
Result result=new Result();
|
|
|
if (null==pageNo)pageNo=1;
|
|
if (null==pageNo)pageNo=1;
|
|
|
if (null==pageSize)pageSize=3;
|
|
if (null==pageSize)pageSize=3;
|
|
|
- result.setData(jtBusinessService.recommendedApplication(2,pageNo,pageSize));
|
|
|
|
|
|
|
+ Map<String, Object> map=new HashMap<>();
|
|
|
|
|
+ //1 赚钱数据 2首页数据
|
|
|
|
|
+ map.put("recommended", jtBusinessService.recommendedApplication(1,pageNo,pageSize));
|
|
|
|
|
+ List<HomeImgBo> l=new ArrayList<>();
|
|
|
|
|
+ l.add(new HomeImgBo("1","1"));
|
|
|
|
|
+ l.add(new HomeImgBo("2","2"));
|
|
|
|
|
+ l.add(new HomeImgBo("3","3"));
|
|
|
|
|
+ map.put("homeImg", l);
|
|
|
|
|
+ result.setData(map);
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|