提交 | 用户 | 时间
|
1ac2bc
|
1 |
/** |
懒 |
2 |
* Copyright 2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng) |
|
3 |
* <p> |
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* <p> |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* <p> |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
*/ |
|
16 |
package cn.stylefeng.guns.sys.modular.system.warpper; |
|
17 |
|
|
18 |
import cn.stylefeng.guns.sys.core.constant.factory.ConstantFactory; |
|
19 |
import cn.stylefeng.guns.sys.core.util.DecimalUtil; |
|
20 |
import cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper; |
|
21 |
import cn.stylefeng.roses.kernel.model.page.PageResult; |
|
22 |
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
23 |
|
|
24 |
import java.util.List; |
|
25 |
import java.util.Map; |
|
26 |
|
|
27 |
/** |
|
28 |
* 角色列表的包装类 |
|
29 |
* |
|
30 |
* @author fengshuonan |
|
31 |
* @date 2017年2月19日10:59:02 |
|
32 |
*/ |
|
33 |
public class RoleWrapper extends BaseControllerWrapper { |
|
34 |
|
|
35 |
public RoleWrapper(Map<String, Object> single) { |
|
36 |
super(single); |
|
37 |
} |
|
38 |
|
|
39 |
public RoleWrapper(List<Map<String, Object>> multi) { |
|
40 |
super(multi); |
|
41 |
} |
|
42 |
|
|
43 |
public RoleWrapper(Page<Map<String, Object>> page) { |
|
44 |
super(page); |
|
45 |
} |
|
46 |
|
|
47 |
public RoleWrapper(PageResult<Map<String, Object>> pageResult) { |
|
48 |
super(pageResult); |
|
49 |
} |
|
50 |
|
|
51 |
@Override |
|
52 |
protected void wrapTheMap(Map<String, Object> map) { |
|
53 |
map.put("pName", ConstantFactory.me().getSingleRoleName(DecimalUtil.getLong(map.get("pid")))); |
|
54 |
map.put("deptName", ConstantFactory.me().getDeptName(DecimalUtil.getLong(map.get("deptId")))); |
|
55 |
} |
|
56 |
|
|
57 |
} |