package com.bonus.hn.bearing.capacity.backstage.corporateOrg.service;



import com.bonus.hn.bearing.capacity.backstage.corporateOrg.dao.CorporateDao;
import com.bonus.hn.bearing.capacity.backstage.corporateOrg.entity.CorporateBean;
import com.bonus.hn.bearing.capacity.backstage.manager.dao.UtilDao;
import com.bonus.hn.bearing.capacity.backstage.manager.entity.MapBean;
import com.bonus.hn.bearing.capacity.backstage.manager.utils.UserUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * APP登录记录表(AppLoginAudit)表服务实现类
 *
 * @author makejava
 * @since 2022-12-12 13:57:46
 */
@Service("CorporateService")
public class CorporateServiceImpl implements CorporateService {
    @Resource
    private CorporateDao dao;
    @Resource
    private UtilDao utilDao;

    @Override
    public List<CorporateBean> getList(CorporateBean o) {
        return dao.getMsgList(o);
    }

    @Override
    public int addInfo(CorporateBean bean) {
        return dao.addInfo(bean);
    }

    @Override
    public CorporateBean getListById(String id) {
        return dao.getListById(id);
    }

    @Override
    public int updateSwitchListen(CorporateBean bean) {
        return dao.updateSwitchListen(bean);
    }

    @Override
    public int updateInfo(CorporateBean bean) {
        return dao.updateInfo(bean);
    }

    @Override
    public List<MapBean> getRole() {
        return dao.getRole();
    }

    @Override
    public List<CorporateBean> getFirmList(CorporateBean o) {
        return dao.getFirmList(o);
    }

    @Override
    public int addFirmInfo(CorporateBean bean) {
        return dao.addFirmInfo(bean);
    }

    @Override
    public CorporateBean getListFirm(String id) {
        return dao.getListFirm(id);
    }

    @Override
    public int updateFirm(CorporateBean bean) {
        return dao.updateFirm(bean);
    }

    @Override
    public List<CorporateBean> getProjectList(CorporateBean o) {
        o.setLevel(UserUtil.getLoginUser().getLevel());
        o.setOrgIds(UserUtil.getLoginUser().getOrgId());
        return dao.getProjectList(o);
    }

    @Override
    public int updateswitchProject(CorporateBean bean) {
        return dao.updateswitchProject(bean);
    }

    @Override
    public int addProjectInfo(CorporateBean bean) {
        return dao.addProjectInfo(bean);
    }

    @Override
    public CorporateBean getListProject(String id) {
        return dao.getListProject(id);
    }

    @Override
    public int updateProject(CorporateBean bean) {
        return dao.updateProject(bean);
    }

    @Override
    public int delFirmById(String id) {
        return dao.delFirmById(id);
    }


}
