fix:店铺分类问题修改,店铺商品默认值
This commit is contained in:
parent
fc07545790
commit
6433360e5e
@ -483,7 +483,7 @@ public class SxDataDao extends BaseDao{
|
||||
log.info("剩余批次更新数: {}", Arrays.toString(remainingCounts));
|
||||
conn.commit(); // 最终提交事务
|
||||
log.info("批量更新完成,总记录数: {}" , count);
|
||||
baseUpdateImBrancStock(dataBaseInfo);
|
||||
//baseUpdateImBrancStock(dataBaseInfo);
|
||||
} catch (SQLException e) {
|
||||
conn.rollback(); // 出错时回滚整个事务
|
||||
e.printStackTrace();
|
||||
|
||||
@ -92,7 +92,7 @@ public interface ShopBaseProductCategoryService extends IBaseService<ShopBasePro
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
boolean cleanCategoryCache();
|
||||
boolean cleanCategoryCache(String storeId);
|
||||
|
||||
/**
|
||||
* 获取查询店铺类型
|
||||
|
||||
@ -1034,7 +1034,8 @@ public class ShopBaseProductCategoryServiceImpl extends BaseServiceImpl<ShopBase
|
||||
throw new ApiException(String.format(I18nUtil._("商品编号 【%s】使用此分类,不可以删除!"), CollUtil.join(product_ids, ",")));
|
||||
}
|
||||
|
||||
cleanCategoryCache();
|
||||
String storeId= ContextUtil.getCurrentUser().getStore_id();
|
||||
cleanCategoryCache(storeId);
|
||||
|
||||
return remove(category_id);
|
||||
}
|
||||
@ -1043,21 +1044,23 @@ public class ShopBaseProductCategoryServiceImpl extends BaseServiceImpl<ShopBase
|
||||
public boolean editCategory(ShopBaseProductCategory shopBaseProductCategory) {
|
||||
boolean flag = saveOrUpdate(shopBaseProductCategory);
|
||||
|
||||
cleanCategoryCache();
|
||||
cleanCategoryCache(shopBaseProductCategory.getStore_id());
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cleanCategoryCache() {
|
||||
public boolean cleanCategoryCache(String storeId) {
|
||||
String cache_key = String.format("productCategoryTree:%s", "*");
|
||||
Set<String> keys = redisService.keys(cache_key);
|
||||
|
||||
if (ObjectUtil.isNotNull(keys)) {
|
||||
redisService.del(keys);
|
||||
}
|
||||
|
||||
redisService.del(RedisConstant.Product_Cate_Key);
|
||||
String manageKey=RedisConstant.Product_Cate_Key;//清除管理员的key
|
||||
String storeKey=RedisConstant.Product_Cate_Key+":"+storeId;//清除店铺的key
|
||||
redisService.del(storeKey);
|
||||
redisService.del(manageKey);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
2
sql/shop/dev/202506021_ddl.sql
Normal file
2
sql/shop/dev/202506021_ddl.sql
Normal file
@ -0,0 +1,2 @@
|
||||
alter table shop_product_base modify `shop_weight` decimal(18,4) default NULL COMMENT '总重量';
|
||||
alter table shop_product_base modify `unit_price` decimal(18,4) default NULL COMMENT '单价';
|
||||
Loading…
Reference in New Issue
Block a user