package com.zzyl.controller;
import cn.hutool.core.bean.BeanUtil;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.LoginDto;
import com.zzyl.mapper.UserMapper;
import com.zzyl.utils.JwtUtil;
import com.zzyl.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
* @author sjqn
* 后台登录临时接口,后期会进行改造
*/
@RestController
public class LoginController {
@Autowired
private UserMapper userMapper;
@PostMapping("/security/login")
public ResponseResult login(@RequestBody LoginDto loginDto){
UserVo userVo = new UserVo();
Map<String,Object> map = new HashMap<>();
map.put("username",loginDto.getUsername());
userVo.setUserToken(JwtUtil.createJWT("itheima",600000,map));
return ResponseResult.success(userVo);
// UserVo userVo = userMapper.selectByName(loginDto.getUsername());
// Map<String,Object> map = new HashMap<>();
// map.put("username",loginDto.getUsername());
// userVo.setUserToken(JwtUtil.createJWT("itheima",600000,map));
// return ResponseResult.success(userVo);
}
@GetMapping("/resource/menus")
public String menus(){
return menu;
}
static String menu = "{\n" +
" \"code\": 200,\n" +
" \"msg\": \"操作成功\",\n" +
" \"data\": [\n" +
" {\n" +
" \"name\": \"工作台\",\n" +
" \"path\": \"dashboard\",\n" +
" \"component\": null,\n" +
" \"redirect\": \"/工作台\",\n" +
" \"hidden\": null,\n" +
" \"children\": [\n" +
" {\n" +
" \"name\": \"工作台\",\n" +
" \"path\": \"/dashboard/base\",\n" +
" \"component\": null,\n" +
" \"redirect\": \"/工作台/工作台\",\n" +
" \"hidden\": null,\n" +
" \"children\": [\n" +
" {\n" +
" \"name\": \"工作台\",\n" +
" \"path\": \"/dashboard/base\",\n" +
" \"component\": null,\n" +
" \"redirect\": \"/工作台/工作台\",\n" +
" \"hidden\": null,\n" +
" \"children\": null,\n" +
" \"meta\": {\n" +
" \"title\": \"工作台\",\n" +
" \"icon\": \"hlrw\",\n" +
" \"roles\": null\n" +
" }\n" +
" }\n" +
" ],\n" +
" \"meta\": {\n" +
" \"title\": \"工作台\",\n" +
" \"icon\": \"hlrw\",\n" +
" \"roles\": null\n" +
" }\n" +
" }\n" +
" ],\n" +
" \"meta\": {\n" +
" \"title\": \"工作台\",\n" +
" \"icon\": \"hlrw\",\n" +
" \"roles\": null\n" +
" }\n" +
" },\n" +
" {\n" +
" \"name\": \"来访管理\",\n" +
" \"path\": \"appointment\",\n" +
" \"component\": null,\n" +
" \"redirect\": \"/来访管理\",\n" +
" \"hidden\": null,\n" +
" \"children\": [\n" +
" {\n" +
" \"name\": \"预约来访\",\n" +
" \"path\": \"appointment\",\n" +
" \"component\": null,\n" +
" \"redirect\": \"/来访管理/预约来访\",\n" +
" \"hidden\": null,\n" +
" \"children\": [\n" +
" {\n" +
" \"name\": \"预约登记\",\n" +
" \"path\": \"/appointment/subscribe\",\n" +
" \"component\": null,\n" +
" \"redirect\": \"/预约来访/预约登记\",\n" +
" \"hidden\": null,\n" +
" \"children\": null,\n" +
" \"meta\": {\n" +
" \"title\": \"预约登记\",\n" +
" \"icon\": \"icon\",\n" +
" \"roles\": null\n" +
" }\n" +
" },\n" +
" {\n" +
" \"name\": \"来访登记\",\n" +
" \"path\": \"/appointment/comeVisit\",\n" +
" \"component\": null,\n" +
" \"redirect\": \"/预约来访/来访登记\",\n" +
" \"hidden\": null,\n" +
" \"children\": null,\n" +
" \"meta\": {\n" +
" \"title\": \"来访登记\",\n" +
" \"icon\": \"icon\",\n" +
" \"roles\": null\n" +
" }\n" +
" }\n" +
" ],\n" +
" \"meta\": {\n" +
" \"title\": \"预约来访\",\n" +
" \"icon\": \"cwgl-sei\",\n" +
" \"roles\": null\n" +
" }\n" +
" }\n" +
" ],\n" +
" \"meta\": {\n" +
" \"title\": \"来访管理\",\n" +
" \"icon\": \"icon\",\n" +
" \"roles\": null\n" +
" }\n" +
" },\n" +
" {\n" +
" \"name\": \"入退管理\",\n" +
" \"path\": \"enterQuit\",\n" +
" \"component\": null,\n" +
" \"redirect\": \"/入退管理\",\n" +
" \"hidden\": null,\n" +
" \"children\": [\n" +
" {\n" +
" \"name\": \"入住管理\",\n" +
" \"path\": \"/enterQuit/enterManage\",\n" +
" \"component\": null,\n" +
" \"redirect\": \"/入退管理/入住管理\",\n" +
" \"hidden\": null,\n" +
" \"children\": [\n" +
" {\n" +
" \"name\": \"入住办理\",\n" +
"
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
该项目为Java语言编写的CP-ZZYL游戏设计源码,包含220个文件,主要由189个Java源文件构成,辅以26个XML配置文件、3个JSON数据文件、1个Git忽略规则文件和1个YAML配置文件,适用于游戏开发爱好者及专业人士学习和参考使用。
资源推荐
资源详情
资源评论
收起资源包目录
基于Java的CP-ZZYL游戏设计源码分享 (222个子文件)
.gitignore 162B
LoginController.java 46KB
UUID.java 15KB
ResourceServiceImpl.java 12KB
UserServiceImpl.java 11KB
StringUtils.java 10KB
DeptServiceImpl.java 9KB
PageResponse.java 8KB
ReservationServiceImpl.java 8KB
PostServiceImpl.java 7KB
UserController.java 6KB
RoleServiceImpl.java 5KB
SwaggerConfig.java 5KB
BasicEnum.java 5KB
RoomTypeServiceImpl.java 5KB
AutoFillInterceptor.java 5KB
CustomerReservationController.java 5KB
PostController.java 5KB
VisitController.java 4KB
VisitServiceImpl.java 4KB
SnowflakeIdWorker.java 4KB
RoomServiceImpl.java 4KB
ElderServiceImpl.java 4KB
NursingLevelController.java 4KB
WebMvcConfig.java 4KB
ResourceController.java 4KB
NursingPlanServiceImpl.java 4KB
RoleController.java 4KB
ContractController.java 4KB
ResponseResult.java 4KB
MemberServiceImpl.java 4KB
DeptController.java 3KB
NursingPlanController.java 3KB
WechatServiceImpl.java 3KB
RoomTypeController.java 3KB
HttpUtilTest.java 3KB
OSSAliyunFileStorageService.java 3KB
CostomerContractController.java 3KB
NursingProjectServiceImpl.java 3KB
ContractServiceImpl.java 3KB
ContractVo.java 3KB
ContractDto.java 3KB
NursingLevelServiceImpl.java 3KB
Constants.java 3KB
FloorController.java 2KB
EmptyUtil.java 2KB
UserDto.java 2KB
JwtUtil.java 2KB
RoomController.java 2KB
ResourceVo.java 2KB
NursingProjectPlanServiceImpl.java 2KB
NursingProjectController.java 2KB
ReservationService.java 2KB
ContractMapper.java 2KB
NoProcessing.java 2KB
UserInterceptor.java 2KB
User.java 2KB
BaseVo.java 2KB
ResourceDto.java 2KB
CommonController.java 2KB
BedServiceImpl.java 2KB
OssAliyunAutoConfig.java 2KB
UserVo.java 2KB
NursingLevelMapper.java 2KB
UserThreadLocal.java 2KB
FloorServiceImpl.java 2KB
NursingProjectPlanMapper.java 2KB
BedController.java 2KB
RoleVo.java 2KB
Contract.java 2KB
DeptMapper.java 2KB
ElderMapper.java 2KB
ReservationMapper.java 2KB
RoleDto.java 2KB
BaseEntity.java 2KB
NursingLevelService.java 2KB
ElderService.java 2KB
NursingPlanMapper.java 2KB
NursingProjectPlanService.java 2KB
UserAddVo.java 2KB
HttpStatus.java 2KB
RegisterBeanHandler.java 2KB
GlobalExceptionHandler.java 2KB
BaseController.java 2KB
ContractService.java 2KB
DeptVo.java 1KB
ResourceMapper.java 1KB
DeptDto.java 1KB
BedVo.java 1KB
RoomTypeService.java 1KB
DeptService.java 1KB
VisitService.java 1KB
RoomService.java 1KB
RoomTypeMapper.java 1KB
MenuVo.java 1KB
PostVo.java 1KB
PostService.java 1KB
PostDto.java 1KB
RoomTypeDto.java 1KB
ElderVo.java 1KB
共 222 条
- 1
- 2
- 3
资源评论
wjs2024
- 粉丝: 2283
- 资源: 5463
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功