package com.rzyc.mapper; import com.rzyc.model.DutyTree; import com.rzyc.model.DutyTreeExample; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface DutyTreeMapper { long countByExample(DutyTreeExample example); int deleteByExample(DutyTreeExample example); int insert(DutyTree record); int insertSelective(DutyTree record); List selectByExample(DutyTreeExample example); int updateByExampleSelective(@Param("record") DutyTree record, @Param("example") DutyTreeExample example); int updateByExample(@Param("record") DutyTree record, @Param("example") DutyTreeExample example); /*批量插入*/ int insertList(@Param("records") List records); /*删除用户责任书*/ Integer delByUserId(@Param("userId") String userId, @Param("targetType") Integer targetType); /*责任树*/ DutyTree findTree(@Param("targetType") Integer targetType, @Param("userId") String userId, @Param("targetId") String targetId); /*查询企业责任人*/ List findByTargetId(@Param("targetId") String targetId); /*需检查企业总数*/ Integer userEntNum(@Param("userId") String userId); /*当月检查企业总数*/ Integer userCheckEntNum(@Param("userId") String userId); /*责任树用户数*/ Integer countUser(@Param("userId") String userId); /*责任树企业数*/ Integer countEnt(@Param("userId") String userId); /*上级用户*/ List topUser(@Param("targetId") String targetId); /*下级用户*/ List findUser(@Param("userId") String userId); /*通过目标id查询*/ DutyTree findTargetId(@Param("targetId") String targetId); /*用户已选择企业信息*/ List findByUserId(@Param("userId") String userId); }