|
@@ -212,15 +212,20 @@ public class RuleGroupServiceImpl extends ServiceImpl<RuleGroupMapper, RuleGroup
|
|
|
|
|
|
//拆分逗号拼接数据
|
|
|
private List<String> strToList(String strings) {
|
|
|
- if (Check.isNull(strings)) {
|
|
|
- return null;
|
|
|
- }
|
|
|
- JSONObject job = new JSONObject();
|
|
|
- job.put("list", strings);
|
|
|
- List<String> ids = new ArrayList<>();
|
|
|
- JSONArray idList = job.getJSONArray("list");
|
|
|
- for (Object id : idList) {
|
|
|
- ids.add(String.valueOf(id));
|
|
|
+ List<String> ids = null;
|
|
|
+ try {
|
|
|
+ if (Check.isNull(strings)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ JSONObject job = new JSONObject();
|
|
|
+ job.put("list", strings);
|
|
|
+ ids = new ArrayList<>();
|
|
|
+ JSONArray idList = job.getJSONArray("list");
|
|
|
+ for (Object id : idList) {
|
|
|
+ ids.add(String.valueOf(id));
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("ids格式转换异常", e);
|
|
|
}
|
|
|
return ids;
|
|
|
}
|