|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
5
|
5
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
6
|
6
|
import com.huiju.estateagents.base.BaseController;
|
7
|
7
|
import com.huiju.estateagents.base.ResponseBean;
|
|
8
|
+import com.huiju.estateagents.common.CommConstant;
|
8
|
9
|
import com.huiju.estateagents.entity.TaRole;
|
9
|
10
|
import com.huiju.estateagents.service.ITaRoleService;
|
10
|
11
|
import org.slf4j.Logger;
|
|
@@ -49,6 +50,7 @@ public class TaRoleController extends BaseController {
|
49
|
50
|
IPage<TaRole> pg = new Page<>(pageNum, pageSize);
|
50
|
51
|
QueryWrapper<TaRole> queryWrapper = new QueryWrapper<>();
|
51
|
52
|
queryWrapper.eq("org_id",orgId);
|
|
53
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
52
|
54
|
queryWrapper.orderByDesc("create_date");
|
53
|
55
|
|
54
|
56
|
IPage<TaRole> result = iTaRoleService.page(pg, queryWrapper);
|
|
@@ -141,7 +143,7 @@ public class TaRoleController extends BaseController {
|
141
|
143
|
}
|
142
|
144
|
|
143
|
145
|
/**
|
144
|
|
- * 修改角色状态--停用
|
|
146
|
+ * 修改角色状态--删除
|
145
|
147
|
* @param id
|
146
|
148
|
* @return
|
147
|
149
|
*/
|
|
@@ -150,8 +152,9 @@ public class TaRoleController extends BaseController {
|
150
|
152
|
ResponseBean responseBean = new ResponseBean();
|
151
|
153
|
TaRole taRole = new TaRole();
|
152
|
154
|
taRole = iTaRoleService.getById(id);
|
153
|
|
- taRole.setStatus(taRole.getStatus().equals(0)?1:0);
|
154
|
|
- iTaRoleService.updateById(taRole);
|
|
155
|
+ if (null != taRole){
|
|
156
|
+ iTaRoleService.removeById(id);
|
|
157
|
+ }
|
155
|
158
|
return responseBean;
|
156
|
159
|
}
|
157
|
160
|
|