|
@ -28,6 +28,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
import springfox.documentation.spring.web.json.Json;
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
@ -731,7 +732,7 @@ public class ThirdJkEduArticleService extends BaseService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public void checkCategory(String categoryName,Integer categoryLevel) throws Exception {
|
|
|
public boolean checkCategory(String categoryName,Integer categoryLevel) throws Exception {
|
|
|
JSONObject json = null;
|
|
|
try {
|
|
|
JSONObject param = new JSONObject();
|
|
@ -739,12 +740,15 @@ public class ThirdJkEduArticleService extends BaseService {
|
|
|
param.put("categoryLevel", categoryLevel);
|
|
|
String response = httpClientUtil.httpPost(articleBaseUrl+"/WsPlatform/rest", getParamsMap(checkCategory, param.toString(), "1"));
|
|
|
json = JSON.parseObject(response);
|
|
|
JSONArray j = (JSONArray) json.get("result");
|
|
|
if(j!=null&&j.size()>0){
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
if (!"10000".equals(json.getString("Code"))) {
|
|
|
new Exception(json.getString("Message"));
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
/**
|