Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
60265ba9
Commit
60265ba9
authored
Mar 25, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自购价格
parent
90aec5a2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
ch-core/src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
...src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
+5
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+6
-2
No files found.
ch-core/src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
View file @
60265ba9
package
com.wwdz.ch.core.entity
;
package
com.wwdz.ch.core.entity
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.xxdxxs.entity.Entity
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -235,4 +233,9 @@ public class SupplierItemVo implements Entity {
...
@@ -235,4 +233,9 @@ public class SupplierItemVo implements Entity {
* 商品所属标签id
* 商品所属标签id
*/
*/
private
List
<
Long
>
bookIdList
;
private
List
<
Long
>
bookIdList
;
/**
* 商家自购价
*/
private
String
selfBuyPrice
;
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
60265ba9
...
@@ -160,7 +160,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -160,7 +160,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
logger
.
error
(
"商品详情分享id和商品id参数全为空,查询失败"
);
logger
.
error
(
"商品详情分享id和商品id参数全为空,查询失败"
);
return
Result
.
failed
(
"商品信息为空"
);
return
Result
.
failed
(
"商品信息为空"
);
}
}
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
itemId
);
SupplierItemVo
supplierItemVo
=
new
SupplierItemVo
();
SupplierItemVo
supplierItemVo
=
new
SupplierItemVo
();
//用户点击链接进入详情页需要记录
//用户点击链接进入详情页需要记录
if
(!
dto
.
getIsShop
())
{
if
(!
dto
.
getIsShop
())
{
...
@@ -192,8 +192,12 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -192,8 +192,12 @@ public class SupplierItemServiceImpl implements SupplierItemService {
}
else
{
}
else
{
supplierItemVo
.
setIsShared
(
false
);
supplierItemVo
.
setIsShared
(
false
);
}
}
//计算商家自购价
BigDecimal
bigDecimal
=
new
BigDecimal
(
PriceUtil
.
convertPriceFenToYuan
(
supplierItem
.
getDistributionPrice
())).
multiply
(
supplierItem
.
getRebate
()).
divide
(
new
BigDecimal
(
"100"
));
BigDecimal
buyPrice
=
new
BigDecimal
(
PriceUtil
.
convertPriceFenToYuan
(
supplierItem
.
getDistributionPrice
())).
subtract
(
bigDecimal
).
setScale
(
2
,
BigDecimal
.
ROUND_UP
);
supplierItemVo
.
setSelfBuyPrice
(
buyPrice
.
toPlainString
());
}
}
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
itemId
);
EntityMapper
.
copyAttribute
(
supplierItem
,
supplierItemVo
);
EntityMapper
.
copyAttribute
(
supplierItem
,
supplierItemVo
);
supplierItemVo
.
setItemId
(
supplierItem
.
getId
());
supplierItemVo
.
setItemId
(
supplierItem
.
getId
());
supplierItemVo
.
setSupplyPrice
(
PriceUtil
.
convertPriceFenToYuan
(
supplierItem
.
getSupplyPrice
()));
supplierItemVo
.
setSupplyPrice
(
PriceUtil
.
convertPriceFenToYuan
(
supplierItem
.
getSupplyPrice
()));
...
...
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