| | |
| | | package com.panzhihua.applets.weixin; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaSecCheckService; |
| | | import com.panzhihua.applets.config.WxMaConfiguration; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import com.panzhihua.applets.config.WxMaConfiguration; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaSecCheckService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private WxMaConfiguration wxMaConfiguration; |
| | | |
| | | public boolean checkMessage(String msg){ |
| | | WxMaSecCheckService wxMaSecCheckService=wxMaConfiguration.getMaService().getSecCheckService(); |
| | | public boolean checkMessage(String msg) { |
| | | WxMaSecCheckService wxMaSecCheckService = wxMaConfiguration.getMaService().getSecCheckService(); |
| | | try { |
| | | boolean b = wxMaSecCheckService.checkMessage(msg); |
| | | return b; |
| | | } catch (WxErrorException e) { |
| | | log.error("微信审核文字内容出错【{}】",e.getMessage()); |
| | | log.error("微信审核文字内容出错【{}】", e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return false; |