Bladeren bron

删除角色和岗位列表

liyuanyuan 10 maanden geleden
bovenliggende
commit
7a68a8b952

+ 1 - 1
hjzx-api/src/main/java/api/controller/common/CommonController.java

135
     @GetMapping("/post")
135
     @GetMapping("/post")
136
     public AjaxResult getPost() {
136
     public AjaxResult getPost() {
137
         LambdaQueryWrapper<Post> qw = new LambdaQueryWrapper<>();
137
         LambdaQueryWrapper<Post> qw = new LambdaQueryWrapper<>();
138
-        qw.eq(Post::getStatus, 0);
138
+        qw.eq(Post::getStatus, 1);
139
         qw.orderByAsc(Post::getPostSort);
139
         qw.orderByAsc(Post::getPostSort);
140
         qw.select(Post::getPostId,Post::getPostCode,Post::getPostName);
140
         qw.select(Post::getPostId,Post::getPostCode,Post::getPostName);
141
 
141
 

+ 5 - 2
hjzx-api/src/main/java/api/controller/system/RoleController.java

158
     @ApiOperation("删除")
158
     @ApiOperation("删除")
159
     @Log(title = "删除角色", businessType = BusinessType.DELETE)
159
     @Log(title = "删除角色", businessType = BusinessType.DELETE)
160
     @DeleteMapping("/{ids}")
160
     @DeleteMapping("/{ids}")
161
-    public AjaxResult delete(@PathVariable Long[] ids) {
162
-        Boolean s = roleService.deleteRoleByIds(ids);
161
+    public AjaxResult delete(@PathVariable long ids) {
162
+
163
+
164
+        Long[] idsArray = new Long[]{ids};
165
+        Boolean s = roleService.deleteRoleByIds(idsArray);
163
         if (s) {
166
         if (s) {
164
             return Success("成功");
167
             return Success("成功");
165
         } else {
168
         } else {

+ 1 - 1
hjzx-api/src/main/resources/application-dev.yml

6
   datasource:
6
   datasource:
7
     type: com.alibaba.druid.pool.DruidDataSource
7
     type: com.alibaba.druid.pool.DruidDataSource
8
     driver-class-name: com.mysql.cj.jdbc.Driver
8
     driver-class-name: com.mysql.cj.jdbc.Driver
9
-    url: jdbc:mysql://192.168.1.200:3306/hjzx?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
9
+    url: jdbc:mysql://192.168.1.200:3306/hjzx_xinxiang?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
10
     username: root
10
     username: root
11
     password: 800100
11
     password: 800100
12
 
12