Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zion
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
zion
Commits
7c728232
提交
7c728232
authored
1月 14, 2020
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
分类商品新增价格排序
上级
816ca35c
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
41 行增加
和
33 行删除
+41
-33
GoodsTypeController.java
...aoyun/zion/chinafrica/controller/GoodsTypeController.java
+11
-8
TbCfStationItemDao.java
...a/com/diaoyun/zion/chinafrica/dao/TbCfStationItemDao.java
+2
-2
TbCfStationItemService.java
...aoyun/zion/chinafrica/service/TbCfStationItemService.java
+1
-1
TbCfStationItemServiceImpl.java
...n/chinafrica/service/impl/TbCfStationItemServiceImpl.java
+2
-2
TbCfStationItemDao.xml
src/main/resources/mapper/TbCfStationItemDao.xml
+25
-20
没有找到文件。
src/main/java/com/diaoyun/zion/chinafrica/controller/GoodsTypeController.java
浏览文件 @
7c728232
...
...
@@ -6,6 +6,7 @@ import com.diaoyun.zion.chinafrica.service.TbCfGoodstypeService;
import
com.diaoyun.zion.chinafrica.service.TbCfStationItemService
;
import
com.diaoyun.zion.chinafrica.vo.StationToGoodsType
;
import
com.diaoyun.zion.master.base.Result
;
import
io.swagger.annotations.ApiParam
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -36,11 +37,11 @@ public class GoodsTypeController {
@RequestMapping
(
"/getGoodsTypeList"
)
@GetMapping
public
Map
<
String
,
List
<
StationToGoodsType
>>
getGoodsTypeList
()
{
Map
<
String
,
List
<
StationToGoodsType
>>
map
=
new
HashMap
<>();
public
Map
<
String
,
List
<
StationToGoodsType
>>
getGoodsTypeList
()
{
Map
<
String
,
List
<
StationToGoodsType
>>
map
=
new
HashMap
<>();
List
<
StationToGoodsType
>
listStation
=
new
ArrayList
<
StationToGoodsType
>();
List
<
TbCfGoodstypeEntity
>
list
=
tbCfGoodstypeService
.
queryList
(
null
);
for
(
TbCfGoodstypeEntity
goods
:
list
)
{
for
(
TbCfGoodstypeEntity
goods
:
list
)
{
StationToGoodsType
goodsType
=
new
StationToGoodsType
();
goodsType
.
setCategoryId
(
goods
.
getGoodstypeId
());
goodsType
.
setGoodstypetitle
(
goods
.
getGoodstypeTitle
());
...
...
@@ -49,7 +50,7 @@ public class GoodsTypeController {
goodsType
.
setStationlist
(
station
);
listStation
.
add
(
goodsType
);
}
map
.
put
(
"data"
,
listStation
);
map
.
put
(
"data"
,
listStation
);
return
map
;
}
...
...
@@ -57,13 +58,15 @@ public class GoodsTypeController {
@GetMapping
public
Result
getItemStationList
(
@RequestParam
(
required
=
false
)
Integer
pageNum
,
@RequestParam
(
required
=
false
)
Integer
pageSize
,
@RequestParam
(
required
=
false
)
String
categoryId
)
{
@RequestParam
(
required
=
false
)
String
categoryId
,
@RequestParam
(
required
=
false
)
String
order
)
{
if
(
pageNum
==
null
)
{
pageNum
=
1
;
}
if
(
pageSize
==
null
)
{
pageSize
=
6
;
}
return
tbCfStationItemService
.
getItemStationList
(
pageNum
,
pageSize
,
categoryId
);
return
tbCfStationItemService
.
getItemStationList
(
pageNum
,
pageSize
,
categoryId
,
order
);
}
}
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfStationItemDao.java
浏览文件 @
7c728232
...
...
@@ -21,7 +21,7 @@ public interface TbCfStationItemDao extends BaseDao<TbCfStationItemEntity> {
*
* @return
*/
List
<
TbCfStationItemEntity
>
getItemStationList
(
String
categoryId
);
List
<
TbCfStationItemEntity
>
getItemStationList
(
@Param
(
"categoryId"
)
String
categoryId
,
@Param
(
"order"
)
String
order
);
/**
* 根据主键一级分类实体集合
...
...
@@ -36,7 +36,7 @@ public interface TbCfStationItemDao extends BaseDao<TbCfStationItemEntity> {
* @param name
* @return
*/
List
<
TbCfStationItemEntity
>
searchItems
(
@Param
(
"name"
)
String
name
,
@Param
(
"order"
)
String
order
);
List
<
TbCfStationItemEntity
>
searchItems
(
@Param
(
"name"
)
String
name
,
@Param
(
"order"
)
String
order
);
/**
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/TbCfStationItemService.java
浏览文件 @
7c728232
...
...
@@ -86,7 +86,7 @@ public interface TbCfStationItemService {
* @param pageSize
* @return
*/
Result
getItemStationList
(
Integer
pageNum
,
Integer
pageSize
,
String
categoryId
);
Result
getItemStationList
(
Integer
pageNum
,
Integer
pageSize
,
String
categoryId
,
String
order
);
/**
* 首页商品
...
...
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfStationItemServiceImpl.java
浏览文件 @
7c728232
...
...
@@ -102,10 +102,10 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
}
@Override
public
Result
getItemStationList
(
Integer
pageNum
,
Integer
pageSize
,
String
categoryId
)
{
public
Result
getItemStationList
(
Integer
pageNum
,
Integer
pageSize
,
String
categoryId
,
String
order
)
{
Result
<
PageInfo
>
result
=
new
Result
<>();
startPage
(
pageNum
,
pageSize
);
List
<
TbCfStationItemEntity
>
tbCfStationItemList
=
tbCfStationItemDao
.
getItemStationList
(
categoryId
);
List
<
TbCfStationItemEntity
>
tbCfStationItemList
=
tbCfStationItemDao
.
getItemStationList
(
categoryId
,
order
);
PageInfo
<
TbCfStationItemEntity
>
pageInfo
=
new
PageInfo
<>(
tbCfStationItemList
);
result
.
setData
(
pageInfo
);
return
result
;
...
...
src/main/resources/mapper/TbCfStationItemDao.xml
浏览文件 @
7c728232
...
...
@@ -166,7 +166,8 @@
<!--获取商品独立站-->
<select
id=
"getItemStationList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity"
>
select `item_id`,
select
`item_id`,
`item_code`,
`item_name`,
`item_brief`,
...
...
@@ -185,7 +186,10 @@
`item_descrition_id`
from tb_cf_station_item
where enable_flag=1 and item_category = #{categoryId}
order by item_num desc
order by
<if
test=
"order != null"
>
item_price ${order},
</if>
item_num desc
</select>
<select
id=
"getGoodsTypeList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity"
>
...
...
@@ -229,7 +233,8 @@
`create_time`,
`item_categorytwo`,
`item_descrition_id`
from tb_cf_station_item where enable_flag=1 and (item_name like concat('%',#{name},'%') or item_brief like concat('%',#{name},'%')
from tb_cf_station_item where enable_flag=1 and (item_name like concat('%',#{name},'%') or item_brief like
concat('%',#{name},'%')
or item_tags like concat('%',#{name},'%'))
<if
test=
"order != null "
>
order by item_price ${order}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论