johnswang
2024-05-10 e47ecfd14572f24df91dff044011a77ece6b2dc5
更新小程序信息咨询页面支持URL链接和微视频号
3个文件已修改
94 ■■■■■ 已修改文件
src/com/yc/sdk/shopping/action/Information.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/sdk/shopping/entity/InformationEntity.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/sdk/shopping/service/InformationImpl.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/sdk/shopping/action/Information.java
@@ -106,6 +106,11 @@
                jsonObject.addProperty("isShowBannerOnHomePage", (info!=null? info.isShowBannerOnHomePage():false));
                jsonObject.addProperty("isShowBannerOnDetailPage", (info!=null? info.isShowBannerOnDetailPage():false));
                jsonObject.addProperty("description", description);
                jsonObject.addProperty("hdLink", (info!=null?info.getHdLink():""));
                jsonObject.addProperty("hdPathCode", (info!=null?info.getHdPathCode():""));
                jsonObject.addProperty("hdFinderUserName", (info!=null?info.getHdFinderUserName():""));
                jsonObject.addProperty("hdFeedId", (info!=null?info.getHdFeedId():""));
                jsonObject.addProperty("hdFeedToken", (info!=null?info.getHdFeedToken():""));
                jsonArray.add(jsonObject);
            
            }
@@ -199,6 +204,11 @@
            json.addProperty("isShowBannerOnHomePage", (info!=null? info.isShowBannerOnHomePage():false));
            json.addProperty("isShowBannerOnDetailPage", (info!=null? info.isShowBannerOnDetailPage():false));
            json.addProperty("description", description);
            json.addProperty("hdLink", (info!=null?info.getHdLink():""));
            json.addProperty("hdPathCode", (info!=null?info.getHdPathCode():""));
            json.addProperty("hdFinderUserName", (info!=null?info.getHdFinderUserName():""));
            json.addProperty("hdFeedId", (info!=null?info.getHdFeedId():""));
            json.addProperty("hdFeedToken", (info!=null?info.getHdFeedToken():""));
            json.add("list", jsonArray);   //内容
            
            //页脚
@@ -286,6 +296,9 @@
        jsonObject.addProperty("pathcode", informationDetailEntity.getPathCode());
        jsonObject.addProperty("pathurl", pathUrl);  //小程序路径 
        jsonObject.addProperty("isTabBarButton", informationDetailEntity.isTabBarButton());
        jsonObject.addProperty("finderUserName", (informationDetailEntity!=null?informationDetailEntity.getHdFinderUserName():""));
        jsonObject.addProperty("feedId", (informationDetailEntity!=null?informationDetailEntity.getHdFeedId():""));
        jsonObject.addProperty("feedToken", (informationDetailEntity!=null?informationDetailEntity.getHdFeedToken():""));
        return jsonObject;
    }
    
src/com/yc/sdk/shopping/entity/InformationEntity.java
@@ -10,6 +10,11 @@
    private String metaTitle = null ;
    private String metaDescription = null ;
    private String metaKeyword = null ;
    private String hdLink = null;
    private String hdPathCode = null;
    private String hdFinderUserName = null ;
    private String hdFeedId = null;
    private String hdFeedToken = null;
    private String link = null ;
    private String pathCode = null ;
    private String image = null ;
@@ -17,9 +22,59 @@
    private String pathName = null ;
    private String pathUrl = null ;
    private boolean isShowBannerOnDetailPage ;
    private String finderUserName= null;
    private String feedId = null;
    private String feedToken= null;
    
    
    public String getHdLink() {
        return hdLink;
    }
    public void setHdLink(String hdLink) {
        this.hdLink = hdLink;
    }
    public String getHdPathCode() {
        return hdPathCode;
    }
    public void setHdPathCode(String hdPathCode) {
        this.hdPathCode = hdPathCode;
    }
    public String getHdFinderUserName() {
        return hdFinderUserName;
    }
    public void setHdFinderUserName(String hdFinderUserName) {
        this.hdFinderUserName = hdFinderUserName;
    }
    public String getHdFeedId() {
        return hdFeedId;
    }
    public void setHdFeedId(String hdFeedId) {
        this.hdFeedId = hdFeedId;
    }
    public String getHdFeedToken() {
        return hdFeedToken;
    }
    public void setHdFeedToken(String hdFeedToken) {
        this.hdFeedToken = hdFeedToken;
    }
    public String getFinderUserName() {
        return finderUserName;
    }
    public void setFinderUserName(String finderUserName) {
        this.finderUserName = finderUserName;
    }
    public String getFeedId() {
        return feedId;
    }
    public void setFeedId(String feedId) {
        this.feedId = feedId;
    }
    public String getFeedToken() {
        return feedToken;
    }
    public void setFeedToken(String feedToken) {
        this.feedToken = feedToken;
    }
    public String getBannerImageUrl() {
        return bannerImageUrl;
    }
src/com/yc/sdk/shopping/service/InformationImpl.java
@@ -23,7 +23,7 @@
        String sql = " set nocount on ; \n"
                + " declare @ShopCcCode varchar(50) = "+GridUtils.prossSqlParm(shopCcCode)+" \n"
                + " select a.DocCode,a.Title,a.BannerImage,a.BannerImageUrl,a.isShowBannerOnHomePage,a.isShowBannerOnDetailPage, \n"
                + "    a.Description,a.MetaTitle,a.MetaDescription,a.MetaKeyword \n"
                + "    a.Description,a.MetaTitle,a.MetaDescription,a.MetaKeyword,a.HDLink,a.HDPathCode,a.HDFinderUserName,a.HDFeedId,a.HDFeedToken \n"
                + " from t714031H a where a.Active = 1 \n"
                + " and (isnull(@ShopCcCode,'') = '' or a.ShopCcCode = @ShopCcCode ) \n"
                + " and isnull(a.isShowBannerOnHomePage,0) = 1 \n"
@@ -57,7 +57,7 @@
        String sql = " set nocount on ; \n"
                + " declare @ShopCcCode varchar(50) = "+GridUtils.prossSqlParm(shopCcCode)+" \n"
                + " select a.DocCode,a.Title,a.BannerImage,a.BannerImageUrl,a.isShowBannerOnHomePage,a.isShowBannerOnDetailPage, \n"
                + "    a.Description,a.MetaTitle,a.MetaDescription,a.MetaKeyword \n"
                + "    a.Description,a.MetaTitle,a.MetaDescription,a.MetaKeyword,a.HDLink,a.HDPathCode,a.HDFinderUserName,a.HDFeedId,a.HDFeedToken \n"
                + " from t714031H a where a.Active = 1 \n"
                + " and (isnull(@ShopCcCode,'') = '' or a.ShopCcCode = @ShopCcCode ) \n"
                + " order by a.SortOrder asc,a.DocCode desc; \n" ;
@@ -91,10 +91,10 @@
                + " declare @DocCode varchar(20) = "+GridUtils.prossSqlParm(docCode)+",@Title varchar(50)  = "+GridUtils.prossSqlParm(title)+" \n"
                + " declare @ShopCcCode varchar(50) = "+GridUtils.prossSqlParm(shopCcCode)+" ,@AuthorizationAppid varchar(50) = "+GridUtils.prossSqlParm(authorizationAppid)+" \n"
                + " select a.DocCode,a.Title,a.BannerImage,a.BannerImageUrl,a.isShowBannerOnHomePage,a.isShowBannerOnDetailPage, \n"
                + "    a.Description,a.MetaTitle,a.MetaDescription,a.MetaKeyword, \n"
                + "    a.Description,a.MetaTitle,a.MetaDescription,a.MetaKeyword,,a.HDLink,a.HDPathCode,a.HDFinderUserName,a.HDFeedId,a.HDFeedToken, \n"
                + "    b.Link,b.PathCode,b.Image,b.SortOrder,c.PathName,c.PathUrl, \n"
                + "    case when exists(select 1 from t720123 y where b.pathcode = y.pathcode and y.AuthorizationAppid = @AuthorizationAppid) then 1 else 0 end as isTabBarButton, \n"
                + "    b.isShowBottom \n"
                + "    b.isShowBottom,,b.FinderUserName,b.FeedId,b.FeedToken \n"
                + " from t714031H a join t714031D b on a.doccode = b.doccode \n"
                + " left join t730117 c on b.PathCode = c.PathCode \n"
                + " where (isnull(@DocCode,'') = '' or a.DocCode = @DocCode ) \n"
@@ -119,11 +119,19 @@
                info.setMetaTitle(map.get("MetaTitle") == null ? "": (String)map.get("MetaTitle"));
                info.setMetaDescription(map.get("MetaDescription") == null ? "": (String)map.get("MetaDescription"));
                info.setMetaKeyword(map.get("MetaKeyword") == null ? "": (String)map.get("MetaKeyword"));
                info.setHdLink(map.get("HDLink") == null ? "": (String)map.get("HDLink"));
                info.setHdPathCode(map.get("HDPathCode") == null ? "": (String)map.get("HDPathCode"));
                info.setHdFinderUserName(map.get("HDFinderUserName") == null ? "": (String)map.get("HDFinderUserName"));
                info.setHdFeedId(map.get("HDFeedId") == null ? "": (String)map.get("HDFeedId"));
                info.setHdFeedToken(map.get("HDFeedToken") == null ? "": (String)map.get("HDFeedToken"));
                info.setLink(map.get("Link") == null ? "": (String)map.get("Link"));
                info.setPathCode(map.get("PathCode") == null ? "": (String)map.get("PathCode"));
                info.setImage(map.get("Image") == null ? "": (String)map.get("Image"));
                info.setPathName(map.get("PathName") == null ? "": (String)map.get("PathName"));
                info.setPathUrl(map.get("PathUrl") == null ? "": (String)map.get("PathUrl"));
                info.setFinderUserName(map.get("FinderUserName") == null ? "": (String)map.get("FinderUserName"));
                info.setFeedId(map.get("FeedId") == null ? "": (String)map.get("FeedId"));
                info.setFeedToken(map.get("FeedToken") == null ? "": (String)map.get("FeedToken"));
                info.setTabBarButton(map.get("isTabBarButton")!=null&&map.get("isTabBarButton").equals(1)?true:false);
                info.setShowBannerOnDetailPage(map.get("isShowBannerOnDetailPage") != null && map.get("isShowBannerOnDetailPage").equals(1) ?true:false);
                info.setShowBottom(map.get("isShowBottom")!=null&&map.get("isShowBottom").equals(1)?true:false);
@@ -153,7 +161,8 @@
                
                + "    select top 1 a.DocCode,a.Title,a.BannerImage,a.BannerImageUrl, \n"
                + "      a.isShowBannerOnHomePage,a.isShowBannerOnDetailPage, \n"
                + "      a.Description,a.MetaTitle,a.MetaDescription,a.MetaKeyword \n"
                + "      a.Description,a.MetaTitle,a.MetaDescription,a.MetaKeyword,a.MetaKeyword,\n"
                + "      a.HDLink,a.HDPathCode,a.HDFinderUserName,a.HDFeedId,a.HDFeedToken \n"
                + "    from t714031H a  \n"
                + "    where (isnull(@DocCode,'') = '' or a.DocCode = @DocCode ) \n"
                + "    and (isnull(@Title,'') = '' or a.Title = @Title ) \n"
@@ -193,6 +202,11 @@
            info.setMetaDescription((String)map.get("MetaDescription") == null ? "": (String)map.get("MetaDescription"));
            info.setMetaKeyword((String)map.get("MetaKeyword") == null ? "": (String)map.get("MetaKeyword"));
            info.setShowBannerOnDetailPage(map.get("isShowBannerOnDetailPage") != null && map.get("isShowBannerOnDetailPage").equals(1) ?true:false);
            info.setHdLink(map.get("HDLink") == null ? "": (String)map.get("HDLink"));
            info.setHdPathCode(map.get("HDPathCode") == null ? "": (String)map.get("HDPathCode"));
            info.setHdFinderUserName(map.get("HDFinderUserName") == null ? "": (String)map.get("HDFinderUserName"));
            info.setHdFeedId(map.get("HDFeedId") == null ? "": (String)map.get("HDFeedId"));
            info.setHdFeedToken(map.get("HDFeedToken") == null ? "": (String)map.get("HDFeedToken"));
        }
        
        return info;