商品Id 问题
This commit is contained in:
@@ -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> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user