Эх сурвалжийг харах

消息工具类,url修改

dongbw 8 жил өмнө
parent
commit
34ce035fff

+ 3 - 2
src/main/java/com/uas/platform/b2b/ps/MessageUtils.java

@@ -42,9 +42,10 @@ public class MessageUtils {
         params.put("consumerApp", "B2B");
         params.put("page", page);
         params.put("size", size);
-        HttpUtils.Response res = HttpUtils.get(MESSAGE_PUBLIC_SERVICE_URL + "/message", params);
+        HttpUtils.Response res = HttpUtils.get(MESSAGE_PUBLIC_SERVICE_URL + "/messages", params);
         if (HttpStatus.OK.value() == res.getStatusCode()) {
             if (null != res.getResponseText()) {
+                System.out.println(res.getResponseText());
                 return (Page) JSONObject.parseObject(res.getResponseText(), new TypeReference<Page<MessageModel>>() {
                 }, new Feature[0]);
             }
@@ -67,7 +68,7 @@ public class MessageUtils {
         HashMap<String, String> params = new HashMap<>();
         params.put("messageId", String.valueOf(id));
         params.put("consumerApp", "B2B");
-        HttpUtils.Response res = HttpUtils.post(MESSAGE_PUBLIC_SERVICE_URL + "/message/read", params);
+        HttpUtils.Response res = HttpUtils.post(MESSAGE_PUBLIC_SERVICE_URL + "/messages/read", params);
         if (HttpStatus.OK.value() == res.getStatusCode()) {
             map.put("success", "成功设为已读");
             return map;

+ 1 - 1
src/main/resources/dev/message.properties

@@ -12,4 +12,4 @@ msgInquiryForB2B=629edeb3-a87e-4a40-a5e5-51d9ae734f1b
 msgAutoInquiryForB2B=8cf71d56-09bb-4d60-993e-ed87ce72ec3b
 messageUrl=http://message.ubtob.com/sms/send
 
-messagePublicServiceDevUrl=http://218.17.158.219:24000/message
+messagePublicServiceDevUrl=http://192.168.253.131:8080

+ 1 - 0
src/main/resources/prod/message.properties

@@ -12,4 +12,5 @@ msgInquiryForB2B=629edeb3-a87e-4a40-a5e5-51d9ae734f1b
 msgAutoInquiryForB2B=8cf71d56-09bb-4d60-993e-ed87ce72ec3b
 messageUrl=http://message.ubtob.com/sms/send
 
+#todo Ö®ºóÐÞ¸ÄΪÕýʽµØÖ·
 messagePublicServiceDevUrl=http://218.17.158.219:24000/message

+ 1 - 1
src/main/resources/spring/context.xml

@@ -19,7 +19,7 @@
 
 	<!-- 消息参数 -->
 	<util:properties id="message"
-		location="classpath:${profile:dev}/message.properties" />
+		location="classpath:${profile}/message.properties" />
 		
 	<bean class="com.uas.platform.b2b.core.support.ApplicationContextRegister" />
 

+ 1 - 0
src/main/webapp/resources/js/index/app.js

@@ -1047,6 +1047,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
     /**
      * 新消息提醒(调用公共服务接口)  -2018-01-22 19:36:50
+     * @author dongbw
      */
     app.controller('PagingReleaseCtrl', ['$scope', 'PagingRelease', 'BaseService', 'ngTableParams', 'toaster', '$modalInstance', 'PagingReleaseInfo', function ($scope, PagingRelease, BaseService, ngTableParams, toaster, $modalInstance, PagingReleaseInfo) {