Commit 8a5dc30e6baf040aec2fc95fd82529f66db6a088
1 parent
58fb36f1a9
Exists in
master
用户角色表
Showing 1 changed file with 21 additions and 0 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java
View file @
8a5dc30
... | ... | @@ -8,10 +8,12 @@ |
8 | 8 | import com.lyms.talkonlineweb.annotation.TokenRequired; |
9 | 9 | import com.lyms.talkonlineweb.domain.LymsPermission; |
10 | 10 | import com.lyms.talkonlineweb.domain.LymsUser; |
11 | +import com.lyms.talkonlineweb.domain.UserroleInfo; | |
11 | 12 | import com.lyms.talkonlineweb.mapper.LymsUserMapper; |
12 | 13 | import com.lyms.talkonlineweb.result.BaseResponse; |
13 | 14 | import com.lyms.talkonlineweb.result.CheckResult; |
14 | 15 | import com.lyms.talkonlineweb.service.LymsUserService; |
16 | +import com.lyms.talkonlineweb.service.UserroleInfoService; | |
15 | 17 | import com.lyms.talkonlineweb.util.Constant; |
16 | 18 | import com.lyms.talkonlineweb.util.HXService; |
17 | 19 | import com.lyms.talkonlineweb.util.JwtUtils; |
... | ... | @@ -43,6 +45,9 @@ |
43 | 45 | @Autowired |
44 | 46 | private HXService hxService; |
45 | 47 | |
48 | + @Autowired | |
49 | + private UserroleInfoService userroleInfoService;//视图 | |
50 | + | |
46 | 51 | @Value("${hx.APPKEY}") |
47 | 52 | private String appKey; |
48 | 53 | @Value("${hx.ClientID}") |
... | ... | @@ -202,6 +207,22 @@ |
202 | 207 | cnt=lymsUserService.addUserAndRole(uid,Integer.parseInt(ridArr[i])); |
203 | 208 | } |
204 | 209 | |
210 | + return baseResponse; | |
211 | + } | |
212 | + | |
213 | + /** | |
214 | + * 获取用户和角色列表 | |
215 | + * @param user | |
216 | + * @param current | |
217 | + * @param size | |
218 | + * @return | |
219 | + */ | |
220 | + @GetMapping("getUserRoleLst") | |
221 | + public BaseResponse getUserRoleLst(UserroleInfo user, int current, int size){ | |
222 | + BaseResponse baseResponse=new BaseResponse(); | |
223 | + Page<UserroleInfo> page=new Page<>(current,size); | |
224 | + Page<UserroleInfo> userIPage=userroleInfoService.page(page,Wrappers.query(user).orderByDesc("updated_time","createdtime")); | |
225 | + baseResponse.setObject(userIPage); | |
205 | 226 | return baseResponse; |
206 | 227 | } |
207 | 228 |