| | |
| | | import cn.iocoder.yudao.module.crm.api.customer.dto.CrmCustomerRespDTO; |
| | | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| | | import cn.iocoder.yudao.module.crm.dal.dataobject.permission.CrmPermissionDO; |
| | | import cn.iocoder.yudao.module.crm.dal.mysql.customer.CrmCustomerMapper; |
| | | import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; |
| | | import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService; |
| | | import cn.iocoder.yudao.module.crm.service.permission.CrmPermissionService; |
| | |
| | | /** |
| | | * CRM 客户 API 实现类 |
| | | * |
| | | * @author 芋道源码 |
| | | * @author 超级管理员 |
| | | */ |
| | | @Service |
| | | public class CrmCustomerApiImpl implements CrmCustomerApi { |
| | | |
| | | @Resource |
| | | private CrmCustomerService customerService; |
| | | @Resource |
| | | private CrmCustomerMapper customerMapper; |
| | | @Resource |
| | | private CrmPermissionService permissionService; |
| | | @Resource |
| | |
| | | } |
| | | |
| | | @Override |
| | | public CrmCustomerRespDTO getCustomerByName(String name) { |
| | | CrmCustomerDO customer = customerMapper.selectByCustomerName(name); |
| | | return BeanUtils.toBean(customer, CrmCustomerRespDTO.class); |
| | | } |
| | | |
| | | @Override |
| | | public List<Long> getPermittedCustomerIds() { |
| | | // 1. 超级管理员有所有权限 |
| | | if (CrmPermissionUtils.isCrmAdmin()) { |