LAPTOP-KB9HII50\70708 2 anos atrás
pai
commit
4284ffb9fe

+ 44 - 27
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/wechat/WeiXinEventProcess.java

@ -31,6 +31,10 @@ public class WeiXinEventProcess {
    private String wechatId;
    @Value("${wechat.appId}")
    private String appId;
    @Value("${wechat.wechat_base_url}")
    private String wechat_base_url;
    @Value("${spring.profiles.active}")
    private String profiles;
    @Autowired
    private BaseDoctorDao baseDoctorDao;
@ -142,44 +146,57 @@ public class WeiXinEventProcess {
     * @param articles
     */
    public void setUrlItems(List<Map<String, String>> articles) {
        String baseUrl = "zhyzh.gongshu.gov.cn";
        String street = "朝晖";
        String Description = "这里是智慧养老和健康管理服务社区+幼儿成长教育服务平台";
        String PicUrl = "https://zhyzh.gongshu.gov.cn/image/index.png";
        if("hzkxtest".equals(profiles)){
            baseUrl = "hzyy.cityihealth.com";
            street= "凯旋";
            Description = "这里是智慧养老和健康管理服务社区";
            PicUrl = "https://zhyzh.gongshu.gov.cn/image/kxindex.jpg";
        }
        Map<String, String> articleBooking = new HashMap<>();
        // 图文URL
        String urlBooking = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri=https%3A%2F%2Fzhyzh.gongshu.gov.cn%2Fmedical-care-patient%2Fhome%2Findex&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";
        String urlBooking = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri=https%3A%2F%2F"+baseUrl+"%2Fmedical-care-patient%2Fhome%2Findex&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";
        urlBooking = urlBooking.replace("{appId}", appId);
        articleBooking.put("Url", urlBooking);
        articleBooking.put("Title", "您好,欢迎来到朝晖云照护!");
        articleBooking.put("Description", "这里是智慧养老和健康管理服务社区+幼儿成长教育服务平台\n" +
        articleBooking.put("Title", "您好,欢迎来到"+street+"云照护!");
        articleBooking.put("Description", Description+"\n" +
                "我们陪你一起,关爱老人,呵护孩子!\n" +
                "感谢关注,点击下方菜单直接进入朝晖云照护平台");
        articleBooking.put("PicUrl", "https://zhyzh.gongshu.gov.cn/image/index.png");
                "感谢关注,点击下方菜单直接进入"+street+"云照护平台");
        articleBooking.put("PicUrl", PicUrl);
        articles.add(articleBooking);
        Map<String, String> articleDevice = new HashMap<>();
        // 图文URL
        String urlDevice = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri=https%3A%2F%2Fzhyzh.gongshu.gov.cn%2Fmedical-care-patient%2FonlineRegistration%2Findex&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";
        urlDevice = urlDevice.replace("{appId}", appId);
        articleDevice.put("Url", urlDevice);
        articleDevice.put("Title", "幼儿在线入园");
        articleDevice.put("Description", "申请专业托育机构入园资格");
        articleDevice.put("PicUrl", "https://zhyzh.gongshu.gov.cn/image/doorCoach.png");
        articles.add(articleDevice);
        Map<String, String> articleFamily = new HashMap<>();
        // 图文URL
        String urlFamily = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri=https%3A%2F%2Fzhyzh.gongshu.gov.cn%2Fmedical-care-patient%2FlifeCare%2Findex%3Ftype%3D2&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";
//        String urlFamily = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri=https%3A%2F%2Fzhyzh.gongshu.gov.cn%2Fmedical-care-patient%2FlifeCare%2Findex%3Ftype%3D2&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";
        urlFamily = urlFamily.replace("{appId}", appId);
        articleFamily.put("Url", urlFamily);
        articleFamily.put("Title", "幼儿上门辅导预约");
        articleFamily.put("Description", "预约幼儿教育专家上门育儿指导");
        articleFamily.put("PicUrl", "https://zhyzh.gongshu.gov.cn/image/online.png");
        articles.add(articleFamily);
        if("hzprod".equals(profiles)){
            Map<String, String> articleDevice = new HashMap<>();
            // 图文URL
            String urlDevice = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri=https%3A%2F%2F"+baseUrl+"%2Fmedical-care-patient%2FonlineRegistration%2Findex&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";
            urlDevice = urlDevice.replace("{appId}", appId);
            articleDevice.put("Url", urlDevice);
            articleDevice.put("Title", "幼儿在线入园");
            articleDevice.put("Description", "申请专业托育机构入园资格");
            articleDevice.put("PicUrl", "https://zhyzh.gongshu.gov.cn/image/doorCoach.png");
            articles.add(articleDevice);
            Map<String, String> articleFamily = new HashMap<>();
            // 图文URL
            String urlFamily = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri=https%3A%2F%2F"+baseUrl+"%2Fmedical-care-patient%2FlifeCare%2Findex%3Ftype%3D2&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";
            urlFamily = urlFamily.replace("{appId}", appId);
            articleFamily.put("Url", urlFamily);
            articleFamily.put("Title", "幼儿上门辅导预约");
            articleFamily.put("Description", "预约幼儿教育专家上门育儿指导");
            articleFamily.put("PicUrl", "https://zhyzh.gongshu.gov.cn/image/online.png");
            articles.add(articleFamily);
        }
        Map<String, String> oldzhaohuService = new HashMap<>();
        // 图文URL
        String urlOld = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri=https%3A%2F%2Fzhyzh.gongshu.gov.cn%2Fmedical-care-patient%2FtoGround%2Findex&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";
        String urlOld = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri=https%3A%2F%2F"+baseUrl+"%2Fmedical-care-patient%2FtoGround%2Findex&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect";
        urlOld = urlOld.replace("{appId}", appId);
        oldzhaohuService.put("Url", urlOld);
        oldzhaohuService.put("Title", "老人照护服务介绍");