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

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.platform.model.PlatformEntity;
import com.mortals.xhx.module.platform.service.PlatformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
/**
*
* 平台系统
*
* @author zxfei
* @date 2022-06-27
*/
@RestController
@RequestMapping("platform")
public class PlatformController extends BaseCRUDJsonBodyMappingController<PlatformService,PlatformEntity,Long> {

    @Autowired
    private ParamService paramService;

    public PlatformController(){
        super.setModuleDesc( "平台系统");
    }

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


}