Commit d77daa33 by lanpingxiong

Merge branch 'dev/lanpingxiong' into 'master'

Dev/lanpingxiong

See merge request hewei/Jumeirah!22
parents cf7e82e7 61296735
package com.jumeirah.api.app.controller;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.jumeirah.api.app.entity.vo.StrokeAddBackAndForthVo;
import com.jumeirah.api.app.entity.vo.StrokeAddFreightVo;
import com.jumeirah.api.app.entity.vo.StrokeAddMedicalTreatmentVo;
import com.jumeirah.api.app.entity.vo.StrokeAddOneWayVo;
import com.jumeirah.api.app.entity.param.StrokeAddBackAndForthParam;
import com.jumeirah.api.app.entity.param.StrokeAddFreightParam;
import com.jumeirah.api.app.entity.param.StrokeAddMedicalTreatmentParam;
import com.jumeirah.api.app.entity.param.StrokeAddOneWayParam;
import com.jumeirah.api.app.entity.param.StrokeDiscountParam;
import com.jumeirah.common.constant.Constant;
import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.enums.StatePaymentStatusEnum;
import com.jumeirah.common.param.StrokePageParam;
import com.jumeirah.common.param.app.StrokePaymentInfoParam;
import com.jumeirah.common.service.StrokeDiscountService;
import com.jumeirah.common.service.StrokeService;
import com.jumeirah.common.vo.StrokeDetailVo;
import com.jumeirah.common.vo.StrokeDiscountQueryVo;
import com.jumeirah.common.vo.StrokeQueryVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.controller.BaseController;
......@@ -49,7 +52,8 @@ public class StrokeController extends BaseController {
@Autowired
private StrokeService strokeService;
@Autowired
private StrokeDiscountService strokeDiscountService;
/**
* 填写付款信息
*/
......@@ -75,10 +79,10 @@ public class StrokeController extends BaseController {
@PostMapping("/add/oneWay")
@OperationLog(name = "添加单程行程表", type = OperationLogType.ADD)
@ApiOperation(value = "添加单程行程表", response = ApiResult.class)
public ApiResult<Boolean> addOneWayStroke(@Validated @RequestBody StrokeAddOneWayVo strokeAddOneWayVo) throws Exception {
public ApiResult<Boolean> addOneWayStroke(@Validated @RequestBody StrokeAddOneWayParam strokeAddOneWayParam) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddOneWayVo, stroke);
BeanUtils.copyProperties(strokeAddOneWayParam, stroke);
stroke.setType(0)
.setMoney(new BigDecimal("0"))
.setMcId(Constant.MC_ID)
......@@ -93,10 +97,10 @@ public class StrokeController extends BaseController {
@PostMapping("/add/backAndForth")
@OperationLog(name = "添加往返行程表", type = OperationLogType.ADD)
@ApiOperation(value = "添加往返行程表", response = ApiResult.class)
public ApiResult<Boolean> addBackAndForthStroke(@Validated @RequestBody StrokeAddBackAndForthVo strokeAddBackAndForthVo) throws Exception {
public ApiResult<Boolean> addBackAndForthStroke(@Validated @RequestBody StrokeAddBackAndForthParam strokeAddBackAndForthParam) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddBackAndForthVo, stroke);
BeanUtils.copyProperties(strokeAddBackAndForthParam, stroke);
stroke.setType(1)
.setMoney(new BigDecimal("0"))
.setMcId(Constant.MC_ID)
......@@ -111,10 +115,10 @@ public class StrokeController extends BaseController {
@PostMapping("/add/freight")
@OperationLog(name = "添加货运行程表", type = OperationLogType.ADD)
@ApiOperation(value = "添加货运行程表", response = ApiResult.class)
public ApiResult<Boolean> addFreightStroke(@Validated @RequestBody StrokeAddFreightVo strokeAddFreightVo) throws Exception {
public ApiResult<Boolean> addFreightStroke(@Validated @RequestBody StrokeAddFreightParam strokeAddFreightParam) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddFreightVo, stroke);
BeanUtils.copyProperties(strokeAddFreightParam, stroke);
stroke.setType(2)
.setMoney(new BigDecimal("0"))
.setMcId(Constant.MC_ID)
......@@ -130,10 +134,10 @@ public class StrokeController extends BaseController {
@OperationLog(name = "添加医疗行程表", type = OperationLogType.ADD)
@ApiOperation(value = "添加医疗行程表", response = ApiResult.class)
public ApiResult<Boolean> addMedicalTreatmentStroke(
@Validated @RequestBody StrokeAddMedicalTreatmentVo strokeAddMedicalTreatmentVo) throws Exception {
@Validated @RequestBody StrokeAddMedicalTreatmentParam strokeAddMedicalTreatmentParam) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddMedicalTreatmentVo, stroke);
BeanUtils.copyProperties(strokeAddMedicalTreatmentParam, stroke);
stroke.setType(3)
.setMoney(new BigDecimal("0"))
.setMcId(Constant.MC_ID)
......@@ -142,6 +146,29 @@ public class StrokeController extends BaseController {
return ApiResult.result(flag);
}
/**
* 添加优惠调机行程
*/
@PostMapping("/add/discount")
@OperationLog(name = "添加优惠调机行程", type = OperationLogType.ADD)
@ApiOperation(value = "添加优惠调机行程", response = ApiResult.class)
public ApiResult<Boolean> addOneWayStroke(@Validated @RequestBody StrokeDiscountParam strokeDiscountParam) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
StrokeDiscountQueryVo strokeDiscountQueryVo = strokeDiscountService.getStrokeDiscountById(strokeDiscountParam.getSdId());
Stroke stroke = new Stroke();
stroke.setType(4)
.setCityOutsetId(strokeDiscountQueryVo.getCityOutsetId())
.setCityArriveId(strokeDiscountQueryVo.getCityArriveId())
.setPeopleNum(strokeDiscountParam.getPeopleNum())
.setPlainTypeId(strokeDiscountQueryVo.getPlainTypeId())
.setOutsetTime(strokeDiscountParam.getOutsetTime())
.setMoney(strokeDiscountQueryVo.getMoney())
.setMcId(strokeDiscountQueryVo.getMcId())
.setUserId(jwtToken.getUserId());
boolean flag = strokeService.saveStroke(stroke);
return ApiResult.result(flag);
}
// /**
// * 修改行程表
......
package com.jumeirah.api.app.controller;
import com.jumeirah.common.entity.StrokeDiscount;
import com.jumeirah.common.param.StrokeDiscountPageParam;
import com.jumeirah.common.service.StrokeDiscountService;
import com.jumeirah.common.vo.StrokeDiscountQueryVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.controller.BaseController;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.core.validator.groups.Add;
import io.geekidea.springbootplus.framework.log.annotation.OperationLog;
import io.geekidea.springbootplus.framework.log.enums.OperationLogType;
import io.swagger.annotations.Api;
......@@ -36,18 +34,6 @@ public class StrokeDiscountController extends BaseController {
private StrokeDiscountService strokeDiscountService;
/**
* 添加优惠行程表
*/
@PostMapping("/add")
@OperationLog(name = "添加优惠行程表", type = OperationLogType.ADD)
@ApiOperation(value = "添加优惠行程表")
public ApiResult<Boolean> addStrokeDiscount(@Validated(Add.class) @RequestBody StrokeDiscount strokeDiscount) throws Exception {
boolean flag = strokeDiscountService.saveStrokeDiscount(strokeDiscount);
return ApiResult.result(flag);
}
/**
* 优惠行程表分页列表
*/
@PostMapping("/getPageList")
......
package com.jumeirah.api.app.entity.vo;
package com.jumeirah.api.app.entity.param;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
......@@ -20,7 +20,7 @@ import java.sql.Timestamp;
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "添加返程行程入参对象")
public class StrokeAddBackAndForthVo extends BaseEntity {
public class StrokeAddBackAndForthParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "出发城市id不能为空")
......
package com.jumeirah.api.app.entity.vo;
package com.jumeirah.api.app.entity.param;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
......@@ -21,7 +21,7 @@ import java.sql.Timestamp;
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "添加货运行程入参对象")
public class StrokeAddFreightVo extends BaseEntity {
public class StrokeAddFreightParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "出发城市id不能为空")
......
package com.jumeirah.api.app.entity.vo;
package com.jumeirah.api.app.entity.param;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
......@@ -21,7 +21,7 @@ import java.sql.Timestamp;
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "添加医疗行程入参对象")
public class StrokeAddMedicalTreatmentVo extends BaseEntity {
public class StrokeAddMedicalTreatmentParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "出发城市id不能为空")
......
package com.jumeirah.api.app.entity.vo;
package com.jumeirah.api.app.entity.param;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
......@@ -20,7 +20,7 @@ import java.sql.Timestamp;
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "添加单程行程入参对象")
public class StrokeAddOneWayVo extends BaseEntity {
public class StrokeAddOneWayParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "出发城市id不能为空")
......
package com.jumeirah.api.app.entity.param;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
import java.sql.Timestamp;
/**
* 优惠行程表
*
* @author xxx
* @since 2020-10-14
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "StrokeDiscount对象")
public class StrokeDiscountParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "优惠行程id不能为空")
@ApiModelProperty("优惠行程ID")
private Long sdId;
@NotNull(message = "人数不能为空")
@ApiModelProperty("人数")
private Integer peopleNum;
@NotNull(message = "出发时间不能为空")
@ApiModelProperty("出发时间")
private Timestamp outsetTime;
}
......@@ -67,7 +67,7 @@ public class Stroke extends BaseEntity {
private Timestamp returnTime;
@NotNull(message = "行程类型,0-单程,1-往返行程,2-货运,3-医疗不能为空")
@ApiModelProperty("行程类型,0-单程,1-往返行程,2-货运,3-医疗")
@ApiModelProperty("行程类型,0-单程,1-往返行程,2-货运,3-医疗,4-优惠调机")
private Integer type;
@NotNull(message = "状态,0-审核中,1-进行中,2-已完成,99-取消不能为空")
......
package com.jumeirah.common.entity;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import java.math.BigDecimal;
import java.sql.Timestamp;
/**
* 优惠行程表
......@@ -23,66 +23,66 @@ import io.geekidea.springbootplus.framework.core.validator.groups.Update;
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "StrokeDiscount对象")
public class StrokeDiscount extends BaseEntity {
private static final long serialVersionUID=1L;
private static final long serialVersionUID = 1L;
@NotNull(message = "id不能为空", groups = {Update.class})
@ApiModelProperty("主键ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@NotNull(message = "id不能为空", groups = {Update.class})
@ApiModelProperty("主键ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@NotNull(message = "出发城市id不能为空")
@ApiModelProperty("出发城市id")
private Long cityOutsetId;
@NotNull(message = "出发城市id不能为空")
@ApiModelProperty("出发城市id")
private Long cityOutsetId;
@NotBlank(message = "出发城市名称不能为空")
@ApiModelProperty("出发城市名称")
private String cityOutsetName;
@NotBlank(message = "出发城市名称不能为空")
@ApiModelProperty("出发城市名称")
private String cityOutsetName;
@NotNull(message = "到达城市id不能为空")
@ApiModelProperty("到达城市id")
private Long cityArriveId;
@NotNull(message = "到达城市id不能为空")
@ApiModelProperty("到达城市id")
private Long cityArriveId;
@NotBlank(message = "到达城市名称不能为空")
@ApiModelProperty("到达城市名称")
private String cityArriveName;
@NotBlank(message = "到达城市名称不能为空")
@ApiModelProperty("到达城市名称")
private String cityArriveName;
@NotNull(message = "座位数不能为空")
@ApiModelProperty("座位数")
private Integer seatMun;
@NotNull(message = "座位数不能为空")
@ApiModelProperty("座位数")
private Integer seatNum;
@NotNull(message = "飞机型号ID不能为空")
@ApiModelProperty("飞机型号ID")
private Long plainTypeId;
@NotNull(message = "飞机型号ID不能为空")
@ApiModelProperty("飞机型号ID")
private Long plainTypeId;
@NotNull(message = "出发时间不能为空")
@ApiModelProperty("出发时间")
private Date outsetTime;
@NotNull(message = "出发时间不能为空")
@ApiModelProperty("出发时间")
private Timestamp outsetTime;
@ApiModelProperty("返程时间")
private Date returnTime;
@ApiModelProperty("返程时间")
private Timestamp returnTime;
@NotNull(message = "状态,0-正常,1-完成,99-删除不能为空")
@ApiModelProperty("状态,0-正常,1-完成,99-删除")
private Integer status;
@NotNull(message = "状态,0-正常,1-完成,99-删除不能为空")
@ApiModelProperty("状态,0-正常,1-完成,99-删除")
private Integer status;
@NotNull(message = "创建时间不能为空")
@ApiModelProperty("创建时间")
private Long createTime;
@NotNull(message = "创建时间不能为空")
@ApiModelProperty("创建时间")
private Timestamp createTime;
@ApiModelProperty("更新时间")
private Long updateTime;
@ApiModelProperty("更新时间")
private Timestamp updateTime;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("价格,单位:分")
private Long money;
@ApiModelProperty("价格")
private BigDecimal money;
@NotNull(message = "商家ID不能为空")
@ApiModelProperty("商家ID")
private Long mcuId;
@NotNull(message = "商家ID不能为空")
@ApiModelProperty("商家ID")
private Long mcId;
}
......@@ -39,9 +39,15 @@ public interface StrokeMapper extends BaseMapper<Stroke> {
* @return
*/
IPage<StrokeQueryVo> getStrokePageList(@Param("page") Page page, @Param("param") StrokePageParam strokePageParam, @Param("userId") Long userId);
IPage<StrokeQueryVo> getStrokePageListWithFinsh(@Param("page") Page page, @Param("param") StrokePageParam strokePageParam, @Param("userId") Long userId);
/**
* 查询已完成行程
* @param page
* @param strokePageParam
* @param userId
* @return
*/
IPage<StrokeQueryVo> getStrokePageListWithFinish(@Param("page") Page page, @Param("param") StrokePageParam strokePageParam, @Param("userId") Long userId);
/**
* 商家端 获取行程分页对象
......
......@@ -3,15 +3,15 @@ package com.jumeirah.common.service.impl;
import com.jumeirah.common.entity.StrokeDiscount;
import com.jumeirah.common.mapper.StrokeDiscountMapper;
import com.jumeirah.common.service.StrokeDiscountService;
import com.jumeirah.common.param.StrokeDiscountPageParam;
import com.jumeirah.common.vo.StrokeDiscountQueryVo;
import com.jumeirah.common.param.StrokeDiscountPageParam;
import com.jumeirah.common.vo.StrokeDiscountQueryVo;
import io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.core.pagination.PageInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.core.pagination.PageInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -26,37 +26,37 @@ import org.springframework.beans.factory.annotation.Autowired;
@Service
public class StrokeDiscountServiceImpl extends BaseServiceImpl<StrokeDiscountMapper, StrokeDiscount> implements StrokeDiscountService {
@Autowired
private StrokeDiscountMapper strokeDiscountMapper;
@Autowired
private StrokeDiscountMapper strokeDiscountMapper;
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveStrokeDiscount(StrokeDiscount strokeDiscount)throws Exception{
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveStrokeDiscount(StrokeDiscount strokeDiscount) throws Exception {
return super.save(strokeDiscount);
}
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean updateStrokeDiscount(StrokeDiscount strokeDiscount)throws Exception{
@Transactional(rollbackFor = Exception.class)
@Override
public boolean updateStrokeDiscount(StrokeDiscount strokeDiscount) throws Exception {
return super.updateById(strokeDiscount);
}
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean deleteStrokeDiscount(Long id)throws Exception{
@Transactional(rollbackFor = Exception.class)
@Override
public boolean deleteStrokeDiscount(Long id) throws Exception {
return super.removeById(id);
}
}
@Override
public StrokeDiscountQueryVo getStrokeDiscountById(Long id) throws Exception {
return strokeDiscountMapper.getStrokeDiscountById(id);
}
@Override
public StrokeDiscountQueryVo getStrokeDiscountById(Long id)throws Exception{
return strokeDiscountMapper.getStrokeDiscountById(id);
}
@Override
public Paging<StrokeDiscountQueryVo> getStrokeDiscountPageList(StrokeDiscountPageParam strokeDiscountPageParam)throws Exception{
Page<StrokeDiscountQueryVo> page=new PageInfo<>(strokeDiscountPageParam,OrderItem.desc(getLambdaColumn(StrokeDiscount::getCreateTime)));
IPage<StrokeDiscountQueryVo> iPage= strokeDiscountMapper.getStrokeDiscountPageList(page, strokeDiscountPageParam);
public Paging<StrokeDiscountQueryVo> getStrokeDiscountPageList(StrokeDiscountPageParam strokeDiscountPageParam) throws Exception {
Page<StrokeDiscountQueryVo> page = new PageInfo<>(strokeDiscountPageParam, OrderItem.desc(getLambdaColumn(StrokeDiscount::getCreateTime)));
IPage<StrokeDiscountQueryVo> iPage = strokeDiscountMapper.getStrokeDiscountPageList(page, strokeDiscountPageParam);
return new Paging<StrokeDiscountQueryVo>(iPage);
}
}
}
}
......@@ -88,19 +88,14 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp
@Override
public Paging<StrokeQueryVo> getStrokePageList(StrokePageParam strokePageParam) throws Exception {
// Page<StrokeQueryVo> page = new PageInfo<>(strokePageParam, OrderItem.asc(getLambdaColumn(Stroke::getCreateTime)));
Page<StrokeQueryVo> page = new PageInfo<>(strokePageParam, OrderItem.asc("s.create_time"));
Page<StrokeQueryVo> page = new PageInfo<>(strokePageParam, OrderItem.desc("s.create_time"));
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
// 查询已完成 需要额外查询已取消状态
if (strokePageParam.getStatus().equals(StrokeStatusEnum.COMPLETED.getCode())){
IPage<StrokeQueryVo> iPage = strokeMapper.getStrokePageListWithFinsh(page, strokePageParam, jwtToken.getUserId());
IPage<StrokeQueryVo> iPage = strokeMapper.getStrokePageListWithFinish(page, strokePageParam, jwtToken.getUserId());
return new Paging<StrokeQueryVo>(iPage);
}
IPage<StrokeQueryVo> iPage = strokeMapper.getStrokePageList(page, strokePageParam, jwtToken.getUserId());
return new Paging<StrokeQueryVo>(iPage);
}
......
......@@ -6,7 +6,8 @@ import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import java.sql.Timestamp;
/**
* <pre>
......@@ -44,26 +45,26 @@ public class StrokeDiscountQueryVo implements Serializable {
private Long plainTypeId;
@ApiModelProperty("出发时间")
private Date outsetTime;
private Timestamp outsetTime;
@ApiModelProperty("返程时间")
private Date returnTime;
private Timestamp returnTime;
@ApiModelProperty("状态,0-正常,1-完成,99-删除")
private Integer status;
@ApiModelProperty("创建时间")
private Long createTime;
private Timestamp createTime;
@ApiModelProperty("更新时间")
private Long updateTime;
private Timestamp updateTime;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("价格,单位:分")
private Long money;
@ApiModelProperty("价格")
private BigDecimal money;
@ApiModelProperty("商家ID")
private Long mcuId;
private Long mcId;
}
......@@ -2,21 +2,41 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jumeirah.common.mapper.StrokeDiscountMapper">
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, city_outset_id, city_outset_name, city_arrive_id, city_arrive_name, seat_mun, plain_type_id, outset_time, return_time, status, create_time, update_time, remarks, money, mcu_id
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id,
city_outset_id,
city_outset_name,
city_arrive_id,
city_arrive_name,
seat_mun,
plain_type_id,
outset_time,
return_time,
status,
create_time,
update_time,
remarks,
money,
mc_id
</sql>
<select id="getStrokeDiscountById" resultType="com.jumeirah.common.vo.StrokeDiscountQueryVo">
select
<include refid="Base_Column_List"/>
from stroke_discount where id = #{id}
</select>
<select id="getStrokeDiscountById" resultType="com.jumeirah.common.vo.StrokeDiscountQueryVo">
select
<include refid="Base_Column_List"/>
from stroke_discount where id = #{id}
</select>
<select id="getStrokeDiscountPageList" parameterType="com.jumeirah.common.param.StrokeDiscountPageParam" resultType="com.jumeirah.common.vo.StrokeDiscountQueryVo">
select
<include refid="Base_Column_List"/>
from stroke_discount
</select>
<select id="getStrokeDiscountPageList" parameterType="com.jumeirah.common.param.StrokeDiscountPageParam"
resultType="com.jumeirah.common.vo.StrokeDiscountQueryVo">
select
ctco.city_name_cn as city_outset_name,
ctca.city_name_cn as city_arrive_name,
sd.*
from stroke_discount sd
INNER JOIN city_three_code ctco ON ctco.id = sd.city_outset_id
INNER JOIN city_three_code ctca ON ctca.id = sd.city_arrive_id
</select>
</mapper>
......@@ -7,9 +7,7 @@
s.id,
mu.id as merchantId,
city_outset_id,
city_outset_name,
city_arrive_id,
city_arrive_name,
people_num,
plain_type_id,
outset_time,
......@@ -19,16 +17,52 @@
money,
user_id,
mu.username AS merchantName,
outset_airport_name,arrive_airport_name,arrive_plain_type_id,back_outset_airport_name,back_arrive_airport_name,
payment_status,audit_status,user_recharge_bank,user_recharge_name,user_recharge_bank_number
arrive_plain_type_id,
back_outset_airport_name,
back_arrive_airport_name,
payment_status,
audit_status,
user_recharge_bank,
user_recharge_name,
user_recharge_bank_number
</sql>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, city_outset_id, deleted, city_outset_name, city_arrive_id, city_arrive_name, people_num, plain_type_id, outset_time, return_time, type, status, create_time, update_time, goods_name, goods_size, goods_weight, disease_name, instruments, medical_persons, remarks, money, user_id
,outset_airport_name,arrive_airport_name,arrive_plain_type_id,back_outset_airport_name,back_arrive_airport_name,payment_status,audit_status, user_recharge_money,user_recharge_bank,user_recharge_name,
user_recharge_bank_number,user_recharge_credentials_url
id,
city_outset_id,
deleted,
city_outset_name,
city_arrive_id,
city_arrive_name,
people_num,
plain_type_id,
outset_time,
return_time,
type,
status,
create_time,
update_time,
goods_name,
goods_size,
goods_weight,
disease_name,
instruments,
medical_persons,
remarks, money,
user_id,
outset_airport_name,
arrive_airport_name,
arrive_plain_type_id,
back_outset_airport_name,
back_arrive_airport_name,
payment_status,audit_status,
user_recharge_money,
user_recharge_bank,
user_recharge_name,
user_recharge_bank_number,
user_recharge_credentials_url
</sql>
<select id="getStrokeById" resultType="com.jumeirah.common.vo.StrokeDetailVo">
......@@ -40,9 +74,15 @@
<select id="getStrokePageList" parameterType="com.jumeirah.common.param.StrokePageParam"
resultType="com.jumeirah.common.vo.StrokeQueryVo">
select
<include refid="Page_Column_List"/>
ctco.city_name_cn as city_outset_name,
ctco.airport_name_cn as outset_airport_name,
ctca.city_name_cn as city_arrive_name,
ctca.airport_name_cn as arrive_airport_name,
<include refid="Page_Column_List"/>
from stroke s
INNER JOIN merchant_user mu ON mu.id = s.mc_id
INNER JOIN city_three_code ctco ON ctco.id = s.city_outset_id
INNER JOIN city_three_code ctca ON ctca.id = s.city_arrive_id
<where>
and s.user_id = #{userId}
and s.deleted = 0
......@@ -56,12 +96,18 @@
</select>
<!-- 已完成订单-->
<select id="getStrokePageListWithFinsh" parameterType="com.jumeirah.common.param.StrokePageParam"
<select id="getStrokePageListWithFinish" parameterType="com.jumeirah.common.param.StrokePageParam"
resultType="com.jumeirah.common.vo.StrokeQueryVo">
select
<include refid="Page_Column_List"/>
ctco.city_name_cn as city_outset_name,
ctco.airport_name_cn as outset_airport_name,
ctca.city_name_cn as city_arrive_name,
ctca.airport_name_cn as arrive_airport_name,
<include refid="Page_Column_List"/>
from stroke s
INNER JOIN merchant_user mu ON mu.id = s.mc_id
INNER JOIN city_three_code ctco ON ctco.id = s.city_outset_id
INNER JOIN city_three_code ctca ON ctca.id = s.city_arrive_id
<where>
and s.user_id = #{userId}
and s.deleted = 0
......
......@@ -53,7 +53,7 @@ public interface GeneratorConstant {
/**
* VO
*/
String VO = "vo";
String VO = "param";
/**
* 查询VO
*/
......
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