maven
2 天以前 23e4d027e282bf5d16e4da35349d4567b2f63f4e
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
package com.ruoyi.aftersalesservice.service.impl;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.aftersalesservice.mapper.AfterSalesServiceMapper;
import com.ruoyi.aftersalesservice.pojo.AfterSalesService;
import com.ruoyi.aftersalesservice.service.AfterSalesServiceService;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.project.system.domain.SysDept;
import com.ruoyi.project.system.mapper.SysDeptMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
/**
 * @author :yys
 * @date : 2025/7/30 9:26
 */
@Service
@Slf4j
public class AfterSalesServiceServiceImpl extends ServiceImpl<AfterSalesServiceMapper, AfterSalesService> implements AfterSalesServiceService {
 
    @Autowired
    private AfterSalesServiceMapper afterSalesServiceMapper;
 
    @Autowired
    private SysDeptMapper sysDeptMapper;
 
    @Override
    public IPage<AfterSalesService> listPage(Page page, AfterSalesService afterSalesService) {
        Long tenantId = SecurityUtils.getLoginUser().getTenantId();
        SysDept sysDept = sysDeptMapper.selectDeptById(tenantId);
        IPage<AfterSalesService> afterSalesServiceIPage = afterSalesServiceMapper.listPage(page, afterSalesService);
        afterSalesServiceIPage.getRecords().forEach(item -> {
            item.setDeptName(sysDept.getDeptName());
        });
        return afterSalesServiceIPage;
    }
}