Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
39f5ab78
Commit
39f5ab78
authored
Feb 27, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加分页Vo
parent
874548cc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
82 deletions
+92
-82
SOrderController.java
...in/java/share/web/controller/system/SOrderController.java
+2
-1
TableDataInfo.java
...n/src/main/java/share/common/core/page/TableDataInfo.java
+0
-76
TableDataInfoVo.java
...common/src/main/java/share/common/vo/TableDataInfoVo.java
+85
-0
ISOrderService.java
...em/src/main/java/share/system/service/ISOrderService.java
+2
-2
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+3
-3
No files found.
share-admin/src/main/java/share/web/controller/system/SOrderController.java
View file @
39f5ab78
...
@@ -11,6 +11,7 @@ import share.common.core.domain.AjaxResult;
...
@@ -11,6 +11,7 @@ import share.common.core.domain.AjaxResult;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.vo.TableDataInfoVo
;
import
share.system.domain.SOrder
;
import
share.system.domain.SOrder
;
import
share.system.domain.vo.SOrderDto
;
import
share.system.domain.vo.SOrderDto
;
import
share.system.request.OrderRefundRequest
;
import
share.system.request.OrderRefundRequest
;
...
@@ -37,7 +38,7 @@ public class SOrderController extends BaseController
...
@@ -37,7 +38,7 @@ public class SOrderController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:order:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:order:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SOrder
sOrder
)
public
TableDataInfo
Vo
list
(
SOrder
sOrder
)
{
{
return
sOrderService
.
pageList
(
sOrder
);
return
sOrderService
.
pageList
(
sOrder
);
}
}
...
...
share-common/src/main/java/share/common/core/page/TableDataInfo.java
View file @
39f5ab78
package
share
.
common
.
core
.
page
;
package
share
.
common
.
core
.
page
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -26,35 +25,6 @@ public class TableDataInfo implements Serializable
...
@@ -26,35 +25,6 @@ public class TableDataInfo implements Serializable
private
String
msg
;
private
String
msg
;
/**
/**
* 总金额
*/
private
BigDecimal
totalAmount
;
/**
* 实付金额
*/
private
BigDecimal
amount
;
/**
* 已使用总金额
*/
private
BigDecimal
usedAmount
;
/**
* 已使用实付金额
*/
private
BigDecimal
usedPayAmount
;
/**
* 以退款总金额
*/
private
BigDecimal
refundAmount
;
/**
* 以退款实付金额
*/
private
BigDecimal
refundPayAmount
;
/**
* 表格数据对象
* 表格数据对象
*/
*/
public
TableDataInfo
()
public
TableDataInfo
()
...
@@ -112,51 +82,5 @@ public class TableDataInfo implements Serializable
...
@@ -112,51 +82,5 @@ public class TableDataInfo implements Serializable
this
.
msg
=
msg
;
this
.
msg
=
msg
;
}
}
public
BigDecimal
getTotalAmount
()
{
return
totalAmount
;
}
public
void
setTotalAmount
(
BigDecimal
totalAmount
)
{
this
.
totalAmount
=
totalAmount
;
}
public
BigDecimal
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
public
BigDecimal
getUsedAmount
()
{
return
usedAmount
;
}
public
void
setUsedAmount
(
BigDecimal
usedAmount
)
{
this
.
usedAmount
=
usedAmount
;
}
public
BigDecimal
getUsedPayAmount
()
{
return
usedPayAmount
;
}
public
void
setUsedPayAmount
(
BigDecimal
usedPayAmount
)
{
this
.
usedPayAmount
=
usedPayAmount
;
}
public
BigDecimal
getRefundAmount
()
{
return
refundAmount
;
}
public
void
setRefundAmount
(
BigDecimal
refundAmount
)
{
this
.
refundAmount
=
refundAmount
;
}
public
BigDecimal
getRefundPayAmount
()
{
return
refundPayAmount
;
}
public
void
setRefundPayAmount
(
BigDecimal
refundPayAmount
)
{
this
.
refundPayAmount
=
refundPayAmount
;
}
}
}
share-common/src/main/java/share/common/vo/TableDataInfoVo.java
0 → 100644
View file @
39f5ab78
package
share
.
common
.
vo
;
import
share.common.core.page.TableDataInfo
;
import
java.math.BigDecimal
;
public
class
TableDataInfoVo
extends
TableDataInfo
{
/**
* 总金额
*/
private
BigDecimal
totalAmount
;
/**
* 实付金额
*/
private
BigDecimal
amount
;
/**
* 已使用总金额
*/
private
BigDecimal
usedAmount
;
/**
* 已使用实付金额
*/
private
BigDecimal
usedPayAmount
;
/**
* 以退款总金额
*/
private
BigDecimal
refundAmount
;
/**
* 以退款实付金额
*/
private
BigDecimal
refundPayAmount
;
public
BigDecimal
getTotalAmount
()
{
return
totalAmount
;
}
public
void
setTotalAmount
(
BigDecimal
totalAmount
)
{
this
.
totalAmount
=
totalAmount
;
}
public
BigDecimal
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
public
BigDecimal
getUsedAmount
()
{
return
usedAmount
;
}
public
void
setUsedAmount
(
BigDecimal
usedAmount
)
{
this
.
usedAmount
=
usedAmount
;
}
public
BigDecimal
getUsedPayAmount
()
{
return
usedPayAmount
;
}
public
void
setUsedPayAmount
(
BigDecimal
usedPayAmount
)
{
this
.
usedPayAmount
=
usedPayAmount
;
}
public
BigDecimal
getRefundAmount
()
{
return
refundAmount
;
}
public
void
setRefundAmount
(
BigDecimal
refundAmount
)
{
this
.
refundAmount
=
refundAmount
;
}
public
BigDecimal
getRefundPayAmount
()
{
return
refundPayAmount
;
}
public
void
setRefundPayAmount
(
BigDecimal
refundPayAmount
)
{
this
.
refundPayAmount
=
refundPayAmount
;
}
}
share-system/src/main/java/share/system/service/ISOrderService.java
View file @
39f5ab78
package
share
.
system
.
service
;
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.common.
core.page.TableDataInf
o
;
import
share.common.
vo.TableDataInfoV
o
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.domain.SOrder
;
import
share.system.domain.SOrder
;
import
share.system.domain.vo.SOrderDto
;
import
share.system.domain.vo.SOrderDto
;
...
@@ -191,5 +191,5 @@ public interface ISOrderService extends IService<SOrder>
...
@@ -191,5 +191,5 @@ public interface ISOrderService extends IService<SOrder>
int
modifyOrder
(
SOrderDto
sOrderDto
);
int
modifyOrder
(
SOrderDto
sOrderDto
);
TableDataInfo
pageList
(
SOrder
sOrder
);
TableDataInfo
Vo
pageList
(
SOrder
sOrder
);
}
}
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
39f5ab78
...
@@ -21,7 +21,6 @@ import org.springframework.stereotype.Service;
...
@@ -21,7 +21,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
share.common.constant.Constants
;
import
share.common.constant.Constants
;
import
share.common.core.page.PageDomain
;
import
share.common.core.page.PageDomain
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableSupport
;
import
share.common.core.page.TableSupport
;
import
share.common.core.redis.RedisUtil
;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.*
;
import
share.common.enums.*
;
...
@@ -31,6 +30,7 @@ import share.common.utils.DateUtil;
...
@@ -31,6 +30,7 @@ import share.common.utils.DateUtil;
import
share.common.utils.DateUtils
;
import
share.common.utils.DateUtils
;
import
share.common.utils.SecurityUtils
;
import
share.common.utils.SecurityUtils
;
import
share.common.utils.bean.BeanUtils
;
import
share.common.utils.bean.BeanUtils
;
import
share.common.vo.TableDataInfoVo
;
import
share.system.domain.*
;
import
share.system.domain.*
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.SOrderDto
;
import
share.system.domain.vo.SOrderDto
;
...
@@ -289,7 +289,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -289,7 +289,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
}
@Override
@Override
public
TableDataInfo
pageList
(
SOrder
sOrder
)
{
public
TableDataInfo
Vo
pageList
(
SOrder
sOrder
)
{
List
<
SOrder
>
sOrders
=
selectSOrderList
(
sOrder
);
List
<
SOrder
>
sOrders
=
selectSOrderList
(
sOrder
);
BigDecimal
totalAmount
=
new
BigDecimal
(
"0.00"
);
BigDecimal
totalAmount
=
new
BigDecimal
(
"0.00"
);
BigDecimal
amount
=
new
BigDecimal
(
"0.00"
);
BigDecimal
amount
=
new
BigDecimal
(
"0.00"
);
...
@@ -323,7 +323,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -323,7 +323,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
int
start
=
(
pageNum
-
1
)
*
pageSize
;
int
start
=
(
pageNum
-
1
)
*
pageSize
;
int
end
=
Math
.
min
(
start
+
pageSize
,
sOrders
.
size
());
int
end
=
Math
.
min
(
start
+
pageSize
,
sOrders
.
size
());
List
<
SOrder
>
pagedList
=
sOrders
.
subList
(
start
,
end
);
List
<
SOrder
>
pagedList
=
sOrders
.
subList
(
start
,
end
);
TableDataInfo
tableDataInfo
=
new
TableDataInf
o
();
TableDataInfo
Vo
tableDataInfo
=
new
TableDataInfoV
o
();
tableDataInfo
.
setRows
(
pagedList
);
tableDataInfo
.
setRows
(
pagedList
);
tableDataInfo
.
setTotal
(
sOrders
.
size
());
tableDataInfo
.
setTotal
(
sOrders
.
size
());
tableDataInfo
.
setCode
(
200
);
tableDataInfo
.
setCode
(
200
);
...
...
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