176yunxuan d2dc0527ab
All checks were successful
代码检查 / 代码检查 (pull_request) Successful in 18s
fix:查询子模块,删除子模块子系统
2024-04-17 20:30:31 +08:00

36 lines
1.2 KiB
Java

package com.jsl.oa.mapper;
import com.jsl.oa.model.dodata.ProjectChildDO;
import com.jsl.oa.model.dodata.ProjectModuleDO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface ModuleMapper {
List<ProjectChildDO> getByProjectId(Integer projectId, Long userId, int is);
List<ProjectModuleDO> getBySysId(Integer sysId, Long userId, int is);
@Select("select principal_id from organize_oa.oa_project where id=#{projectId}")
Long getPidByProjectid(Integer projectId);
@Select("select principal_id from organize_oa.oa_project_child where id=#{sysId}")
Long getPidBySysid(Integer sysId);
@Delete("DELETE FROM organize_oa.oa_project_work WHERE id = #{id}")
void deleteMoudule(Long id);
@Select("select * from organize_oa.oa_project_work where pid=#{id} and is_delete=0 and type=1 ")
List<ProjectModuleDO> getAllMoudleByPid(Long id);
@Select("select principal_id from organize_oa.oa_project where id=(select project_id "
+ "from organize_oa.oa_project_child where id = #{sysId})")
Long getPridBySysyid(Integer sysId);
}