rk
2026-03-10 fa668c325f2dac348fb9f80c0c6c679f9ce1e41b
server/dmmall_service/src/main/resources/mappers/SystemRoleMapper.xml
@@ -19,9 +19,9 @@
      role.ID, role.`CODE`, role.`NAME`, role.`REMARK`, role.`FIXED`, role.`CREATE_TIME`, role.`UPDATE_TIME`,
      create_user.ID CREATE_USER_ID, create_user.`USERNAME` CREATE_USER_NAME,
      update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME
    FROM SYSTEM_ROLE role
    LEFT JOIN `SYSTEM_USER` create_user ON create_user.ID = role.CREATE_USER
    LEFT JOIN `SYSTEM_USER` update_user ON update_user.ID = role.UPDATE_USER
    FROM system_role role
    LEFT JOIN `system_user` create_user ON create_user.ID = role.CREATE_USER
    LEFT JOIN `system_user` update_user ON update_user.ID = role.UPDATE_USER
    <where>
      role.DELETED = 0
      <if test="dto.code != null and dto.code != ''">
@@ -38,8 +38,8 @@
  <select id="selectByUserId" parameterType="java.lang.Integer" resultType="com.doumee.dao.system.model.SystemRole">
    SELECT
    role.ID, role.`CODE`, role.`NAME`, role.`REMARK`, role.`CREATE_TIME`, role.`UPDATE_TIME`
    FROM SYSTEM_ROLE role
    INNER JOIN SYSTEM_USER_ROLE user_role ON user_role.ROLE_ID = role.ID AND user_role.DELETED = 0
    FROM system_role role
    INNER JOIN system_user_role user_role ON user_role.ROLE_ID = role.ID AND user_role.DELETED = 0
    <where>
      role.DELETED = 0
      AND user_role.USER_ID = #{userId}