Commit c802500d authored by hezhen's avatar hezhen

123

parent ad1c33e0
......@@ -7,6 +7,7 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.tour.dto.TourSpePriceDTO;
import com.xxfc.platform.tour.entity.TourGood;
import com.xxfc.platform.tour.entity.TourGoodVerification;
import com.xxfc.platform.tour.entity.TourTag;
import com.xxfc.platform.tour.entity.TourUser;
import com.xxfc.platform.tour.vo.TourGoodOrderFindVo;
import com.xxfc.platform.tour.vo.TourGoodOrderVo;
......@@ -107,4 +108,24 @@ public interface TourFeign {
@GetMapping(value = "/tourGood/app/unauth/findRandomVehicle")
public ObjectRestResponse findRandomVehicle(@RequestParam(value = "number")Integer number);
//查询旅游路线列表
@RequestMapping(value = "/gw/app/unauth/getGoodList", method = RequestMethod.GET)
ObjectRestResponse getGoodList(@RequestParam(value = "page",defaultValue = "1") Integer page,
@RequestParam(value = "limit",defaultValue = "10") Integer limit,
@RequestParam(value = "tagId", required = false) Integer tagId);
//获取公司详情
@GetMapping("/gw/app/unauth/detail/{id}")
ObjectRestResponse getOne(@PathVariable Integer id);
//首页旅游列表
@GetMapping(value = "/gw/app/shopList")
List<GoodDataVO> goodListAll(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit",defaultValue = "4") Integer limit);
//旅游标签列表
@GetMapping(value = "/gw/tagList")
List<TourTag> tagList(@RequestParam(value = "isHot",defaultValue = "0")Integer isHot);
}
......@@ -49,6 +49,16 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
return mapper.findHotListTag(tag);
}
public List<TourTag> getTagList(Integer isHot) {
TourTag tag = new TourTag();
tag.setIsDel(0);
if (isHot!=null&&isHot==1){
tag.setIsHot(1);
return mapper.findHotListTag(tag);
}
return mapper.findAllByIsDel(tag);
}
public PageDataVO<TourTag> findPage(Map map) {
......
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.vo.GoodDataVO;
import com.xxfc.platform.tour.biz.TourGoodBiz;
import com.xxfc.platform.tour.biz.TourGoodDetailBiz;
import com.xxfc.platform.tour.biz.TourTagBiz;
import com.xxfc.platform.tour.entity.TourGood;
import com.xxfc.platform.tour.entity.TourTag;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("gw")
@IgnoreClientToken
@IgnoreUserToken
public class TourGwController extends BaseController<TourGoodBiz, TourGood> {
@Autowired
TourGoodDetailBiz goodDetailBiz;
@Autowired
TourTagBiz tourTagBiz;
/**
* 查询旅游路线列表
*
* @param page
* @param limit
* @param tagId
* @return
*/
@ApiOperation("查询旅游路线列表")
@RequestMapping(value = "/app/unauth/getGoodList", method = RequestMethod.GET)
public ObjectRestResponse getGoodList(@RequestParam(value = "page",defaultValue = "1") Integer page,
@RequestParam(value = "limit",defaultValue = "10") Integer limit,
@RequestParam(value = "tagId", required = false) Integer tagId) {
return baseBiz.getGoodList(page, limit, "", null, null, tagId, null);
}
@GetMapping("/app/unauth/detail/{id}")
public ObjectRestResponse getOne(@PathVariable Integer id) {
return goodDetailBiz.getGoodDetaileById(id);
}
@ApiOperation("首页旅游列表")
@GetMapping(value = "/shopList")
public List<GoodDataVO> goodListAll(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit",defaultValue = "4") Integer limit) {
return baseBiz.getAllByHome(page,limit);
}
@ApiOperation("旅游标签列表")
@GetMapping(value = "/tagList")
public List<TourTag> tagList(@RequestParam(value = "isHot",defaultValue = "0")Integer isHot) {
return tourTagBiz.getTagList(isHot);
}
}
\ No newline at end of file
......@@ -33,6 +33,12 @@
<version>2.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.xxfc.platform</groupId>
<artifactId>xx-tour-api</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
......
package com.xxfc.platform.uccn.rest;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.CommonBaseController;
import com.xxfc.platform.tour.feign.TourFeign;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/tour")
@Slf4j
@IgnoreClientToken
public class GwTourController extends CommonBaseController {
@Autowired
TourFeign tourFeign;
@ApiOperation("查询旅游路线列表")
@RequestMapping(value = "/getGoodList", method = RequestMethod.GET)
@IgnoreUserToken
public ObjectRestResponse getGoodList(@RequestParam(value = "page",defaultValue = "1") Integer page, @RequestParam(value = "limit",defaultValue = "10") Integer limit,
@RequestParam(value = "tagId", required = false) Integer tagId) {
return tourFeign.getGoodList(page, limit, tagId);
}
@GetMapping("/detail/{id}")
@IgnoreUserToken
public ObjectRestResponse getOne(@PathVariable Integer id) {
return tourFeign.getOne(id);
}
@ApiOperation("首页旅游列表")
@GetMapping(value = "/shopList")
@IgnoreUserToken
public ObjectRestResponse goodListAll(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit",defaultValue = "4") Integer limit) {
return ObjectRestResponse.succ(tourFeign.goodListAll(page,limit));
}
@GetMapping("/tagList")
@IgnoreUserToken
public ObjectRestResponse getTagList(@RequestParam(value = "isHot",defaultValue = "0")Integer isHot) {
return ObjectRestResponse.succ(tourFeign.tagList(isHot));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment