Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SiEn
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
SiEn
Commits
b682691c
Commit
b682691c
authored
Oct 14, 2020
by
testdl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 用户下单功能
parent
b8147e79
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
645 additions
and
79 deletions
+645
-79
api-app/src/main/java/com/jumeirah/api/app/controller/StrokeController.java
+11
-0
api-app/src/main/java/com/jumeirah/api/app/controller/StrokeDiscountController.java
+62
-0
api-app/src/main/java/com/jumeirah/api/app/entity/vo/StrokeAddBackAndForthVo.java
+6
-15
api-app/src/main/java/com/jumeirah/api/app/entity/vo/StrokeAddFreightVo.java
+3
-10
api-app/src/main/java/com/jumeirah/api/app/entity/vo/StrokeAddMedicalTreatmentVo.java
+2
-9
api-app/src/main/java/com/jumeirah/api/app/entity/vo/StrokeAddOneWayVo.java
+5
-18
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/order/McStrokeController.java
+26
-11
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/StrokeQuotedPriceParam.java
+43
-0
common/src/main/java/com/jumeirah/common/constant/Constant.java
+14
-0
common/src/main/java/com/jumeirah/common/controller/StrokeDiscountController.java
+93
-0
common/src/main/java/com/jumeirah/common/entity/Stroke.java
+5
-5
common/src/main/java/com/jumeirah/common/entity/StrokeDiscount.java
+88
-0
common/src/main/java/com/jumeirah/common/mapper/StrokeDiscountMapper.java
+42
-0
common/src/main/java/com/jumeirah/common/param/McStrokePageParam.java
+1
-1
common/src/main/java/com/jumeirah/common/param/StrokeDiscountPageParam.java
+23
-0
common/src/main/java/com/jumeirah/common/service/StrokeDiscountService.java
+62
-0
common/src/main/java/com/jumeirah/common/service/impl/StrokeDiscountServiceImpl.java
+62
-0
common/src/main/java/com/jumeirah/common/vo/StrokeDiscountQueryVo.java
+69
-0
common/src/main/resources/mapper/StrokeDiscountMapper.xml
+22
-0
common/src/main/resources/mapper/StrokeMapper.xml
+6
-10
No files found.
api-app/src/main/java/com/jumeirah/api/app/controller/StrokeController.java
View file @
b682691c
...
@@ -5,6 +5,7 @@ import com.jumeirah.api.app.entity.vo.StrokeAddBackAndForthVo;
...
@@ -5,6 +5,7 @@ import com.jumeirah.api.app.entity.vo.StrokeAddBackAndForthVo;
import
com.jumeirah.api.app.entity.vo.StrokeAddFreightVo
;
import
com.jumeirah.api.app.entity.vo.StrokeAddFreightVo
;
import
com.jumeirah.api.app.entity.vo.StrokeAddMedicalTreatmentVo
;
import
com.jumeirah.api.app.entity.vo.StrokeAddMedicalTreatmentVo
;
import
com.jumeirah.api.app.entity.vo.StrokeAddOneWayVo
;
import
com.jumeirah.api.app.entity.vo.StrokeAddOneWayVo
;
import
com.jumeirah.common.constant.Constant
;
import
com.jumeirah.common.entity.Stroke
;
import
com.jumeirah.common.entity.Stroke
;
import
com.jumeirah.common.enums.StatePaymentStatusEnum
;
import
com.jumeirah.common.enums.StatePaymentStatusEnum
;
import
com.jumeirah.common.param.StrokePageParam
;
import
com.jumeirah.common.param.StrokePageParam
;
...
@@ -32,6 +33,8 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -32,6 +33,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.math.BigDecimal
;
/**
/**
* 行程表 控制器
* 行程表 控制器
*
*
...
@@ -77,6 +80,8 @@ public class StrokeController extends BaseController {
...
@@ -77,6 +80,8 @@ public class StrokeController extends BaseController {
Stroke
stroke
=
new
Stroke
();
Stroke
stroke
=
new
Stroke
();
BeanUtils
.
copyProperties
(
strokeAddOneWayVo
,
stroke
);
BeanUtils
.
copyProperties
(
strokeAddOneWayVo
,
stroke
);
stroke
.
setType
(
0
)
stroke
.
setType
(
0
)
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMcId
(
Constant
.
MC_ID
)
.
setUserId
(
jwtToken
.
getUserId
());
.
setUserId
(
jwtToken
.
getUserId
());
boolean
flag
=
strokeService
.
saveStroke
(
stroke
);
boolean
flag
=
strokeService
.
saveStroke
(
stroke
);
return
ApiResult
.
result
(
flag
);
return
ApiResult
.
result
(
flag
);
...
@@ -93,6 +98,8 @@ public class StrokeController extends BaseController {
...
@@ -93,6 +98,8 @@ public class StrokeController extends BaseController {
Stroke
stroke
=
new
Stroke
();
Stroke
stroke
=
new
Stroke
();
BeanUtils
.
copyProperties
(
strokeAddBackAndForthVo
,
stroke
);
BeanUtils
.
copyProperties
(
strokeAddBackAndForthVo
,
stroke
);
stroke
.
setType
(
1
)
stroke
.
setType
(
1
)
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMcId
(
Constant
.
MC_ID
)
.
setUserId
(
jwtToken
.
getUserId
());
.
setUserId
(
jwtToken
.
getUserId
());
boolean
flag
=
strokeService
.
saveStroke
(
stroke
);
boolean
flag
=
strokeService
.
saveStroke
(
stroke
);
return
ApiResult
.
result
(
flag
);
return
ApiResult
.
result
(
flag
);
...
@@ -109,6 +116,8 @@ public class StrokeController extends BaseController {
...
@@ -109,6 +116,8 @@ public class StrokeController extends BaseController {
Stroke
stroke
=
new
Stroke
();
Stroke
stroke
=
new
Stroke
();
BeanUtils
.
copyProperties
(
strokeAddFreightVo
,
stroke
);
BeanUtils
.
copyProperties
(
strokeAddFreightVo
,
stroke
);
stroke
.
setType
(
2
)
stroke
.
setType
(
2
)
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMcId
(
Constant
.
MC_ID
)
.
setUserId
(
jwtToken
.
getUserId
());
.
setUserId
(
jwtToken
.
getUserId
());
boolean
flag
=
strokeService
.
saveStroke
(
stroke
);
boolean
flag
=
strokeService
.
saveStroke
(
stroke
);
return
ApiResult
.
result
(
flag
);
return
ApiResult
.
result
(
flag
);
...
@@ -126,6 +135,8 @@ public class StrokeController extends BaseController {
...
@@ -126,6 +135,8 @@ public class StrokeController extends BaseController {
Stroke
stroke
=
new
Stroke
();
Stroke
stroke
=
new
Stroke
();
BeanUtils
.
copyProperties
(
strokeAddMedicalTreatmentVo
,
stroke
);
BeanUtils
.
copyProperties
(
strokeAddMedicalTreatmentVo
,
stroke
);
stroke
.
setType
(
3
)
stroke
.
setType
(
3
)
.
setMoney
(
new
BigDecimal
(
"0"
))
.
setMcId
(
Constant
.
MC_ID
)
.
setUserId
(
jwtToken
.
getUserId
());
.
setUserId
(
jwtToken
.
getUserId
());
boolean
flag
=
strokeService
.
saveStroke
(
stroke
);
boolean
flag
=
strokeService
.
saveStroke
(
stroke
);
return
ApiResult
.
result
(
flag
);
return
ApiResult
.
result
(
flag
);
...
...
api-app/src/main/java/com/jumeirah/api/app/controller/StrokeDiscountController.java
0 → 100644
View file @
b682691c
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
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 优惠行程表 控制器
*
* @author xxx
* @since 2020-10-14
*/
@Slf4j
@RestController
@RequestMapping
(
"/app/strokeDiscount"
)
@Api
(
value
=
"优惠行程表API"
,
tags
=
{
"优惠行程表"
})
public
class
StrokeDiscountController
extends
BaseController
{
@Autowired
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"
)
@OperationLog
(
name
=
"优惠行程表分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"优惠行程表分页列表"
)
public
ApiResult
<
Paging
<
StrokeDiscountQueryVo
>>
getStrokeDiscountPageList
(
@Validated
@RequestBody
StrokeDiscountPageParam
strokeDiscountPageParam
)
throws
Exception
{
Paging
<
StrokeDiscountQueryVo
>
paging
=
strokeDiscountService
.
getStrokeDiscountPageList
(
strokeDiscountPageParam
);
return
ApiResult
.
ok
(
paging
);
}
}
api-app/src/main/java/com/jumeirah/api/app/entity/vo/StrokeAddBackAndForthVo.java
View file @
b682691c
...
@@ -7,8 +7,8 @@ import lombok.Data;
...
@@ -7,8 +7,8 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
/**
/**
* 行程表-返程
* 行程表-返程
...
@@ -27,32 +27,23 @@ public class StrokeAddBackAndForthVo extends BaseEntity {
...
@@ -27,32 +27,23 @@ public class StrokeAddBackAndForthVo extends BaseEntity {
@ApiModelProperty
(
"出发城市id"
)
@ApiModelProperty
(
"出发城市id"
)
private
Long
cityOutsetId
;
private
Long
cityOutsetId
;
@NotBlank
(
message
=
"出发城市名称不能为空"
)
@ApiModelProperty
(
"出发城市名称"
)
private
String
cityOutsetName
;
@NotNull
(
message
=
"到达城市id不能为空"
)
@NotNull
(
message
=
"到达城市id不能为空"
)
@ApiModelProperty
(
"到达城市id"
)
@ApiModelProperty
(
"到达城市id"
)
private
Long
cityArriveId
;
private
Long
cityArriveId
;
@NotBlank
(
message
=
"到达城市名称不能为空"
)
@ApiModelProperty
(
"到达城市名称"
)
private
String
cityArriveName
;
@NotNull
(
message
=
"人数不能为空"
)
@NotNull
(
message
=
"人数不能为空"
)
@ApiModelProperty
(
"人数"
)
@ApiModelProperty
(
"人数"
)
private
Integer
people
Mun
;
private
Integer
people
Num
;
@NotNull
(
message
=
"飞机型号ID不能为空"
)
@ApiModelProperty
(
"用户选择机型(多个中间逗号隔开)"
)
@ApiModelProperty
(
"飞机型号ID"
)
private
String
choosePlainType
;
private
Long
plainTypeId
;
@NotNull
(
message
=
"出发时间不能为空"
)
@NotNull
(
message
=
"出发时间不能为空"
)
@ApiModelProperty
(
"出发时间"
)
@ApiModelProperty
(
"出发时间"
)
private
Long
outsetTime
;
private
Timestamp
outsetTime
;
@NotNull
(
message
=
"返程时间不能为空"
)
@NotNull
(
message
=
"返程时间不能为空"
)
@ApiModelProperty
(
"返程时间"
)
@ApiModelProperty
(
"返程时间"
)
private
Long
returnTime
;
private
Timestamp
returnTime
;
}
}
api-app/src/main/java/com/jumeirah/api/app/entity/vo/StrokeAddFreightVo.java
View file @
b682691c
...
@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
...
@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
/**
/**
* 行程表
* 行程表
...
@@ -27,21 +28,13 @@ public class StrokeAddFreightVo extends BaseEntity {
...
@@ -27,21 +28,13 @@ public class StrokeAddFreightVo extends BaseEntity {
@ApiModelProperty
(
"出发城市id"
)
@ApiModelProperty
(
"出发城市id"
)
private
Long
cityOutsetId
;
private
Long
cityOutsetId
;
@NotBlank
(
message
=
"出发城市名称不能为空"
)
@ApiModelProperty
(
"出发城市名称"
)
private
String
cityOutsetName
;
@NotNull
(
message
=
"到达城市id不能为空"
)
@NotNull
(
message
=
"到达城市id不能为空"
)
@ApiModelProperty
(
"到达城市id"
)
@ApiModelProperty
(
"到达城市id"
)
private
Long
cityArriveId
;
private
Long
cityArriveId
;
@NotBlank
(
message
=
"到达城市名称不能为空"
)
@ApiModelProperty
(
"到达城市名称"
)
private
String
cityArriveName
;
@NotNull
(
message
=
"出发时间不能为空"
)
@NotNull
(
message
=
"出发时间不能为空"
)
@ApiModelProperty
(
"出发时间"
)
@ApiModelProperty
(
"出发时间"
)
private
Long
outsetTime
;
private
Timestamp
outsetTime
;
@NotBlank
(
message
=
"货物名称不能为空"
)
@NotBlank
(
message
=
"货物名称不能为空"
)
@ApiModelProperty
(
"货物名称"
)
@ApiModelProperty
(
"货物名称"
)
...
@@ -53,6 +46,6 @@ public class StrokeAddFreightVo extends BaseEntity {
...
@@ -53,6 +46,6 @@ public class StrokeAddFreightVo extends BaseEntity {
@NotNull
(
message
=
"货物重量不能为空"
)
@NotNull
(
message
=
"货物重量不能为空"
)
@ApiModelProperty
(
"货物重量,单位:吨"
)
@ApiModelProperty
(
"货物重量,单位:吨"
)
private
Double
goodsWeight
;
private
String
goodsWeight
;
}
}
api-app/src/main/java/com/jumeirah/api/app/entity/vo/StrokeAddMedicalTreatmentVo.java
View file @
b682691c
...
@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
...
@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
/**
/**
* 行程表
* 行程表
...
@@ -27,21 +28,13 @@ public class StrokeAddMedicalTreatmentVo extends BaseEntity {
...
@@ -27,21 +28,13 @@ public class StrokeAddMedicalTreatmentVo extends BaseEntity {
@ApiModelProperty
(
"出发城市id"
)
@ApiModelProperty
(
"出发城市id"
)
private
Long
cityOutsetId
;
private
Long
cityOutsetId
;
@NotBlank
(
message
=
"出发城市名称不能为空"
)
@ApiModelProperty
(
"出发城市名称"
)
private
String
cityOutsetName
;
@NotNull
(
message
=
"到达城市id不能为空"
)
@NotNull
(
message
=
"到达城市id不能为空"
)
@ApiModelProperty
(
"到达城市id"
)
@ApiModelProperty
(
"到达城市id"
)
private
Long
cityArriveId
;
private
Long
cityArriveId
;
@NotBlank
(
message
=
"到达城市名称不能为空"
)
@ApiModelProperty
(
"到达城市名称"
)
private
String
cityArriveName
;
@NotNull
(
message
=
"出发时间不能为空"
)
@NotNull
(
message
=
"出发时间不能为空"
)
@ApiModelProperty
(
"出发时间"
)
@ApiModelProperty
(
"出发时间"
)
private
Long
outsetTime
;
private
Timestamp
outsetTime
;
@NotBlank
(
message
=
"到达城市名称不能为空"
)
@NotBlank
(
message
=
"到达城市名称不能为空"
)
@ApiModelProperty
(
"病人疾病名称"
)
@ApiModelProperty
(
"病人疾病名称"
)
...
...
api-app/src/main/java/com/jumeirah/api/app/entity/vo/StrokeAddOneWayVo.java
View file @
b682691c
package
com
.
jumeirah
.
api
.
app
.
entity
.
vo
;
package
com
.
jumeirah
.
api
.
app
.
entity
.
vo
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
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.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.
util.Date
;
import
java.
sql.Timestamp
;
/**
/**
* 行程表
* 行程表
...
@@ -31,28 +27,19 @@ public class StrokeAddOneWayVo extends BaseEntity {
...
@@ -31,28 +27,19 @@ public class StrokeAddOneWayVo extends BaseEntity {
@ApiModelProperty
(
"出发城市id"
)
@ApiModelProperty
(
"出发城市id"
)
private
Long
cityOutsetId
;
private
Long
cityOutsetId
;
@NotBlank
(
message
=
"出发城市名称不能为空"
)
@ApiModelProperty
(
"出发城市名称"
)
private
String
cityOutsetName
;
@NotNull
(
message
=
"到达城市id不能为空"
)
@NotNull
(
message
=
"到达城市id不能为空"
)
@ApiModelProperty
(
"到达城市id"
)
@ApiModelProperty
(
"到达城市id"
)
private
Long
cityArriveId
;
private
Long
cityArriveId
;
@NotBlank
(
message
=
"到达城市名称不能为空"
)
@ApiModelProperty
(
"到达城市名称"
)
private
String
cityArriveName
;
@NotNull
(
message
=
"人数不能为空"
)
@NotNull
(
message
=
"人数不能为空"
)
@ApiModelProperty
(
"人数"
)
@ApiModelProperty
(
"人数"
)
private
Integer
people
Mun
;
private
Integer
people
Num
;
@NotNull
(
message
=
"飞机型号ID不能为空"
)
@ApiModelProperty
(
"用户选择机型(多个中间逗号隔开)"
)
@ApiModelProperty
(
"飞机型号ID"
)
private
String
choosePlainType
;
private
Long
plainTypeId
;
@NotNull
(
message
=
"出发时间不能为空"
)
@NotNull
(
message
=
"出发时间不能为空"
)
@ApiModelProperty
(
"出发时间"
)
@ApiModelProperty
(
"出发时间"
)
private
Long
outsetTime
;
private
Timestamp
outsetTime
;
}
}
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/order/McStrokeController.java
View file @
b682691c
package
com
.
jumeirah
.
api
.
merchant
.
controller
.
order
;
package
com
.
jumeirah
.
api
.
merchant
.
controller
.
order
;
import
com.jumeirah.api.merchant.entity.param.StrokeQuotedPriceParam
;
import
com.jumeirah.common.entity.Stroke
;
import
com.jumeirah.common.entity.Stroke
;
import
com.jumeirah.common.param.McStrokePageParam
;
import
com.jumeirah.common.param.McStrokePageParam
;
import
com.jumeirah.common.service.StrokeService
;
import
com.jumeirah.common.service.StrokeService
;
...
@@ -14,6 +15,7 @@ import io.geekidea.springbootplus.framework.log.enums.OperationLogType;
...
@@ -14,6 +15,7 @@ import io.geekidea.springbootplus.framework.log.enums.OperationLogType;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -39,6 +41,30 @@ public class McStrokeController extends BaseController {
...
@@ -39,6 +41,30 @@ public class McStrokeController extends BaseController {
private
StrokeService
strokeService
;
private
StrokeService
strokeService
;
/**
/**
* 行程表分页列表
*/
@PostMapping
(
"/getPageList"
)
@OperationLog
(
name
=
"行程分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"行程分页列表"
)
public
ApiResult
<
Paging
<
McStrokeQueryVo
>>
getMyStrokePageList
(
@Validated
@RequestBody
McStrokePageParam
mcStrokePageParam
)
throws
Exception
{
Paging
<
McStrokeQueryVo
>
paging
=
strokeService
.
getMcStrokePageList
(
mcStrokePageParam
);
return
ApiResult
.
ok
(
paging
);
}
/**
* 行程报价接口
*/
@PostMapping
(
"/update/quotedPrice"
)
@OperationLog
(
name
=
"行程报价接口"
,
type
=
OperationLogType
.
UPDATE
)
@ApiOperation
(
value
=
"行程报价接口"
,
response
=
ApiResult
.
class
)
public
ApiResult
<
Boolean
>
updateStroke
(
@Validated
@RequestBody
StrokeQuotedPriceParam
strokeQuotedPriceParam
)
throws
Exception
{
Stroke
stroke
=
new
Stroke
();
BeanUtils
.
copyProperties
(
strokeQuotedPriceParam
,
stroke
);
boolean
flag
=
strokeService
.
updateStroke
(
stroke
);
return
ApiResult
.
result
(
flag
);
}
/**
* 修改行程表
* 修改行程表
*/
*/
@PostMapping
(
"/update"
)
@PostMapping
(
"/update"
)
...
@@ -71,16 +97,5 @@ public class McStrokeController extends BaseController {
...
@@ -71,16 +97,5 @@ public class McStrokeController extends BaseController {
return
ApiResult
.
ok
(
strokeQueryVo
);
return
ApiResult
.
ok
(
strokeQueryVo
);
}
}
/**
* 行程表分页列表
*/
@PostMapping
(
"/getPageList"
)
@OperationLog
(
name
=
"行程分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"行程分页列表"
)
public
ApiResult
<
Paging
<
McStrokeQueryVo
>>
getMyStrokePageList
(
@Validated
@RequestBody
McStrokePageParam
mcStrokePageParam
)
throws
Exception
{
Paging
<
McStrokeQueryVo
>
paging
=
strokeService
.
getMcStrokePageList
(
mcStrokePageParam
);
return
ApiResult
.
ok
(
paging
);
}
}
}
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/StrokeQuotedPriceParam.java
0 → 100644
View file @
b682691c
package
com
.
jumeirah
.
api
.
merchant
.
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.math.BigDecimal
;
/**
* 行程表
*
* @author wei
* @since 2020-09-29
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"Stroke报价对象"
)
public
class
StrokeQuotedPriceParam
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
"id不能为空"
)
@ApiModelProperty
(
"主键ID"
)
private
Long
id
;
@NotNull
(
message
=
"飞机型号ID不能为空"
)
@ApiModelProperty
(
"飞机型号ID"
)
private
Long
plainTypeId
;
@NotNull
(
message
=
"价格不能为空"
)
@ApiModelProperty
(
"价格"
)
private
BigDecimal
money
;
@ApiModelProperty
(
"备注"
)
private
String
remarks
;
}
common/src/main/java/com/jumeirah/common/constant/Constant.java
0 → 100644
View file @
b682691c
package
com
.
jumeirah
.
common
.
constant
;
/**
* @ClassName Constant
* @Descripteion 请写点注释吧!
* @Date 2020/10/13 14:08
* @Version 1.0
**/
public
class
Constant
{
/**
* 卓美亚商家ID
*/
public
static
final
Long
MC_ID
=
1L
;
}
common/src/main/java/com/jumeirah/common/controller/StrokeDiscountController.java
0 → 100644
View file @
b682691c
package
com
.
jumeirah
.
common
.
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.core.validator.groups.Update
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
/**
* 优惠行程表 控制器
*
* @author xxx
* @since 2020-10-14
*/
/*@Slf4j
@RestController
@RequestMapping("/strokeDiscount")
@Api(value = "优惠行程表API", tags = {"优惠行程表"})*/
public
class
StrokeDiscountController
extends
BaseController
{
@Autowired
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
(
"/update"
)
@OperationLog
(
name
=
"修改优惠行程表"
,
type
=
OperationLogType
.
UPDATE
)
@ApiOperation
(
value
=
"修改优惠行程表"
)
public
ApiResult
<
Boolean
>
updateStrokeDiscount
(
@Validated
(
Update
.
class
)
@RequestBody
StrokeDiscount
strokeDiscount
)
throws
Exception
{
boolean
flag
=
strokeDiscountService
.
updateStrokeDiscount
(
strokeDiscount
);
return
ApiResult
.
result
(
flag
);
}
/**
* 删除优惠行程表
*/
@PostMapping
(
"/delete/{id}"
)
@OperationLog
(
name
=
"删除优惠行程表"
,
type
=
OperationLogType
.
DELETE
)
@ApiOperation
(
value
=
"删除优惠行程表"
)
public
ApiResult
<
Boolean
>
deleteStrokeDiscount
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
boolean
flag
=
strokeDiscountService
.
deleteStrokeDiscount
(
id
);
return
ApiResult
.
result
(
flag
);
}
/**
* 获取优惠行程表详情
*/
@GetMapping
(
"/info/{id}"
)
@OperationLog
(
name
=
"优惠行程表详情"
,
type
=
OperationLogType
.
INFO
)
@ApiOperation
(
value
=
"优惠行程表详情"
)
public
ApiResult
<
StrokeDiscountQueryVo
>
getStrokeDiscount
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
StrokeDiscountQueryVo
strokeDiscountQueryVo
=
strokeDiscountService
.
getStrokeDiscountById
(
id
);
return
ApiResult
.
ok
(
strokeDiscountQueryVo
);
}
/**
* 优惠行程表分页列表
*/
@PostMapping
(
"/getPageList"
)
@OperationLog
(
name
=
"优惠行程表分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"优惠行程表分页列表"
)
public
ApiResult
<
Paging
<
StrokeDiscountQueryVo
>>
getStrokeDiscountPageList
(
@Validated
@RequestBody
StrokeDiscountPageParam
strokeDiscountPageParam
)
throws
Exception
{
Paging
<
StrokeDiscountQueryVo
>
paging
=
strokeDiscountService
.
getStrokeDiscountPageList
(
strokeDiscountPageParam
);
return
ApiResult
.
ok
(
paging
);
}
}
common/src/main/java/com/jumeirah/common/entity/Stroke.java
View file @
b682691c
...
@@ -42,7 +42,6 @@ public class Stroke extends BaseEntity {
...
@@ -42,7 +42,6 @@ public class Stroke extends BaseEntity {
@TableLogic
@TableLogic
private
Integer
deleted
;
private
Integer
deleted
;
@NotBlank
(
message
=
"出发城市名称不能为空"
)
@ApiModelProperty
(
"出发城市名称"
)
@ApiModelProperty
(
"出发城市名称"
)
private
String
cityOutsetName
;
private
String
cityOutsetName
;
...
@@ -50,15 +49,13 @@ public class Stroke extends BaseEntity {
...
@@ -50,15 +49,13 @@ public class Stroke extends BaseEntity {
@ApiModelProperty
(
"到达城市id"
)
@ApiModelProperty
(
"到达城市id"
)
private
Long
cityArriveId
;
private
Long
cityArriveId
;
@NotBlank
(
message
=
"到达城市名称不能为空"
)
@ApiModelProperty
(
"到达城市名称"
)
@ApiModelProperty
(
"到达城市名称"
)
private
String
cityArriveName
;
private
String
cityArriveName
;
@NotNull
(
message
=
"人数不能为空"
)
@NotNull
(
message
=
"人数不能为空"
)
@ApiModelProperty
(
"人数"
)
@ApiModelProperty
(
"人数"
)
private
Integer
people
Mun
;
private
Integer
people
Num
;
@NotNull
(
message
=
"飞机型号ID不能为空"
)
@ApiModelProperty
(
"飞机型号ID"
)
@ApiModelProperty
(
"飞机型号ID"
)
private
Long
plainTypeId
;
private
Long
plainTypeId
;
...
@@ -91,7 +88,7 @@ public class Stroke extends BaseEntity {
...
@@ -91,7 +88,7 @@ public class Stroke extends BaseEntity {
private
String
goodsSize
;
private
String
goodsSize
;
@ApiModelProperty
(
"货物重量,单位:吨"
)
@ApiModelProperty
(
"货物重量,单位:吨"
)
private
Double
goodsWeight
;
private
String
goodsWeight
;
@ApiModelProperty
(
"病人疾病名称"
)
@ApiModelProperty
(
"病人疾病名称"
)
private
String
diseaseName
;
private
String
diseaseName
;
...
@@ -183,4 +180,7 @@ public class Stroke extends BaseEntity {
...
@@ -183,4 +180,7 @@ public class Stroke extends BaseEntity {
@ApiModelProperty
(
"商家银行卡号"
)
@ApiModelProperty
(
"商家银行卡号"
)
private
String
rechargeBankNumber
;
private
String
rechargeBankNumber
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
}
common/src/main/java/com/jumeirah/common/entity/StrokeDiscount.java
0 → 100644
View file @
b682691c
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.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
;
/**
* 优惠行程表
*
* @author xxx
* @since 2020-10-14
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"StrokeDiscount对象"
)
public
class
StrokeDiscount
extends
BaseEntity
{
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不能为空"
)
@ApiModelProperty
(
"出发城市id"
)
private
Long
cityOutsetId
;
@NotBlank
(
message
=
"出发城市名称不能为空"
)
@ApiModelProperty
(
"出发城市名称"
)
private
String
cityOutsetName
;
@NotNull
(
message
=
"到达城市id不能为空"
)
@ApiModelProperty
(
"到达城市id"
)
private
Long
cityArriveId
;
@NotBlank
(
message
=
"到达城市名称不能为空"
)
@ApiModelProperty
(
"到达城市名称"
)
private
String
cityArriveName
;
@NotNull
(
message
=
"座位数不能为空"
)
@ApiModelProperty
(
"座位数"
)
private
Integer
seatMun
;
@NotNull
(
message
=
"飞机型号ID不能为空"
)
@ApiModelProperty
(
"飞机型号ID"
)
private
Long
plainTypeId
;
@NotNull
(
message
=
"出发时间不能为空"
)
@ApiModelProperty
(
"出发时间"
)
private
Date
outsetTime
;
@ApiModelProperty
(
"返程时间"
)
private
Date
returnTime
;
@NotNull
(
message
=
"状态,0-正常,1-完成,99-删除不能为空"
)
@ApiModelProperty
(
"状态,0-正常,1-完成,99-删除"
)
private
Integer
status
;
@NotNull
(
message
=
"创建时间不能为空"
)
@ApiModelProperty
(
"创建时间"
)
private
Long
createTime
;
@ApiModelProperty
(
"更新时间"
)
private
Long
updateTime
;
@ApiModelProperty
(
"备注"
)
private
String
remarks
;
@ApiModelProperty
(
"价格,单位:分"
)
private
Long
money
;
@NotNull
(
message
=
"商家ID不能为空"
)
@ApiModelProperty
(
"商家ID"
)
private
Long
mcuId
;
}
common/src/main/java/com/jumeirah/common/mapper/StrokeDiscountMapper.java
0 → 100644
View file @
b682691c
package
com
.
jumeirah
.
common
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.jumeirah.common.entity.StrokeDiscount
;
import
com.jumeirah.common.param.StrokeDiscountPageParam
;
import
com.jumeirah.common.vo.StrokeDiscountQueryVo
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.io.Serializable
;
/**
* 优惠行程表 Mapper 接口
*
* @author xxx
* @since 2020-10-14
*/
@Repository
public
interface
StrokeDiscountMapper
extends
BaseMapper
<
StrokeDiscount
>
{
/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
StrokeDiscountQueryVo
getStrokeDiscountById
(
Serializable
id
);
/**
* 获取分页对象
*
* @param page
* @param strokeDiscountPageParam
* @return
*/
IPage
<
StrokeDiscountQueryVo
>
getStrokeDiscountPageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
StrokeDiscountPageParam
strokeDiscountPageParam
);
}
common/src/main/java/com/jumeirah/common/param/McStrokePageParam.java
View file @
b682691c
...
@@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
...
@@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
public
class
McStrokePageParam
extends
BasePageOrderParam
{
public
class
McStrokePageParam
extends
BasePageOrderParam
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"行程类型,0-单程,1-往返行程,2-货运,3-医疗"
)
@ApiModelProperty
(
"行程类型,
-1-全部,
0-单程,1-往返行程,2-货运,3-医疗"
)
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
"主键id"
)
@ApiModelProperty
(
"主键id"
)
...
...
common/src/main/java/com/jumeirah/common/param/StrokeDiscountPageParam.java
0 → 100644
View file @
b682691c
package
com
.
jumeirah
.
common
.
param
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam
;
/**
* <pre>
* 优惠行程表 分页参数对象
* </pre>
*
* @author xxx
* @date 2020-10-14
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"优惠行程表分页参数"
)
public
class
StrokeDiscountPageParam
extends
BasePageOrderParam
{
private
static
final
long
serialVersionUID
=
1L
;
}
common/src/main/java/com/jumeirah/common/service/StrokeDiscountService.java
0 → 100644
View file @
b682691c
package
com
.
jumeirah
.
common
.
service
;
import
com.jumeirah.common.entity.StrokeDiscount
;
import
com.jumeirah.common.param.StrokeDiscountPageParam
;
import
io.geekidea.springbootplus.framework.common.service.BaseService
;
import
com.jumeirah.common.vo.StrokeDiscountQueryVo
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
/**
* 优惠行程表 服务类
*
* @author xxx
* @since 2020-10-14
*/
public
interface
StrokeDiscountService
extends
BaseService
<
StrokeDiscount
>
{
/**
* 保存
*
* @param strokeDiscount
* @return
* @throws Exception
*/
boolean
saveStrokeDiscount
(
StrokeDiscount
strokeDiscount
)
throws
Exception
;
/**
* 修改
*
* @param strokeDiscount
* @return
* @throws Exception
*/
boolean
updateStrokeDiscount
(
StrokeDiscount
strokeDiscount
)
throws
Exception
;
/**
* 删除
*
* @param id
* @return
* @throws Exception
*/
boolean
deleteStrokeDiscount
(
Long
id
)
throws
Exception
;
/**
* 根据ID获取查询对象
*
* @param id
* @return
* @throws Exception
*/
StrokeDiscountQueryVo
getStrokeDiscountById
(
Long
id
)
throws
Exception
;
/**
* 获取分页对象
*
* @param strokeDiscountPageParam
* @return
* @throws Exception
*/
Paging
<
StrokeDiscountQueryVo
>
getStrokeDiscountPageList
(
StrokeDiscountPageParam
strokeDiscountPageParam
)
throws
Exception
;
}
common/src/main/java/com/jumeirah/common/service/impl/StrokeDiscountServiceImpl.java
0 → 100644
View file @
b682691c
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
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
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
* 优惠行程表 服务实现类
*
* @author xxx
* @since 2020-10-14
*/
@Slf4j
@Service
public
class
StrokeDiscountServiceImpl
extends
BaseServiceImpl
<
StrokeDiscountMapper
,
StrokeDiscount
>
implements
StrokeDiscountService
{
@Autowired
private
StrokeDiscountMapper
strokeDiscountMapper
;
@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
{
return
super
.
updateById
(
strokeDiscount
);
}
@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
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
);
}
}
common/src/main/java/com/jumeirah/common/vo/StrokeDiscountQueryVo.java
0 → 100644
View file @
b682691c
package
com
.
jumeirah
.
common
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* <pre>
* 优惠行程表 查询结果对象
* </pre>
*
* @author xxx
* @date 2020-10-14
*/
@Data
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"StrokeDiscountQueryVo对象"
)
public
class
StrokeDiscountQueryVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"主键ID"
)
private
Long
id
;
@ApiModelProperty
(
"出发城市id"
)
private
Long
cityOutsetId
;
@ApiModelProperty
(
"出发城市名称"
)
private
String
cityOutsetName
;
@ApiModelProperty
(
"到达城市id"
)
private
Long
cityArriveId
;
@ApiModelProperty
(
"到达城市名称"
)
private
String
cityArriveName
;
@ApiModelProperty
(
"座位数"
)
private
Integer
seatMun
;
@ApiModelProperty
(
"飞机型号ID"
)
private
Long
plainTypeId
;
@ApiModelProperty
(
"出发时间"
)
private
Date
outsetTime
;
@ApiModelProperty
(
"返程时间"
)
private
Date
returnTime
;
@ApiModelProperty
(
"状态,0-正常,1-完成,99-删除"
)
private
Integer
status
;
@ApiModelProperty
(
"创建时间"
)
private
Long
createTime
;
@ApiModelProperty
(
"更新时间"
)
private
Long
updateTime
;
@ApiModelProperty
(
"备注"
)
private
String
remarks
;
@ApiModelProperty
(
"价格,单位:分"
)
private
Long
money
;
@ApiModelProperty
(
"商家ID"
)
private
Long
mcuId
;
}
common/src/main/resources/mapper/StrokeDiscountMapper.xml
0 → 100644
View file @
b682691c
<?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.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>
<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>
</mapper>
common/src/main/resources/mapper/StrokeMapper.xml
View file @
b682691c
...
@@ -63,27 +63,23 @@
...
@@ -63,27 +63,23 @@
stroke s
stroke s
LEFT JOIN app_user au ON au.id = s.user_id
LEFT JOIN app_user au ON au.id = s.user_id
<where>
<where>
<if
test=
"mcStrokePageParam.type !=
null
"
>
<if
test=
"mcStrokePageParam.type !=
null and mcStrokePageParam.type != -1
"
>
AND s.type = #{mcStrokePageParam.type}
AND s.type = #{mcStrokePageParam.type}
</if>
</if>
<if
test=
"mcStrokePageParam.id !=
null
"
>
<if
test=
"mcStrokePageParam.id !=
null and mcStrokePageParam.id != 0
"
>
AND s.id = #{mcStrokePageParam.id}
AND s.id = #{mcStrokePageParam.id}
</if>
</if>
<if
test=
"mcStrokePageParam.startTime !=null and mcStrokePageParam.startTime != ''"
>
<if
test=
"mcStrokePageParam.startTime !=
null and mcStrokePageParam.startTime != ''"
>
AND s.create_time
>
= #{mcStrokePageParam.startTime}
AND s.create_time
>
= #{mcStrokePageParam.startTime}
</if>
</if>
<if
test=
"mcStrokePageParam.endTime !=null and mcStrokePageParam.endTime != ''"
>
<if
test=
"mcStrokePageParam.endTime !=
null and mcStrokePageParam.endTime != ''"
>
AND s.create_time
<
= #{mcStrokePageParam.endTime}
AND s.create_time
<
= #{mcStrokePageParam.endTime}
</if>
</if>
<if
test=
"mcStrokePageParam.applicant !=null and mcStrokePageParam.applicant != ''"
>
<if
test=
"mcStrokePageParam.applicant !=
null and mcStrokePageParam.applicant != ''"
>
AND CONCAT( au.surname, au.`name` ) LIKE CONCAT('%',#{mcStrokePageParam.applicant},'%')
AND CONCAT( au.surname, au.`name` ) LIKE CONCAT('%',#{mcStrokePageParam.applicant},'%')
</if>
</if>
</where>
</where>
WHERE
ORDER BY
s.type = 2
AND s.id = 1
AND (s.create_time BETWEEN '2020-10-07 15:32:30' AND '2020-10-12 15:32:30')
AND CONCAT( au.surname, au.`name` ) LIKE '%姓名'
</select>
</select>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment