Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zion
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
zion
Commits
b55beae9
提交
b55beae9
authored
1月 04, 2020
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改商品详情接口
上级
51a678f6
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
16 行增加
和
6 行删除
+16
-6
TbCfStationItemController.java
...zion/chinafrica/controller/TbCfStationItemController.java
+5
-4
TbCfStationItemService.java
...aoyun/zion/chinafrica/service/TbCfStationItemService.java
+1
-1
TbCfStationItemServiceImpl.java
...n/chinafrica/service/impl/TbCfStationItemServiceImpl.java
+10
-1
没有找到文件。
src/main/java/com/diaoyun/zion/chinafrica/controller/TbCfStationItemController.java
浏览文件 @
b55beae9
...
...
@@ -71,10 +71,11 @@ public class TbCfStationItemController {
* @return
*/
@ApiOperation
(
"商品sku"
)
@GetMapping
(
"/queryItemSku/{itemId}"
)
public
Result
queryItemSku
(
@ApiParam
(
value
=
"商品ID"
)
@PathVariable
(
"itemId"
)
String
itemId
)
{
@GetMapping
(
"/queryItemSku"
)
public
Result
queryItemSku
(
@ApiParam
(
value
=
"商品ID"
)
@RequestParam
(
value
=
"itemId"
)
String
itemId
,
@ApiParam
(
value
=
"用户ID"
)
@RequestParam
(
value
=
"userId"
,
required
=
false
)
String
userId
)
{
return
tbCfStationItemService
.
queryItemSku
(
itemId
);
return
tbCfStationItemService
.
queryItemSku
(
itemId
,
userId
);
}
/**
...
...
@@ -86,7 +87,7 @@ public class TbCfStationItemController {
@ApiOperation
(
"商品搜索"
)
@GetMapping
(
"/searchItems"
)
public
Result
searchItems
(
@ApiParam
(
value
=
"名字"
)
@RequestParam
(
value
=
"name"
)
String
name
,
@ApiParam
(
value
=
"
名字
"
)
@RequestParam
(
value
=
"order"
,
required
=
false
)
String
order
)
{
@ApiParam
(
value
=
"
排序
"
)
@RequestParam
(
value
=
"order"
,
required
=
false
)
String
order
)
{
return
tbCfStationItemService
.
searchItems
(
name
,
order
);
}
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfStationItemService.java
浏览文件 @
b55beae9
...
...
@@ -102,7 +102,7 @@ public interface TbCfStationItemService {
* @param itemId
* @return
*/
Result
queryItemSku
(
String
itemId
);
Result
queryItemSku
(
String
itemId
,
String
userId
);
/**
*
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfStationItemServiceImpl.java
浏览文件 @
b55beae9
...
...
@@ -142,10 +142,18 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
* @return
*/
@Override
public
Result
queryItemSku
(
String
itemId
)
{
public
Result
queryItemSku
(
String
itemId
,
String
userId
)
{
Result
result
=
new
Result
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
boolean
collection
=
false
;
try
{
//判断商品是否被收藏
if
(!
StringUtils
.
isBlank
(
userId
))
{
TbCfItemCollectionEntity
isCollection
=
tbCfItemCollectionDao
.
queryIsCollection
(
userId
,
itemId
);
if
(
isCollection
!=
null
)
{
collection
=
true
;
}
}
//商品信息
TbCfStationItemEntity
itemInfo
=
tbCfStationItemDao
.
queryObject
(
itemId
);
//商品规格
...
...
@@ -204,6 +212,7 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
String
priceRange
=
priceList
.
get
(
0
).
toString
()
+
"-"
+
priceList
.
get
(
priceList
.
size
()
-
1
);
//商品详情
TbCfItemDescEntity
itemDesc
=
tbCfItemDescDao
.
queryObject
(
itemId
);
map
.
put
(
"isCollection"
,
collection
);
map
.
put
(
"itemInfo"
,
itemInfo
);
map
.
put
(
"itemDesc"
,
itemDesc
);
map
.
put
(
"itemDetail"
,
skuInfoList
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论