fix 78396 标准选择--查询--来源为空,列表数据为空

This commit is contained in:
liao
2023-11-10 19:27:04 +08:00
parent 30af820173
commit 364da7ed77
2 changed files with 6 additions and 10 deletions
@@ -49,24 +49,24 @@
<select id="getManyStandardSelectionBox"
resultType="com.jero.modules.laws.common.vo.ManyStandardSelectionBox">
SELECT id, standard_number, standard_name, release_date, standard_state, source
SELECT id, standard_number, standard_name, release_date, standard_state, source, create_time
FROM
(SELECT id, standard_number, standard_name, release_date, standard_state, '1' AS source
(SELECT id, standard_number, standard_name, release_date, standard_state, '1' AS source, create_time
FROM laws_domestic_standard
WHERE del_flag = 0
UNION ALL
SELECT id, standard_number, standard_name, release_date, standard_state, '2' AS source
SELECT id, standard_number, standard_name, release_date, standard_state, '2' AS source, create_time
FROM laws_overseas_standard
WHERE del_flag = 0
UNION ALL
SELECT id, standard_number, standard_name, release_date, standard_state, '3' AS source
SELECT id, standard_number, standard_name, release_date, standard_state, '3' AS source, create_time
FROM laws_enterprise_standard
WHERE del_flag = 0) standard
WHERE del_flag = 0
<where>
<if test="vo.source != null and vo.source != ''">
AND source = #{vo.source}
</if>
@@ -80,6 +80,7 @@
<if test="vo.excludeStandardNumbers != null and vo.excludeStandardNumbers != ''">
AND standard_number NOT LIKE CONCAT('%', #{vo.excludeStandardNumbers}, '%')
</if>
</where>
ORDER BY create_time DESC
</select>
<select id="getSingleStandard" resultType="com.jero.modules.laws.common.vo.ManyStandardSelectionBox">
@@ -1167,11 +1167,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
@Override
public IPage<ManyStandardSelectionBox> getManyStandardSelectionBox(ManyStandardSelectionBoxVO selectionBoxVO, Integer pageNo, Integer pageSize) {
Page<ManyStandardSelectionBox> page = new Page<>(pageNo, pageSize);
// 来源不能为空
if (StringUtils.isBlank(selectionBoxVO.getSource())) {
throw new JeroBootException(ResultCommon.EMPTY_SOURCE, "");
}
selectionBoxVO.setSource(TableNameEnum.getTableName(selectionBoxVO.getSource()));
return lawsCommonMapper.getManyStandardSelectionBox(page, selectionBoxVO);
}