Commit 0475e756 authored by unset's avatar unset

完善接口信息

parent 586e3da3
......@@ -15,4 +15,6 @@ public class ImageInformationDto extends PageParam {
String name;
Integer status;
Integer indexShow;
}
......@@ -95,4 +95,6 @@ public class ImageInformation implements Serializable {
private Date updTime;
private Integer indexShow;
}
......@@ -67,6 +67,9 @@ public class ImageInformationBiz extends BaseBiz<ImageInformationMapper, ImageIn
if (imageInformationDto.getStatus() != null) {
criteria.andEqualTo("status", imageInformationDto.getStatus());
}
if (imageInformationDto.getIndexShow() != null) {
criteria.andEqualTo("indexShow", imageInformationDto.getIndexShow());
}
example.orderBy("updTime").desc();
Query query = new Query(imageInformationDto);
PageDataVO<ImageInformation> pageDataVO = PageDataVO.pageInfo(query, () -> mapper.selectByExample(example));
......
......@@ -86,7 +86,7 @@ public class NewsInfoBiz extends BaseBiz<NewsInfoMapper, NewsInfo> {
Map<Integer, List<NewsInfo>> listMap = list.stream()
.collect(Collectors.groupingBy(NewsInfo::getTypeId));
if (MapUtil.isNotEmpty(listMap)) {
List<NewsType> newsTypeList = newsTypeBiz.getAll(1).getData();
List<NewsType> newsTypeList = newsTypeBiz.getAll().getData();
if (newsTypeList != null && newsTypeList.size() > 0) {
Map<Integer, List<NewsType>> map = newsTypeList.stream().collect(Collectors.groupingBy(NewsType::getId));
for (Map.Entry<Integer, List<NewsInfo>> entry : listMap.entrySet()) {
......
......@@ -59,12 +59,12 @@ public class NewsTypeBiz extends BaseBiz<NewsTypeMapper, NewsType> {
/**
* 查询所有首页展示
* @param indexShow 是否首页展示
* @return
*/
public ObjectRestResponse<List<NewsType>> getAll(Integer indexShow) {
public ObjectRestResponse<List<NewsType>> getAll() {
Example example = new Example(NewsType.class);
example.createCriteria().andEqualTo("isDel", 0).andEqualTo("status", 1);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("isDel", 0).andEqualTo("status", 1);
example.orderBy("rank");
return ObjectRestResponse.succ(mapper.selectByExample(example));
}
......
......@@ -105,7 +105,6 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper,Shopping
OrderInfo orderInfo = new OrderInfo();
orderInfo.setAmount(new BigDecimal(amount).setScale(2, BigDecimal.ROUND_HALF_UP));
orderInfo.setNumber(totalNumber);
orderInfo.set
}
}
\ No newline at end of file
......@@ -17,8 +17,8 @@ public class NewsTypeController extends BaseController<NewsTypeBiz, NewsType> {
}
@GetMapping(value = "/app/unauth/getAll")
public ObjectRestResponse getAll(Integer indexShow) {
return baseBiz.getAll(indexShow);
public ObjectRestResponse getAll() {
return baseBiz.getAll();
}
@GetMapping(value = "getList")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment