Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pension
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mengmeng
pension
Commits
df57e96f
Commit
df57e96f
authored
Jan 28, 2021
by
mengmeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Shen' into 'master'
接口域名配置 See merge request
!5
parents
6146b6cc
1f4f35bd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
1 deletion
+35
-1
SwaggerConfig.java
hmit-api/src/main/java/io/hmit/config/SwaggerConfig.java
+1
-0
PensionOrderController.java
...dules/serviceOrder/controller/PensionOrderController.java
+16
-0
PensionOrderDao.java
...ava/io/hmit/modules/serviceOrder/dao/PensionOrderDao.java
+2
-0
PensionOrderService.java
...mit/modules/serviceOrder/service/PensionOrderService.java
+3
-0
PensionOrderServiceImpl.java
...es/serviceOrder/service/impl/PensionOrderServiceImpl.java
+9
-1
PensionOrderDao.xml
...rc/main/resources/mapper/serviceOrder/PensionOrderDao.xml
+4
-0
No files found.
hmit-api/src/main/java/io/hmit/config/SwaggerConfig.java
View file @
df57e96f
...
...
@@ -27,6 +27,7 @@ public class SwaggerConfig {
@Bean
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
host
(
"byyl.zjhmit.com"
)
.
apiInfo
(
apiInfo
())
.
select
()
//加了ApiOperation注解的类,才生成接口文档
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderController.java
View file @
df57e96f
...
...
@@ -144,6 +144,22 @@ public class PensionOrderController {
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
@Login
@GetMapping
(
"getOrderPageByStatus"
)
@ApiOperation
(
"根据状态返回订单"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
PageData
<
PensionOrderDTO
>>
getOrderPageByStatus
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getOrderPageByStatus
(
params
,
user
.
getId
(),
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
()));
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
@Login
@GetMapping
(
"orderInfo/{id}"
)
@ApiOperation
(
"预约订单详情"
)
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOrderDao.java
View file @
df57e96f
...
...
@@ -18,6 +18,8 @@ public interface PensionOrderDao extends BaseDao<PensionOrderEntity> {
IPage
<
PensionOrderEntity
>
getTodayOrderPage
(
IPage
<
PensionOrderEntity
>
page
,
Long
userId
);
IPage
<
PensionOrderEntity
>
getTodayNoProceedOrderPage
(
IPage
<
PensionOrderEntity
>
page
);
IPage
<
PensionOrderEntity
>
getOrderPageByStatus
(
IPage
<
PensionOrderEntity
>
page
,
Long
userId
,
Integer
status
);
IPage
<
PensionOrderEntity
>
getNoProceedOrderPage
(
IPage
<
PensionOrderEntity
>
page
);
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrderService.java
View file @
df57e96f
...
...
@@ -42,4 +42,7 @@ public interface PensionOrderService extends CrudService<PensionOrderEntity, Pen
//根据订单Id和订单状态查询
PensionOrderDTO
getOrderInfoByIdAndStatus
(
Long
orderId
,
Integer
status
);
//查询已完成订单
PageData
<
PensionOrderDTO
>
getOrderPageByStatus
(
Map
<
String
,
Object
>
params
,
Long
userId
,
Integer
status
);
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrderServiceImpl.java
View file @
df57e96f
...
...
@@ -56,7 +56,8 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
@Override
public
PageData
<
PensionOrderDTO
>
getTodayOrderPage
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
IPage
<
PensionOrderEntity
>
page
=
getPage
(
params
,
Constant
.
CREATE_DATE
,
false
);
IPage
<
PensionOrderEntity
>
pensionOrderEntityIPage
=
pensionOrderDao
.
getTodayOrderPage
(
page
,
userId
);
// IPage<PensionOrderEntity> pensionOrderEntityIPage = pensionOrderDao.getTodayOrderPage(page, userId); //TODO 今日订单中展示未接单订单
IPage
<
PensionOrderEntity
>
pensionOrderEntityIPage
=
pensionOrderDao
.
getTodayNoProceedOrderPage
(
page
);
return
getPageData
(
pensionOrderEntityIPage
,
PensionOrderDTO
.
class
);
}
...
...
@@ -113,4 +114,11 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
return
ConvertUtils
.
sourceToTarget
(
orderEntity
,
PensionOrderDTO
.
class
);
}
@Override
public
PageData
<
PensionOrderDTO
>
getOrderPageByStatus
(
Map
<
String
,
Object
>
params
,
Long
userId
,
Integer
status
)
{
IPage
<
PensionOrderEntity
>
page
=
getPage
(
params
,
Constant
.
CREATE_DATE
,
false
);
IPage
<
PensionOrderEntity
>
pensionOrderEntityIPage
=
pensionOrderDao
.
getOrderPageByStatus
(
page
,
userId
,
status
);
return
getPageData
(
pensionOrderEntityIPage
,
PensionOrderDTO
.
class
);
}
}
\ No newline at end of file
hmit-api/src/main/resources/mapper/serviceOrder/PensionOrderDao.xml
View file @
df57e96f
...
...
@@ -36,6 +36,10 @@
SELECT * FROM pension_order WHERE TO_DAYS(appointment_time) = TO_DAYS(NOW()) and order_recipient_id = #{userId}
</select>
<select
id=
"getTodayNoProceedOrderPage"
resultType=
"io.hmit.modules.serviceOrder.entity.PensionOrderEntity"
>
SELECT * FROM pension_order WHERE TO_DAYS(appointment_time) = TO_DAYS(NOW()) AND pension_order.status = 0 AND order_recipient_id IS NULL
</select>
<select
id=
"getOrderPageByStatus"
resultType=
"io.hmit.modules.serviceOrder.entity.PensionOrderEntity"
>
SELECT * FROM pension_order WHERE pension_order.status = #{status} and order_recipient_id = #{userId}
</select>
...
...
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