|
|
@@ -1,6 +1,7 @@
|
|
|
package com.mooctest.crowd.site.mediator.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.mooctest.crowd.domain.dao.*;
|
|
|
import com.mooctest.crowd.domain.domainobject.*;
|
|
|
import com.mooctest.crowd.domain.exception.*;
|
|
|
@@ -23,7 +24,6 @@ import com.mooctest.crowd.site.data.vo.*;
|
|
|
import com.mooctest.crowd.site.mediator.ViewMediator;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.codehaus.jettison.json.JSONException;
|
|
|
-import org.codehaus.jettison.json.JSONObject;
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -1105,7 +1105,7 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
userPO.get().setProvince(userVO.getProvince());
|
|
|
userPO.get().setCity(userVO.getCity());
|
|
|
userPO.get().setCounty(userVO.getCounty());
|
|
|
- userPO.get().setPersonalCompetence(userVO.getPersonalCompetence());
|
|
|
+ userPO.get().setPersonalCompetence(JSONObject.toJSONString(userVO.getPersonalCompetence()));
|
|
|
userDao.save(userPO.get());
|
|
|
return this.getInformation(userId);
|
|
|
}
|
|
|
@@ -1208,7 +1208,7 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
String url = "https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&cardNo=" + bankNo + "&cardBinCheck=true";
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
String result = restTemplate.getForObject(url, String.class);
|
|
|
- JSONObject json = new JSONObject(result);
|
|
|
+ JSONObject json = JSONObject.parseObject(result);
|
|
|
String validated = String.valueOf(json.get("validated"));
|
|
|
if ("false".equals(validated)) {
|
|
|
throw new HttpBadRequestException("请输入正确的卡号");
|