Commit 1a93d8ac authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents 7468fbb6 4da900ea
...@@ -42,7 +42,7 @@ public class BaseUserMemberLevel implements Serializable { ...@@ -42,7 +42,7 @@ public class BaseUserMemberLevel implements Serializable {
private Integer level; private Integer level;
//描述 //描述
@Column(name = "describe") @Column(name = "describes")
@ApiModelProperty(value = "描述") @ApiModelProperty(value = "描述")
private String describe; private String describe;
......
...@@ -24,13 +24,17 @@ public class ${className} implements Serializable { ...@@ -24,13 +24,17 @@ public class ${className} implements Serializable {
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.columnName == $pk.columnName) #if($column.columnName == $pk.columnName)
//$column.comments /**
* $column.comments
*/
@Id @Id
@GeneratedValue(generator = "JDBC") @GeneratedValue(generator = "JDBC")
@ApiModelProperty("$column.comments") @ApiModelProperty("$column.comments")
private $column.attrType $column.attrname; private $column.attrType $column.attrname;
#else #else
//$column.comments /**
* $column.comments
*/
@Column(name = "$column.columnName") @Column(name = "$column.columnName")
@ApiModelProperty(value = "$column.comments"#if($column.columnName == "crt_time"||$column.columnName == "upd_time"), hidden = true #end) @ApiModelProperty(value = "$column.comments"#if($column.columnName == "crt_time"||$column.columnName == "upd_time"), hidden = true #end)
private $column.attrType $column.attrname; private $column.attrType $column.attrname;
......
package com.xxfc.platform.app.entity; package com.xxfc.platform.app.entity;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import javax.persistence.*; import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -15,40 +14,55 @@ import lombok.Data; ...@@ -15,40 +14,55 @@ import lombok.Data;
* @date 2019-06-03 15:57:13 * @date 2019-06-03 15:57:13
*/ */
@Data @Data
@Table(name = "cofig") @Table(name = "config")
public class Cofig implements Serializable { public class Cofig implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//主键id /**
* 主键id
*/
@Id @Id
@GeneratedValue(generator = "JDBC") @GeneratedValue(generator = "JDBC")
@ApiModelProperty("主键id") @ApiModelProperty("主键id")
private Integer id; private Integer id;
//1-租车须知;2-预定须知 /**
* 1-租车须知;2-预定须知
*/
@Column(name = "type") @Column(name = "type")
@ApiModelProperty(value = "1-租车须知;2-预定须知") @ApiModelProperty(value = "1-租车须知;2-预定须知;3-旅游")
private Integer type; private Integer type;
// /**
*
*/
@Column(name = "value") @Column(name = "value")
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
private String value; private String value;
//创建时间 /**
* 创建时间
*/
@Column(name = "crt_time") @Column(name = "crt_time")
@ApiModelProperty(value = "创建时间", hidden = true ) @ApiModelProperty(value = "创建时间", hidden = true )
private Long crtTime; private Long crtTime;
//更新时间 /**
* 更新时间
*/
@Column(name = "upd_time") @Column(name = "upd_time")
@ApiModelProperty(value = "更新时间", hidden = true ) @ApiModelProperty(value = "更新时间", hidden = true )
private Long updTime; private Long updTime;
//是否删除;0-1正常;1-删除 /**
* 是否删除;0-1正常;1-删除
*/
@Column(name = "is_del") @Column(name = "is_del")
@ApiModelProperty(value = "是否删除;0-1正常;1-删除") @ApiModelProperty(value = "是否删除;0-1正常;1-删除")
private Integer isDel; private Integer isDel;
@Column(name = "title")
@ApiModelProperty(value = "标题")
private String title;
} }
...@@ -22,5 +22,4 @@ public class CofigBiz extends BaseBiz<CofigMapper,Cofig> { ...@@ -22,5 +22,4 @@ public class CofigBiz extends BaseBiz<CofigMapper,Cofig> {
return mapper.getAllByType(list); return mapper.getAllByType(list);
} }
} }
\ No newline at end of file
package com.xxfc.platform.app.rest.admin;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.app.biz.CofigBiz;
import com.xxfc.platform.app.entity.Cofig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author libin
* @version 1.0
* @description 后台*通用配置
* @data 2019/6/12 9:56
*/
@RestController
@RequestMapping("/admin/config")
@Slf4j
public class CofigAdminController extends BaseController<CofigBiz,Cofig> {
}
\ No newline at end of file
...@@ -106,9 +106,9 @@ public class TourGoodSite implements Serializable { ...@@ -106,9 +106,9 @@ public class TourGoodSite implements Serializable {
private Integer status; private Integer status;
//创建时间 //创建时间
@Column(name = "ctr_time") @Column(name = "crt_time")
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Long ctrTime; private Long crtTime;
//更新时间 //更新时间
@Column(name = "upd_time") @Column(name = "upd_time")
......
package com.xxfc.platform.tour.biz; package com.xxfc.platform.tour.biz;
import com.github.wxiaoqi.security.admin.entity.BaseUserMemberLevel;
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.entity.TourGood; import com.xxfc.platform.tour.entity.TourGood;
...@@ -39,6 +41,8 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> { ...@@ -39,6 +41,8 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> {
TourGoodSpePriceMapper priceMapper; TourGoodSpePriceMapper priceMapper;
@Autowired @Autowired
TourGoodSiteMapper siteMapper; TourGoodSiteMapper siteMapper;
@Autowired
private UserFeign userFeign;
//获取商品详情 //获取商品详情
public ObjectRestResponse<TourGoodDetailVo> getGoodDetaileById(Integer id){ public ObjectRestResponse<TourGoodDetailVo> getGoodDetaileById(Integer id){
...@@ -53,16 +57,21 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> { ...@@ -53,16 +57,21 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> {
BigDecimal price=detailVo.getPrice(); BigDecimal price=detailVo.getPrice();
if(price!=null&&detailVo.getIsMember()>0){ if(price!=null&&detailVo.getIsMember()>0){
List<TourMemberVo> memberList=new ArrayList<>(); List<TourMemberVo> memberList=new ArrayList<>();
for(int i=1;i<4;i++){ List<BaseUserMemberLevel> levelsList=userFeign.levels();
if(levelsList.size()>0){
for(BaseUserMemberLevel memberLevel :levelsList){
TourMemberVo memberVo=new TourMemberVo(); TourMemberVo memberVo=new TourMemberVo();
memberVo.setLevel(i); memberVo.setLevel(memberLevel.getLevel());
memberVo.setName(getName(i)); memberVo.setName(memberLevel.getName());
BigDecimal member_price=price.multiply(new BigDecimal("0.88")).setScale(2, RoundingMode.HALF_UP); ; BigDecimal member_price=price.multiply(new BigDecimal(memberLevel.getDiscount()+"")).divide(new BigDecimal("100"))
.setScale(2, RoundingMode.HALF_UP); ;
memberVo.setPrice(member_price); memberVo.setPrice(member_price);
memberList.add(memberVo); memberList.add(memberVo);
} }
detailVo.setMemberVo(memberList); detailVo.setMemberVo(memberList);
} }
}
//获取出行时间 //获取出行时间
List<TourDepartTimeVo> timelist=priceMapper.getAllByGoodId(id); List<TourDepartTimeVo> timelist=priceMapper.getAllByGoodId(id);
...@@ -80,23 +89,6 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> { ...@@ -80,23 +89,6 @@ public class TourGoodDetailBiz extends BaseBiz<TourGoodMapper, TourGood> {
} }
} }
public String getName(Integer type){
String name="";
switch (type){
case 1:
name="普通会员";
break;
case 2:
name="黄金会员";
break;
case 3:
name="钻石会员";
break;
}
return name;
}
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<result property="type" column="type"/> <result property="type" column="type"/>
<result property="rank" column="rank"/> <result property="rank" column="rank"/>
<result property="status" column="status"/> <result property="status" column="status"/>
<result property="ctrTime" column="ctr_time"/> <result property="crtTime" column="crt_time"/>
<result property="updTime" column="upd_time"/> <result property="updTime" column="upd_time"/>
<result property="intro" column="intro"/> <result property="intro" column="intro"/>
<result property="isDel" column="is_del"/> <result property="isDel" column="is_del"/>
......
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