You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							64 lines
						
					
					
						
							1.7 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							64 lines
						
					
					
						
							1.7 KiB
						
					
					
				
								package com.epmet.utils;
							 | 
						|
								
							 | 
						|
								import cn.binarywang.wx.miniapp.api.WxMaService;
							 | 
						|
								import com.epmet.wx.ma.WxMaConfig;
							 | 
						|
								import org.springframework.beans.factory.annotation.Value;
							 | 
						|
								import org.springframework.stereotype.Component;
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 获取小程序业务工具
							 | 
						|
								 *
							 | 
						|
								 * @author work@yujt.net.cn
							 | 
						|
								 * @date 2019/11/25 13:29
							 | 
						|
								 */
							 | 
						|
								@Component
							 | 
						|
								public class WxMaServiceUtils {
							 | 
						|
								
							 | 
						|
								    @Value("${wx.ma.appId.resi}")
							 | 
						|
								    private String APPID_RESI;
							 | 
						|
								
							 | 
						|
								    @Value("${wx.ma.appId.gov}")
							 | 
						|
								    private String APPID_GOV;
							 | 
						|
								
							 | 
						|
								    /*@Value("${wx.ma.appId.oper}")
							 | 
						|
								    private String APPID_OPER;*/
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * 获取党群e事通-居民端小程序配置
							 | 
						|
								     *
							 | 
						|
								     * @return cn.binarywang.wx.miniapp.api.WxMaService
							 | 
						|
								     * @author yinzuomei
							 | 
						|
								     * @date 2020/03/13 10:44
							 | 
						|
								     */
							 | 
						|
								    public final WxMaService resiWxMaService() {
							 | 
						|
								        final WxMaService wxMaService = WxMaConfig.getMaService(APPID_RESI);
							 | 
						|
								        return wxMaService;
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * 获取党群e事通-政府端小程序配置
							 | 
						|
								     *
							 | 
						|
								     * @return cn.binarywang.wx.miniapp.api.WxMaService
							 | 
						|
								     * @author yinzuomei
							 | 
						|
								     * @date 2020/03/13 10:44
							 | 
						|
								     */
							 | 
						|
								    public final WxMaService govWxMaService() {
							 | 
						|
								        final WxMaService wxMaService = WxMaConfig.getMaService(APPID_GOV);
							 | 
						|
								        return wxMaService;
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     *
							 | 
						|
								     * 获取党群e事通-运营端小程序配置
							 | 
						|
								     *
							 | 
						|
								     * @params []
							 | 
						|
								     * @return cn.binarywang.wx.miniapp.api.WxMaService
							 | 
						|
								     * @author yinzuomei
							 | 
						|
								     * @since 2020/03/13 10:44
							 | 
						|
								     */
							 | 
						|
								    public final WxMaService operWxMaService() {
							 | 
						|
								//        final WxMaService wxMaService = WxMaConfig.getMaService(APPID_OPER);
							 | 
						|
								        final WxMaService wxMaService = WxMaConfig.getMaService(APPID_RESI);
							 | 
						|
								        return wxMaService;
							 | 
						|
								    }
							 | 
						|
								}
							 | 
						|
								
							 |