/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.iim.web;

import com.jeeplus.common.web.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 环信群组Controller
 * @author fgy
 * @version 2018-03-08
 */
@Controller
@RequestMapping(value = "${adminPath}/iim/easemobGroup")
public class EasemobGroupController extends BaseController {

	/*@Autowired
	private EasemobInfoService easemobInfoService;
	@Autowired
	private UserDao userDao;

    @RequiresPermissions("user")
	@ResponseBody
	@RequestMapping(value = "treeData")
	public List<Map<String, Object>> treeData(@RequestParam(required=false) String extId, HttpServletResponse response) {
		List<Map<String, Object>> mapList = Lists.newArrayList();
		List<EasemobInfo> list = new ArrayList<EasemobInfo>();
		//当前用户加入过的环信群组
		EasemobInfo easemobInfo = new EasemobInfo();
		easemobInfo.setUserId(UserUtils.getUser().getId());//当前登录用户所加入的环信群组
		easemobInfo.setDelFlag("0");
		List<EasemobInfo> easemobGroups = easemobInfoService.findByUser(easemobInfo);
		list.addAll(easemobGroups);
	    for (int i=0; i<list.size(); i++){
			EasemobInfo easemob = list.get(i);
			if (StringUtils.isBlank(extId) || (extId!=null && !extId.equals(easemob.getId()))){
				Map<String, Object> map = Maps.newHashMap();
				map.put("id", easemob.getGroupId());
				map.put("name", easemob.getGroupName());
				mapList.add(map);
			}
	   }
	   return mapList;
	}*/

	

}