master:app获取商品可不用登录调整;

pull/1121/head
liujiang 2025-11-28 22:07:57 +08:00
parent 1c14747667
commit 3224d0c27b
2 changed files with 4 additions and 1 deletions

View File

@ -841,7 +841,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
@Transactional(readOnly = true)
public StoreProdAppResDTO getAppInfo(Long storeProdId) {
// 档口商品的基础信息
StoreProdAppResDTO appResDTO = this.storeProdMapper.getAppInfo(storeProdId, SecurityUtils.getUserId());
StoreProdAppResDTO appResDTO = this.storeProdMapper.getAppInfo(storeProdId, SecurityUtils.getUserIdSafe());
StoreProductCategoryAttribute cateAttr = this.storeProdCateAttrMapper.selectOne(new LambdaQueryWrapper<StoreProductCategoryAttribute>()
.eq(StoreProductCategoryAttribute::getStoreProdId, storeProdId).eq(StoreProductCategoryAttribute::getDelFlag, Constants.UNDELETED));
List<StoreProductColor> colorList = this.storeProdColorMapper.selectList(new LambdaQueryWrapper<StoreProductColor>()

View File

@ -286,6 +286,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null">
EXISTS ( SELECT 1 FROM user_favorites uf WHERE sp.id = uf.store_prod_id AND uf.del_flag = 0 AND uf.user_id = #{userId} ) AS collectProd
</if>
<if test="userId == null">
false AS collectProd
</if>
FROM
store_product sp
JOIN store s ON sp.store_id = s.id