|
@@ -30,7 +30,6 @@ import org.springframework.stereotype.Service;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
-import java.util.Date;
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
import java.util.function.Function;
|
|
import java.util.function.Function;
|
|
@@ -68,6 +67,7 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
);
|
|
);
|
|
//计算并根据生命周期过滤
|
|
//计算并根据生命周期过滤
|
|
wrapper.eq("IF(DATEDIFF(now(),json_unquote( victoriatourist_json -> '$.growUpDay' ))> 0,3,IF(DATEDIFF(now(), json_unquote(victoriatourist_json -> '$.newProductsDay' ))> 0, 2, 1 ))", dto.getLifeCycle());
|
|
wrapper.eq("IF(DATEDIFF(now(),json_unquote( victoriatourist_json -> '$.growUpDay' ))> 0,3,IF(DATEDIFF(now(), json_unquote(victoriatourist_json -> '$.newProductsDay' ))> 0, 2, 1 ))", dto.getLifeCycle());
|
|
|
|
+ wrapper.eq("json_unquote( victoriatourist_json -> '$.combination' )", dto.getCombination());
|
|
Page<ProductInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
Page<ProductInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
|
|
|
List<ProductInfoVo> records = page.getRecords();
|
|
List<ProductInfoVo> records = page.getRecords();
|
|
@@ -146,6 +146,13 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
+ public Page<ProductInfoVo> getCombinationPage(ProductInfoSelectDto dto) {
|
|
|
|
+ dto.setCombination(1);
|
|
|
|
+ Page<ProductInfoVo> page = getPage(dto);
|
|
|
|
+ return page;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
public ProductInfoVo detail(Long id) {
|
|
public ProductInfoVo detail(Long id) {
|
|
ProductInfo ProductInfo = this.getById(id);
|
|
ProductInfo ProductInfo = this.getById(id);
|
|
ProductInfoVo result = BeanUtil.toBean(ProductInfo, ProductInfoVo.class);
|
|
ProductInfoVo result = BeanUtil.toBean(ProductInfo, ProductInfoVo.class);
|