| | |
| | | |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.im.config.AddTeamMembersRequest; |
| | | import com.ruoyi.im.config.CreateTeamRequest; |
| | | import com.ruoyi.im.dto.CreateGroupDto; |
| | | import com.ruoyi.im.config.AssignmentRequest; |
| | | import com.ruoyi.im.service.NeteaseTeamService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/im/group") |
| | |
| | | return neteaseGroupService.createGroup(request); |
| | | } |
| | | |
| | | /** |
| | | * 更新群组 |
| | | */ |
| | | @PostMapping("/updateCreate") |
| | | public AjaxResult updateCreate(@Validated @RequestBody CreateTeamRequest request) { |
| | | return neteaseGroupService.updateCreate(request); |
| | | } |
| | | |
| | | /** |
| | | * 拉人进去 |
| | | */ |
| | | @PostMapping("/inviteTeamMembers") |
| | | public AjaxResult inviteTeamMembers(@Validated @RequestBody AddTeamMembersRequest request) { |
| | | return neteaseGroupService.inviteTeamMembers(request); |
| | | } |
| | | |
| | | /** |
| | | * 转让群主 |
| | | */ |
| | | @PostMapping("/assignment") |
| | | public AjaxResult assignment(@Validated @RequestBody AssignmentRequest request) { |
| | | return neteaseGroupService.assignment(request); |
| | | } |
| | | |
| | | /** |
| | | * 解散 |
| | | */ |
| | | @PostMapping("/dismiss") |
| | | public AjaxResult dismiss(@PathVariable("id") Long id) { |
| | | return neteaseGroupService.dismiss(id); |
| | | } |
| | | |
| | | } |