master:app获取商品可不用登录调整;
parent
1c14747667
commit
3224d0c27b
|
|
@ -841,7 +841,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
public StoreProdAppResDTO getAppInfo(Long storeProdId) {
|
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>()
|
StoreProductCategoryAttribute cateAttr = this.storeProdCateAttrMapper.selectOne(new LambdaQueryWrapper<StoreProductCategoryAttribute>()
|
||||||
.eq(StoreProductCategoryAttribute::getStoreProdId, storeProdId).eq(StoreProductCategoryAttribute::getDelFlag, Constants.UNDELETED));
|
.eq(StoreProductCategoryAttribute::getStoreProdId, storeProdId).eq(StoreProductCategoryAttribute::getDelFlag, Constants.UNDELETED));
|
||||||
List<StoreProductColor> colorList = this.storeProdColorMapper.selectList(new LambdaQueryWrapper<StoreProductColor>()
|
List<StoreProductColor> colorList = this.storeProdColorMapper.selectList(new LambdaQueryWrapper<StoreProductColor>()
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="userId != null">
|
<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
|
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>
|
||||||
|
<if test="userId == null">
|
||||||
|
false AS collectProd
|
||||||
|
</if>
|
||||||
FROM
|
FROM
|
||||||
store_product sp
|
store_product sp
|
||||||
JOIN store s ON sp.store_id = s.id
|
JOIN store s ON sp.store_id = s.id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue