wwl vor 3 Jahren
Ursprung
Commit
b3b20633a1

+ 2 - 2
twzd-common/src/main/java/com/miaxis/common/utils/wx/MessageUtil.java

@@ -44,7 +44,7 @@ public class MessageUtil {
      * @param content
      * @return
      */
-    public static String initText(String toUserName, String fromUserName, String content) throws Exception{
+    public static String initText(String fromUserName, String toUserName, String content) throws Exception{
         // 返回消息时ToUserName的值与FromUserName的互换
         Map<String, String> returnMap = new HashMap<>();
         returnMap.put("ToUserName", fromUserName);
@@ -68,7 +68,7 @@ public class MessageUtil {
      * @param url 点击图文消息跳转链接
      * @return
      */
-    public static String initNews(String toUserName, String fromUserName, String articles, String title, String description, String picUrl, String url)  throws Exception{
+    public static String initNews(String fromUserName, String toUserName, String articles, String title, String description, String picUrl, String url)  throws Exception{
         // 返回消息时ToUserName的值与FromUserName的互换
         Map<String, String> returnMap = new HashMap<>();
         returnMap.put("ToUserName", fromUserName);

+ 2 - 2
twzd-service/src/main/java/com/miaxis/wx/service/impl/WxGzhServiceImpl.java

@@ -182,7 +182,7 @@ public class WxGzhServiceImpl implements IWxGzhService {
                     String encryptMsg = mapToXml(returnMap);
                     return encryptMsg;
                 }else {
-                    return initText(fromUserName, toUserName, "文本消息-默认回复信息");
+                    return MessageUtil.initText(fromUserName, toUserName, "文本消息-默认回复信息");
                 }
 
             } else if (MessageUtil.MESSAGE_IMAGE.equals(msgType)) { // 图片消息
@@ -257,7 +257,7 @@ public class WxGzhServiceImpl implements IWxGzhService {
      * @param content
      * @return
      */
-    public static String initText(String toUserName, String fromUserName, String content) throws Exception{
+    public static String initText(String fromUserName, String toUserName, String content) throws Exception{
         // 返回消息时ToUserName的值与FromUserName的互换
         Map<String, String> returnMap = new HashMap<>();
         returnMap.put("ToUserName", fromUserName);