mapper.AdminRoleMapper.xml Maven / Gradle / Ivy
The newest version!
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.kamingpan.infrastructure.entity.dao.AdminRoleDao"> <!-- 通用查询映射结果 --> <resultMap id="BaseResultMap" type="com.kamingpan.infrastructure.entity.model.entity.AdminRole"> <result column="id" property="id" /> <result column="creator_id" property="creatorId" /> <result column="creator" property="creator" /> <result column="create_time" property="createTime" /> <result column="updater_id" property="updaterId" /> <result column="updater" property="updater" /> <result column="update_time" property="updateTime" /> <result column="deleted" property="deleted" /> <result column="admin_id" property="adminId" /> <result column="role_id" property="roleId" /> </resultMap> <!-- 通用查询结果列 --> <sql id="BaseColumnList"> id, creator_id, creator, create_time, updater_id, updater, update_time, deleted, admin_id, role_id </sql> <!-- 根据管理员主键删除管理员-角色关联 --> <delete id="deleteByAdminId" parameterType="java.lang.String"> <if test="adminId != null and adminId != ''"> delete from system_admin_role where admin_id = #{adminId} </if> </delete> <!-- 根据角色主键查询管理员-角色关联数量 --> <select id="countByRoleId" resultType="java.lang.Integer"> select count(id) from system_admin_role where role_id = #{roleId} </select> </mapper>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy