Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
4b26bb75
Commit
4b26bb75
authored
Mar 27, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加折扣
parent
47ab956a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
ContactOrderGoodsInfoDTO.java
...oban/manage/api/dto/contact/ContactOrderGoodsInfoDTO.java
+36
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/contact/ContactOrderGoodsInfoDTO.java
View file @
4b26bb75
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
contact
;
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
contact
;
import
cn.hutool.core.util.NumberUtil
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.RoundingMode
;
public
class
ContactOrderGoodsInfoDTO
implements
Serializable
{
public
class
ContactOrderGoodsInfoDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
973688857967269975L
;
private
static
final
long
serialVersionUID
=
973688857967269975L
;
...
@@ -31,6 +34,17 @@ public class ContactOrderGoodsInfoDTO implements Serializable {
...
@@ -31,6 +34,17 @@ public class ContactOrderGoodsInfoDTO implements Serializable {
private
Double
payAmount
;
private
Double
payAmount
;
/**
/**
* 吊牌价
*/
private
Double
unitPrice
;
/**
* 折扣 = 实付/吊牌价
*
*/
private
Double
discount
;
/**
* 商品名称
* 商品名称
*/
*/
private
String
proName
;
private
String
proName
;
...
@@ -95,6 +109,28 @@ public class ContactOrderGoodsInfoDTO implements Serializable {
...
@@ -95,6 +109,28 @@ public class ContactOrderGoodsInfoDTO implements Serializable {
this
.
payAmount
=
payAmount
;
this
.
payAmount
=
payAmount
;
}
}
public
Double
getUnitPrice
()
{
return
unitPrice
;
}
public
void
setUnitPrice
(
Double
unitPrice
)
{
this
.
unitPrice
=
unitPrice
;
}
public
Double
getDiscount
()
{
if
(
unitPrice
!=
null
&&
payAmount
!=
null
)
{
if
(
unitPrice
==
0
)
{
return
1.0
;
}
return
NumberUtil
.
div
(
payAmount
*
1.0
,
unitPrice
.
doubleValue
(),
2
,
RoundingMode
.
HALF_UP
);
}
return
discount
;
}
public
void
setDiscount
(
Double
discount
)
{
this
.
discount
=
discount
;
}
public
String
getProName
()
{
public
String
getProName
()
{
return
proName
;
return
proName
;
}
}
...
...
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