From 09310a5a6da2ffccc17f460244fb9a09ec3ff68b Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期一, 25 八月 2025 17:55:13 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java b/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java index 2d6693b..4beb1dc 100644 --- a/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java @@ -2,6 +2,7 @@ import cn.hutool.core.date.DateTime; import cn.hutool.core.text.CharSequenceUtil; +import cn.hutool.crypto.SecureUtil; import cn.lili.cache.Cache; import cn.lili.cache.CachePrefix; import cn.lili.common.enums.ResultCode; @@ -11,10 +12,12 @@ import cn.lili.common.security.context.UserContext; import cn.lili.common.security.enums.UserEnums; import cn.lili.common.utils.BeanUtil; +import cn.lili.common.utils.StringUtils; import cn.lili.common.vo.PageVO; import cn.lili.modules.goods.entity.dos.GoodsSku; import cn.lili.modules.goods.service.GoodsService; import cn.lili.modules.goods.service.GoodsSkuService; +import cn.lili.modules.lmk.enums.general.DEFAULT_PASSWORD; import cn.lili.modules.member.entity.dos.Clerk; import cn.lili.modules.member.entity.dos.FootPrint; import cn.lili.modules.member.entity.dos.Member; @@ -44,6 +47,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.rocketmq.spring.core.RocketMQTemplate; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -216,6 +220,9 @@ Member member = memberService.getById(store.getMemberId()); member.setHaveStore(true); member.setStoreId(id); + if (StringUtils.isBlank(member.getPassword()) || DEFAULT_PASSWORD.DEFAULT_PASSWORD.getDesc().equals(member.getPassword())) { + member.setPassword(new BCryptPasswordEncoder().encode(SecureUtil.md5(DEFAULT_PASSWORD.DEFAULT_PASSWORD.getDesc()))); + } memberService.updateById(member); //鍒涘缓搴楀憳 ClerkAddDTO clerkAddDTO = new ClerkAddDTO(); -- Gitblit v1.8.0