商品Id 问题

This commit is contained in:
2025-12-19 17:50:27 +08:00
parent 1d0deb4a38
commit 30b3da513b
2 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
package com.czg;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.URLBuilder;
import org.apache.dubbo.common.constants.CommonConstants;
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.config.ServiceConfig;
import java.util.List;
import java.util.Map;
/**
* 自定义 ServiceConfig重写 URL 组装逻辑
*/
public class CustomServiceConfig<T> extends ServiceConfig<T> {
}

View File

@@ -52,7 +52,11 @@ public class GbWareServiceImpl extends ServiceImpl<GbWareMapper, GbWare> impleme
q2.eq(GbWare::getUseShopType, "custom").and("FIND_IN_SET( " + shopId + ", use_shops ) > 0"); q2.eq(GbWare::getUseShopType, "custom").and("FIND_IN_SET( " + shopId + ", use_shops ) > 0");
}); });
}); });
return page(Page.of(param.getPage(), param.getSize()), queryWrapper); Page<GbWare> page = page(Page.of(param.getPage(), param.getSize()), queryWrapper);
page.getRecords().forEach(item -> {
item.setShopId(shopId);
});
return page;
} }
@Override @Override