|
@@ -139,46 +139,6 @@ public class ProductController {
|
|
|
return Result.success(pageInfo);
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/combination/list")
|
|
|
- @ApiOperation(value = "商品拼团列表")
|
|
|
- public Result<List<StoreProduct>> appList(@RequestBody StoreProductDTO dto, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer size) {
|
|
|
- PageHelper.startPage(page, size);
|
|
|
- Condition condition = new Condition(StoreProduct.class);
|
|
|
- Criteria criteria = condition.createCriteria();
|
|
|
- criteria.andEqualTo("isDelete", 0);
|
|
|
- condition.setOrderByClause("create_time DESC");
|
|
|
- criteria.andEqualTo("isShow", 1);
|
|
|
- criteria.andEqualTo("isPink", 1);
|
|
|
- if (StringUtils.isNotBlank(dto.getStoreName())) {
|
|
|
- criteria.andLike("storeName", "%" + dto.getStoreName() + "%");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(dto.getItemNumber())) {
|
|
|
- criteria.andLike("itemNumber", "%" + dto.getItemNumber() + "%");
|
|
|
- }
|
|
|
- if (dto.getIsNew() != null) {
|
|
|
- criteria.andEqualTo("isNew", 1);
|
|
|
- }
|
|
|
- if (dto.getCateId() != null) {
|
|
|
- criteria.andEqualTo("cateId", dto.getCateId());
|
|
|
- }
|
|
|
- if (dto.getIsRecycle() != null) {
|
|
|
- criteria.andEqualTo("isRecycle", dto.getIsRecycle());
|
|
|
- }
|
|
|
- if (dto.getMinPrice() != null && dto.getMaxPrice() != null) {
|
|
|
- criteria.andBetween("price", dto.getMinPrice(), dto.getMaxPrice());
|
|
|
- }
|
|
|
- PageInfo pageInfo = null;
|
|
|
- try {
|
|
|
- List<StoreProduct> list = storeProductService.findByCondition(condition);
|
|
|
- pageInfo = new PageInfo(list);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("查询对象操作异常e:{}", e);
|
|
|
- return Result.fail(ResultCode.INTERNAL_SERVER_ERROR);
|
|
|
- }
|
|
|
- return Result.success(pageInfo);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
@ApiOperation("商品导入")
|
|
|
@PostMapping("/import")
|
|
|
public Result importFile(@JSONField(serialize = false) @RequestParam("file") MultipartFile file) {
|
|
@@ -236,7 +196,6 @@ public class ProductController {
|
|
|
public Result<String> save(@RequestBody @Validated StoreProductAddRequest request) {
|
|
|
storeProductService.save(request);
|
|
|
return Result.success();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
}
|