package com.engine.htsc.meeting.cmd;

import com.api.browser.bean.SearchConditionGroup;
import com.api.browser.bean.SearchConditionItem;
import com.api.browser.bean.SearchConditionOption;
import com.api.browser.util.ConditionFactory;
import com.api.browser.util.ConditionType;
import com.engine.common.biz.AbstractCommonCommand;
import com.engine.common.entity.BizLogContext;
import com.engine.core.interceptor.CommandContext;
import weaver.hrm.User;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class GetMeetingFormCmd extends AbstractCommonCommand<Map<String, Object>> {

  public GetMeetingFormCmd(User user, Map<String, Object> params) {
    this.user = user;
    this.params = params;
  }

  @Override
  public BizLogContext getLogContext() {
    return null;
  }

  @Override
  public Map<String, Object> execute(CommandContext commandContext) {

    //定义返回数据
    Map<String, Object> apidatas = new HashMap<String, Object>();

    //角色判断参考代码
//        if(!HrmUserVarify.checkUserRight("LogView:View", user)){
//            apidatas.put("hasRight", false);
//            return apidatas;
//        }

    if (null == user) {
      apidatas.put("hasRight", false);
      return apidatas;
    }

    apidatas.put("hasRight", true);

    List<SearchConditionGroup> addGroups = new ArrayList<>();
    //前端构造
    apidatas.put("condition", addGroups);

    return apidatas;
  }

}
