初始化

This commit is contained in:
曹鹏飞 2025-07-01 10:34:04 +08:00
parent 70e3cf2937
commit 06e956a054
4 changed files with 7 additions and 8 deletions

View File

@ -24,6 +24,7 @@ import jakarta.validation.constraints.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -33,6 +34,7 @@ import java.util.stream.Collectors;
/**
* Sa-Token-SSO Server端
*/
@Validated
@RestController
@RequestMapping("/sso")
public class SsoServerController {

View File

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nflg.wms.common.pojo.qo.RoleSearchQO;
import com.nflg.wms.common.pojo.vo.ButtonVO;
import com.nflg.wms.common.pojo.vo.MenuVO;
import com.nflg.wms.common.pojo.vo.RoleVO;
import com.nflg.wms.repository.entity.Role;
@ -24,6 +23,4 @@ public interface RoleMapper extends BaseMapper<Role> {
IPage<RoleVO> search(RoleSearchQO request, Page<?> objectPage);
List<MenuVO> getMenusByRoleCodes(Long serviceId, Long userId);
List<ButtonVO> getButtonsByMenuId(Long userId, Long menuId);
}

View File

@ -6,9 +6,9 @@
SELECT DISTINCT mb.name, mb.code
FROM role r
INNER JOIN role_button_map rbm ON r.id = rbm.role_id
INNER JOIN admin_menu_button mb ON rbm.button_id = mb.id
INNER JOIN menu_button mb ON rbm.button_id = mb.id
INNER JOIN user_role_map urm ON urm.role_id = r.id
WHERE mb.enable = 1
WHERE mb.enable = TRUE
AND mb.menu_id = #{menuId}
AND urm.user_id = #{userId}
</select>

View File

@ -16,10 +16,10 @@
SELECT DISTINCT m.id, m.name, m.url, m.component, m.parent_id AS "parentId", m.show
FROM role r
INNER JOIN role_menu_map rmm ON r.id = rmm.role_id
INNER JOIN admin_menu m ON rmm.menu_id = m.id
INNER JOIN menu m ON rmm.menu_id = m.id
INNER JOIN user_role_map urm ON urm.role_id = r.id
WHERE m.enable = 1
AND r.enable = 1
WHERE m.enable = TRUE
AND r.enable = TRUE
AND urm.user_id = #{userId}
AND m.service_desc_id = #{serviceId}
</select>