Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
ecae0717
提交
ecae0717
authored
6月 08, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
接口放行
上级
a02ea2d9
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
72 行增加
和
21 行删除
+72
-21
BackstageProductSpecController.java
...om/mmc/pms/controller/BackstageProductSpecController.java
+1
-3
WebLeaseGoodsController.java
...a/com/mmc/pms/controller/web/WebLeaseGoodsController.java
+18
-0
GoodsInfoDao.java
src/main/java/com/mmc/pms/dao/GoodsInfoDao.java
+2
-0
GoodsInfoServiceImpl.java
...n/java/com/mmc/pms/service/Impl/GoodsInfoServiceImpl.java
+35
-15
application-dev.yml
src/main/resources/application-dev.yml
+1
-1
application-prod.yml
src/main/resources/application-prod.yml
+1
-1
GoodsInfoDao.xml
src/main/resources/mapper/GoodsInfoDao.xml
+13
-0
not-check.yml
src/main/resources/not-check.yml
+1
-1
没有找到文件。
src/main/java/com/mmc/pms/controller/BackstageProductSpecController.java
浏览文件 @
ecae0717
...
...
@@ -12,7 +12,6 @@ import io.swagger.annotations.*;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
java.math.BigDecimal
;
...
...
@@ -133,8 +132,7 @@ public class BackstageProductSpecController {
// }
@ApiOperation
(
value
=
"feign根据渠道等级获取单价信息"
)
@GetMapping
(
"feignGetSpecLeaseUnitPrice"
)
@ApiIgnore
@PostMapping
(
"feignGetSpecLeaseUnitPrice"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
public
BigDecimal
feignGetUnitPriceByTag
(
@RequestBody
PriceAcquisition
priceAcquisition
)
{
return
productSkuService
.
feignGetUnitPriceByTag
(
priceAcquisition
);
...
...
src/main/java/com/mmc/pms/controller/web/WebLeaseGoodsController.java
0 → 100644
浏览文件 @
ecae0717
package
com
.
mmc
.
pms
.
controller
.
web
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @Author LW
* @date 2023/6/8 15:19
* 概要:
*/
@RestController
@RequestMapping
(
"/lease/goods"
)
@Api
(
tags
=
{
"web端-设备租赁-相关接口"
})
public
class
WebLeaseGoodsController
{
}
src/main/java/com/mmc/pms/dao/GoodsInfoDao.java
浏览文件 @
ecae0717
...
...
@@ -90,6 +90,8 @@ public interface GoodsInfoDao {
List
<
MallGoodsProductDO
>
listIndustryProductList
(
List
<
Integer
>
industrySpecIds
);
List
<
GoodsInfo
>
ListGoodsInfoByCategoryId
(
Integer
id
);
List
<
MallProdSkuInfoSpecDO
>
getMallProSkuInfoSpec
(
Integer
goodsInfoId
);
}
...
...
src/main/java/com/mmc/pms/service/Impl/GoodsInfoServiceImpl.java
浏览文件 @
ecae0717
...
...
@@ -551,22 +551,41 @@ public class GoodsInfoServiceImpl implements GoodsInfoService {
private
List
<
GoodsSpecDTO
>
getProductSpecInfo
(
Integer
goodsInfoId
)
{
// 获取商品对应绑定sku的信息
List
<
MallProdInfoDO
>
mallProSkuInfo
=
goodsInfoDao
.
getMallProSkuInfo
(
goodsInfoId
);
// 获取该产品下的规格id
Map
<
Integer
,
String
>
specIdsMap
=
mallProSkuInfo
.
stream
().
collect
(
Collectors
.
toMap
(
MallProdInfoDO:
:
getId
,
MallProdInfoDO:
:
getProductSpecIdList
));
List
<
GoodsSpecDTO
>
list
=
mallProSkuInfo
.
stream
().
map
(
MallProdInfoDO:
:
buildGoodsSpecDTO
).
collect
(
Collectors
.
toList
());
for
(
GoodsSpecDTO
goodsSpecDTO
:
list
)
{
String
specIds
=
specIdsMap
.
get
(
goodsSpecDTO
.
getId
());
String
[]
ids
=
specIds
.
split
(
","
);
List
<
Integer
>
idList
=
new
ArrayList
<>();
for
(
String
id
:
ids
)
{
idList
.
add
(
Integer
.
parseInt
(
id
));
List
<
MallProdInfoDO
>
mallProdSkuInfoList
=
goodsInfoDao
.
getMallProSkuInfo
(
goodsInfoId
);
List
<
GoodsSpecDTO
>
list
=
mallProdSkuInfoList
.
stream
().
map
(
MallProdInfoDO:
:
buildGoodsSpecDTO
).
collect
(
Collectors
.
toList
());
// 获取规格来源详细信息
List
<
MallProdSkuInfoSpecDO
>
mallProdSkuInfoSpec
=
goodsInfoDao
.
getMallProSkuInfoSpec
(
goodsInfoId
);
// 根据id查询出规格的具体信息
list
=
list
.
stream
().
peek
(
d
->
{
List
<
MallProductSpecDTO
>
specList
=
new
ArrayList
<>();
for
(
MallProdSkuInfoSpecDO
e
:
mallProdSkuInfoSpec
)
{
if
(
d
.
getId
().
equals
(
e
.
getMallProdSkuInfoId
()))
{
// 构建规格对象
ProductSpecDO
productSpecDO
=
e
.
getProductSpecDO
();
MallProductSpecDTO
productSpecDTO
=
productSpecDO
.
buildMallProductSpecDTO
();
productSpecDTO
.
setProductSkuId
(
d
.
getSkuId
());
productSpecDTO
.
setId
(
e
.
getId
());
productSpecDTO
.
setProductSpec
(
e
.
getProductSpecId
());
if
(
d
.
getFlag
().
equals
(
1
))
{
// 获取自定义sku下规格的价格配置信息
ProductSpecCPQVO
productSpecCPQVO
=
new
ProductSpecCPQVO
();
productSpecCPQVO
.
setProductSpecId
(
e
.
getProductSpecId
());
List
<
ProductSpecPriceDO
>
productSpecPrice
=
productDao
.
getProductSpecPrice
(
productSpecCPQVO
);
List
<
SpecPriceVO
>
collect
=
productSpecPrice
.
stream
().
map
(
m
->
{
SpecPriceVO
specPriceVO
=
new
SpecPriceVO
();
specPriceVO
.
setId
(
m
.
getId
());
specPriceVO
.
setPrice
(
m
.
getPrice
());
specPriceVO
.
setCooperationTag
(
m
.
getCooperationTag
());
return
specPriceVO
;
}).
collect
(
Collectors
.
toList
());
productSpecCPQVO
.
setSpecPrice
(
collect
);
productSpecDTO
.
setProductSpecCPQVO
(
productSpecCPQVO
);
}
specList
.
add
(
productSpecDTO
);
}
}
// 根据specIds集合找出spec的信息
List
<
ProductSpecDO
>
productSpecDOS
=
productDao
.
listProductSpecInfo
(
idList
);
List
<
MallProductSpecDTO
>
mallProductSpecList
=
productSpecDOS
.
stream
().
map
(
ProductSpecDO:
:
buildMallProductSpecDTO
).
collect
(
Collectors
.
toList
());
goodsSpecDTO
.
setProductSpecList
(
mallProductSpecList
);
}
d
.
setProductSpecList
(
specList
);
}).
collect
(
Collectors
.
toList
());
return
list
;
}
...
...
@@ -595,6 +614,7 @@ public class GoodsInfoServiceImpl implements GoodsInfoService {
/**
* 根据商品id,商品规格id查询并填充相关信息
*
* @param param
* @return
*/
...
...
src/main/resources/application-dev.yml
浏览文件 @
ecae0717
...
...
@@ -6,7 +6,7 @@ spring:
username
:
tmj
password
:
MMC@2022&MYSQL
redis
:
database
:
3
database
:
1
host
:
redis.default
port
:
6379
password
:
MMC@2022&REDIS
...
...
src/main/resources/application-prod.yml
浏览文件 @
ecae0717
...
...
@@ -6,7 +6,7 @@ spring:
username
:
tmj
password
:
MMC@2022&MYSQL
redis
:
database
:
3
database
:
1
host
:
redis.default
port
:
6379
password
:
MMC@2022&REDIS
...
...
src/main/resources/mapper/GoodsInfoDao.xml
浏览文件 @
ecae0717
...
...
@@ -440,4 +440,17 @@
AND im.img_type = 0
WHERE gi.category_by_one = #{id}
</select>
<select
id=
"getMallProSkuInfoSpec"
resultType=
"com.mmc.pms.entity.MallProdSkuInfoSpecDO"
>
SELECT mp.id,
mp.mall_prod_info_id,
mp.product_spec_id,
ps.part_no,
ps.spec_image,
ps.spec_name,
ps.version_desc
FROM mall_prod_info_spec mp
INNER JOIN product_spec ps ON mp.product_spec_id = ps.id
WHERE mp.goods_info_id = #{id}
AND mp.is_deleted = 0
</select>
</mapper>
src/main/resources/not-check.yml
浏览文件 @
ecae0717
...
...
@@ -6,4 +6,4 @@ data-filter:
-
/pms/doc.html
-
/pms/swagger-resources/**
-
/pms/webjars/**
-
/pms/product/spec/feignGet
UnitPriceByTag
-
/pms/product/spec/feignGet
SpecLeaseUnitPrice
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论