|
@@ -45,7 +45,8 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, GoodsEntity> impl
|
|
|
IPage<GoodsEntity> page = new Page<>(param.getPageNum(), param.getPageSize());
|
|
|
LambdaQueryWrapper<GoodsEntity> wrapper = new LambdaQueryWrapper<>();
|
|
|
String searchKey = param.getSearchKey();
|
|
|
- wrapper.eq(GoodsEntity::getType, param.getType());
|
|
|
+ String type = param.getType();
|
|
|
+ wrapper.eq(StrUtil.isNotBlank(type), GoodsEntity::getType, type);
|
|
|
Integer display = param.getDisplay();
|
|
|
wrapper.eq(display!=null, GoodsEntity::getDisplay, display);
|
|
|
String startTime = param.getStartTime();
|
|
@@ -125,13 +126,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, GoodsEntity> impl
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 前端条件:前端已经把不使用的图片id已删除
|
|
|
- */
|
|
|
-// private void bindingImg(Long id, String ids){
|
|
|
-// fileService.bindingModuleId(id, ids, "goods");
|
|
|
-//
|
|
|
-// }
|
|
|
+
|
|
|
@Override
|
|
|
public Result upload(FileDto param) {
|
|
|
|
|
@@ -146,11 +141,36 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, GoodsEntity> impl
|
|
|
return Result.success(map);
|
|
|
}
|
|
|
|
|
|
-// @Override
|
|
|
-// public Result videoUpload(MultipartFile file, String type) {
|
|
|
-// Map<String, Object> map = fileUtils.uploadMap(file, "/goods/"+type, false);
|
|
|
-// return Result.success(map);
|
|
|
-// }
|
|
|
+
|
|
|
+// @Test
|
|
|
+// public void testPage(){
|
|
|
+// PageHelper.startPage(1, 4);
|
|
|
+// ArrayList<Object> list = new ArrayList<>();
|
|
|
+// list.add(new FileVo(1L, "小明1", null));
|
|
|
+// list.add(new FileVo(2L, "小明2", null));
|
|
|
+// list.add(new FileVo(3L, "小明3", null));
|
|
|
+// list.add(new FileVo(4L, "小明4", null));
|
|
|
+// list.add(new FileVo(5L, "小明5", null));
|
|
|
+//
|
|
|
+// list.add(new UserVo(1L, "小孩1"));
|
|
|
+// list.add(new UserVo(2L, "小孩2"));
|
|
|
+// list.add(new UserVo(3L, "小孩3"));
|
|
|
+// list.add(new UserVo(4L, "小孩4"));
|
|
|
+// list.add(new UserVo(5L, "小孩5"));
|
|
|
+// list.add(new UserVo(6L, "小孩6"));
|
|
|
+// list.add(new UserVo(7L, "小孩7"));
|
|
|
+// list.add(new UserVo(8L, "小孩8"));
|
|
|
+// list.add(new UserVo(9L, "小孩9"));
|
|
|
+// list.add(new UserVo(10L, "小孩10"));
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+// PageInfo<Object> info = PageInfo.of(list);
|
|
|
+//
|
|
|
+// System.out.println(info);
|
|
|
+//
|
|
|
|
|
|
|
|
|
+// }
|
|
|
}
|