提交 565c33bb authored 作者: 吴德鹏's avatar 吴德鹏

评论

上级 d53fd962
......@@ -223,6 +223,7 @@ public class ItemController {
//商品详情
Optional<TbCfItemDesc> byId = descRepository.findById(itemId);
map.put("score", item.getTotalScore());
map.put("itemScore",item.getItemScore());
map.put("isCollection", userId != null && !userId.isEmpty() && collectionRepository.existsByUserIdAndItemItemId(userId, itemId));
map.put("optionList", categoryList);
map.put("itemDetail", skusList);
......
......@@ -562,7 +562,7 @@ public class OrderController extends Controller {
@PostMapping("/add/comment")
public Result addComment(TbCfItemComment comment) throws Exception {
logger.info("上传files:", comment.getFiles());
logger.info("上传files:", comment);
TbCfUserInfo user = this.user.user();
......
......@@ -133,6 +133,8 @@ public class TbCfStationItem {
@Formula(value = "(SELECT IFNULL(ROUND(SUM((a.item_score+a.service_score+a.logistics_score+a.price_score)/4)/COUNT(a.item_id),1),5.0) FROM tb_cf_item_comment a WHERE a.item_id=item_id)")
private double totalScore;
@Formula(value = "(SELECT IFNULL(ROUND(SUM((a.item_score+a.service_score+a.logistics_score+a.price_score)/4)/COUNT(a.item_id),1),5.0) FROM tb_cf_item_comment a WHERE a.item_id=item_id)")
private double itemScore;
@JsonIgnore
@OneToMany(mappedBy = "item", cascade = CascadeType.ALL)
......@@ -159,6 +161,14 @@ public class TbCfStationItem {
this.labelList = labelList;
}
public double getItemScore() {
return itemScore;
}
public void setItemScore(double itemScore) {
this.itemScore = itemScore;
}
/**
* 获取:商品id
*/
......
......@@ -28,7 +28,7 @@ public class JwtUtils {
return Jwts.builder()
.setSubject((userPrincipal.getId()))
.setIssuedAt(new Date())
.setExpiration(new Date((new Date()).getTime() + (jwtExpirationMs * 20)))
.setExpiration(new Date((new Date()).getTime() + (jwtExpirationMs * 365)))
.signWith(SignatureAlgorithm.HS512, jwtSecret)
.compact();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论