Blame view

ServiceAdministerMappingServiceImpl.java 1.71 KB
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
package com.subsidy.service.impl;

import com.subsidy.mapper.AdministerMapper;
import com.subsidy.mapper.ServiceDictMapper;
import com.subsidy.model.AdministerDO;
import com.subsidy.model.AdministerLaborMappingDO;
import com.subsidy.model.ServiceAdministerMappingDO;
import com.subsidy.mapper.ServiceAdministerMappingMapper;
import com.subsidy.model.ServiceDictDO;
import com.subsidy.service.ServiceAdministerMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.vo.administer.AdministerServicesVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 应用账户-业务映射表 服务实现类
 * </p>
 *
 * @author Tuyp
 * @since 2024-07-30
 */
@Service
public class ServiceAdministerMappingServiceImpl extends ServiceImpl<ServiceAdministerMappingMapper, ServiceAdministerMappingDO> implements ServiceAdministerMappingService {

    @Autowired
    private AdministerMapper administerMapper;

    @Autowired
    private ServiceDictMapper serviceDictMapper;

    public List<ServiceDictDO> administerServices(AdministerLaborMappingDO administerLaborMappingDO) {
        List<ServiceDictDO> serviceDictDOS = administerMapper.administerServices(administerLaborMappingDO.getAdministerId());
        AdministerDO administerDO = administerMapper.selectById(administerLaborMappingDO.getAdministerId());
        if (administerDO.getRole()==6 || administerDO.getRole() ==7){
            //如果是伙伴账户的话,就把也返回
            ServiceDictDO serviceDictDO = serviceDictMapper.selectById(5);
            serviceDictDOS.add(serviceDictDO);
        }
        return serviceDictDOS;
    }

}