Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mall-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
yimu
mall-server
Commits
dbe646f5
Commit
dbe646f5
authored
Mar 09, 2022
by
wp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品价格同步到规格表
parent
5e3fa076
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
ISkuService.java
...m/mall/server/admin/goods_center/service/ISkuService.java
+1
-1
SkuServiceImpl.java
...erver/admin/goods_center/service/impl/SkuServiceImpl.java
+4
-1
SpuServiceImpl.java
...erver/admin/goods_center/service/impl/SpuServiceImpl.java
+1
-1
No files found.
mall-server-admin/src/main/java/com/fzm/mall/server/admin/goods_center/service/ISkuService.java
View file @
dbe646f5
...
@@ -28,7 +28,7 @@ public interface ISkuService extends IService<Sku> {
...
@@ -28,7 +28,7 @@ public interface ISkuService extends IService<Sku> {
* @param merchantId 商户id
* @param merchantId 商户id
* @param commodityPass 商品通证
* @param commodityPass 商品通证
*/
*/
void
add
(
List
<
GoodsSkuDTO
>
kDTOs
,
String
goodsId
,
String
goodsName
,
String
merchantId
,
String
addr
,
Integer
commodityPass
,
String
thumb
,
Integer
pDTOType
,
Integer
salesType
,
BigDecimal
blindBoxPrice
);
void
add
(
List
<
GoodsSkuDTO
>
kDTOs
,
String
goodsId
,
String
goodsName
,
String
merchantId
,
String
addr
,
Integer
commodityPass
,
String
thumb
,
Integer
pDTOType
,
Integer
salesType
,
BigDecimal
blindBoxPrice
,
BigDecimal
price
);
/**
/**
* 新增商品规格
* 新增商品规格
...
...
mall-server-admin/src/main/java/com/fzm/mall/server/admin/goods_center/service/impl/SkuServiceImpl.java
View file @
dbe646f5
...
@@ -71,7 +71,7 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuS
...
@@ -71,7 +71,7 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuS
private
ChainUtil
chainUtil
;
private
ChainUtil
chainUtil
;
@Override
@Override
public
void
add
(
List
<
GoodsSkuDTO
>
kDTOs
,
String
goodsId
,
String
goodsName
,
String
merchantId
,
String
addr
,
Integer
commodityPass
,
String
thumb
,
Integer
pDTOType
,
Integer
salesType
,
BigDecimal
blindBoxPrice
)
{
public
void
add
(
List
<
GoodsSkuDTO
>
kDTOs
,
String
goodsId
,
String
goodsName
,
String
merchantId
,
String
addr
,
Integer
commodityPass
,
String
thumb
,
Integer
pDTOType
,
Integer
salesType
,
BigDecimal
blindBoxPrice
,
BigDecimal
price
)
{
List
<
Sku
>
skus
=
new
ArrayList
<>();
List
<
Sku
>
skus
=
new
ArrayList
<>();
int
total
=
kDTOs
.
size
();
int
total
=
kDTOs
.
size
();
int
subCount
=
0
;
int
subCount
=
0
;
...
@@ -86,9 +86,12 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuS
...
@@ -86,9 +86,12 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuS
}
}
if
(
salesType
.
equals
(
SalesTypeEnum
.
ORDINARY
.
getType
()))
{
if
(
salesType
.
equals
(
SalesTypeEnum
.
ORDINARY
.
getType
()))
{
sku
.
setCirculation
(
kDTO
.
getStock
());
sku
.
setCirculation
(
kDTO
.
getStock
());
sku
.
setOriginalPrice
(
price
);
sku
.
setPrice
(
price
);
}
}
if
(
salesType
.
equals
(
SalesTypeEnum
.
BLIND_BOX
.
getType
()))
{
if
(
salesType
.
equals
(
SalesTypeEnum
.
BLIND_BOX
.
getType
()))
{
sku
.
setOriginalPrice
(
blindBoxPrice
);
sku
.
setOriginalPrice
(
blindBoxPrice
);
sku
.
setPrice
(
blindBoxPrice
);
}
}
sku
.
setSkuId
(
skuId
);
sku
.
setSkuId
(
skuId
);
sku
.
setGoodsId
(
goodsId
);
sku
.
setGoodsId
(
goodsId
);
...
...
mall-server-admin/src/main/java/com/fzm/mall/server/admin/goods_center/service/impl/SpuServiceImpl.java
View file @
dbe646f5
...
@@ -126,7 +126,7 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
...
@@ -126,7 +126,7 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
categorySpuService
.
add
(
ids
,
goodsId
,
merchantId
);
categorySpuService
.
add
(
ids
,
goodsId
,
merchantId
);
//商品规格入库
//商品规格入库
skuService
.
add
(
pDTO
.
getSkuList
(),
goodsId
,
pDTO
.
getName
(),
merchantId
,
addr
,
pDTO
.
getCommodityPass
(),
pDTO
.
getThumb
(),
pDTOType
,
pDTO
.
getSalesType
(),
pDTO
.
getBlindBox
Price
());
skuService
.
add
(
pDTO
.
getSkuList
(),
goodsId
,
pDTO
.
getName
(),
merchantId
,
addr
,
pDTO
.
getCommodityPass
(),
pDTO
.
getThumb
(),
pDTOType
,
pDTO
.
getSalesType
(),
pDTO
.
getBlindBoxPrice
(),
pDTO
.
getNftdto
().
get
Price
());
//初始化商品信息
//初始化商品信息
spu
=
beanMapper
.
map
(
pDTO
,
Spu
.
class
);
spu
=
beanMapper
.
map
(
pDTO
,
Spu
.
class
);
...
...
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