diff --git a/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecCombopMapper.java b/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecCombopMapper.java index 993037d7e1961806605f60e1aa08b17a7334fa91..09f34b3dfd3bae65642070d99d8d0371b520689b 100644 --- a/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecCombopMapper.java +++ b/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecCombopMapper.java @@ -14,6 +14,7 @@ package neatlogic.framework.autoexec.dao.mapper; import neatlogic.framework.autoexec.dto.AutoexecTypeVo; import neatlogic.framework.autoexec.dto.combop.AutoexecCombopAuthorityVo; +import neatlogic.framework.autoexec.dto.combop.AutoexecCombopSearchVo; import neatlogic.framework.autoexec.dto.combop.AutoexecCombopVo; import neatlogic.framework.common.dto.BasePageVo; import neatlogic.framework.dto.AuthenticationInfoVo; @@ -40,13 +41,9 @@ public interface AutoexecCombopMapper { List getAutoexecCombopByIdList(List idList); - int getAutoexecCombopCount(AutoexecCombopVo searchVo); + int getAutoexecCombopCount(AutoexecCombopSearchVo searchVo); - List getAutoexecCombopList(AutoexecCombopVo searchVo); - - List getAutoexecCombopIdList(AutoexecCombopVo searchVo); - - List getAutoexecCombopListByIdList(List idList); + List getAutoexecCombopIdList(AutoexecCombopSearchVo searchVo); List getAutoexecCombopAuthorityListByCombopId(Long combopId); diff --git a/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecCombopMapper.xml b/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecCombopMapper.xml index d589d85ed6fa4210c173cdd12dbae68e648692d1..1028125050049ff84efb0d70f6edc47518045e0c 100644 --- a/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecCombopMapper.xml +++ b/src/main/java/neatlogic/framework/autoexec/dao/mapper/AutoexecCombopMapper.xml @@ -75,104 +75,80 @@ - + + + + AND b.status = 'draft' + + + AND b.status = 'submitted' + + + AND b.status = 'rejected' + + + AND b.status = 'passed' AND b.is_active = 1 + + + + AND (a.`name` LIKE concat('%', #{keyword}, '%') OR a.`description` LIKE concat('%', #{keyword}, '%')) + + + AND a.`type_id` = #{typeId} + + + AND a.`is_active` = #{isActive} + + + AND (a.`owner` = #{userUuid} + OR (c.`uuid` = 'alluser' + + AND c.`action` = #{action} + ) + + + OR (c.`uuid` IN + + #{uuid} + + + AND c.`action` = #{action} + + ) + + + OR 1 != 1 + + + ) + + - SELECT - `id`, - `name`, - `description`, - `type_id` AS typeId, - `is_active` AS isActive, - `operation_type` AS operationType, - `op_type` as opType, - `owner`, - `fcd`, - `fcu` - FROM `autoexec_combop` + COUNT(DISTINCT a.`id`) + FROM `autoexec_combop` a + JOIN `autoexec_combop_version` b on b.combop_id = a.id + JOIN `autoexec_combop_authority` c on c.combop_id = a.id - - AND `id` IN - - #{id} - - - - AND (`name` LIKE concat('%', #{keyword}, '%') OR `description` LIKE concat('%', #{keyword}, '%')) - - - AND `type_id` = #{typeId} - - - AND `is_active` = #{isActive} - + - ORDER BY `id` DESC - LIMIT #{startNum}, #{pageSize} - SELECT - `id` - FROM `autoexec_combop` + a.`id` + FROM `autoexec_combop` a + join `autoexec_combop_version` b on b.`combop_id` = a.`id` + join `autoexec_combop_authority` c on c.`combop_id` = a.`id` - - AND `name` LIKE concat('%', #{keyword}, '%') - - - AND `type_id` = #{typeId} - - - AND `is_active` = #{isActive} - + - ORDER BY `id` DESC + GROUP BY a.`id` + ORDER BY a.`id` DESC LIMIT #{startNum}, #{pageSize} - -