package com.yonge.cooleshow.student.controller;


import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
import com.yonge.cooleshow.auth.api.entity.SysUser;
import com.yonge.cooleshow.biz.dal.entity.ImUserFriend;
import com.yonge.cooleshow.biz.dal.entity.ImUserStateSync;
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
import com.yonge.cooleshow.biz.dal.enums.MK;
import com.yonge.cooleshow.biz.dal.service.ImGroupService;
import com.yonge.cooleshow.biz.dal.service.ImUserFriendService;
import com.yonge.cooleshow.biz.dal.service.LiveRoomService;
import com.yonge.cooleshow.biz.dal.vo.im.ImUserFriendVO;
import com.yonge.cooleshow.biz.dal.wrapper.im.ImUserWrapper;
import com.yonge.cooleshow.common.controller.BaseController;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * 用户通讯录表(ImUserFriend)表控制层
 *
 * @author zx
 * @since 2022-03-22 10:45:59
 */
@Api(tags = "用户通讯录表")
@RestController
@Slf4j
@RequestMapping("/user")
public class UserController extends BaseController {

    @Autowired
    private LiveRoomService liveRoomService;



    /**
     * 同步融云用户状态变更
     *
     * @param userState
     */
    @PostMapping(value = "/statusImUser")
    public void statusImUser(@RequestBody List<ImUserStateSync> userState) {
        log.info("opsRoom >>>>> : {}", JSONObject.toJSONString(userState));
        liveRoomService.opsRoom(userState);
    }

}

