package com.mortals.xhx.module.job.web;
import com.mortals.framework.exception.AppException;
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.job.model.JobEntity;
import com.mortals.xhx.module.job.service.JobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;
/**
*
* 职位信息
*
* @author zxfei
* @date 2023-04-07
*/
@RestController
@RequestMapping("job")
public class JobController extends BaseCRUDJsonBodyMappingController<JobService,JobEntity,Long> {

    @Autowired
    private ParamService paramService;

    public JobController(){
        super.setModuleDesc( "职位信息");
    }

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


    @Override
    public void doImportDataBefore(List<JobEntity> list, boolean updateSupport, Context context) throws AppException {


        super.doImportDataBefore(list, updateSupport, context);
    }
}