package com.mortals.xhx.module.matter.web;

import com.mortals.framework.model.Context;
import com.mortals.xhx.common.code.MatterSourceEnum;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mortals.framework.web.BaseCRUDJsonMappingController;
import com.mortals.xhx.module.matter.model.MatterQuestionEntity;
import com.mortals.xhx.module.matter.service.MatterQuestionService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;


/**
* <p>Title: 事项常见问题</p>
* <p>Description: MatterQuestionController  </p>
* <p>Copyright: Copyright &reg;  </p>
* <p>Company: </p>
* @author zxfei
* @version 1.0.0
*/
@RestController
@RequestMapping("matter/question")
public class MatterQuestionController extends BaseCRUDJsonMappingController<MatterQuestionService,MatterQuestionForm,MatterQuestionEntity,Long> {

    public MatterQuestionController(){
        super.setFormClass(MatterQuestionForm.class);
        super.setModuleDesc("事项常见问题");
    }

    @Override
    protected void init(HttpServletRequest request, HttpServletResponse response, MatterQuestionForm form, Map<String, Object> model, Context context) {
        super.init(request, response, form, model, context);
        this.addDict(model, "source", MatterSourceEnum.getEnumMap());
    }
}