update 字典翻译排序异常处理
This commit is contained in:
@@ -17,6 +17,7 @@ public class ResultCommon {
|
||||
public static final String EMPTY_STANDARD_NAME = "message.empty.standard.name"; // 标准名称不能为空
|
||||
public static final String EMPTY_COMMON = "message.empty.common"; // {0}不能为空
|
||||
public static final String EXIST_STANDARD_NUMBER = "message.exists.standard.number"; // 标准编号已经存在
|
||||
public static final String NOT_EXIST_PARAM = "message.no.exists.param"; // 参数{0}不存在
|
||||
|
||||
public static final String RMR_SET_QUALITY_OVER_TEN = "es.rmr.setQuality.overTen"; // 请最多选择10条
|
||||
|
||||
|
||||
+6
-2
@@ -899,8 +899,12 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
String orderByField = (String) parameterMap.get(FieldCommon.ORDER_BY_FIELD);
|
||||
if (StringUtils.isNotBlank(orderByField)) {
|
||||
// 排序字段的类型
|
||||
String fieldShowType = fieldList.stream().filter(lawsTag -> orderByField
|
||||
.equals(lawsTag.getDbFieldName())).collect(Collectors.toList()).get(0).getFieldShowType();
|
||||
List<LawsTag> lawsTagList = fieldList.stream().filter(lawsTag -> orderByField
|
||||
.equals(lawsTag.getDbFieldName())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(lawsTagList)) {
|
||||
throw new JeroBootException(ResultCommon.NOT_EXIST_PARAM, orderByField);
|
||||
}
|
||||
String fieldShowType = lawsTagList.get(0).getFieldShowType();
|
||||
if (LawsFieldTypeEnum.DATE_MANY.getValue().equals(fieldShowType)) {
|
||||
// 多日期的排序逻辑不一样
|
||||
orderBySortDateMany(parameterMap, selectCondition);
|
||||
|
||||
Reference in New Issue
Block a user