Commit 8c3fa797 authored by hanfeng's avatar hanfeng

Merge branch 'base-modify' of http://10.5.52.3/youjj/cloud-platform into base-modify

parents 18202b08 300b34ba
package com.github.wxiaoqi.security.common.vo; package com.github.wxiaoqi.security.common.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.persistence.Column;
/** /**
* 首页商品列表 * 首页商品列表
...@@ -20,4 +23,18 @@ public class GoodDataVO{ ...@@ -20,4 +23,18 @@ public class GoodDataVO{
private String price; private String price;
/**
* 经度
*/
@Column(name = "longitude")
@ApiModelProperty(value = "经度")
private Double longitude;
/**
* 纬度
*/
@Column(name = "latitude")
@ApiModelProperty(value = "纬度")
private Double latitude;
} }
...@@ -50,6 +50,11 @@ ...@@ -50,6 +50,11 @@
<artifactId>xx-activity-api</artifactId> <artifactId>xx-activity-api</artifactId>
<version>2.0-SNAPSHOT</version> <version>2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>com.xxfc.platform</groupId>
<artifactId>xx-tour-api</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId> <artifactId>spring-boot-starter-data-redis</artifactId>
......
...@@ -11,7 +11,10 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz; ...@@ -11,7 +11,10 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.tour.entity.TourGood;
import com.xxfc.platform.tour.feign.TourFeign;
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
...@@ -28,6 +31,9 @@ import java.util.List; ...@@ -28,6 +31,9 @@ import java.util.List;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserCollect> { public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserCollect> {
@Autowired
TourFeign tourFeign;
//新增收藏 //新增收藏
public ObjectRestResponse addUserCollect(AppUserCollectDTO collectDTO)throws Exception{ public ObjectRestResponse addUserCollect(AppUserCollectDTO collectDTO)throws Exception{
...@@ -46,7 +52,13 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl ...@@ -46,7 +52,13 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl
} }
AppUserCollect collect=new AppUserCollect(); AppUserCollect collect=new AppUserCollect();
BeanUtils.copyProperties(collect,collectDTO); BeanUtils.copyProperties(collect,collectDTO);
TourGood tourGood=tourFeign.one(typeId);
if(tourGood!=null){
BeanUtils.copyProperties(collect,tourGood);
insertSelective(collect); insertSelective(collect);
}
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
} }
......
...@@ -17,6 +17,7 @@ import com.github.wxiaoqi.security.common.rest.CommonBaseController; ...@@ -17,6 +17,7 @@ import com.github.wxiaoqi.security.common.rest.CommonBaseController;
import com.github.wxiaoqi.security.common.util.Query; import com.github.wxiaoqi.security.common.util.Query;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.util.result.JsonResultUtil; import com.github.wxiaoqi.security.common.util.result.JsonResultUtil;
import com.xxfc.platform.tour.feign.TourFeign;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -44,6 +45,7 @@ public class AppUserCollectController extends CommonBaseController { ...@@ -44,6 +45,7 @@ public class AppUserCollectController extends CommonBaseController {
AppUserCollectBiz collectBiz; AppUserCollectBiz collectBiz;
/** /**
* 我的收藏 * 我的收藏
* @param page * @param page
......
...@@ -20,10 +20,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; ...@@ -20,10 +20,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableAceCache @EnableAceCache
@tk.mybatis.spring.annotation.MapperScan(basePackages = "com.xxfc.platform.app.mapper") @tk.mybatis.spring.annotation.MapperScan(basePackages = "com.xxfc.platform.app.mapper")
public class AppApplication { public class AppApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(AppApplication.class, args); SpringApplication.run(AppApplication.class, args);
} }
} }
...@@ -34,7 +34,8 @@ public class BannerBiz extends BaseBiz<BannerMapper,Banner> { ...@@ -34,7 +34,8 @@ public class BannerBiz extends BaseBiz<BannerMapper,Banner> {
Banner banner = new Banner(); Banner banner = new Banner();
banner.setIsDel(0); banner.setIsDel(0);
banner.setType(type); banner.setType(type);
return mapper.selectByExample(banner); //mapper.findByType(type);
return mapper.findBannerListByType(type);
} }
/* /*
......
...@@ -21,4 +21,7 @@ public interface BannerMapper extends Mapper<Banner> { ...@@ -21,4 +21,7 @@ public interface BannerMapper extends Mapper<Banner> {
@Select("select * from `banner` where is_del=#{isDel} order by rank ASC") @Select("select * from `banner` where is_del=#{isDel} order by rank ASC")
List<Banner> findBannerListByisDelOrderByRank(Banner banner); List<Banner> findBannerListByisDelOrderByRank(Banner banner);
@Select("select * from `banner` where `is_del`=0 and `type`=#{type} order by rank asc ")
List<Banner> findBannerListByType(Integer type);
} }
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<!--首页查询全部--> <!--首页查询全部-->
<select id="findAllByHome" resultType="com.github.wxiaoqi.security.common.vo.GoodDataVO"> <select id="findAllByHome" resultType="com.github.wxiaoqi.security.common.vo.GoodDataVO">
select cs.id as `id`,cs.name as `name`,cs.logo as `imgUrl`,cs.province_name as `name1` select cs.id as `id`,cs.name as `name`,cs.logo as `imgUrl`,cs.province_name as `name1`,cs.longitude,cs.latitude
FROM `campsite_shop` cs FROM `campsite_shop` cs
where cs.sale_state=1 where cs.sale_state=1
order by cs.hot desc order by cs.hot desc
......
...@@ -49,17 +49,17 @@ public interface TourFeign { ...@@ -49,17 +49,17 @@ public interface TourFeign {
* @return * @return
*/ */
@RequestMapping(value = "/spe/stock", method = RequestMethod.GET) @RequestMapping(value = "/spe/stock", method = RequestMethod.GET)
public ObjectRestResponse<TourSpePriceVo> stock(@RequestParam Integer speId, @RequestParam Integer number, @RequestParam Integer type); public ObjectRestResponse<TourSpePriceVo> stock(@RequestParam("speId") Integer speId, @RequestParam("number") Integer number, @RequestParam("type") Integer type);
@RequestMapping(value = "/tourGood/app/unauth/usable/{id}", method = RequestMethod.GET) @RequestMapping(value = "/tourGood/app/unauth/usable/{id}", method = RequestMethod.GET)
public ObjectRestResponse<TourGood> usableGet(@PathVariable int id); public ObjectRestResponse<TourGood> usableGet(@PathVariable(value = "id") int id);
@GetMapping("/tourUser/app/unauth/getTourUsers") @GetMapping("/tourUser/app/unauth/getTourUsers")
public ObjectRestResponse<List<TourUser>> getTourUsers(@RequestParam String ids); public ObjectRestResponse<List<TourUser>> getTourUsers(@RequestParam("ids") String ids);
@GetMapping("/tourGood/verfication/entityList") @GetMapping("/tourGood/verfication/entityList")
public ObjectRestResponse<List<TourGoodVerification>> entityList(@RequestParam Map<String, Object> entity); public ObjectRestResponse<List<TourGoodVerification>> entityList(@RequestParam("entity") Map<String, Object> entity);
/** /**
* 更新发车状态 * 更新发车状态
...@@ -84,10 +84,14 @@ public interface TourFeign { ...@@ -84,10 +84,14 @@ public interface TourFeign {
* @return * @return
*/ */
@GetMapping("/tourGood/verfication/orders") @GetMapping("/tourGood/verfication/orders")
PageDataVO<TourGoodOrderVo> findTourGoodOrders(@RequestParam Map<String,Object> tourGoodOrderFindVo); PageDataVO<TourGoodOrderVo> findTourGoodOrders(@RequestParam("tourGoodOrderFindVo") Map<String,Object> tourGoodOrderFindVo);
@ApiOperation("首页旅游列表") @ApiOperation("首页旅游列表")
@GetMapping(value = "/tourGood/app/shopList") @GetMapping(value = "/tourGood/app/shopList")
public List<GoodDataVO> goodList(@RequestParam(value = "page", defaultValue = "1") Integer page, public List<GoodDataVO> goodList(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit",defaultValue = "4") Integer limit); @RequestParam(value = "limit",defaultValue = "4") Integer limit);
//获取商品信息
@RequestMapping(value = "/app/unauth/one", method = RequestMethod.GET)
public TourGood one(@RequestParam(value = "goodId",defaultValue = "0") Integer goodId);
} }
...@@ -125,5 +125,10 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> { ...@@ -125,5 +125,10 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> {
} }
} }
//获取路线信息
public TourGood getOneGood(Integer id){
return selectById(id);
}
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken; ...@@ -4,6 +4,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.tour.biz.TourGoodDetailBiz; import com.xxfc.platform.tour.biz.TourGoodDetailBiz;
import com.xxfc.platform.tour.entity.TourGood;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
...@@ -27,6 +28,13 @@ public class TourGoodDetailController{ ...@@ -27,6 +28,13 @@ public class TourGoodDetailController{
return detailBiz.getGoodDetaileById(goodId); return detailBiz.getGoodDetaileById(goodId);
} }
//获取商品信息
@RequestMapping(value = "/app/unauth/one", method = RequestMethod.GET)
@IgnoreUserToken
public TourGood one(@RequestParam(value = "goodId",defaultValue = "0") Integer goodId) {
return detailBiz.getOneGood(goodId);
}
......
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