Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
8c7993f4
Commit
8c7993f4
authored
Nov 03, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加特惠租车
parent
df8ba7f9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
SpecialRent.java
...main/java/com/xxfc/platform/order/entity/SpecialRent.java
+4
-0
SpecialRentBiz.java
...main/java/com/xxfc/platform/order/biz/SpecialRentBiz.java
+2
-0
SpecialRentController.java
...a/com/xxfc/platform/order/rest/SpecialRentController.java
+23
-2
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/SpecialRent.java
View file @
8c7993f4
...
...
@@ -239,4 +239,8 @@ public class SpecialRent implements Serializable {
@Column
(
name
=
"category_name"
)
@ApiModelProperty
(
"型号名称"
)
private
String
categoryName
;
@Column
(
name
=
"is_del"
)
private
Integer
isDel
;
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/SpecialRentBiz.java
View file @
8c7993f4
...
...
@@ -138,6 +138,8 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> {
}
specialRent
.
setPublishUserId
(
userDTO
.
getId
());
specialRent
.
setCrtUser
(
userDTO
.
getId
().
toString
());
specialRent
.
setUpdUser
(
userDTO
.
getId
().
toString
());
specialRent
.
setStatus
(
STATUS_CRT
);
RentVehicleBO
detail
=
new
RentVehicleBO
();
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/SpecialRentController.java
View file @
8c7993f4
...
...
@@ -29,6 +29,8 @@ import lombok.Data;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_FALSE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
import
static
com
.
xxfc
.
platform
.
order
.
entity
.
SpecialRent
.
STATUS_CRT
;
@RestController
...
...
@@ -95,6 +97,7 @@ public class SpecialRentController extends BaseController<SpecialRentBiz, Specia
baseBiz
.
updateSelectiveById
(
new
SpecialRent
(){{
setId
(
specialRentDB
.
getId
());
setStatus
(
SpecialRent
.
STATUS_CNL
);
setUpdUser
(
userDTO
.
getId
().
toString
());
}});
return
ObjectRestResponse
.
succ
();
...
...
@@ -109,7 +112,6 @@ public class SpecialRentController extends BaseController<SpecialRentBiz, Specia
if
(
StrUtil
.
isBlank
(
getCurrentUserId
()))
{
throw
new
BaseException
(
ResultCode
.
AJAX_WECHAT_NOTEXIST_CODE
);
}
dto
.
setUserId
(
getCurrentUserIdInt
());
Query
query
=
new
Query
(
dto
);
PageDataVO
<
SpecialRentVO
>
pages
=
PageDataVO
.
pageInfo
(
query
,
()
->
baseBiz
.
selectByWeekend
(
w
->
{
w
.
andEqualTo
(
SpecialRent:
:
getStatus
,
STATUS_CRT
);
...
...
@@ -119,7 +121,26 @@ public class SpecialRentController extends BaseController<SpecialRentBiz, Specia
return
ObjectRestResponse
.
succ
(
pages
);
}
@RequestMapping
(
value
=
"/appBusiness/specialOrder"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/appBusiness/myList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiOperation
(
value
=
"分页查询我发布的特惠租车"
)
public
ObjectRestResponse
<
SpecialRentVO
>
myList
(
QueryDTO
dto
)
{
//查询列表数据
if
(
StrUtil
.
isBlank
(
getCurrentUserId
()))
{
throw
new
BaseException
(
ResultCode
.
AJAX_WECHAT_NOTEXIST_CODE
);
}
UserDTO
userDTO
=
getBusinessUserByAppUser
();
Query
query
=
new
Query
(
dto
);
PageDataVO
<
SpecialRentVO
>
pages
=
PageDataVO
.
pageInfo
(
query
,
()
->
baseBiz
.
selectByWeekend
(
w
->
{
w
.
andEqualTo
(
SpecialRent:
:
getIsDel
,
SYS_FALSE
);
w
.
andEqualTo
(
SpecialRent:
:
getPublishUserId
,
userDTO
.
getId
());
return
w
;
},
" crt_time desc "
),
SpecialRentVO
.
class
);
return
ObjectRestResponse
.
succ
(
pages
);
}
@RequestMapping
(
value
=
"/app/specialOrder"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ApiOperation
(
value
=
"特惠租车下单"
)
public
ObjectRestResponse
specialOrder
(
@RequestBody
SpecialOrderDTO
dto
)
{
...
...
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