Commit 4be15f54be05ff1cd7cac948ecad51cd6f432bf7
1 parent
cc70f9faf6
Exists in
master
获取所有资源
Showing 2 changed files with 36 additions and 0 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
View file @
4be15f5
... | ... | @@ -3,8 +3,10 @@ |
3 | 3 | import com.alibaba.fastjson.JSONObject; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | 5 | import com.lyms.talkonlineweb.domain.LymsChatgroup; |
6 | +import com.lyms.talkonlineweb.domain.LymsMessage; | |
6 | 7 | import com.lyms.talkonlineweb.result.BaseResponse; |
7 | 8 | import com.lyms.talkonlineweb.service.LymsChatgroupService; |
9 | +import com.lyms.talkonlineweb.service.LymsMessageService; | |
8 | 10 | import com.lyms.talkonlineweb.util.HXService; |
9 | 11 | import lombok.extern.log4j.Log4j2; |
10 | 12 | import org.springframework.beans.BeanUtils; |
... | ... | @@ -23,6 +25,9 @@ |
23 | 25 | private LymsChatgroupService lymsChatgroupService; |
24 | 26 | |
25 | 27 | @Autowired |
28 | + private LymsMessageService lymsMessageService; | |
29 | + | |
30 | + @Autowired | |
26 | 31 | private HXService hxService; |
27 | 32 | /** |
28 | 33 | * 添加或删除聊天组 |
... | ... | @@ -49,6 +54,19 @@ |
49 | 54 | lymsChatgroupService.saveOrUpdate(group); |
50 | 55 | } |
51 | 56 | baseResponse.setObject(group); |
57 | + return baseResponse; | |
58 | + } | |
59 | + | |
60 | + /** | |
61 | + * 保存消息记录 | |
62 | + * @param message | |
63 | + * @return | |
64 | + */ | |
65 | + @PostMapping("saveMsg") | |
66 | + public BaseResponse saveMsg(LymsMessage message){ | |
67 | + BaseResponse baseResponse=new BaseResponse(); | |
68 | + boolean f=lymsMessageService.saveOrUpdate(message); | |
69 | + baseResponse.setErrorcode(f==true?0:1); | |
52 | 70 | return baseResponse; |
53 | 71 | } |
54 | 72 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PermissController.java
View file @
4be15f5
... | ... | @@ -8,9 +8,12 @@ |
8 | 8 | import com.lyms.talkonlineweb.service.LymsPermissionService; |
9 | 9 | import lombok.extern.log4j.Log4j2; |
10 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
11 | +import org.springframework.web.bind.annotation.GetMapping; | |
11 | 12 | import org.springframework.web.bind.annotation.PostMapping; |
12 | 13 | import org.springframework.web.bind.annotation.RestController; |
13 | 14 | |
15 | +import java.util.List; | |
16 | + | |
14 | 17 | /** |
15 | 18 | * 权限管理 |
16 | 19 | */ |
... | ... | @@ -60,6 +63,21 @@ |
60 | 63 | Page<LymsPermission> page=new Page<>(current,size); |
61 | 64 | |
62 | 65 | Page<LymsPermission> perIPage=lymsPermissionService.page(page,Wrappers.query(perm).orderByDesc("updated_time","createdtime")); |
66 | + baseResponse.setObject(perIPage); | |
67 | + | |
68 | + return baseResponse; | |
69 | + } | |
70 | + | |
71 | + /** | |
72 | + * 获取所有权限列表 | |
73 | + * @param perm | |
74 | + * @return | |
75 | + */ | |
76 | + @GetMapping("getAllPerm") | |
77 | + public BaseResponse getAllPerm(LymsPermission perm){ | |
78 | + BaseResponse baseResponse=new BaseResponse(); | |
79 | + | |
80 | + List<LymsPermission> perIPage=lymsPermissionService.list(Wrappers.query(perm).orderByDesc("updated_time","createdtime")); | |
63 | 81 | baseResponse.setObject(perIPage); |
64 | 82 | |
65 | 83 | return baseResponse; |