提交 61e3db52 authored 作者: 吴德鹏's avatar 吴德鹏

update

上级 8c17b589
......@@ -4,7 +4,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
@EnableScheduling
@SpringBootApplication
public class AfrishopV3Application {
private static Logger logger = LoggerFactory.getLogger(AfrishopV3Application.class);
......
......@@ -192,13 +192,15 @@ public class ItemController {
//商品参数
List<TbCfItemParam> itemParamList = itemParamRepository.findAllByItemId(itemId);
//商品详情
Optional<TbCfItemDesc> byId = descRepository.findById(itemId);
map.put("score",item.getTotalScore());
map.put("isCollection",userId != null && !userId.isEmpty() && collectionRepository.existsByUserIdAndItemItemId(userId,itemId));
map.put("optionList",categoryList);
map.put("itemDetail",skusList);
map.put("itemInfo", item);
map.put("itemParam", itemParamList);
map.put("itemDesc",descRepository.findById(itemId));
map.put("itemDesc",byId.orElse(new TbCfItemDesc()));
return new Result<>(map);
}
......
......@@ -182,7 +182,7 @@ public class TbCfOrder {
this.commentCount = commentCount;
}
@OneToMany(mappedBy = "orderId", cascade = CascadeType.ALL)
@OneToMany(mappedBy = "orderId", cascade = CascadeType.ALL,fetch = FetchType.EAGER)
private List<TbCfItemOrderR> itemOrderList = new ArrayList<>();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论