Commit 3847d31f authored by hezhen's avatar hezhen

添加更新用户

parent 34ee340d
package com.github.wxiaoqi.security.admin.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
/**
* 我的收藏
*/
@Table(name = "app_user_collect")
@Data
public class AppUserCollect {
@Id
@ApiModelProperty("主键id")
@GeneratedValue(generator = "JDBC")
private Integer id;
@ApiModelProperty("用户id")
@Column(name = "user_id")
private Integer userId;
@ApiModelProperty("收藏类型;1-租车;2-旅游")
@Column(name = "type")
private Integer type;
@ApiModelProperty("类型id")
@Column(name = "type_id")
private Integer typeId;
@ApiModelProperty("类型id名称")
@Column(name = "name")
private String name;
@ApiModelProperty("封面")
@Column(name = "cover")
private String cover;
@ApiModelProperty("价格")
@Column(name = "price")
private BigDecimal price;
@ApiModelProperty("单位")
@Column(name = "unit")
private BigDecimal unit;
@ApiModelProperty("创建时间")
@Column(name = "crt_time")
private Long crtTime;
@ApiModelProperty("更新时间")
@Column(name = "upd_time")
private Long updTime;
@ApiModelProperty("否取消;0-正常;1-取消")
@Column(name = "status")
private Integer status;
@ApiModelProperty("否取消;0-正常;1-取消")
@Column(name = "is_del")
private Integer isDel;
}
\ No newline at end of file
package com.github.wxiaoqi.security.admin.biz;
import com.github.wxiaoqi.security.admin.entity.AppUserCollect;
import com.github.wxiaoqi.security.admin.mapper.AppUserCollectMapper;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* ${DESCRIPTION}
*
* @author wanghaobin
* @create 2017-06-08 16:23
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserCollect> {
//新增收藏
public ObjectRestResponse addUserCollect(){
return ObjectRestResponse.succ();
}
}
package com.github.wxiaoqi.security.admin.mapper;
import com.github.wxiaoqi.security.admin.entity.AppUserCollect;
import tk.mybatis.mapper.common.Mapper;
public interface AppUserCollectMapper extends Mapper<AppUserCollect> {
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.github.wxiaoqi.security.admin.mapper.AppUserCollectMapper">
</mapper>
\ No newline at end of file
...@@ -5,6 +5,7 @@ import java.math.BigDecimal; ...@@ -5,6 +5,7 @@ import java.math.BigDecimal;
import java.util.List; import java.util.List;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.xxfc.platform.tour.dto.GoodBannerDTO;
import com.xxfc.platform.tour.dto.GoodTagDTO; import com.xxfc.platform.tour.dto.GoodTagDTO;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -70,6 +71,10 @@ public class TourGoodDetailVo { ...@@ -70,6 +71,10 @@ public class TourGoodDetailVo {
//状态:0-未发布;1-上架;2-下架 //状态:0-未发布;1-上架;2-下架
@ApiModelProperty(value = "状态:0-未发布;1-上架;2-下架") @ApiModelProperty(value = "状态:0-未发布;1-上架;2-下架")
private Integer status; private Integer status;
//天数
@ApiModelProperty(value = "天数")
private Integer number;
//创建时间 //创建时间
@ApiModelProperty(value = "创建时间", hidden = true ) @ApiModelProperty(value = "创建时间", hidden = true )
...@@ -107,6 +112,10 @@ public class TourGoodDetailVo { ...@@ -107,6 +112,10 @@ public class TourGoodDetailVo {
@ApiModelProperty(value = "出发地点") @ApiModelProperty(value = "出发地点")
private List<TourDepartVo> tourDepartVo; private List<TourDepartVo> tourDepartVo;
//商品轮播
@ApiModelProperty(value = "商品轮播")
List<GoodBannerDTO> bannerDTOS;
//目的地 //目的地
@ApiModelProperty(value = "目的地") @ApiModelProperty(value = "目的地")
private String destination; private String destination;
......
...@@ -73,6 +73,10 @@ public class TourGoodVo implements Serializable { ...@@ -73,6 +73,10 @@ public class TourGoodVo implements Serializable {
//状态:0-未发布;1-上架;2-下架 //状态:0-未发布;1-上架;2-下架
@ApiModelProperty(value = "状态:0-未发布;1-上架;2-下架") @ApiModelProperty(value = "状态:0-未发布;1-上架;2-下架")
private Integer status; private Integer status;
//天数
@ApiModelProperty(value = "天数")
private Integer number;
//创建时间 //创建时间
@ApiModelProperty(value = "创建时间", hidden = true ) @ApiModelProperty(value = "创建时间", hidden = true )
......
...@@ -4,12 +4,10 @@ import com.github.wxiaoqi.security.admin.entity.BaseUserMemberLevel; ...@@ -4,12 +4,10 @@ import com.github.wxiaoqi.security.admin.entity.BaseUserMemberLevel;
import com.github.wxiaoqi.security.admin.feign.UserFeign; import com.github.wxiaoqi.security.admin.feign.UserFeign;
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.xxfc.platform.tour.dto.GoodBannerDTO;
import com.xxfc.platform.tour.dto.GoodTagDTO; import com.xxfc.platform.tour.dto.GoodTagDTO;
import com.xxfc.platform.tour.entity.TourGood; import com.xxfc.platform.tour.entity.TourGood;
import com.xxfc.platform.tour.mapper.TourGoodMapper; import com.xxfc.platform.tour.mapper.*;
import com.xxfc.platform.tour.mapper.TourGoodSiteMapper;
import com.xxfc.platform.tour.mapper.TourGoodSpePriceMapper;
import com.xxfc.platform.tour.mapper.TourGoodTagMapper;
import com.xxfc.platform.tour.vo.TourDepartTimeVo; import com.xxfc.platform.tour.vo.TourDepartTimeVo;
import com.xxfc.platform.tour.vo.TourDepartVo; import com.xxfc.platform.tour.vo.TourDepartVo;
import com.xxfc.platform.tour.vo.TourGoodDetailVo; import com.xxfc.platform.tour.vo.TourGoodDetailVo;
...@@ -45,6 +43,8 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> { ...@@ -45,6 +43,8 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> {
TourGoodTagMapper tagMapper; TourGoodTagMapper tagMapper;
@Autowired @Autowired
private UserFeign userFeign; private UserFeign userFeign;
@Autowired
TourGoodBannerMapper bannerMapper;
//获取商品详情 //获取商品详情
public ObjectRestResponse<TourGoodDetailVo> getGoodDetaileById(Integer id){ public ObjectRestResponse<TourGoodDetailVo> getGoodDetaileById(Integer id){
...@@ -111,6 +111,9 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> { ...@@ -111,6 +111,9 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> {
//获取标签 //获取标签
List<GoodTagDTO> tagList=tagMapper.getGoodTagList(id); List<GoodTagDTO> tagList=tagMapper.getGoodTagList(id);
detailVo.setTagDTOS(tagList); detailVo.setTagDTOS(tagList);
//获取banner
List<GoodBannerDTO> bannerList=bannerMapper.getBannerList(id);
detailVo.setBannerDTOS(bannerList);
return ObjectRestResponse.succ(detailVo); return ObjectRestResponse.succ(detailVo);
} }
return ObjectRestResponse.createDefaultFail(); return ObjectRestResponse.createDefaultFail();
......
package com.xxfc.platform.tour.mapper; package com.xxfc.platform.tour.mapper;
import com.xxfc.platform.tour.dto.GoodBannerDTO;
import com.xxfc.platform.tour.entity.TourGoodBanner; import com.xxfc.platform.tour.entity.TourGoodBanner;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.Mapper;
import java.util.List;
/** /**
* 商品轮播图 * 商品轮播图
* *
...@@ -11,5 +15,7 @@ import tk.mybatis.mapper.common.Mapper; ...@@ -11,5 +15,7 @@ import tk.mybatis.mapper.common.Mapper;
* @date 2019-06-06 11:41:51 * @date 2019-06-06 11:41:51
*/ */
public interface TourGoodBannerMapper extends Mapper<TourGoodBanner> { public interface TourGoodBannerMapper extends Mapper<TourGoodBanner> {
//查询旅游路线列表
public List<GoodBannerDTO> getBannerList(@Param("goodId")Integer goodId);
} }
...@@ -16,4 +16,8 @@ ...@@ -16,4 +16,8 @@
<result property="isDel" column="is_del"/> <result property="isDel" column="is_del"/>
</resultMap> </resultMap>
<select id="getBannerList" resultType="com.xxfc.platform.tour.dto.GoodBannerDTO">
select * FROM tour_good_banner where good_id=#{goodId} and is_del=0
</select>
</mapper> </mapper>
\ No newline at end of file
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