From 68043dbd96ff66f3bb946af7add55cca2ac35f7c Mon Sep 17 00:00:00 2001 From: xuan <255124139@qq.com> Date: Mon, 27 Sep 2021 10:22:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?cxs,2021,9,27=201,=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E6=A2=93=E5=BA=B7=E7=9A=84=E6=8B=A6=E6=88=AA=E6=96=B9=E6=A1=88?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E6=96=B0=E9=85=8D=E4=BA=86=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=202=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/meetingroom/controller/DepartController.java | 4 ++-- .../meetingroom/controller/EmployeeInfoController.java | 5 ++++- .../controller/EmployeeRegisterController.java | 9 ++++----- .../example/meetingroom/controller/RoleController.java | 5 ++--- .../meetingroom/controller/RoomInfoController.java | 7 +------ .../com/example/meetingroom/dao/EmployeeRegisterDao.java | 5 +++++ src/main/java/com/example/meetingroom/dao/RoleDao.java | 2 +- src/main/resources/application.yaml | 6 +++--- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/example/meetingroom/controller/DepartController.java b/src/main/java/com/example/meetingroom/controller/DepartController.java index 1cb3441..5642066 100644 --- a/src/main/java/com/example/meetingroom/controller/DepartController.java +++ b/src/main/java/com/example/meetingroom/controller/DepartController.java @@ -98,11 +98,11 @@ public class DepartController { //判断成功与否 if(departList == null){ - return ResultVo.error(500,"向展示部门信息失败",map); + return ResultVo.error(500,"向管理员展示部门信息失败",map); } map.put("departData", departList); System.out.println(departList); - return ResultVo.ok(200,"向展示部门信息成功",map); + return ResultVo.ok(200,"向管理员展示部门信息成功",map); } diff --git a/src/main/java/com/example/meetingroom/controller/EmployeeInfoController.java b/src/main/java/com/example/meetingroom/controller/EmployeeInfoController.java index 06a8f01..29c5717 100644 --- a/src/main/java/com/example/meetingroom/controller/EmployeeInfoController.java +++ b/src/main/java/com/example/meetingroom/controller/EmployeeInfoController.java @@ -14,7 +14,10 @@ import org.apache.shiro.subject.Subject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.naming.Name; import javax.servlet.http.HttpServletRequest; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; @@ -27,7 +30,7 @@ import java.util.Map; */ @RestController @CrossOrigin() -@RequestMapping("/api") +@RequestMapping("/oper") public class EmployeeInfoController { @Autowired diff --git a/src/main/java/com/example/meetingroom/controller/EmployeeRegisterController.java b/src/main/java/com/example/meetingroom/controller/EmployeeRegisterController.java index 8cc477a..3f78350 100644 --- a/src/main/java/com/example/meetingroom/controller/EmployeeRegisterController.java +++ b/src/main/java/com/example/meetingroom/controller/EmployeeRegisterController.java @@ -24,15 +24,15 @@ import java.util.Map; */ @RestController @CrossOrigin -@RequestMapping("/api") +@RequestMapping("/oper") public class EmployeeRegisterController { @Autowired private EmployeeRegisterService employeeRegisterService; - @Autowired - private EmployeeInfoService employeeInfoService; +// @Autowired +// private EmployeeInfoService employeeInfoService; @Autowired private RoleService roleService; @@ -74,8 +74,7 @@ public class EmployeeRegisterController { } -// @RequestMapping(value = "/deleteEmployeeRegister",method = RequestMethod.DELETE) - @DeleteMapping("/employeeRegister/{id}") + @DeleteMapping("/super/employeeRegister/{id}") public ResultVo deleteEmployeeRegister(@PathVariable("id")String id){ judge = employeeRegisterService.deleteEmployeeRegister(id); diff --git a/src/main/java/com/example/meetingroom/controller/RoleController.java b/src/main/java/com/example/meetingroom/controller/RoleController.java index fc3bff8..5e22336 100644 --- a/src/main/java/com/example/meetingroom/controller/RoleController.java +++ b/src/main/java/com/example/meetingroom/controller/RoleController.java @@ -26,9 +26,9 @@ public class RoleController { /** * @return - * 查询所有权限,用于员工表权限修改 + * 查询所有权限,用于员工表权限展示 */ - @GetMapping("/api/role") + @GetMapping("/oper/role") public ResultVo seleteRoleList(){ List roleList = roleService.selectRoleList(); @@ -40,7 +40,6 @@ public class RoleController { return ResultVo.error(500,"展示权限信息失败",map); } map.put("权限信息", roleList); -// System.out.println(roleList); return ResultVo.ok(200,"展示权限信息成功",map); } } diff --git a/src/main/java/com/example/meetingroom/controller/RoomInfoController.java b/src/main/java/com/example/meetingroom/controller/RoomInfoController.java index c4e01b0..f9422c0 100644 --- a/src/main/java/com/example/meetingroom/controller/RoomInfoController.java +++ b/src/main/java/com/example/meetingroom/controller/RoomInfoController.java @@ -39,16 +39,13 @@ public class RoomInfoController { judge = roomInfoService.updateRoomInfo(roomInfo); Map map = new HashMap<>(); -// map.put("超管修改会议室信息", judge); - -// System.out.println(judge); //判断成功与否 if(judge != 1){ return ResultVo.error(500,"超管修改会议室失败",map); } -// System.out.println(ResultVo.ok(200, "超管修改会议室成功", map).toString()); + return ResultVo.ok(200,"超管修改会议室成功",map); @@ -65,7 +62,6 @@ public class RoomInfoController { judge = roomInfoService.deleteRoomInfo(id); Map map = new HashMap<>(); -// map.put("超管删除会议室信息", judge); //判断成功与否 if(judge != 1){ @@ -85,7 +81,6 @@ public class RoomInfoController { judge = roomInfoService.insertRoomInfo(roomInfo); Map map = new HashMap<>(); -// map.put("超管新增会议室信息", judge); //判断成功与否 if(judge != 1){ diff --git a/src/main/java/com/example/meetingroom/dao/EmployeeRegisterDao.java b/src/main/java/com/example/meetingroom/dao/EmployeeRegisterDao.java index 8d37a7f..3cea297 100644 --- a/src/main/java/com/example/meetingroom/dao/EmployeeRegisterDao.java +++ b/src/main/java/com/example/meetingroom/dao/EmployeeRegisterDao.java @@ -75,6 +75,11 @@ public interface EmployeeRegisterDao { */ String selectEmployeeInfoPasswode(String phont); + /** + * 插入新的注册用户 + * @param register + * @return + */ int insertRegister(EmployeeRegister register); } diff --git a/src/main/java/com/example/meetingroom/dao/RoleDao.java b/src/main/java/com/example/meetingroom/dao/RoleDao.java index a34fd31..fad873a 100644 --- a/src/main/java/com/example/meetingroom/dao/RoleDao.java +++ b/src/main/java/com/example/meetingroom/dao/RoleDao.java @@ -16,7 +16,7 @@ public interface RoleDao { /** * @return int 0或1 - * 查询所有权限,用于员工表权限修改 + * 查询所有权限,用于员工表权限展示 */ List selectRoleList(); diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index c049b08..9326d35 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -1,13 +1,13 @@ server: - port: 8081 + port: 8080 spring: #mysql数据源配置 datasource: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://chensiran.cn:3306/meeting_room?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai + url: jdbc:mysql://localhost:3305/meeting_room?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai username: root - password: root + password: mysql mybatis: mapper-locations: classpath*:mapper/*.xml -- Gitee From 9d839aa1efa0a166063afb055f3099d28943a077 Mon Sep 17 00:00:00 2001 From: 277 <2286974448@qq.com> Date: Mon, 27 Sep 2021 02:28:30 +0000 Subject: [PATCH 2/2] update src/main/resources/application.yaml. --- src/main/resources/application.yaml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 9326d35..19cbf32 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -1,13 +1,13 @@ server: - port: 8080 + port: 8081 spring: #mysql数据源配置 datasource: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3305/meeting_room?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai + url: jdbc:mysql://chensiran.cn:3306/meeting_room?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai username: root - password: mysql + password: root mybatis: mapper-locations: classpath*:mapper/*.xml @@ -30,12 +30,4 @@ sendMessage: sdkAppId: "1400503015" templateCodePass: "1113098" templateCodeNotPass: "1113009" - signName: "江岸摆渡" - -#阿里云对象存储 -sendOss: - ENDPOINT: "oss-cn-shenzhen.aliyuncs.com" # 外网访问地址 - ACCESSKEYID: "LTAI4G92xKXsNh8UtbFyNCZw" - ACCESSKEYSECERT: "6UrL5dApnI76kqvuTFRWLUxBNN0nwQ" - BUCKETNAME: "chensiran" # 仓库名称 - SUFFER_URL: "http://chensiran.oss-cn-shenzhen.aliyuncs.com/" # 上传成功后返回的URL \ No newline at end of file + signName: "江岸摆渡" \ No newline at end of file -- Gitee