Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop
This commit is contained in:
@@ -23,6 +23,21 @@ public interface GoodsParamsService extends IService<GoodsParams> {
|
||||
*/
|
||||
void addParams(List<GoodsParams> paramList, String goodsId);
|
||||
|
||||
/**
|
||||
* 更新商品参数是否索引
|
||||
*
|
||||
* @param paramId 参数id
|
||||
* @param isIndex 是否索引
|
||||
*/
|
||||
void updateParametersIsIndex(String paramId, Integer isIndex);
|
||||
|
||||
/**
|
||||
* 根据参数id删除已经设置的商品参数
|
||||
*
|
||||
* @param paramId 参数id
|
||||
*/
|
||||
void deleteByParamId(String paramId);
|
||||
|
||||
/**
|
||||
* 获取商品关联参数
|
||||
*
|
||||
|
||||
@@ -69,7 +69,7 @@ public class DraftGoodsServiceImpl extends ServiceImpl<DraftGoodsMapper, DraftGo
|
||||
draftGoods.setGoodsGalleryListJson(JSONUtil.toJsonStr(draftGoods.getGoodsGalleryList()));
|
||||
draftGoods.setSkuListJson(JSONUtil.toJsonStr(this.getGoodsSkuList(draftGoods.getSkuList())));
|
||||
draftGoods.setGoodsParamsListJson(JSONUtil.toJsonStr(draftGoods.getGoodsParamsList()));
|
||||
this.save(draftGoods);
|
||||
this.saveOrUpdate(draftGoods);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,6 +9,8 @@ import cn.lili.modules.goods.service.CategoryParameterGroupService;
|
||||
import cn.lili.modules.goods.service.GoodsParamsService;
|
||||
import cn.lili.modules.goods.service.ParametersService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -55,6 +57,30 @@ public class GoodsParamsServiceImpl extends ServiceImpl<GoodsParamsMapper, Goods
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新商品参数是否索引
|
||||
*
|
||||
* @param paramId 参数id
|
||||
* @param isIndex 是否索引
|
||||
*/
|
||||
@Override
|
||||
public void updateParametersIsIndex(String paramId, Integer isIndex) {
|
||||
LambdaUpdateWrapper<GoodsParams> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(GoodsParams::getParamId, paramId);
|
||||
updateWrapper.set(GoodsParams::getIsIndex, isIndex);
|
||||
this.update(updateWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据参数id删除已经设置的商品参数
|
||||
*
|
||||
* @param paramId 参数id
|
||||
*/
|
||||
@Override
|
||||
public void deleteByParamId(String paramId) {
|
||||
this.remove(new QueryWrapper<GoodsParams>().eq("param_id", paramId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsParams> getGoodsParamsByGoodsId(String goodsId) {
|
||||
return this.list(new LambdaQueryWrapper<GoodsParams>().eq(GoodsParams::getGoodsId, goodsId));
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface StoreDetailMapper extends BaseMapper<StoreDetail> {
|
||||
|
||||
@Select("select s.store_logo,s.member_name,s.store_name,s.store_disable,s.self_operated,s.store_address_detail,s.store_address_path,s.store_address_id_path,s.store_center,s.store_desc,s.yzf_sign," +
|
||||
@Select("select s.store_logo,s.member_name,s.store_name,s.store_disable,s.self_operated,s.store_address_detail,s.store_address_path,s.store_address_id_path,s.store_center,s.store_desc,s.yzf_sign,s.yzf_mp_sign," +
|
||||
"d.* from li_store s inner join li_store_detail d on s.id=d.store_id where s.id=#{storeId}")
|
||||
StoreDetailVO getStoreDetail(String storeId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user