|
|
@@ -11,7 +11,6 @@ import com.uas.platform.b2b.temporary.model.InquiryDetailInfo;
|
|
|
import com.uas.platform.b2b.temporary.model.InquiryMessage;
|
|
|
import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.util.HttpUtil;
|
|
|
-import com.uas.platform.core.util.serializer.FlexJsonUtils;
|
|
|
import com.uas.sso.support.Page;
|
|
|
import org.apache.http.HttpStatus;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
@@ -40,7 +39,7 @@ public class InquiryUtils {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public static PublicInquiryItemInfo save(PublicInquiryItemInfo item) throws Exception {
|
|
|
- String res = HttpUtil.doPost(url + "/inquiry/sale/item/save", FlexJsonUtils.toJsonDeep(item));
|
|
|
+ String res = HttpUtil.doPost(url + "/inquiry/sale/item/save", JSONObject.toJSONString(item));
|
|
|
if (null != res) {
|
|
|
Object obj = JSON.parse(res);
|
|
|
return JSON.parseObject(obj.toString(), PublicInquiryItemInfo.class);
|
|
|
@@ -83,7 +82,7 @@ public class InquiryUtils {
|
|
|
formData.put("enuu", enuu);
|
|
|
HttpUtil.Response res = HttpUtil.sendGetRequest(url + "/inquiry/sale/publicInquiry/detail", formData);
|
|
|
ModelMap map = new ModelMap();
|
|
|
- if (res.getStatusCode() == 200) {
|
|
|
+ if (res.getStatusCode() == HttpStatus.SC_OK) {
|
|
|
JSONObject jsonObject = JSONObject.parseObject(res.getResponseText());
|
|
|
String itemStr = jsonObject.getString("inquiryItem");
|
|
|
if (null != itemStr) {
|
|
|
@@ -175,8 +174,8 @@ public class InquiryUtils {
|
|
|
*/
|
|
|
public static Page<PublicInquiryItemInfo> getQuoteInfo(PageInfo pageInfo, SearchFilter searchFilter, String state) throws Exception {
|
|
|
JSONObject formData = new JSONObject();
|
|
|
- formData.put("pageInfo", FlexJsonUtils.toJsonDeep(pageInfo));
|
|
|
- formData.put("filter", FlexJsonUtils.toJsonDeep(searchFilter));
|
|
|
+ formData.put("pageInfo", JSON.toJSONString(pageInfo));
|
|
|
+ formData.put("filter", JSON.toJSONString(searchFilter));
|
|
|
if (null != state) {
|
|
|
formData.put("_state", state);
|
|
|
}
|
|
|
@@ -258,7 +257,7 @@ public class InquiryUtils {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public static PurcInquiry saveInquiry(PurcInquiry inquiry) throws Exception {
|
|
|
- String res = HttpUtil.doPost(url + "/inquiry/buyer/save", FlexJsonUtils.toJsonDeep(inquiry));
|
|
|
+ String res = HttpUtil.doPost(url + "/inquiry/buyer/save", JSON.toJSONString(inquiry));
|
|
|
if (null != res) {
|
|
|
Object obj = JSON.parse(res);
|
|
|
return JSON.parseObject(obj.toString(), PurcInquiry.class);
|