Commit a8d88dfc authored by wuwz's avatar wuwz

旅游路线

parent 682f0a77
...@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourGood; import com.xxfc.platform.tour.entity.TourGood;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -20,18 +21,31 @@ import java.util.Map; ...@@ -20,18 +21,31 @@ import java.util.Map;
*/ */
@Service @Service
@Slf4j @Slf4j
public class TourGoodBiz extends BaseBiz<TourGoodMapper,TourGood> { public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
@Autowired @Autowired
private TourGoodMapper tourGoodMapper; private TourGoodMapper tourGoodMapper;
public PageDataVO<TourGood> getGoodList(int page, int limit , String query , Double latitude, Double longitude, Integer tagId, Double distance){ /**
Map<String,Object> params = new HashMap<String,Object>(); * 查询旅游路线列表
params.put("query",query); *
params.put("latitude",latitude); * @param page
params.put("longitude",longitude); * @param limit
params.put("tagId",tagId); * @param query
params.put("distance",distance); * @param latitude
* @param longitude
* @param tagId
* @param distance
* @return
*/
public PageDataVO<TourGood> getGoodList(int page, int limit, String query, Double latitude, Double longitude, Integer tagId, Double distance) {
//查询参数
Map<String, Object> params = new HashMap<String, Object>();
params.put("query", query);
params.put("latitude", latitude);
params.put("longitude", longitude);
params.put("tagId", tagId);
params.put("distance", distance);
// List<TourGood> list = tourGoodMapper.getGoodList(params); // List<TourGood> list = tourGoodMapper.getGoodList(params);
return PageDataVO.pageInfo(page, limit, mapper.getGoodList(params)); return PageDataVO.pageInfo(page, limit, mapper.getGoodList(params));
} }
......
...@@ -18,5 +18,6 @@ public interface TourGoodMapper extends Mapper<TourGood> { ...@@ -18,5 +18,6 @@ public interface TourGoodMapper extends Mapper<TourGood> {
//获取商品信息 //获取商品信息
public TourGood getOne(@Param("id")Integer id); public TourGood getOne(@Param("id")Integer id);
//查询旅游路线列表
public List<TourGood> getGoodList(@Param("params") Map<String,Object> map); public List<TourGood> getGoodList(@Param("params") Map<String,Object> map);
} }
...@@ -13,17 +13,28 @@ import org.springframework.web.bind.annotation.*; ...@@ -13,17 +13,28 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@RequestMapping("tourGood") @RequestMapping("tourGood")
public class TourGoodController extends BaseController<TourGoodBiz,TourGood> { public class TourGoodController extends BaseController<TourGoodBiz, TourGood> {
@ApiOperation("订单详情") /**
@RequestMapping(value = "/app/unauth/getGoodList",method = RequestMethod.GET) * 查询旅游路线列表
//@GetMapping(value = "/app/unauth/getGoodList") *
* @param page
* @param limit
* @param query
* @param latitude
* @param longitude
* @param tagId
* @param distance
* @return
*/
@ApiOperation("查询旅游路线列表")
@RequestMapping(value = "/app/unauth/getGoodList", method = RequestMethod.GET)
@IgnoreClientToken @IgnoreClientToken
@ResponseBody @ResponseBody
public PageDataVO<TourGood> getGoodList(@RequestParam(value = "page", required=true) Integer page, @RequestParam(value = "limit", required=true) Integer limit , public PageDataVO<TourGood> getGoodList(@RequestParam(value = "page", required = true) Integer page, @RequestParam(value = "limit", required = true) Integer limit,
@RequestParam(value = "query") String query , @RequestParam(value = "latitude", required=false) Double latitude, @RequestParam(value = "longitude", required=false) Double longitude, @RequestParam(value = "query") String query, @RequestParam(value = "latitude", required = false) Double latitude,
@RequestParam(value = "tagId", required=false) Integer tagId, @RequestParam(value = "distance",defaultValue = "10.00") Double distance){ @RequestParam(value = "longitude", required = false) Double longitude, @RequestParam(value = "tagId", required = false) Integer tagId,
//BaseResponse baseResponse = new BaseResponse(); @RequestParam(value = "distance", defaultValue = "10.00") Double distance) {
return baseBiz.getGoodList(page, limit, query, latitude, longitude, tagId, distance); return baseBiz.getGoodList(page, limit, query, latitude, longitude, tagId, distance);
} }
} }
\ No newline at end of file
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<result property="unit" column="unit"/> <result property="unit" column="unit"/>
</resultMap> </resultMap>
<!--查询旅游路线列表-->
<select id="getGoodList" parameterType="java.util.Map" resultMap="tourGoodMap"> <select id="getGoodList" parameterType="java.util.Map" resultMap="tourGoodMap">
SELECT * from tour_good t SELECT * from tour_good t
where 1=1 where 1=1
......
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