提交 8ef02b92 authored 作者: 张光耀's avatar 张光耀

更加更多商品进行查询

上级 0e7c4be4
...@@ -43,7 +43,7 @@ public class TokenVerification { ...@@ -43,7 +43,7 @@ public class TokenVerification {
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfUserInfoController.resetPassWord(..))" + "&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfUserInfoController.resetPassWord(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeedbackController.getFeedbackList(..))" + "&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeedbackController.getFeedbackList(..))" +
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfUserInfoController.getUserIdentifyCode(..))"+ "&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfUserInfoController.getUserIdentifyCode(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.GoodsTypeController.getGoodsTypeList(..))"+ "&&!execution(* com.diaoyun.zion.chinafrica.controller.GoodsTypeController.*(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeeController.*(..))") "&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeeController.*(..))")
public void controllerAspect() { public void controllerAspect() {
......
...@@ -12,6 +12,7 @@ import org.slf4j.LoggerFactory; ...@@ -12,6 +12,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -52,4 +53,18 @@ public class GoodsTypeController { ...@@ -52,4 +53,18 @@ public class GoodsTypeController {
map.put("data",listStation); map.put("data",listStation);
return map; return map;
} }
@RequestMapping("/getItemStationList")
@GetMapping
public Result getItemStationList(@RequestParam(required = false) Integer pageNum,
@RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String categoryId) {
if (pageNum == null) {
pageNum = 1;
}
if (pageSize == null) {
pageSize = 6;
}
return tbCfStationItemService.getItemStationList(pageNum,pageSize,categoryId);
}
} }
...@@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
public class TbCfStationItemController { public class TbCfStationItemController {
@Autowired @Autowired
private TbCfStationItemService tbCfStationItemService; private TbCfStationItemService tbCfStationItemService;
/*
@ApiOperation("获取商品独立站") @ApiOperation("获取商品独立站")
@GetMapping @GetMapping
public Result getItemStationList(@ApiParam(value = "页数 默认1") @RequestParam(required = false) Integer pageNum, public Result getItemStationList(@ApiParam(value = "页数 默认1") @RequestParam(required = false) Integer pageNum,
...@@ -33,9 +33,9 @@ public class TbCfStationItemController { ...@@ -33,9 +33,9 @@ public class TbCfStationItemController {
pageNum = 1; pageNum = 1;
} }
if (pageSize == null) { if (pageSize == null) {
pageSize = 10; pageSize = 2;
} }
return tbCfStationItemService.getItemStationList(pageNum,pageSize); return tbCfStationItemService.getItemStationList(pageNum,pageSize);
} }*/
} }
...@@ -18,7 +18,7 @@ public interface TbCfStationItemDao extends BaseDao<TbCfStationItemEntity> { ...@@ -18,7 +18,7 @@ public interface TbCfStationItemDao extends BaseDao<TbCfStationItemEntity> {
* 获取商品独立站 * 获取商品独立站
* @return * @return
*/ */
List<TbCfStationItemEntity> getItemStationList(); List<TbCfStationItemEntity> getItemStationList(String categoryId);
/** /**
* 根据主键一级分类实体集合 * 根据主键一级分类实体集合
......
...@@ -83,5 +83,5 @@ public interface TbCfStationItemService { ...@@ -83,5 +83,5 @@ public interface TbCfStationItemService {
* @param pageSize * @param pageSize
* @return * @return
*/ */
Result getItemStationList(Integer pageNum, Integer pageSize); Result getItemStationList(Integer pageNum, Integer pageSize,String categoryId);
} }
...@@ -68,10 +68,10 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService { ...@@ -68,10 +68,10 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
} }
@Override @Override
public Result getItemStationList(Integer pageNum, Integer pageSize) { public Result getItemStationList(Integer pageNum, Integer pageSize,String categoryId) {
Result<PageInfo> result = new Result<>(); Result<PageInfo> result = new Result<>();
startPage(pageNum,pageSize); startPage(pageNum,pageSize);
List<TbCfStationItemEntity> tbCfStationItemList=tbCfStationItemDao.getItemStationList(); List<TbCfStationItemEntity> tbCfStationItemList=tbCfStationItemDao.getItemStationList(categoryId);
PageInfo<TbCfStationItemEntity> pageInfo = new PageInfo<>(tbCfStationItemList); PageInfo<TbCfStationItemEntity> pageInfo = new PageInfo<>(tbCfStationItemList);
result.setData(pageInfo); result.setData(pageInfo);
return result; return result;
......
...@@ -147,7 +147,10 @@ ...@@ -147,7 +147,10 @@
<!--获取商品独立站--> <!--获取商品独立站-->
<select id="getItemStationList" resultType="com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity"> <select id="getItemStationList" resultType="com.diaoyun.zion.chinafrica.entity.TbCfStationItemEntity">
select * from tb_cf_station_item where enable_flag=1 order by create_time desc select * from tb_cf_station_item
where enable_flag=1 and item_category = #{categoryId}
order by create_time desc
</select> </select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论