| | |
| | | import com.ruoyi.rongcloud.service.RongCloudService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: |
| | |
| | | @RestController |
| | | @Api(tags = "融云接口") |
| | | @Anonymous |
| | | @RequestMapping("/rongCloud") |
| | | public class RongCloudController { |
| | | @Resource |
| | | RongCloudService rongCloudService; |
| | | |
| | | @GetMapping("getToken") |
| | | @GetMapping("/getToken") |
| | | @ApiOperation("获取token") |
| | | public AjaxResult getToken(String userId,String name) |
| | | { |
| | | String token = rongCloudService.getToken(userId, name); |
| | | return AjaxResult.success(token); |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/checkOnline") |
| | | @ApiOperation("查询用户在线状态") |
| | | public AjaxResult checkOnline(@RequestBody List<String> userIds) |
| | | { |
| | | Map map = rongCloudService.checkOnline(userIds); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | } |