From 6d2662ded74c7b99771abf21a4c42ff5f3f7983b Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Mon, 16 Jul 2018 17:24:56 +0800 Subject: [PATCH] tmp --- .../web/EncourageMoneyController.java | 2 +- .../manage/openim/core/OpenimClient.java | 21 ++- src/main/ui/service_client.html | 18 ++- src/main/ui/service_contact_list.html | 125 ++++++++++-------- src/main/ui/service_customer.html | 2 +- 5 files changed, 97 insertions(+), 71 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java b/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java index f94a5d7e1..385f18ebd 100644 --- a/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java +++ b/src/main/java/au/com/royalpay/payment/manage/customers/web/EncourageMoneyController.java @@ -29,7 +29,7 @@ public class EncourageMoneyController { private EncourageService encourageService; - @RequestMapping(value = "/orders/{orderId}", method = RequestMethod.PUT) + @RequestMapping(value = "/orders/{orderId}", method = RequestMethod.GET) public JSONObject takeEncourageMoney(@PathVariable String orderId, @ModelAttribute(CommonConsts.WECHATINFO) JSONObject wxUser, @ModelAttribute(CommonConsts.ALIUSER) JSONObject aliuser) { String user_id = ""; diff --git a/src/main/java/au/com/royalpay/payment/manage/openim/core/OpenimClient.java b/src/main/java/au/com/royalpay/payment/manage/openim/core/OpenimClient.java index d1a126eef..370612bb0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/openim/core/OpenimClient.java +++ b/src/main/java/au/com/royalpay/payment/manage/openim/core/OpenimClient.java @@ -6,15 +6,12 @@ import com.alibaba.fastjson.JSONObject; import com.taobao.api.ApiException; import com.taobao.api.DefaultTaobaoClient; import com.taobao.api.TaobaoClient; -import com.taobao.api.domain.OpenImUser; import com.taobao.api.domain.Userinfos; import com.taobao.api.request.OpenimCustmsgPushRequest; -import com.taobao.api.request.OpenimRelationsGetRequest; import com.taobao.api.request.OpenimUsersAddRequest; import com.taobao.api.request.OpenimUsersGetRequest; import com.taobao.api.request.OpenimUsersUpdateRequest; import com.taobao.api.response.OpenimCustmsgPushResponse; -import com.taobao.api.response.OpenimRelationsGetResponse; import com.taobao.api.response.OpenimUsersAddResponse; import com.taobao.api.response.OpenimUsersGetResponse; import com.taobao.api.response.OpenimUsersUpdateResponse; @@ -23,6 +20,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** @@ -112,14 +110,15 @@ public class OpenimClient { String secret = "7639427973bd671be15c9d0c1e9c90b4"; String url = "https://eco.taobao.com/router/rest"; TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); - OpenimRelationsGetRequest req = new OpenimRelationsGetRequest(); - req.setBegDate("20180701"); - req.setEndDate("20180711"); - OpenImUser obj1 = new OpenImUser(); - obj1.setUid("imuser123"); - obj1.setTaobaoAccount(false); - req.setUser(obj1); - OpenimRelationsGetResponse rsp = null; + OpenimUsersAddRequest req = new OpenimUsersAddRequest(); + List list2 = new ArrayList(); + Userinfos obj3 = new Userinfos(); + list2.add(obj3); + obj3.setNick("im123"); + obj3.setUserid("im123"); + obj3.setPassword("xxxxxx"); + req.setUserinfos(list2); + OpenimUsersAddResponse rsp = null; try { rsp = client.execute(req); } catch (ApiException e) { diff --git a/src/main/ui/service_client.html b/src/main/ui/service_client.html index 0941d270d..a29071d07 100644 --- a/src/main/ui/service_client.html +++ b/src/main/ui/service_client.html @@ -6,8 +6,8 @@ \ No newline at end of file diff --git a/src/main/ui/service_contact_list.html b/src/main/ui/service_contact_list.html index 7769b5d72..5b4fecb6f 100644 --- a/src/main/ui/service_contact_list.html +++ b/src/main/ui/service_contact_list.html @@ -9,24 +9,27 @@