Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
325dde8a
提交
325dde8a
authored
6月 10, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改:价格回显
上级
a6c686fc
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
54 行增加
和
39 行删除
+54
-39
ProductMallController.java
...in/java/com/mmc/pms/controller/ProductMallController.java
+9
-2
GoodsInfoServiceImpl.java
...n/java/com/mmc/pms/service/Impl/GoodsInfoServiceImpl.java
+21
-22
WebDeviceServiceImpl.java
...n/java/com/mmc/pms/service/Impl/WebDeviceServiceImpl.java
+19
-13
WebDeviceService.java
src/main/java/com/mmc/pms/service/WebDeviceService.java
+5
-1
ProductDao.xml
src/main/resources/mapper/ProductDao.xml
+0
-1
没有找到文件。
src/main/java/com/mmc/pms/controller/ProductMallController.java
浏览文件 @
325dde8a
...
@@ -43,13 +43,20 @@ public class ProductMallController extends BaseController {
...
@@ -43,13 +43,20 @@ public class ProductMallController extends BaseController {
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
MallGoodsDetailDTO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
MallGoodsDetailDTO
.
class
)})
@GetMapping
(
"/getLeaseGoodsDetail"
)
@GetMapping
(
"/getLeaseGoodsDetail"
)
public
ResultBody
<
MallGoodsDetailDTO
>
getLeaseGoodsDetail
(
public
ResultBody
<
MallGoodsDetailDTO
>
getLeaseGoodsDetail
(
Integer
goodsId
,
HttpServletRequest
request
)
{
Integer
goodsId
,
HttpServletRequest
request
,
@ApiParam
(
value
=
"租赁:1 销售商品:0"
)
@RequestParam
(
value
=
"type"
)
Integer
type
,
@ApiParam
(
value
=
"租赁时限:(输入0:1-7天、输入1:8-15天、输入2:16-30天、输入3:30天以上)"
)
@RequestParam
(
value
=
"leaseTerm"
,
required
=
false
)
Integer
leaseTerm
)
{
return
webDeviceService
.
getLeaseGoodsDetail
(
return
webDeviceService
.
getLeaseGoodsDetail
(
goodsId
,
goodsId
,
request
.
getHeader
(
TokenConstant
.
TOKEN
)
==
null
request
.
getHeader
(
TokenConstant
.
TOKEN
)
==
null
?
null
?
null
:
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
:
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
request
);
request
,
type
,
leaseTerm
);
}
}
@ApiOperation
(
value
=
"web-首页分类数据-展示"
)
@ApiOperation
(
value
=
"web-首页分类数据-展示"
)
...
...
src/main/java/com/mmc/pms/service/Impl/GoodsInfoServiceImpl.java
浏览文件 @
325dde8a
...
@@ -734,28 +734,27 @@ public class GoodsInfoServiceImpl implements GoodsInfoService {
...
@@ -734,28 +734,27 @@ public class GoodsInfoServiceImpl implements GoodsInfoService {
productSpecDTO
.
setProductSkuId
(
d
.
getSkuId
());
productSpecDTO
.
setProductSkuId
(
d
.
getSkuId
());
productSpecDTO
.
setId
(
e
.
getId
());
productSpecDTO
.
setId
(
e
.
getId
());
productSpecDTO
.
setProductSpec
(
e
.
getProductSpecId
());
productSpecDTO
.
setProductSpec
(
e
.
getProductSpecId
());
if
(
d
.
getFlag
().
equals
(
1
))
{
// 获取自定义sku下规格的价格配置信息
// 获取自定义sku下规格的价格配置信息
ProductSpecCPQVO
productSpecCPQVO
=
new
ProductSpecCPQVO
();
ProductSpecCPQVO
productSpecCPQVO
=
new
ProductSpecCPQVO
();
productSpecCPQVO
.
setProductSpecId
(
e
.
getProductSpecId
());
productSpecCPQVO
.
setProductSpecId
(
e
.
getProductSpecId
());
productSpecCPQVO
.
setType
(
type
);
productSpecCPQVO
.
setType
(
type
);
productSpecCPQVO
.
setLeaseTerm
(
leaseTerm
);
productSpecCPQVO
.
setLeaseTerm
(
leaseTerm
);
List
<
ProductSpecPriceDO
>
productSpecPrice
=
List
<
ProductSpecPriceDO
>
productSpecPrice
=
productDao
.
getProductSpecPrice
(
productSpecCPQVO
);
productDao
.
getProductSpecPrice
(
productSpecCPQVO
);
List
<
SpecPriceVO
>
collect
=
List
<
SpecPriceVO
>
collect
=
productSpecPrice
.
stream
()
productSpecPrice
.
stream
()
.
map
(
.
map
(
m
->
{
m
->
{
SpecPriceVO
specPriceVO
=
new
SpecPriceVO
();
SpecPriceVO
specPriceVO
=
new
SpecPriceVO
();
specPriceVO
.
setId
(
m
.
getId
());
specPriceVO
.
setId
(
m
.
getId
());
specPriceVO
.
setPrice
(
m
.
getPrice
());
specPriceVO
.
setPrice
(
m
.
getPrice
());
specPriceVO
.
setCooperationTag
(
m
.
getCooperationTag
());
specPriceVO
.
setCooperationTag
(
m
.
getCooperationTag
());
return
specPriceVO
;
return
specPriceVO
;
})
})
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
productSpecCPQVO
.
setSpecPrice
(
collect
);
productSpecCPQVO
.
setSpecPrice
(
collect
);
productSpecDTO
.
setProductSpecCPQVO
(
productSpecCPQVO
);
productSpecDTO
.
setProductSpecCPQVO
(
productSpecCPQVO
);
}
specList
.
add
(
productSpecDTO
);
specList
.
add
(
productSpecDTO
);
}
}
}
}
...
...
src/main/java/com/mmc/pms/service/Impl/WebDeviceServiceImpl.java
浏览文件 @
325dde8a
...
@@ -218,25 +218,31 @@ public class WebDeviceServiceImpl implements WebDeviceService {
...
@@ -218,25 +218,31 @@ public class WebDeviceServiceImpl implements WebDeviceService {
@Override
@Override
public
ResultBody
getLeaseGoodsDetail
(
public
ResultBody
getLeaseGoodsDetail
(
Integer
goodsInfoId
,
Integer
userAccountId
,
HttpServletRequest
request
)
{
Integer
goodsInfoId
,
Integer
userAccountId
,
HttpServletRequest
request
,
Integer
type
,
Integer
leaseTerm
)
{
int
count
=
goodsInfoDao
.
countGoodsInfoById
(
goodsInfoId
);
int
count
=
goodsInfoDao
.
countGoodsInfoById
(
goodsInfoId
);
if
(
count
<=
0
)
{
if
(
count
<=
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_NOT_EXIST_OR_ALREADY_DOWN_SHELF
);
return
ResultBody
.
error
(
ResultEnum
.
GOODS_NOT_EXIST_OR_ALREADY_DOWN_SHELF
);
}
}
// 初始化商品返回信息的对象
// 初始化商品返回信息的对象
ResultBody
goodsInfoDetail
=
goodsInfoService
.
getGoodsInfoDetail
(
goodsInfoId
,
null
,
null
);
ResultBody
goodsInfoDetail
=
goodsInfoService
.
getGoodsInfoDetail
(
goodsInfoId
,
type
,
leaseTerm
);
MallGoodsDetailDTO
result
=
(
MallGoodsDetailDTO
)
goodsInfoDetail
.
getResult
();
MallGoodsDetailDTO
result
=
(
MallGoodsDetailDTO
)
goodsInfoDetail
.
getResult
();
if
(
userAccountId
!=
null
)
{
// if (userAccountId != null) {
UserAccountSimpleDTO
userAccountSimpleDTO
=
// UserAccountSimpleDTO userAccountSimpleDTO =
userAppApi
.
feignGetUserSimpleInfo
(
userAccountId
,
request
.
getHeader
(
TokenConstant
.
TOKEN
));
// userAppApi.feignGetUserSimpleInfo(userAccountId,
if
(
userAccountSimpleDTO
.
getCooperationTagId
()
!=
null
)
{
// request.getHeader(TokenConstant.TOKEN));
if
(!
result
.
getDirectoryId
().
equals
(
2
))
{
// if (userAccountSimpleDTO.getCooperationTagId() != null) {
Integer
id
=
result
.
getGoodsSpec
().
get
(
0
).
getProductSpecList
().
get
(
0
).
getProductSpec
();
// if (!result.getDirectoryId().equals(2)) {
ProductSpecPriceDO
price
=
productDao
.
getProductSpecPriceById
(
id
);
// Integer id =
result
.
setPrice
(
price
.
getPrice
());
// result.getGoodsSpec().get(0).getProductSpecList().get(0).getProductSpec();
}
// ProductSpecPriceDO price = productDao.getProductSpecPriceById(id);
}
// result.setPrice(price.getPrice());
}
// }
// }
// }
return
ResultBody
.
success
(
result
);
return
ResultBody
.
success
(
result
);
}
}
...
...
src/main/java/com/mmc/pms/service/WebDeviceService.java
浏览文件 @
325dde8a
...
@@ -42,7 +42,11 @@ public interface WebDeviceService {
...
@@ -42,7 +42,11 @@ public interface WebDeviceService {
List
<
SkuInfoDTO
>
listWareSkuById
(
Integer
id
);
List
<
SkuInfoDTO
>
listWareSkuById
(
Integer
id
);
ResultBody
getLeaseGoodsDetail
(
ResultBody
getLeaseGoodsDetail
(
Integer
goodsId
,
Integer
userAccountId
,
HttpServletRequest
request
);
Integer
goodsId
,
Integer
userAccountId
,
HttpServletRequest
request
,
Integer
type
,
Integer
leaseTerm
);
ResultBody
<
CategoryTypeDTO
>
getPageHomeCategories
(
Integer
type
);
ResultBody
<
CategoryTypeDTO
>
getPageHomeCategories
(
Integer
type
);
}
}
src/main/resources/mapper/ProductDao.xml
浏览文件 @
325dde8a
...
@@ -510,6 +510,5 @@
...
@@ -510,6 +510,5 @@
WHERE product_spec_id = #{id}
WHERE product_spec_id = #{id}
AND cooperation_tag = 0
AND cooperation_tag = 0
AND type = 1
AND type = 1
and lease_term = 0
</select>
</select>
</mapper>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论