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
a9d02fa6
Commit
a9d02fa6
authored
Jan 28, 2021
by
mlchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dao层优化,删除无用内容
parent
bb9eb9b5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
28 deletions
+6
-28
SwaggerConfig.java
hmit-api/src/main/java/io/hmit/config/SwaggerConfig.java
+1
-1
PensionOrderDao.java
...ava/io/hmit/modules/serviceOrder/dao/PensionOrderDao.java
+0
-4
PensionOrderService.java
...mit/modules/serviceOrder/service/PensionOrderService.java
+0
-3
PensionOrderServiceImpl.java
...es/serviceOrder/service/impl/PensionOrderServiceImpl.java
+5
-12
PensionOrderDao.xml
...rc/main/resources/mapper/serviceOrder/PensionOrderDao.xml
+0
-8
No files found.
hmit-api/src/main/java/io/hmit/config/SwaggerConfig.java
View file @
a9d02fa6
...
...
@@ -27,7 +27,7 @@ public class SwaggerConfig {
@Bean
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
//
.host("byyl.zjhmit.com")
.
host
(
"byyl.zjhmit.com"
)
.
apiInfo
(
apiInfo
())
.
select
()
//加了ApiOperation注解的类,才生成接口文档
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOrderDao.java
View file @
a9d02fa6
...
...
@@ -17,10 +17,6 @@ public interface PensionOrderDao extends BaseDao<PensionOrderEntity> {
IPage
<
PensionOrderDTO
>
getTodayNoProceedOrderPage
(
IPage
<
PensionOrderEntity
>
page
);
IPage
<
PensionOrderEntity
>
getOrderPageByStatus
(
IPage
<
PensionOrderEntity
>
page
,
Long
userId
,
Integer
status
);
PensionOrderEntity
getOrderInfoByIdAndUserId
(
Long
orderId
,
Long
userId
);
PensionOrderEntity
getOrderInfoByIdAndStatus
(
Long
orderId
,
Integer
status
);
IPage
<
PensionOrderDTO
>
getOrderPageByStatusOrUserId
(
IPage
<
PensionOrderEntity
>
page
,
Long
userId
,
Integer
status
);
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrderService.java
View file @
a9d02fa6
...
...
@@ -21,9 +21,6 @@ public interface PensionOrderService extends CrudService<PensionOrderEntity, Pen
//查询今日订单
PageData
<
PensionOrderDTO
>
getTodayOrderPage
(
Map
<
String
,
Object
>
params
);
//查询预约订单详情
PensionOrderDTO
getOrderInfoByIdAndUserId
(
Long
id
,
Long
userId
);
//根据订单Id和订单状态查询 (接单时使用)
PensionOrderDTO
getOrderInfoByIdAndStatus
(
Long
orderId
,
Integer
status
);
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrderServiceImpl.java
View file @
a9d02fa6
...
...
@@ -38,6 +38,7 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
@Autowired
private
PensionOrderDao
pensionOrderDao
;
//查询全部订单
@Override
public
PageData
<
PensionOrderDTO
>
getAllOrderPage
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
IPage
<
PensionOrderEntity
>
page
=
getPage
(
params
,
Constant
.
CREATE_DATE
,
false
);
...
...
@@ -45,6 +46,7 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
return
getPageData
(
pensionOrderEntityIPage
,
PensionOrderDTO
.
class
);
}
//查询今日订单
@Override
public
PageData
<
PensionOrderDTO
>
getTodayOrderPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
PensionOrderEntity
>
page
=
getPage
(
params
,
Constant
.
CREATE_DATE
,
false
);
...
...
@@ -53,24 +55,14 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
return
getPageData
(
pensionOrderDTOIPage
,
PensionOrderDTO
.
class
);
}
@Override
public
PensionOrderDTO
getOrderInfoByIdAndUserId
(
Long
id
,
Long
userId
)
{
PensionOrderEntity
orderEntity
=
pensionOrderDao
.
getOrderInfoByIdAndUserId
(
id
,
userId
);
orderEntity
.
setServiceId
(
null
);
orderEntity
.
setOrderRecipientId
(
null
);
orderEntity
.
setDeptId
(
null
);
orderEntity
.
setCreator
(
null
);
orderEntity
.
setUpdater
(
null
);
orderEntity
.
setUpdateDate
(
null
);
return
ConvertUtils
.
sourceToTarget
(
orderEntity
,
PensionOrderDTO
.
class
);
}
//根据订单Id和订单状态查询 (接单时使用)
@Override
public
PensionOrderDTO
getOrderInfoByIdAndStatus
(
Long
id
,
Integer
status
)
{
PensionOrderEntity
orderEntity
=
pensionOrderDao
.
getOrderInfoByIdAndStatus
(
id
,
status
);
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
);
...
...
@@ -78,6 +70,7 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
return
getPageData
(
pensionOrderDTOIPage
,
PensionOrderDTO
.
class
);
}
//根据用户ID或订单状态查询(带图)
@Override
public
PensionOrderDTO
getOrderInfoByIdAndUserIdOrStatus
(
Long
orderId
,
Long
userId
,
Integer
status
)
{
PensionOrderDTO
pensionOrderDTO
=
pensionOrderDao
.
getOrderInfoByIdAndUserIdOrStatus
(
orderId
,
userId
,
status
);
...
...
hmit-api/src/main/resources/mapper/serviceOrder/PensionOrderDao.xml
View file @
a9d02fa6
...
...
@@ -28,14 +28,6 @@
<result
property=
"updateDate"
column=
"update_date"
/>
</resultMap>
<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>
<select
id=
"getOrderInfoByIdAndUserId"
resultType=
"io.hmit.modules.serviceOrder.entity.PensionOrderEntity"
>
SELECT * FROM pension_order WHERE pension_order.id = #{orderId} and pension_order.order_recipient_id = #{userId}
</select>
<select
id=
"getOrderInfoByIdAndStatus"
resultType=
"io.hmit.modules.serviceOrder.entity.PensionOrderEntity"
>
SELECT * FROM pension_order WHERE pension_order.id = #{orderId} and pension_order.status = #{status}
</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