shopId获取修改

This commit is contained in:
张松 2025-02-28 16:33:46 +08:00
parent 64a94e7e12
commit 128f19ba5a
2 changed files with 3 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import cn.dev33.satoken.session.TokenSign;
import cn.dev33.satoken.stp.SaLoginModel;
import cn.dev33.satoken.stp.SaTokenInfo;
import cn.dev33.satoken.stp.StpLogic;
import cn.hutool.core.util.StrUtil;
import com.czg.exception.ApiNotPrintException;
import lombok.Getter;
@ -84,7 +85,7 @@ public class MyStpLogic {
errType = 0;
} else {
String header = SaHolder.getRequest().getHeader("shopId");
shopId = header == null ? null : Long.parseLong(header);
shopId = StrUtil.isBlank(header) ? null : Long.parseLong(header);
errType = 1;
}

View File

@ -43,7 +43,7 @@ public class ShopExtendServiceImpl extends ServiceImpl<ShopExtendMapper, ShopExt
@Override
public List<ShopExtend> listInfo(Long shopId, String autoKey) {
QueryWrapper queryWrapper = new QueryWrapper().eq(ShopExtend::getShopId, StpKit.USER.getShopId());
QueryWrapper queryWrapper = new QueryWrapper().eq(ShopExtend::getShopId, shopId);
if (StrUtil.isNotBlank(autoKey)) {
queryWrapper.eq(ShopExtend::getAutoKey, autoKey);
}