|
|
@@ -2,6 +2,7 @@ package com.uas.ps.inquiry.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.uas.ps.inquiry.BaseJunitTest;
|
|
|
+import com.uas.ps.inquiry.model.Attach;
|
|
|
import com.uas.ps.inquiry.model.PublicInquiry;
|
|
|
import com.uas.ps.inquiry.model.PublicInquiryItem;
|
|
|
import com.uas.ps.inquiry.model.PublicInquiryReply;
|
|
|
@@ -12,6 +13,7 @@ import com.uas.ps.inquiry.util.HttpUtil;
|
|
|
import org.junit.Test;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -110,6 +112,63 @@ public class InquiryForSalerControllerTest extends BaseJunitTest {
|
|
|
System.out.println(JSON.toJSON(res));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * /attach
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @Test
|
|
|
+ public void testAddAttachs() throws Exception {
|
|
|
+ Attach attach = new Attach();
|
|
|
+ attach.setDate(new Date());
|
|
|
+ attach.setName("attach");
|
|
|
+ attach.setPath("https://dfs.ubtob.com/group1/M00/88/B7/CgpkyFsZBI-AakOYAAAX5xdZwHw866.jpg");
|
|
|
+ String res = HttpUtil.doPost(localhost + "/inquiry/sale/attach", FlexJsonUtils.toJsonDeep(attach));
|
|
|
+ System.out.println(JSON.toJSON(res));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * /quote
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @Test
|
|
|
+ public void testFindBySourceId() throws Exception {
|
|
|
+ HashMap<String, Object> params = new HashMap<>();
|
|
|
+ // 询价明细Id
|
|
|
+ params.put("id", 1169);
|
|
|
+ params.put("en_uu", enUU);
|
|
|
+ HttpUtil.Response res = HttpUtil.sendGetRequest(localhost + "/inquiry/sale/quote", params);
|
|
|
+ System.out.println(JSON.toJSON(res));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * /allot/enremind
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @Test
|
|
|
+ public void testAllotEnRemind() throws Exception {
|
|
|
+ HashMap<String, Object> params = new HashMap<>();
|
|
|
+ // 询价明细Id
|
|
|
+ params.put("userUU", enUU);
|
|
|
+ params.put("enRemindId", 89445);
|
|
|
+ String res = HttpUtil.doPost(localhost + "/inquiry/sale/allot/enremind", FlexJsonUtils.toJsonDeep(params));
|
|
|
+ System.out.println(res);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * /allot/inquiry
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @Test
|
|
|
+ public void testAllotInquiry() throws Exception {
|
|
|
+ HashMap<String, Object> params = new HashMap<>();
|
|
|
+ // 询价明细Id
|
|
|
+ params.put("userUU", enUU);
|
|
|
+ params.put("itemId", 1169);
|
|
|
+ params.put("enUU", enUU);
|
|
|
+ String res = HttpUtil.doPost(localhost + "/inquiry/sale/allot/inquiry", FlexJsonUtils.toJsonDeep(params));
|
|
|
+ System.out.println(res);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* /remind
|
|
|
* @throws Exception
|