fix: 优化逻辑
This commit is contained in:
parent
43b2559f6b
commit
716ee0bfa9
@ -102,7 +102,7 @@ public interface MsMapmoduleBMapper extends BaseMapper<MsMapmoduleB> {
|
||||
+ "BMM.MULTI_SELECT AS multiSelect, BMM.CHECKED AS checked, BMM.CAN_BE_CHECKED AS canBeChecked, "
|
||||
+ "BMM.ORDER_INDEX AS pSort "
|
||||
+ "FROM MS_MAPLEGEND_B BML LEFT JOIN MS_MAPMODULE_B BMM ON BML.ID = BMM.RES_ID "
|
||||
+ "WHERE BMM.RES_TYPE = 'legend' AND BML.IS_DELETED = 0 AND BML.ENABLE = 1 "
|
||||
+ "WHERE BMM.RES_TYPE = 'legend' AND BMM.IS_DELETED = 0 AND BML.IS_DELETED = 0 AND BML.ENABLE = 1 "
|
||||
+ "<choose>"
|
||||
+ "<when test=\"moduleId != null and moduleId != ''\"> AND BMM.MODULE_ID = #{moduleId}</when>"
|
||||
+ "<otherwise> AND BMM.MODULE_ID = 'common'</otherwise>"
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
package com.yfd.platform.qgc_sys.mapcfg.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@ -48,6 +49,7 @@ public class MapmoduleBController {
|
||||
|
||||
@Resource
|
||||
private MsMaplayerBMapper msMaplayerBMapper;
|
||||
|
||||
/**
|
||||
* 条件过滤数据列表(Kendo UI 数据源)
|
||||
*/
|
||||
@ -160,9 +162,9 @@ public class MapmoduleBController {
|
||||
moduleWrapper.eq(MsMapmoduleB::getResType, "layer");
|
||||
moduleWrapper.eq(MsMapmoduleB::getResId, layer.getId());
|
||||
moduleWrapper.eq(MsMapmoduleB::getIsDeleted, 0);
|
||||
MsMapmoduleB existingLayerModule = mapmoduleBService.getOne(moduleWrapper);
|
||||
long count = mapmoduleBService.count(moduleWrapper);
|
||||
|
||||
if (existingLayerModule == null) {
|
||||
if (count <= 0) {
|
||||
MsMapmoduleB layerModule = new MsMapmoduleB();
|
||||
layerModule.setModuleId(mapmoduleB.getModuleId());
|
||||
layerModule.setSystemId(mapmoduleB.getSystemId());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user