xinyb
2024-07-25 47f24af9b117c4fc5dda1463ae2779741d5e2a81
微信小程序过滤有积分的商品不加载到普通显示页面里
2个文件已修改
20 ■■■■ 已修改文件
src/com/yc/sdk/shopping/action/api/MatCode.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/sdk/shopping/service/MatCodeImpl.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/sdk/shopping/action/api/MatCode.java
@@ -359,7 +359,7 @@
            if (set.getFrom() != null && "11".equals(set.getFrom())) {
                matCodeList =  matCodeIfc.getMatCodesByFromUserId(fromUserId,shopCcCodeEntity.getShopCcCode(),cltCode,openId) ;
            }
            //积分商城的商品列表
            //12.积分商城的商品列表
            if (set.getFrom() != null && "12".equals(set.getFrom())) {
                String myMatGroupsProd[] = set.getPath().split(SettingKey.NAVSPLIT);
                String lastMatGroupProd = myMatGroupsProd[myMatGroupsProd.length - 1];
src/com/yc/sdk/shopping/service/MatCodeImpl.java
@@ -124,7 +124,8 @@
                + " and isnull(a.Status,0) = 1  \n"
                + " and isnull(c.Status,0) = 1 \n"
                + " and (isnull(@ShopCcCode,'') = '' or a.ShopCcCode = @ShopCcCode ) \n"
                + " and isnull(a.MatGroupStatus,0) = 1 \n";
                + " and isnull(a.MatGroupStatus,0) = 1 \n"
                + " and isnull(a.ExchangePointsQuantity,0) = 0 \n";
        if (!this.isShowSubMatGroup()) {
            sql += " and (isnull(@ShoppingMatGroups,'') = '' or a.ShoppingMatGroups like '%' + @ShoppingMatGroups + '%') \n";
        } else {
@@ -389,6 +390,7 @@
                + " where isnull(a.inActive,0) = 0 \n"
                + " and isnull(a.Status,0) = 1 \n"
                + " and isnull(c.Status,0) = 1  \n"
                + " and isnull(a.ExchangePointsQuantity,0) = 0  \n"
                +"  and (" + (isShowAllWhenBlankSearch?"isnull(@Search,'') = '' or ":"") + "\n"
                + " a.MatCode like '%'+@Search+'%' \n"
                + "   or a.MatName like '%' + @Search + '%' \n"
@@ -847,6 +849,7 @@
                + " and isnull(a.inActive,0) = 0 \n"
                + " and isnull(a.Status,0) = 1 \n"   
                + " and isnull(c.Status,0) = 1  \n"
                + " and isnull(a.ExchangePointsQuantity,0) = 0  \n"
                + " and (isnull(@ShopCcCode,'') = '' or a.ShopCcCode in (select list from getinstr( @ShopCcCode))) \n"
                + " and (isnull(@Brand,'') = '' or a.Brand in (select list from getinstr(@brand))) \n"
                + " and isnull(a.MatGroupStatus,0) = 1 \n";
@@ -917,7 +920,8 @@
                + " and isnull(a.Status,0) = 1 \n"   
                + " and isnull(c.Status,0) = 1  \n"
                + " and (isnull(@ShopCcCode,'') = '' or a.ShopCcCode in (select list from getinstr( @ShopCcCode))) \n"
                + " and isnull(a.MatGroupStatus,0) = 1 \n";
                + " and isnull(a.MatGroupStatus,0) = 1 \n"
                + " and isnull(a.ExchangePointsQuantity,0) = 0 \n";
                //+ " and exists (select 1 from t710104 b join t110501 e on b.MatGroup = e.MatGroup  \n"
                //+ "              where a.DocCode = b.doccode and isnull(e.Status,0) = 1 \n"
                //+ "              and (isnull(@ShopCcCode,'') = '' or e.ShopCcCode = @ShopCcCode) )  \n";
@@ -2006,7 +2010,8 @@
                + "      where  isnull(c.Status,0) = 1  \n"
                + "      and c.MatCode = @MatCode   \n"
                + "      and (isnull(@ShopCcCode,'') = '' or c.ShopCcCode = @ShopCcCode ) \n"
                + "      and isnull(c.MatGroupStatus,0) = 1 ) \n";
                + "      and isnull(c.MatGroupStatus,0) = 1 ) \n "
                +  "and isnull(a.ExchangePointsQuantity,0) = 0 \n";
                //+ "      and exists (select 1 from t710104 h join t110501 e on h.MatGroup = e.MatGroup \n"
                //+ "           where c.DocCode = h.doccode and isnull(e.Status,0) = 1 \n"
                //+ "           and (isnull(@ShopCcCode,'') = '' or e.ShopCcCode = @ShopCcCode )  ) ) \n" ;
@@ -2073,6 +2078,7 @@
                + " and ISNULL(d.Status,0) = 1    \n"
                + " and (isnull(@ShopCcCode,'') = '' or b.ShopCcCode = @ShopCcCode ) \n"
                + " and isnull(b.MatGroupStatus,0) = 1 \n"
                + " and isnull(b.ExchangePointsQuantity,0) = 0 \n"
                //+ " and exists (select 1 from t710104 h join t110501 e on h.MatGroup = e.MatGroup \n"
                //+ "       where b.DocCode = h.doccode and isnull(e.Status,0) = 1 \n"
                //+ "       and (isnull(@ShopCcCode,'') = '' or e.ShopCcCode = @ShopCcCode )  )  \n"
@@ -2174,7 +2180,8 @@
                + " and c.BrandId = @BrandId  \n"
                + " and isnull(c.Status,0) = 1 \n"
                + " and (isnull(@ShopCcCode,'') = '' or a.ShopCcCode = @ShopCcCode ) \n" 
                + " and isnull(a.MatGroupStatus,0) = 1 \n";
                + " and isnull(a.MatGroupStatus,0) = 1 \n"
                + " and isnull(a.ExchangePointsQuantity,0) = 0 \n";
                //+ " and exists (select 1 from t710104 h join t110501 e on h.MatGroup = e.MatGroup \n"
                //+ "       where a.DocCode = h.doccode and isnull(e.Status,0) = 1 \n"
                //+ "       and (isnull(@ShopCcCode,'') = '' or e.ShopCcCode = @ShopCcCode )  )  \n" ;
@@ -2262,6 +2269,7 @@
                + " where isnull(a.inActive,0) = 0 \n"
                + " and isnull(a.Status,0) = 1 \n"
                + " and isnull(c.Status,0) = 1 \n"
                + " and isnull(a.ExchangePointsQuantity,0) = 0 \n"
                + " and (isnull(@ShopCcCode,'') = '' or a.ShopCcCode = @ShopCcCode ) \n" 
                + " and exists(select 1 from t710109 e where a.DocCode = e.DocCode \n"
                + "        and convert(datetime,convert(varchar(10),getdate(),120)) between e.DateStart and e.DateEnd )  \n"
@@ -2362,6 +2370,7 @@
                + " where isnull(a.inActive,0) = 0 \n"
                + " and isnull(a.Status,0) = 1 \n"
                + " and isnull(c.Status,0) = 1 \n"
                + " and isnull(a.ExchangePointsQuantity,0) = 0 \n"
                + " and (isnull(@GroupDocCode,'') = '' or f.DocCode = @GroupDocCode ) \n"
                + " and isnull(f.Status,0) = 1 \n"
                + " and (isnull(@ShopCcCode,'') = '' or a.ShopCcCode = @ShopCcCode ) \n"
@@ -2468,6 +2477,7 @@
                + " where isnull(a.inActive,0) = 0 \n"
                + " and isnull(a.Status,0) = 1 \n"
                + " and isnull(c.Status,0) = 1 \n"
                + " and isnull(a.ExchangePointsQuantity,0) = 0 \n"
                + " and  (isnull(@GroupDocCode,'') = '' or  f.DocCode = @GroupDocCode )  \n"
                + " and isnull(f.Status,0) = 1 \n"
                + " and (isnull(@ShopCcCode,'') = '' or a.ShopCcCode = @ShopCcCode ) \n"