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

import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.matter.model.MatterExtEntity;
import com.mortals.xhx.module.matter.service.MatterExtService;
import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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

import static com.mortals.framework.ap.SysConstains.MESSAGE_INFO;
/**
*
* 事项扩展
*
* @author zxfei
* @date 2022-11-23
*/
@RestController
@RequestMapping("matter/ext")
@Slf4j
public class MatterExtController extends BaseCRUDJsonBodyMappingController<MatterExtService,MatterExtEntity,Long> {

    @Autowired
    private ParamService paramService;
    @Autowired
    private SiteService siteService;

    public MatterExtController(){
        super.setModuleDesc( "事项扩展");
    }

    @Override
    protected void init(Map<String, Object> model, Context context) {
        this.addDict(model, "source", paramService.getParamBySecondOrganize("MatterExt","source"));
        super.init(model, context);
    }

}