按数组内容首字母排序
Object[] objects = companyCreditSituation.getGuaranteeMethod().toArray();
Arrays.sort(objects);
JSONArray data = JSONArray.parseArray(JSON.toJSONString(objects));
companyCreditSituation.setGuaranteeMethod(data);
适用场景:JSON数组内容为查询条件
使用方式:查询和保存service里写一遍以上排序代码即可。